[RELENG-43] Improve ar-notify script to find groupId without <name> field Created: 06/Mar/17  Updated: 11/Apr/17  Resolved: 11/Apr/17

Status: Resolved
Project: releng
Component/s: Autorelease
Affects Version/s: unspecified
Fix Version/s: None

Type: Improvement
Reporter: Thanh Ha (zxiiro) Assignee: Anil Belur
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Attachments: Text File mvn_evaluate.txt    

 Description   

In light of discussions in [0], Robert suggested exploring the possibility of improving the script to detect failure from parsing more of the logs. We can infer some additional information from the build by parsing the maven ERROR lines.

Maven prints the command line args to resume the build:

[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :config-manager

hence you can use:
mvn help:evaluate -Dexpression=project.groupId -rf :config-manager

to get:

[INFO] — maven-help-plugin:2.2:evaluate (default-cli) @ config-manager —
[INFO] No artifact parameter specified, using 'org.opendaylight.controller:config-manager:bundle:0.6.0-SNAPSHOT' as project.
[INFO]

org.opendaylight.controller



 Comments   
Comment by Thanh Ha (zxiiro) [ 06/Mar/17 ]

Forgot to link [0]

[0] https://git.opendaylight.org/gerrit/52719

Comment by Anil Belur [ 10/Mar/17 ]

With the recent failure on autorelease from [1.], we have features-config which under controller project:

./controller/features/config/features-config

As recommended, I tried `mvn evaluate` along with artifactid obtained from the console logs, from the autorelease root directory.

$ cd /w/workspace/autorelease-release-carbon
$ mvn help:evaluate -Dexpression=project.groupId -rf :features-config

However this does not seem to return the `org.opendaylight.controller` from the output file attached. What am I missing ?

[1.] https://jenkins.opendaylight.org/releng/job/autorelease-release-carbon/197/

Comment by Anil Belur [ 10/Mar/17 ]

Attachment mvn_evaluate.txt has been added with description: mvn_evaluate.txt

Comment by Thanh Ha (zxiiro) [ 10/Mar/17 ]

(In reply to Anil Belur from comment #2)
> As recommended, I tried `mvn evaluate` along with artifactid obtained from
> the console logs, from the autorelease root directory.

The command should be `mvn help:evaluate -Dexpression=project.groupId -rf :config-manager`. Evaluate is a goal inside of the Maven Help plugin:

https://maven.apache.org/plugins/maven-help-plugin/evaluate-mojo.html

Comment by Anil Belur [ 10/Mar/17 ]

Thanh, yes I have used the same command:

$ cd /w/workspace/autorelease-release-carbon
$ mvn help:evaluate -Dexpression=project.groupId -rf :features-config

Comment by Thanh Ha (zxiiro) [ 11/Mar/17 ]

(In reply to Anil Belur from comment #2)
> However this does not seem to return the `org.opendaylight.controller` from
> the output file attached. What am I missing ?
>
> [1.]
> https://jenkins.opendaylight.org/releng/job/autorelease-release-carbon/197/

This is a link to the releng server. Did you mean to paste a link to the sandbox logs?

Comment by Anil Belur [ 12/Mar/17 ]

(In reply to Thanh Ha from comment #5)
> This is a link to the releng server. Did you mean to paste a link to the
> sandbox logs?

The logs I wanted to share earlier on sandbox jobs have been purged over the weekend, here are the updated logs in [1.].

There errors seen in the attached log file in [2.], are these due to incorrect ~/.m2/settings.xml file while running `mvn help:evaluate ...` ? I have reused the same autorelease-settings to maven-target.

Downloaded: https://repo.maven.apache.org/maven2/biz/aQute/bnd/biz.aQute.bndlib/3.2.0/biz.aQute.bndlib-3.2.0.jar (2319 KB at 3079.4 KB/sec)
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Unresolveable build extension: Plugin org.apache.karaf.tooling:karaf-maven-plugin:4.0.8-odl or one of its dependencies could not be resolved: Could not find artifact org.apache.karaf.tooling:karaf-maven-plugin:jar:4.0.8-odl in central (https://repo.maven.apache.org/maven2) @

[1.] https://logs.opendaylight.org/sandbox/jenkins091/autorelease-release-carbon/2/
[2.] https://bugs.opendaylight.org/attachment.cgi?id=1626

Comment by Anil Belur [ 14/Mar/17 ]

Hello:

I tried your suggestion on improvements for the AR notify script, with `mvn help:evaluate -Dexpression="project.groupId" -rf :bundles-test | grep -v Download | grep -e '[[]'` on the autorelease root folder.

The command seems to works perfectly, but does not return the expected parent of the artifactid which is failing. Instead returns the `org.opendaylight.releng.autorelease` which may not be very useful for determining the $PROJECT mailing list.

We need run the `mvn help:evaluate ...` within the folder which contains the `pom.xml` for `<module>bundles-test</module>` or artifactid. One possible work around is to manually find the project directory manually with the pom.xml and run `mvn help:evaluate ...`. However, a caveat is not finding an artifactid with inside <module> tag for instance with features-tsdr, can again cause issue in [1.].

Regards,
Anil

[1. ] https://logs.opendaylight.org/sandbox/jenkins091/autorelease-release-carbon/9/console.log.gz

$ mvn clean verify
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] ODL :: odlparent :: checkstyle
[INFO] ODL :: odlparent :: findbugs
[INFO] ODL :: odlparent :: odl-license
[INFO] ODL :: odlparent :: bundles-test
[INFO] odlparent
[INFO] autorelease
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ODL :: odlparent :: checkstyle 0.3.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] — maven-clean-plugin:3.0.0:clean (default-clean) @ checkstyle —
[INFO] Deleting /home/abelur/.virtualenvs/autorelease/odlparent/checkstyle/target
[INFO]
[INFO] — maven-enforcer-plugin:1.4.1:enforce (enforce-maven) @ checkstyle —
[INFO]
[INFO] — git-commit-id-plugin:2.2.1:revision (get-git-infos) @ checkstyle —
[INFO]
[INFO] — maven-resources-plugin:3.0.1:resources (default-resources) @ checkstyle —
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO]
[INFO] — maven-compiler-plugin:3.6.1:compile (default-compile) @ checkstyle —
[INFO] No sources to compile
[INFO]
[INFO] — maven-resources-plugin:3.0.1:testResources (default-testResources) @ checkstyle —
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/abelur/.virtualenvs/autorelease/odlparent/checkstyle/src/test/resources
[INFO]
[INFO] — maven-compiler-plugin:3.6.1:testCompile (default-testCompile) @ checkstyle —
[INFO] No sources to compile
[INFO]
[INFO] — maven-surefire-plugin:2.19.1:test (default-test) @ checkstyle —
[INFO] No tests to run.
[INFO]
[INFO] — maven-jar-plugin:3.0.2:jar (default-jar) @ checkstyle —
[INFO] Building jar: /home/abelur/.virtualenvs/autorelease/odlparent/checkstyle/target/checkstyle-0.3.0-SNAPSHOT.jar
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ODL :: odlparent :: findbugs 1.8.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] — maven-clean-plugin:3.0.0:clean (default-clean) @ findbugs —
[INFO] Deleting /home/abelur/.virtualenvs/autorelease/odlparent/findbugs/target
[INFO]
[INFO] — maven-enforcer-plugin:1.4.1:enforce (enforce-maven) @ findbugs —
[INFO]
[INFO] — git-commit-id-plugin:2.2.1:revision (get-git-infos) @ findbugs —
[INFO]
[INFO] — maven-resources-plugin:3.0.1:resources (default-resources) @ findbugs —
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] — maven-compiler-plugin:3.6.1:compile (default-compile) @ findbugs —
[INFO] No sources to compile
[INFO]
[INFO] — maven-resources-plugin:3.0.1:testResources (default-testResources) @ findbugs —
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/abelur/.virtualenvs/autorelease/odlparent/findbugs/src/test/resources
[INFO]
[INFO] — maven-compiler-plugin:3.6.1:testCompile (default-testCompile) @ findbugs —
[INFO] No sources to compile
[INFO]
[INFO] — maven-surefire-plugin:2.19.1:test (default-test) @ findbugs —
[INFO] No tests to run.
[INFO]
[INFO] — maven-jar-plugin:3.0.2:jar (default-jar) @ findbugs —
[INFO] Building jar: /home/abelur/.virtualenvs/autorelease/odlparent/findbugs/target/findbugs-1.8.0-SNAPSHOT.jar
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ODL :: odlparent :: odl-license 0.2.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] — maven-clean-plugin:3.0.0:clean (default-clean) @ odl-license —
[INFO] Deleting /home/abelur/.virtualenvs/autorelease/odlparent/license/target
[INFO]
[INFO] — maven-enforcer-plugin:1.4.1:enforce (enforce-maven) @ odl-license —
[INFO]
[INFO] — git-commit-id-plugin:2.2.1:revision (get-git-infos) @ odl-license —
[INFO]
[INFO] — maven-resources-plugin:3.0.1:resources (default-resources) @ odl-license —
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] — maven-compiler-plugin:3.6.1:compile (default-compile) @ odl-license —
[INFO] No sources to compile
[INFO]
[INFO] — maven-resources-plugin:3.0.1:testResources (default-testResources) @ odl-license —
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/abelur/.virtualenvs/autorelease/odlparent/license/src/test/resources
[INFO]
[INFO] — maven-compiler-plugin:3.6.1:testCompile (default-testCompile) @ odl-license —
[INFO] No sources to compile
[INFO]
[INFO] — maven-surefire-plugin:2.19.1:test (default-test) @ odl-license —
[INFO] No tests to run.
[INFO]
[INFO] — maven-jar-plugin:3.0.2:jar (default-jar) @ odl-license —
[INFO] Building jar: /home/abelur/.virtualenvs/autorelease/odlparent/license/target/odl-license-0.2.0-SNAPSHOT.jar
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ODL :: odlparent :: bundles-test 1.8.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] — maven-clean-plugin:3.0.0:clean (default-clean) @ bundles-test —
[INFO] Deleting /home/abelur/.virtualenvs/autorelease/odlparent/bundles-test/target
[INFO]
[INFO] — maven-enforcer-plugin:1.4.1:enforce (enforce-maven) @ bundles-test —
[INFO]
[INFO] — maven-enforcer-plugin:1.4.1:enforce (enforce-banned-dependencies) @ bundles-test —
[INFO]
[INFO] — git-commit-id-plugin:2.2.1:revision (get-git-infos) @ bundles-test —
[INFO]
[INFO] — jacoco-maven-plugin:0.7.7.201606060606:prepare-agent (pre-unit-test) @ bundles-test —
[INFO] argLine set to -javaagent:/home/abelur/.m2/repository/org/jacoco/org.jacoco.agent/0.7.7.201606060606/org.jacoco.agent-0.7.7.201606060606-runtime.jar=destfile=/home/abelur/.virtualenvs/autorelease/odlparent/bundles-test/target/code-coverage/jacoco.exec,excludes=*/gen/:/generated-sources/:/generated-test-sources/:/yang-gen/:/yang-gen-config/:/yang-gen-sal/:/yang-gen-code/:/pax/*
[INFO]
[INFO] — maven-checkstyle-plugin:2.17:check (check-license) @ bundles-test —
[INFO] Starting audit...
Audit done.
[INFO]
[INFO] — maven-checkstyle-plugin:2.17:check (default) @ bundles-test —
[INFO] Starting audit...
Audit done.
[INFO]
[INFO] >>> maven-pmd-plugin:3.6:cpd-check (cpd) > :cpd @ bundles-test >>>
[INFO]
[INFO] — maven-pmd-plugin:3.6:cpd (cpd) @ bundles-test —
[INFO]
[INFO] <<< maven-pmd-plugin:3.6:cpd-check (cpd) < :cpd @ bundles-test <<<
[INFO]
[INFO] — maven-pmd-plugin:3.6:cpd-check (cpd) @ bundles-test —
[INFO]
[INFO]
[INFO] — maven-dependency-plugin:2.10:unpack (unpack-license) @ bundles-test —
[INFO] Configured Artifact: org.opendaylight.odlparent:odl-license:0.2.0-SNAPSHOT:jar
[INFO] Unpacking /home/abelur/.virtualenvs/autorelease/odlparent/license/target/odl-license-0.2.0-SNAPSHOT.jar to /home/abelur/.virtualenvs/autorelease/odlparent/bundles-test/target/classes with includes "" and excludes "META-INF/**"
[INFO]
[INFO] — maven-resources-plugin:3.0.1:resources (default-resources) @ bundles-test —
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/abelur/.virtualenvs/autorelease/odlparent/bundles-test/src/main/resources
[INFO]
[INFO] — maven-compiler-plugin:3.6.1:compile (default-compile) @ bundles-test —
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 6 source files to /home/abelur/.virtualenvs/autorelease/odlparent/bundles-test/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/abelur/.virtualenvs/autorelease/odlparent/bundles-test/src/main/java/org/opendaylight/odlparent/bundlestest/BundleDiagInfos.java:[13,30] cannot find symbol
symbol: class String
location: package com.google.common.base
[ERROR] /home/abelur/.virtualenvs/autorelease/odlparent/bundles-test/src/main/java/org/opendaylight/odlparent/bundlestest/BundleDiagInfos.java:[58,18] cannot find symbol
symbol: variable Strings
location: class org.opendaylight.odlparent.bundlestest.BundleDiagInfos
[INFO] 2 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] ODL :: odlparent :: checkstyle ..................... SUCCESS [ 1.895 s]
[INFO] ODL :: odlparent :: findbugs ....................... SUCCESS [ 0.170 s]
[INFO] ODL :: odlparent :: odl-license .................... SUCCESS [ 0.157 s]
[INFO] ODL :: odlparent :: bundles-test ................... FAILURE [ 5.084 s]
[INFO] odlparent .......................................... SKIPPED
[INFO] autorelease ........................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.385 s
[INFO] Finished at: 2017-03-14T17:00:00+10:00
[INFO] Final Memory: 58M/569M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:compile (default-compile) on project bundles-test: Compilation failure: Compilation failure:
[ERROR] /home/abelur/.virtualenvs/autorelease/odlparent/bundles-test/src/main/java/org/opendaylight/odlparent/bundlestest/BundleDiagInfos.java:[13,30] cannot find symbol
[ERROR] symbol: class String
[ERROR] location: package com.google.common.base
[ERROR] /home/abelur/.virtualenvs/autorelease/odlparent/bundles-test/src/main/java/org/opendaylight/odlparent/bundlestest/BundleDiagInfos.java:[58,18] cannot find symbol
[ERROR] symbol: variable Strings
[ERROR] location: class org.opendaylight.odlparent.bundlestest.BundleDiagInfos
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :bundles-test

$ mvn help:evaluate -Dexpression=project.groupId -rf :bundles-test
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] ODL :: odlparent :: bundles-test
[INFO] odlparent
[INFO] autorelease
Downloading: https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/apache/maven/plugins/maven-help-plugin/maven-metadata.xml
Downloading: https://nexus.opendaylight.org/content/repositories/public/org/apache/maven/plugins/maven-help-plugin/maven-metadata.xml
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-help-plugin/maven-metadata.xml
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-help-plugin/maven-metadata.xml (493 B at 0.3 KB/sec)
Downloaded: https://nexus.opendaylight.org/content/repositories/public/org/apache/maven/plugins/maven-help-plugin/maven-metadata.xml (493 B at 0.3 KB/sec)
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building autorelease 1.2.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: https://nexus.opendaylight.org/content/repositories/public/org/apache/maven/plugins/maven-site-plugin/3.3/maven-site-plugin-3.3.pom
Downloaded: https://nexus.opendaylight.org/content/repositories/public/org/apache/maven/plugins/maven-site-plugin/3.3/maven-site-plugin-3.3.pom (21 KB at 27.9 KB/sec)
Downloading: https://nexus.opendaylight.org/content/repositories/public/org/apache/maven/plugins/maven-site-plugin/3.3/maven-site-plugin-3.3.jar
Downloaded: https://nexus.opendaylight.org/content/repositories/public/org/apache/maven/plugins/maven-site-plugin/3.3/maven-site-plugin-3.3.jar (122 KB at 102.8 KB/sec)
Downloading: https://nexus.opendaylight.org/content/repositories/public/org/apache/maven/plugins/maven-release-plugin/2.3.2/maven-release-plugin-2.3.2.pom
Downloaded: https://nexus.opendaylight.org/content/repositories/public/org/apache/maven/plugins/maven-release-plugin/2.3.2/maven-release-plugin-2.3.2.pom (10 KB at 13.1 KB/sec)
Downloading: https://nexus.opendaylight.org/content/repositories/public/org/apache/maven/release/maven-release/2.3.2/maven-release-2.3.2.pom
Downloaded: https://nexus.opendaylight.org/content/repositories/public/org/apache/maven/release/maven-release/2.3.2/maven-release-2.3.2.pom (9 KB at 12.0 KB/sec)
Downloading: https://nexus.opendaylight.org/content/repositories/public/org/apache/maven/plugins/maven-release-plugin/2.3.2/maven-release-plugin-2.3.2.jar
Downloaded: https://nexus.opendaylight.org/content/repositories/public/org/apache/maven/plugins/maven-release-plugin/2.3.2/maven-release-plugin-2.3.2.jar (44 KB at 57.5 KB/sec)
Downloading: https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/apache/maven/plugins/maven-metadata.xml
Downloading: https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/codehaus/mojo/maven-metadata.xml
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
Downloading: https://nexus.opendaylight.org/content/repositories/public/org/apache/maven/plugins/maven-metadata.xml
Downloading: https://nexus.opendaylight.org/content/repositories/public/org/codehaus/mojo/maven-metadata.xml
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml (13 KB at 18.5 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml (20 KB at 37.0 KB/sec)
Downloaded: https://nexus.opendaylight.org/content/repositories/public/org/apache/maven/plugins/maven-metadata.xml (13 KB at 10.4 KB/sec)
Downloaded: https://nexus.opendaylight.org/content/repositories/public/org/codehaus/mojo/maven-metadata.xml (20 KB at 16.7 KB/sec)
[INFO]
[INFO] — maven-help-plugin:2.2:evaluate (default-cli) @ autorelease-root —
[INFO] No artifact parameter specified, using 'org.opendaylight.releng.autorelease:autorelease-root:pom:1.2.0-SNAPSHOT' as project.
[INFO]
org.opendaylight.releng.autorelease
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] ODL :: odlparent :: bundles-test ................... SKIPPED
[INFO] odlparent .......................................... SKIPPED
[INFO] autorelease ........................................ SUCCESS [ 5.762 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.111 s
[INFO] Finished at: 2017-03-14T17:02:14+10:00
[INFO] Final Memory: 27M/321M
[INFO] ------------------------------------------------------------------------

~/autorelease (master)*$ mvn help:evaluate -Dexpression="project.groupId" -rf :bundles-test | grep -v Download | grep -e '[[]'
org.opendaylight.releng.autorelease

~/autorelease (master)*$ cd odlparent/
~/autorelease/odlparent (detached*)*$ mvn help:evaluate -Dexpression="project.groupId" -rf :bundles-test | grep -v Download | grep -e '[[]'
org.opendaylight.odlparent

$ find . -name pom.xml | xargs grep '<module>bundles-test</module>' | awk -F: '

{ print $1 }

'
./odlparent/pom.xml

Comment by Thanh Ha (zxiiro) [ 14/Mar/17 ]

So clearly -rf doesn't do what we want or thought it did. Looks like help:evaluate evaluates only the pom file that it is passed (default: pom.xml).

The artifactId can also be used to find the directory as a pom.xml files artifactId typically matches the directory name so we can do something like `find . -type d -name ${artifactId}` to find the relative path containing the directory and pass that path to mvn's -f parameter.

What if we did something like this (using bundles-test as example):

mvn help:evaluate -Dexpression="project.groupId" -f $(find . -type d -name bundles-test) | grep -v Download | grep -e '[[]'

For me running it from autorelease root results in org.opendaylight.odlparent groupId to be returned.

Comment by Anil Belur [ 15/Mar/17 ]

Thanh, the suggestion works for ':bundles-test', since there is folder under the project odlparent. However for other scenarios like 'features-tsdr' would not return anything. Maybe searching for a "string" in the pom.xml to determine if its the correct pom to use with `mvn help:evaluate ...' maybe a better alternative ?

// fails to find dir features-tsdr
11:04:05 +++ find . -type d -name features-tsdr
11:04:36 ++ /w/tools/hudson.tasks.Maven_MavenInstallation/mvn33/bin/mvn help:evaluate -gs /w/workspace/ar-notify-autorelease-release-carbon@tmp/config4534188431340427911tmp -Dexpression=project.groupId -f
11:04:36 Unable to parse command line options: Missing argument for option: f
11:04:36 + GROUP='usage: mvn [options] [<goal(s)>] [<phase(s)>]

$ find . -name pom.xml | xargs grep "$ARTIFACTID"
./tsdr/features/pom.xml: <artifactId>features-tsdr</artifactId>
./integration/distribution/features3-index/pom.xml: <artifactId>features-tsdr</artifactId>
./integration/distribution/artifacts/upstream/feature3-repos/pom.xml: <artifactId>features-tsdr</artifactId>
./iotdm/onem2mplugins/onem2mtsdr/features/pom.xml: <artifactId>features-tsdr</artifactId>
./cardinal/features/pom.xml: <artifactId>features-tsdr</artifactId>

I was thinking if we should search the pom.xml file instead (below), however all $artifactId don't have <module> tag in pom.xml

  1. find the folder where the pom file exist for the artifactId
    ARTIFACTID_PATH=$(find . -name pom.xml | xargs grep "<module>$ARTIFACTID</module>" | awk -F: ' { print $1 }

    ')

  2. get into folder
    cd "${ARTIFACTID_PATH%/*}"
Comment by Anil Belur [ 19/Mar/17 ]

The issue with using "mvn help:evalute ..." from the autorelease root is this requires ${artifactId}/pom.xml file as in input, which in turn requires manually finding the directory. We thought of using xpaths and xmlstarlet to search xpath's in all pom.xml and determine if ${project.artifactId} == $ARTIFACTID, then return ${project.groupId}, which can be used to derive project mailing list.

However using this approach may require updating the groupId to several pom files, since it requires all the pom files to have ${project.groupId} and ${project.artifactId} xpath.

Many pom files are missing the project.groupId from the xpath, which possibly requires to be updated. Below are the list of pom.xml's missing the ${project.groupId}.

for p in $(find . -name pom.xml); do
ARTIID=$(xmlstarlet sel -N x=http://maven.apache.org/POM/4.0.0 -t -v "/x:project/x:artifactId" < "$p" 2>/dev/null)
if [ ! -z "$ARTIID" ]; then
GROUPID=$(xmlstarlet sel -N x=http://maven.apache.org/POM/4.0.0 -t -v "/x:project[x:artifactId='$ARTIID']/x:groupId" < "$p" 2>/dev/null)
if [ -z "${GROUPID}" ]; then
echo "${p}:${ARTIID}:NULL"
fi
fi
done

Expected script output should be something like: <path/to/dir/pom.xml>:<artifactId>:<groupId>

./tsdr/persistence-cassandra/pom.xml:tsdr-persistence-cassandra:NULL
./tsdr/datastorage/pom.xml:tsdr-datastorage:NULL
./tsdr/datapurge/pom.xml:tsdr-datapurge:NULL
./tsdr/persistence-hbase/pom.xml:tsdr-persistence-hbase:NULL
./tsdr/persistence-elasticsearch/pom.xml:tsdr-persistence-elasticsearch:NULL
./tsdr/persistence-hsqldb/pom.xml:tsdr-persistence-hsqldb:NULL
./tsdr/dataquery/pom.xml:tsdr-dataquery:NULL
./tsdr/persistence-h2/pom.xml:tsdr-persistence-h2:NULL
./tsdr/collectors/collector-spi/pom.xml:tsdr-collector-spi:NULL
./tsdr/collectors/syslog-collector/pom.xml:tsdr-syslog-collector:NULL
./tsdr/collectors/controller-metrics-collector/pom.xml:tsdr-controller-metrics-collector:NULL
./tsdr/collectors/snmp-data-collector/pom.xml:tsdr-snmp-data-collector:NULL
./tsdr/collectors/sflow-statistics-collector/pom.xml:tsdr-sflow-statistics-collector:NULL
./tsdr/collectors/openflow-statistics-collector/pom.xml:tsdr-openflow-statistics-collector:NULL
./tsdr/collectors/restconf-collector/pom.xml:tsdr-restconf-collector:NULL
./tsdr/collectors/external-collector-service/pom.xml:tsdr-external-collector-service:NULL
./tsdr/collectors/netflow-statistics-collector/pom.xml:tsdr-netflow-statistics-collector:NULL
./tsdr/configuration/pom.xml:tsdr-configuration:NULL
./tsdr/persistence-spi/pom.xml:tsdr-persistence-spi:NULL
./aaa/aaa-h2-store/pom.xml:aaa-h2-store:NULL
./aaa/aaa-authn-federation/pom.xml:aaa-authn-federation:NULL
./aaa/aaa-authn-sssd/pom.xml:aaa-authn-sssd:NULL
./aaa/aaa-authn-store/pom.xml:aaa-authn-store:NULL
./aaa/aaa-authn-sts/pom.xml:aaa-authn-sts:NULL
./aaa/aaa-cli-jar/pom.xml:aaa-cli-jar:NULL
./aaa/aaa-authn-basic/pom.xml:aaa-authn-basic:NULL
./aaa/aaa-shiro-act/pom.xml:aaa-shiro-act:NULL
./aaa/aaa-filterchain/pom.xml:aaa-filterchain:NULL
./aaa/aaa-idp-mapping/pom.xml:aaa-authn-idpmapping:NULL
./aaa/aaa-idmlight/pom.xml:aaa-idmlight:NULL
./aaa/aaa-authn/pom.xml:aaa-authn:NULL
./mdsal/binding/mdsal-binding-test-model/pom.xml:mdsal-binding-test-model:NULL
./mdsal/binding2/prototype/yang-binding2/pom.xml:yang-binding2:NULL
./genius/it/pom.xml:genius-it:NULL
./controller/opendaylight/model/model-inventory/pom.xml:model-inventory:NULL
./controller/opendaylight/model/model-topology/pom.xml:model-topology:NULL
./controller/opendaylight/config/shutdown-api/pom.xml:shutdown-api:NULL
./controller/opendaylight/config/netty-config-api/pom.xml:netty-config-api:NULL
./controller/opendaylight/config/config-util/pom.xml:config-util:NULL
./controller/opendaylight/config/config-persister-file-xml-adapter/pom.xml:config-persister-file-xml-adapter:NULL
./controller/opendaylight/config/config-plugin-parent/pom.xml:config-plugin-parent:NULL
./controller/opendaylight/config/config-persister-feature4-adapter/pom.xml:config-persister-feature4-adapter:NULL
./controller/opendaylight/config/config-persister-impl/pom.xml:config-persister-impl:NULL
./controller/opendaylight/config/config-persister-api/pom.xml:config-persister-api:NULL
./controller/opendaylight/config/yang-test-plugin/pom.xml:yang-test-plugin:NULL
./controller/opendaylight/config/threadpool-config-api/pom.xml:threadpool-config-api:NULL
./controller/opendaylight/config/yang-jmx-generator/pom.xml:yang-jmx-generator:NULL
./controller/opendaylight/config/yang-test/pom.xml:yang-test:NULL
./controller/opendaylight/config/netty-timer-config/pom.xml:netty-timer-config:NULL
./controller/opendaylight/config/config-manager/pom.xml:config-manager:NULL
./controller/opendaylight/config/yang-jmx-generator-it/pom.xml:yang-jmx-generator-it:NULL
./controller/opendaylight/config/yang-jmx-generator-plugin/pom.xml:yang-jmx-generator-plugin:NULL
./controller/opendaylight/config/netty-threadgroup-config/pom.xml:netty-threadgroup-config:NULL
./controller/opendaylight/config/threadpool-config-impl/pom.xml:threadpool-config-impl:NULL
./controller/opendaylight/config/shutdown-impl/pom.xml:shutdown-impl:NULL
./controller/opendaylight/config/config-manager-facade-xml/pom.xml:config-manager-facade-xml:NULL
./controller/opendaylight/config/logback-config-loader/pom.xml:logback-config-loader:NULL
./controller/opendaylight/config/netty-event-executor-config/pom.xml:netty-event-executor-config:NULL
./controller/opendaylight/config/config-persister-feature-adapter/pom.xml:config-persister-feature-adapter:NULL
./controller/opendaylight/config/logback-config/pom.xml:logback-config:NULL
./controller/opendaylight/config/config-persister-directory-xml-adapter/pom.xml:config-persister-directory-xml-adapter:NULL
./controller/opendaylight/config/config-it-base/pom.xml:config-it-base:NULL
./controller/opendaylight/md-sal/sal-dom-broker-config/pom.xml:sal-dom-broker-config:NULL
./controller/opendaylight/md-sal/samples/clustering-test-app/pom.xml:clustering-it:NULL
./controller/opendaylight/md-sal/samples/clustering-test-app/configuration/pom.xml:clustering-it-config:NULL
./controller/opendaylight/md-sal/samples/toaster-it/pom.xml:sample-toaster-it:NULL
./controller/opendaylight/md-sal/sal-inmemory-datastore/pom.xml:sal-inmemory-datastore:NULL
./controller/opendaylight/md-sal/sal-cluster-admin-impl/pom.xml:sal-cluster-admin-impl:NULL
./controller/opendaylight/md-sal/mdsal-it-base/pom.xml:mdsal-it-base:NULL
./controller/opendaylight/md-sal/sal-binding-it/pom.xml:sal-binding-it:NULL
./controller/opendaylight/md-sal/sal-distributed-datastore/pom.xml:sal-distributed-datastore:NULL
./controller/opendaylight/md-sal/sal-dom-config/pom.xml:sal-dom-config:NULL
./controller/opendaylight/md-sal/sal-remoterpc-connector/pom.xml:sal-remoterpc-connector:NULL
./controller/opendaylight/md-sal/sal-binding-config/pom.xml:sal-binding-config:NULL
./controller/opendaylight/md-sal/mdsal-it-parent/pom.xml:mdsal-it-parent:NULL
./netvirt/vpnservice/cloud-servicechain/cloud-servicechain-impl/pom.xml:cloud-servicechain-impl:NULL
./netvirt/vpnservice/cloud-servicechain/cloud-servicechain-api/pom.xml:cloud-servicechain-api:NULL
./netvirt/vpnservice/ipv6service/api/pom.xml:ipv6service-api:NULL
./netvirt/vpnservice/ipv6service/impl/pom.xml:ipv6service-impl:NULL
./netvirt/vpnservice/federation-plugin/api/pom.xml:federation-plugin-api:NULL
./netvirt/vpnservice/vpnmanager/vpnmanager-impl/pom.xml:vpnmanager-impl:NULL
./netvirt/vpnservice/vpnmanager/vpnmanager-api/pom.xml:vpnmanager-api:NULL
./netvirt/vpnservice/vpnmanager/vpnmanager-shell/pom.xml:vpnmanager-shell:NULL
./netvirt/vpnservice/qosservice/api/pom.xml:qosservice-api:NULL
./netvirt/vpnservice/qosservice/impl/pom.xml:qosservice-impl:NULL
./netvirt/vpnservice/elanmanager/elanmanager-api/pom.xml:elanmanager-api:NULL
./netvirt/vpnservice/elanmanager/elanmanager-impl/pom.xml:elanmanager-impl:NULL
./netvirt/vpnservice/model-bgp/pom.xml:model-bgp:NULL
./netvirt/vpnservice/statemanager/impl/pom.xml:statemanager-impl:NULL
./netvirt/vpnservice/fibmanager/fibmanager-shell/pom.xml:fibmanager-shell:NULL
./netvirt/vpnservice/fibmanager/fibmanager-impl/pom.xml:fibmanager-impl:NULL
./netvirt/vpnservice/fibmanager/fibmanager-api/pom.xml:fibmanager-api:NULL
./netvirt/vpnservice/natservice/natservice-impl/pom.xml:natservice-impl:NULL
./netvirt/vpnservice/natservice/natservice-api/pom.xml:natservice-api:NULL
./netvirt/vpnservice/it/impl/pom.xml:it-impl:NULL
./netvirt/vpnservice/statistics/api/pom.xml:statistics-api:NULL
./netvirt/vpnservice/statistics/impl/pom.xml:statistics-impl:NULL
./netvirt/vpnservice/dhcpservice/dhcpservice-impl/pom.xml:dhcpservice-impl:NULL
./netvirt/vpnservice/dhcpservice/dhcpservice-api/pom.xml:dhcpservice-api:NULL
./netvirt/vpnservice/bgpmanager/bgpmanager-impl/pom.xml:bgpmanager-impl:NULL
./netvirt/vpnservice/bgpmanager/bgpmanager-api/pom.xml:bgpmanager-api:NULL
./netvirt/vpnservice/aclservice/api/pom.xml:aclservice-api:NULL
./netvirt/vpnservice/aclservice/impl/pom.xml:aclservice-impl:NULL
./netvirt/vpnservice/neutronvpn/neutronvpn-api/pom.xml:neutronvpn-api:NULL
./netvirt/vpnservice/neutronvpn/neutronvpn-shell/pom.xml:neutronvpn-shell:NULL
./netvirt/vpnservice/neutronvpn/neutronvpn-impl/pom.xml:neutronvpn-impl:NULL
./netvirt/openstack/net-virt-it/pom.xml:openstack.net-virt-it:NULL
./netvirt/openstack/net-virt-sfc/it/pom.xml:openstack.net-virt-sfc-it:NULL
./sxp/sxp-api/pom.xml:sxp-api:NULL
./sxp/sxp-controller/pom.xml:sxp-controller:NULL
./sxp/sxp-cluster-route/pom.xml:sxp-cluster-route:NULL
./sxp/sxp-robot/pom.xml:sxp-robot:NULL
./sxp/sxp-config/pom.xml:sxp-config:NULL
./sxp/sxp-core/pom.xml:sxp-core:NULL
./integration/distribution/artifacts/upstream/other/pom.xml:other-artifacts:NULL
./integration/distribution/artifacts/upstream/single-features/pom.xml:single-feature-artifacts:NULL
./integration/distribution/artifacts/upstream/feature3-repos/pom.xml:feature3-repo-artifacts:NULL
./integration/distribution/artifacts/upstream/artifacts/pom.xml:artifact-artifacts:NULL
./integration/distribution/artifacts/upstream/feature-repos/pom.xml:feature-repo-artifacts:NULL
./netide/config/pom.xml:shim-config:NULL
./netide/netide-it/pom.xml:netide-it:NULL
./netide/pom.xml:netide-aggregator:NULL
./netide/applications/pom.xml:applications:NULL
./iotdm/onem2m/onem2m-ui/onem2m-ui-bundle/pom.xml:onem2m-ui-bundle:NULL
./iotdm/onem2m/onem2m-ui/onem2m-ui-module/pom.xml:onem2m-ui-module:NULL
./iotdm/onem2mplugins/iotdmitresources/pom.xml:iotdmit-resources:NULL
./packetcable/packetcable-driver/pom.xml:packetcable-driver:NULL
./packetcable/packetcable-emulator/pom.xml:packetcable-emulator:NULL
./sdninterfaceapp/ui/ui-module/pom.xml:ui-module:NULL
./sdninterfaceapp/ui/ui-bundle/pom.xml:ui-bundle:NULL
./vtn/pom.xml:distribution:NULL
./vtn/manager/model/pom.xml:manager.model:NULL
./vtn/manager/neutron/pom.xml:manager.neutron:NULL
./vtn/manager/api/pom.xml:manager:NULL
./vtn/manager/pom.xml:vtn-manager:NULL
./vtn/manager/implementation/pom.xml:manager.implementation:NULL
./vtn/manager/common/yang/pom.xml:manager.common.yang:NULL
./vtn/manager/common/java/pom.xml:manager.common.java:NULL
./vtn/manager/it/util/pom.xml:manager.it.util:NULL
./vtn/manager/it/ofmock/pom.xml:manager.it.ofmock:NULL
./vtn/manager/it/pom.xml:manager.it:NULL
./vtn/manager/it/common/pom.xml:manager.it.common:NULL
./vtn/manager/it/core/pom.xml:manager.it.core:NULL
./vtn/manager/it/base/pom.xml:manager.it.base:NULL
./vtn/application/vsemprovider/pom.xml:vtnmanager-vsemprovider:NULL
./netconf/features/pom.xml:netconf-features-parent:NULL
./netconf/netconf/tools/pom.xml:netconf-tools:NULL
./netconf/netconf/netconf-it/pom.xml:netconf-it:NULL
./netconf/restconf/sal-restconf-broker/pom.xml:sal-restconf-broker:NULL
./netconf/restconf/models/pom.xml:restconf-models:NULL
./topoprocessing/topoprocessing-spi/pom.xml:topoprocessing-spi:NULL
./topoprocessing/mlmt/inventory/model/pom.xml:mlmt-topology-inventory-model:NULL
./topoprocessing/mlmt/inventory/pom.xml:mlmt-topology-inventory:NULL
./topoprocessing/mlmt/inventory/impl/pom.xml:mlmt-topology-inventory-impl:NULL
./topoprocessing/mlmt/pom.xml:mlmt:NULL
./topoprocessing/mlmt/observer/model/pom.xml:mlmt-topology-observer-model:NULL
./topoprocessing/mlmt/observer/pom.xml:mlmt-topology-observer:NULL
./topoprocessing/mlmt/observer/impl/pom.xml:mlmt-topology-observer-impl:NULL
./topoprocessing/mlmt/common/model/pom.xml:mlmt-topology-common-model:NULL
./topoprocessing/mlmt/common/pom.xml:mlmt-topology-common:NULL
./topoprocessing/mlmt/common/impl/pom.xml:mlmt-topology-common-impl:NULL
./topoprocessing/mlmt/multilayer-topology/model/pom.xml:multilayer-topology-model:NULL
./topoprocessing/mlmt/multilayer-topology/pom.xml:multilayer-topology:NULL
./topoprocessing/mlmt/multilayer-topology/impl/pom.xml:multilayer-topology-impl:NULL
./topoprocessing/mlmt/multilayer-topology/impl/multilayer/pom.xml:multilayer-impl:NULL
./topoprocessing/mlmt/multilayer-topology/impl/forwarding-adjacency/pom.xml:forwarding-adjacency-impl:NULL
./topoprocessing/mlmt/parser/model/pom.xml:mlmt-topology-parser-model:NULL
./topoprocessing/mlmt/parser/pom.xml:mlmt-topology-parser:NULL
./topoprocessing/mlmt/parser/impl/pom.xml:mlmt-topology-parser-impl:NULL
./topoprocessing/mlmt/multitechnology-topology/model/pom.xml:multitechnology-topology-model:NULL
./topoprocessing/mlmt/multitechnology-topology/pom.xml:multitechnology-topology:NULL
./topoprocessing/mlmt/multitechnology-topology/impl/pom.xml:multitechnology-topology-impl:NULL
./topoprocessing/mlmt/factory/model/pom.xml:mlmt-topology-factory-model:NULL
./topoprocessing/mlmt/factory/pom.xml:mlmt-topology-factory:NULL
./topoprocessing/mlmt/factory/impl/pom.xml:mlmt-topology-factory-impl:NULL
./topoprocessing/topoprocessing-api/pom.xml:topoprocessing-api:NULL
./topoprocessing/pom.xml:topoprocessing-aggregator:NULL
./topoprocessing/rwa/model/pom.xml:rwa-model:NULL
./topoprocessing/rwa/pom.xml:rwa:NULL
./topoprocessing/administrative-topology/model/pom.xml:administrative-topology-model:NULL
./topoprocessing/administrative-topology/pom.xml:administrative-topology:NULL
./topoprocessing/administrative-topology/impl/pom.xml:administrative-topology-impl:NULL
./topoprocessing/topoprocessing-impl/pom.xml:topoprocessing-impl:NULL
./federation/federation-service/api/pom.xml:federation-service-api:NULL
./snbi/southplugin/pom.xml:southplugin:NULL
./openflowjava/openflow-protocol-it/pom.xml:openflow-protocol-it:NULL
./openflowjava/openflowjava-util/pom.xml:openflowjava-util:NULL
./openflowjava/pom.xml:openflowjava-aggregator:NULL
./openflowjava/openflowjava-config/pom.xml:openflowjava-config:NULL
./openflowjava/simple-client/pom.xml:simple-client:NULL
./openflowjava/openflow-protocol-spi/pom.xml:openflow-protocol-spi:NULL
./openflowjava/openflow-protocol-impl/pom.xml:openflow-protocol-impl:NULL
./openflowjava/openflowjava-blueprint-config/pom.xml:openflowjava-blueprint-config:NULL
./snmp4sdn/mdsal/caller/miscconfigmanager/pom.xml:miscconfigmanager:NULL
./snmp4sdn/mdsal/caller/fdbmanager/pom.xml:fdbmanager:NULL
./snmp4sdn/mdsal/caller/vlanmanager/pom.xml:vlanmanager:NULL
./snmp4sdn/mdsal/caller/aclmanager/pom.xml:aclmanager:NULL
./snmp4sdn/plugin-shell/pom.xml:plugin-shell:NULL
./snmp4sdn/pom.xml:snmp4sdn_distribution:NULL
./snmp4sdn/commons/integrationtest/pom.xml:commons.integrationtest:NULL
./snmp4sdn/snmp4sdn/pom.xml:snmp4sdn:NULL
./ocpplugin/model/model-ocp-service/pom.xml:model-ocp-service:NULL
./ocpplugin/ocpplugin-impl/pom.xml:ocpplugin-impl:NULL
./ocpplugin/ocpplugin-api/pom.xml:ocpplugin-api:NULL
./ocpplugin/simple-agent/pom.xml:simple-agent:NULL
./ocpplugin/applications/pom.xml:applications:NULL
./ocpplugin/ocpplugin-controller-config/pom.xml:ocpplugin-controller-config:NULL
./ocpplugin/ocpjava/util/pom.xml:util:NULL
./ocpplugin/ocpjava/ocpjava-config/pom.xml:ocpjava-config:NULL
./ocpplugin/ocpjava/ocp-protocol-impl/pom.xml:ocp-protocol-impl:NULL
./ocpplugin/ocpjava/pom.xml:ocpjava-aggregator:NULL
./ocpplugin/ocpjava/simple-client/pom.xml:simple-client:NULL
./ocpplugin/ocpjava/ocp-protocol-spi/pom.xml:ocp-protocol-spi:NULL
./ocpplugin/ocpjava/ocp-protocol-it/pom.xml:ocp-protocol-it:NULL
./groupbasedpolicy/groupbasedpolicy-ui/module/pom.xml:groupbasedpolicy-ui-module:NULL
./groupbasedpolicy/groupbasedpolicy-ui/bundle/pom.xml:groupbasedpolicy-ui-bundle:NULL
./groupbasedpolicy/renderers/faas/pom.xml:faas-renderer:NULL
./groupbasedpolicy/renderers/ofoverlay/pom.xml:ofoverlay-renderer:NULL
./groupbasedpolicy/renderers/iovisor/pom.xml:iovisor-renderer:NULL
./groupbasedpolicy/renderers/vpp/pom.xml:vpp-renderer:NULL
./groupbasedpolicy/renderers/ovssfc/pom.xml:ovssfc-renderer:NULL
./groupbasedpolicy/renderers/netconf/pom.xml:netconf-renderer:NULL
./groupbasedpolicy/renderers/ios-xe/pom.xml:ios-xe-renderer:NULL
./groupbasedpolicy/location-providers/ne-location-provider/pom.xml:ne-location-provider:NULL
./groupbasedpolicy/sxp-integration/sxp-ep-provider/pom.xml:sxp-ep-provider:NULL
./groupbasedpolicy/sxp-integration/sxp-ise-adapter/pom.xml:sxp-ise-adapter:NULL
./groupbasedpolicy/domain-extensions/l2-l3/pom.xml:l2-l3-domain-extension:NULL
./sfc/sfc-util/sfc-vpp-utils/pom.xml:sfc-vpp-utils:NULL
./sfc/sfc-util/pom.xml:sfc-util-parent:NULL
./sfc/sfc-util/sfc-openflow-utils/pom.xml:sfc-openflow-utils:NULL
./sfc/sfc-test-consumer/pom.xml:sfc-test-consumer:NULL
./sfc/sfc-vnfm-spi/pom.xml:sfc-vnfm-spi:NULL
./sfc/sfclisp/pom.xml:sfclisp:NULL
./sfc/sfc-provider/pom.xml:sfc-provider:NULL
./sfc/sfc-pot/pom.xml:sfc-pot:NULL
./sfc/sfc-vnfm-tacker/pom.xml:sfc-vnfm-tacker:NULL
./sfc/sfc-ovs/pom.xml:sfc-ovs:NULL
./sfc/sfc-model/pom.xml:sfc-model:NULL
./sfc/sfc-genius/pom.xml:sfc-genius:NULL
./sfc/sfc-classifiers/sfc-scf-vpp/pom.xml:sfc-scf-vpp:NULL
./sfc/sfc-classifiers/pom.xml:sfc-classifiers:NULL
./sfc/sfc-classifiers/sfc-scf-openflow/pom.xml:sfc-scf-openflow:NULL
./sfc/sfc-ui/pom.xml:sfc-ui:NULL
./sfc/sfc-ui/module/pom.xml:sfc-ui-module:NULL
./sfc/sfc-ui/bundle/pom.xml:sfc-ui-bundle:NULL
./sfc/sfc-renderers/sfc-vpp-renderer/pom.xml:sfc-vpp-renderer:NULL
./sfc/sfc-renderers/pom.xml:sfc-renderers:NULL
./sfc/sfc-renderers/sfc-ios-xe-renderer/pom.xml:sfc-ios-xe-renderer:NULL
./sfc/sfc-renderers/sfc-openflow-renderer/pom.xml:sfc-openflow-renderer:NULL
./sfc/sfc-renderers/sfc-pot-netconf-renderer/pom.xml:sfc-pot-netconf-renderer:NULL
./sfc/sfc-sb-rest/pom.xml:sfc-sb-rest:NULL
./sfc/sfc-rsp-manager/pom.xml:sfc-rsp-manager:NULL
./sfc/sfc-netconf/pom.xml:sfc-netconf:NULL
./lispflowmapping/pom.xml:lispflowmapping-all:NULL
./lispflowmapping/commons/build_tools/pom.xml:common.build.tools:NULL
./lispflowmapping/commons/unittest_tools/pom.xml:common.unittest.tools:NULL
./lispflowmapping/mappingservice/inmemorydb/pom.xml:mappingservice.inmemorydb:NULL
./lispflowmapping/mappingservice/config/pom.xml:mappingservice.config:NULL
./lispflowmapping/mappingservice/neutron/pom.xml:mappingservice.neutron:NULL
./lispflowmapping/mappingservice/implementation/pom.xml:mappingservice.implementation:NULL
./lispflowmapping/mappingservice/dsbackend/pom.xml:mappingservice.dsbackend:NULL
./lispflowmapping/mappingservice/shell/pom.xml:mappingservice.shell:NULL
./lispflowmapping/mappingservice/southbound/pom.xml:mappingservice.southbound:NULL
./lispflowmapping/mappingservice/mapcache/pom.xml:mappingservice.mapcache:NULL
./lispflowmapping/ui/pom.xml:lispflowmapping-ui:NULL
./lispflowmapping/ui/module/pom.xml:lispflowmapping-ui-module:NULL
./lispflowmapping/ui/bundle/pom.xml:lispflowmapping-ui-bundle:NULL
./unimgr/dlux/cpeui/cpeui-module/pom.xml:cpeui-module:NULL
./unimgr/dlux/cpeui/cpeui-bundle/pom.xml:cpeui-bundle:NULL
./yangtools/benchmarks/pom.xml:benchmarks:NULL
./didm/identification/impl/pom.xml:didm-identification:NULL
./l2switch/hosttracker/model/pom.xml:hosttracker-model:NULL
./openflowplugin/model/model-flow-statistics/pom.xml:model-flow-statistics:NULL
./openflowplugin/model/model-flow-base/pom.xml:model-flow-base:NULL
./openflowplugin/model/model-flow-service/pom.xml:model-flow-service:NULL
./openflowplugin/openflowplugin-api/pom.xml:openflowplugin-api:NULL
./openflowplugin/openflowplugin-blueprint-config-he/pom.xml:openflowplugin-blueprint-config-he:NULL
./openflowplugin/test-provider/pom.xml:test-provider:NULL
./openflowplugin/drop-test-karaf/pom.xml:drop-test-karaf:NULL
./openflowplugin/samples/learning-switch/pom.xml:learning-switch:NULL
./openflowplugin/samples/sample-consumer/pom.xml:sample-consumer:NULL
./openflowplugin/openflowplugin-controller-config/pom.xml:openflowplugin-controller-config:NULL
./openflowplugin/applications/pom.xml:applications:NULL
./openflowplugin/openflowplugin-blueprint-config/pom.xml:openflowplugin-blueprint-config:NULL
./openflowplugin/test-common/pom.xml:test-common:NULL
./openflowplugin/openflowplugin-it/pom.xml:openflowplugin-it:NULL
./openflowplugin/openflowplugin-common/pom.xml:openflowplugin-common:NULL
./openflowplugin/openflowplugin/pom.xml:openflowplugin:NULL
./openflowplugin/openflowplugin-impl/pom.xml:openflowplugin-impl:NULL
./openflowplugin/extension/openflowplugin-extension-onf/pom.xml:openflowplugin-extension-onf:NULL
./openflowplugin/extension/test-extension/pom.xml:test-extension:NULL
./openflowplugin/extension/openflowplugin-extension-nicira/pom.xml:openflowplugin-extension-nicira:NULL
./openflowplugin/extension/openflowplugin-extension-api/pom.xml:openflowplugin-extension-api:NULL
./openflowplugin/extension/pom.xml:openflowplugin-extension-parent:NULL
./openflowplugin/extension/openflowjava-extension-nicira/pom.xml:openflowjava-extension-nicira:NULL
./openflowplugin/extension/openflowplugin-extension-nicira-config/pom.xml:openflowplugin-extension-nicira-config:NULL
./openflowplugin/extension/openflowjava-extension-nicira-api/pom.xml:openflowjava-extension-nicira-api:NULL
./odlparent/bundle-parent/pom.xml:bundle-parent:NULL
./odlparent/features/features-akka/pom.xml:features-akka:NULL
./odlparent/features/features-odlparent/pom.xml:features-odlparent:NULL
./odlparent/findbugs/pom.xml:findbugs:NULL
./odlparent/karaf/opendaylight-karaf-empty/pom.xml:opendaylight-karaf-empty:NULL
./odlparent/karaf/opendaylight-karaf-resources/pom.xml:opendaylight-karaf-resources:NULL
./odlparent/karaf/pom.xml:karaf-aggregator:NULL
./odlparent/karaf/karaf-parent/pom.xml:karaf-parent:NULL
./odlparent/karaf/karaf-branding/pom.xml:karaf.branding:NULL
./odlparent/karaf/opendaylight-karaf4-resources/pom.xml:opendaylight-karaf4-resources:NULL
./odlparent/bundles4-test/pom.xml:bundles4-test:NULL
./odlparent/pom.xml:odlparent-aggregator:NULL
./odlparent/features-test/pom.xml:features-test:NULL
./odlparent/features4-test/pom.xml:features4-test:NULL
./odlparent/karaf-plugin/pom.xml:karaf-plugin:NULL
./odlparent/checkstyle/pom.xml:checkstyle:NULL
./odlparent/odlparent/pom.xml:odlparent:NULL
./odlparent/features-parent/pom.xml:features-parent:NULL
./odlparent/odlparent-artifacts/pom.xml:odlparent-artifacts:NULL
./odlparent/karaf4-plugin/pom.xml:karaf4-plugin:NULL
./odlparent/bundles-test/pom.xml:bundles-test:NULL
./odlparent/features4/odl-karaf-feat-jdbc/pom.xml:odl-karaf-feat-jdbc:NULL
./odlparent/features4/features4-akka/pom.xml:features4-akka:NULL
./odlparent/features4/features4-odlparent/pom.xml:features4-odlparent:NULL
./odlparent/features4/odl-karaf-feat-feature/pom.xml:odl-karaf-feat-feature:NULL
./odlparent/features4/odl-karaf-feat-war/pom.xml:odl-karaf-feat-war:NULL
./odlparent/features4/odl-karaf-feat-jetty/pom.xml:odl-karaf-feat-jetty:NULL
./odlparent/license/pom.xml:odl-license:NULL
./snmp/pom.xml:snmp-aggregator:NULL
./snmp/yang-oid-plugin/pom.xml:yang-oid-plugin:NULL
./snmp/mibs-model/pom.xml:mibs-model:NULL
./snmp/snmp/pom.xml:snmp:NULL
./of-config/pom.xml:ofconf:NULL
./of-config/commons/pom.xml:parents:NULL
./of-config/commons/integrationtest/pom.xml:commons.integrationtest:NULL
./of-config/southbound/pom.xml:southbound-aggregator:NULL
./of-config/integrationtest/pom.xml:integrationtest:NULL
./bgpcep/testtool-util/pom.xml:testtool-util:NULL
./bgpcep/topology/api/pom.xml:topology-api:NULL
./bgpcep/topology/tunnel-api/pom.xml:topology-tunnel-api:NULL
./bgpcep/topology/segment-routing/pom.xml:topology-segment-routing:NULL
./bgpcep/concepts/pom.xml:concepts:NULL
./bgpcep/util/pom.xml:util:NULL
./bgpcep/rsvp/spi/pom.xml:rsvp-spi:NULL
./bgpcep/rsvp/api/pom.xml:rsvp-api:NULL
./bgpcep/rsvp/impl/pom.xml:rsvp-impl:NULL
./bgpcep/data-change-counter/pom.xml:data-change-counter:NULL
./bgpcep/pcep/topology-spi/pom.xml:pcep-topology-spi:NULL
./bgpcep/pcep/base-parser/pom.xml:pcep-base-parser:NULL
./bgpcep/pcep/spi/pom.xml:pcep-spi:NULL
./bgpcep/pcep/tunnel-provider/pom.xml:pcep-tunnel-provider:NULL
./bgpcep/pcep/api/pom.xml:pcep-api:NULL
./bgpcep/pcep/tunnel-api/pom.xml:pcep-tunnel-api:NULL
./bgpcep/pcep/segment-routing/pom.xml:pcep-segment-routing:NULL
./bgpcep/pcep/ietf-stateful07/pom.xml:pcep-ietf-stateful07:NULL
./bgpcep/pcep/topology-api/pom.xml:pcep-topology-api:NULL
./bgpcep/pcep/topology-provider/pom.xml:pcep-topology-provider:NULL
./bgpcep/pcep/auto-bandwidth-extension/pom.xml:pcep-auto-bandwidth-extension:NULL
./bgpcep/pcep/impl/pom.xml:pcep-impl:NULL
./bgpcep/data-change-counter-controller-config/pom.xml:data-change-counter-controller-config:NULL
./bgpcep/bgp/bmp-parser-impl/pom.xml:bgp-bmp-parser-impl:NULL
./bgpcep/bgp/inet/pom.xml:bgp-inet:NULL
./bgpcep/bgp/evpn/pom.xml:bgp-evpn:NULL
./bgpcep/bgp/rib-impl/pom.xml:bgp-rib-impl:NULL
./bgpcep/bgp/rib-api/pom.xml:bgp-rib-api:NULL
./bgpcep/bgp/openconfig-state/pom.xml:bgp-openconfig-state:NULL
./bgpcep/bgp/concepts/pom.xml:bgp-concepts:NULL
./bgpcep/bgp/parser-api/pom.xml:bgp-parser-api:NULL
./bgpcep/bgp/util/pom.xml:bgp-util:NULL
./bgpcep/bgp/peer-acceptor/pom.xml:bgp-peer-acceptor:NULL
./bgpcep/bgp/bmp-api/pom.xml:bgp-bmp-api:NULL
./bgpcep/bgp/cli/pom.xml:bgp-cli:NULL
./bgpcep/bgp/rib-spi/pom.xml:bgp-rib-spi:NULL
./bgpcep/bgp/flowspec/pom.xml:bgp-flowspec:NULL
./bgpcep/bgp/rib-mock/pom.xml:bgp-rib-mock:NULL
./bgpcep/bgp/parser-impl/pom.xml:bgp-parser-impl:NULL
./bgpcep/bgp/bmp-spi/pom.xml:bgp-bmp-spi:NULL
./bgpcep/bgp/openconfig-api/pom.xml:bgp-openconfig-api:NULL
./bgpcep/bgp/config-loader-impl/pom.xml:bgp-config-loader-impl:NULL
./bgpcep/bgp/topology-provider/pom.xml:bgp-topology-provider:NULL
./bgpcep/bgp/labeled-unicast/pom.xml:bgp-labeled-unicast:NULL
./bgpcep/bgp/config-loader-spi/pom.xml:bgp-config-loader-spi:NULL
./bgpcep/bgp/parser-spi/pom.xml:bgp-parser-spi:NULL
./bgpcep/bgp/benchmark-app/pom.xml:bgp-benchmark-app:NULL
./bgpcep/bgp/l3vpn/pom.xml:bgp-l3vpn:NULL
./bgpcep/bgp/bmp-impl/pom.xml:bgp-bmp-impl:NULL
./bgpcep/bgp/path-selection-mode/pom.xml:bgp-path-selection-mode:NULL
./bgpcep/bgp/linkstate/pom.xml:bgp-linkstate:NULL
./bgpcep/bgp/openconfig-spi/pom.xml:bgp-openconfig-spi:NULL
./bgpcep/bgp/parser-mock/pom.xml:bgp-parser-mock:NULL
./bgpcep/programming/spi/pom.xml:programming-spi:NULL
./bgpcep/programming/api/pom.xml:programming-api:NULL
./bgpcep/programming/tunnel-api/pom.xml:programming-tunnel-api:NULL
./bgpcep/programming/topology-api/pom.xml:programming-topology-api:NULL
./bgpcep/programming/impl/pom.xml:programming-impl:NULL
./dlux/loader/api/pom.xml:loader:NULL
./dlux/loader/impl/pom.xml:loader.implementation:NULL
./dlux/modules/yangvisualizer-resources/pom.xml:dlux.yangvisualizer.resources:NULL
./dlux/modules/node-resources/pom.xml:dlux.node.resources:NULL
./dlux/modules/loader-resources/pom.xml:dlux.loader.resources:NULL
./dlux/modules/common-authentication-resources/pom.xml:dlux.common.authentication.resources:NULL
./dlux/modules/common-topbar-resources/pom.xml:dlux.common.topbar.resources:NULL
./dlux/modules/common-sigmatopology-resources/pom.xml:dlux.common.sigmatopology.resources:NULL
./dlux/modules/container-resources/pom.xml:dlux.container.resources:NULL
./dlux/modules/pom.xml:dlux.resources:NULL
./dlux/modules/common-navigation-resources/pom.xml:dlux.common.navigation.resources:NULL
./dlux/modules/yangui-resources/pom.xml:dlux.yangui.resources:NULL
./dlux/modules/flow-resources/pom.xml:dlux.flow.resources:NULL
./dlux/modules/core-resources/pom.xml:dlux.core.resources:NULL
./dlux/modules/common-login-resources/pom.xml:dlux.common.login.resources:NULL
./dlux/modules/common-layout-resources/pom.xml:dlux.common.layout.resources:NULL
./dlux/modules/network-resources/pom.xml:dlux.network.resources:NULL
./dlux/modules/common-general-resources/pom.xml:dlux.common.general.resources:NULL
./dlux/modules/yangman-resources/pom.xml:dlux.yangman.resources:NULL
./dlux/modules/topology-resources/pom.xml:dlux.topology.resources:NULL
./dlux/modules/common-yangutils-resources/pom.xml:dlux.common.yangutils.resources:NULL
./dlux/modules/connection_manager-resources/pom.xml:dlux.connection_manager.resources:NULL
./dlux/bundles/pom.xml:bundles:NULL

Comment by Thanh Ha (zxiiro) [ 19/Mar/17 ]

Pom files inherit the groupId and version of the parent pom if those GAV items are not specified. So if a pom returns NULL for groupId or version then check project.parent.groupId which should always return a value.

Comment by Anil Belur [ 19/Mar/17 ]

I have explored that option too, but several of the pom files return an different parent from what is expected, for instance the below poms return project.groupId == org.opendaylight.contoller for the poms under neutron. Is this the expected output ?

./neutron/neutron-hostconfig/vpp/pom.xml:org.opendaylight.controller
./neutron/neutron-hostconfig/pom.xml:org.opendaylight.controller
./neutron/neutron-hostconfig/ovs/pom.xml:org.opendaylight.controller
./neutron/neutron-hostconfig/utils/pom.xml:org.opendaylight.controller
./neutron/neutron-logger/pom.xml:org.opendaylight.controller
./sxp/features/odl-sxp-robot/pom.xml:org.opendaylight.odlparent
./sxp/features/odl-sxp-controller/pom.xml:org.opendaylight.odlparent
./sxp/features/pom.xml:org.opendaylight.odlparent
./sxp/features/odl-sxp-core/pom.xml:org.opendaylight.odlparent
./sxp/features/features-sxp/pom.xml:org.opendaylight.odlparent

Comment by Anil Belur [ 19/Mar/17 ]

s/project.groupId/project.parent.groupId/ == org.opendaylight.contoller

Comment by Thanh Ha (zxiiro) [ 20/Mar/17 ]

(In reply to Anil Belur from comment #12)
> I have explored that option too, but several of the pom files return an
> different parent from what is expected, for instance the below poms return
> project.groupId == org.opendaylight.contoller for the poms under neutron. Is
> this the expected output ?

Maybe you missed it in my previous message but I said the groupId is inherited IF not declared. Which means you need to do an if-else-if statement. I'll try being more clear.

  1. Condition 1
    if project.groupId:
    project.groupId is set and is not inherited
  1. Condition 2
    else if project.parent.groupId:
    project.groupId is not set but IS inherited from project.parent.groupId
  1. Invalid Condition
    else:
    This should not happen.

You will find all of the cases below meet condition 1. We only need to use condition 2 on select situations.

> ./neutron/neutron-hostconfig/vpp/pom.xml:org.opendaylight.controller

project.groupId = org.opendaylight.neutron as expected. Condition 1 is set.

> ./neutron/neutron-hostconfig/pom.xml:org.opendaylight.controller

project.groupId = org.opendaylight.neutron as expected. Condition 1 is set.

> ./neutron/neutron-hostconfig/ovs/pom.xml:org.opendaylight.controller

project.groupId = org.opendaylight.neutron as expected. Condition 1 is set.

> ./neutron/neutron-hostconfig/utils/pom.xml:org.opendaylight.controller

project.groupId = org.opendaylight.neutron as expected. Condition 1 is set.

> ./neutron/neutron-logger/pom.xml:org.opendaylight.controller

project.groupId = org.opendaylight.neutron as expected. Condition 1 is set.

> ./sxp/features/odl-sxp-robot/pom.xml:org.opendaylight.odlparent

project.groupId = org.opendaylight.sxp as expected. Condition 1 is set.

> ./sxp/features/odl-sxp-controller/pom.xml:org.opendaylight.odlparent

project.groupId = org.opendaylight.sxp as expected. Condition 1 is set.

> ./sxp/features/pom.xml:org.opendaylight.odlparent

project.groupId = org.opendaylight.sxp as expected. Condition 1 is set.

> ./sxp/features/odl-sxp-core/pom.xml:org.opendaylight.odlparent

project.groupId = org.opendaylight.sxp as expected. Condition 1 is set.

> ./sxp/features/features-sxp/pom.xml:org.opendaylight.odlparent

project.groupId = org.opendaylight.sxp as expected. Condition 1 is set.

Does this make sense?

Comment by Anil Belur [ 22/Mar/17 ]

// suggestion from Thanh Ha on gerrit change #53380

So a situation that might occur is there might be more than 1 project that uses the same name for it's ARTIFACT_ID. For example many projects have an ARTIFACT_ID called "distribution-karaf". In which case we still don't know project is the cause.
I think an improved solution is to:
1) Run the for loop and find all pom.xml that has project.artifactId
2) Check if there is only 1 pom.xml containing ARTIFACT_ID. If there is then proceed to discover the group and email their dev and release mailing lists as appropriate.
3) If there is more than 1 pom.xml matching ARTIFACT_ID, then discover the groups of all matching pom.xmls and email only the release mailing list with a list of groups that have artifact IDs matching as a human will need to determine which project is failing. (Alternatively we could email all groups-dev mailing lists with matching ARTIFACT_IDs again including the full list of groups involved in hopes that they will deduplicate in the future.

Comment by Anil Belur [ 22/Mar/17 ]

Yes, we would have artifactId dups under several projects to be handled, here is the list:

applications: repeats: 3
bgp-parser-impl: repeats: 2
bgp-rib-impl: repeats: 2
binding-parent: repeats: 5
bundle-parent: repeats: 2
commons.integrationtest: repeats: 2
commons: repeats: 3
concepts: repeats: 2
config-parent: repeats: 5
distribution-karaf: repeats: 10
features4-extras: repeats: 2
features4-mdsal: repeats: 2
features-aggregator: repeats: 9
features-aggregator: repeats: 9
features-extras: repeats: 2
features-mdsal-aggregator: repeats: 2
features-mdsal: repeats: 2
features: repeats: 3
features-test: repeats: 2
ietf-restconf: repeats:2
ietf-restconf: repeats: 2
it-parent: repeats: 2
it: repeats: 3
karaf-aggregator: repeats: 2
karaf-parent: repeats: 2
karaf: repeats: 3
mdsal-artifacts: repeats: 2
model-aggregator: repeats: 3
model-parent: repeats: 3
netvirt-it: repeats: 2
odl-mdsal-common: repeats: 2
opendaylight-karaf-empty: repeats: 2
parents: repeats: 3
simple-client: repeats: 2
simple-it: repeats: 2
southbound-aggregator: repeats: 2
southbound-api: repeats: 2
southbound-artifacts: repeats: 2
southbound-features: repeats: 2
southbound-impl: repeats: 2
southbound-karaf: repeats: 2
testutils: repeats: 2
util: repeats: 3
utils.config: repeats: 2
utils.mdsal-utils: repeats: 2
utils: repeats: 4
utils.servicehelper: repeats: 2

Comment by Thanh Ha (zxiiro) [ 11/Apr/17 ]

I think this is resolved?

Comment by Anil Belur [ 11/Apr/17 ]

Yes, closing as resolved.

Generated at Wed Feb 07 20:37:21 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.