Maven module has different versions of the same library - maven

Good day!
I have maven multimodule project. Contains war,jar and ear modules. When I try to start local Tomcat (web module exploded), got the following error:
Possible root causes include a too low setting for -Xss and illegal
cyclic inheritance dependencies. The class hierarchy being processed
was
[org.bouncycastle.asn1.ASN1EncodableVector->org.bouncycastle.asn1.DEREncodableVector->org.bouncycastle.asn1.ASN1EncodableVector]
I have read this question Avoid cyclic reference inheritance in grails
and found two version of jar: org.bouncycastle:bcprov-jdk15on:jar and org.bouncycastle:bcprov-jdk14:jar
but still cannot understand how to solve the issue..
Thank you in advance!
tor for org.codehaus.mojo:gwt-maven-plugin:jar:${gwt.version}
[INFO]
[INFO] --- maven-dependency-plugin:2.4:tree (default-cli) # desktop-app ---
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building arm-data-entry 1.0.30-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] Failed to retrieve plugin descriptor for org.codehaus.mojo:gwt-maven-plugin:${gwt.version}: Plugin org.codehau
s.mojo:gwt-maven-plugin:${gwt.version} or one of its dependencies could not be resolved: Failed to read artifact descrip
tor for org.codehaus.mojo:gwt-maven-plugin:jar:${gwt.version}
[INFO]
[INFO] --- maven-dependency-plugin:2.4:tree (default-cli) # arm-data-entry ---
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building sea-print 1.0.30-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] Failed to retrieve plugin descriptor for org.codehaus.mojo:gwt-maven-plugin:${gwt.version}: Plugin org.codehau
s.mojo:gwt-maven-plugin:${gwt.version} or one of its dependencies could not be resolved: Failed to read artifact descrip
tor for org.codehaus.mojo:gwt-maven-plugin:jar:${gwt.version}
[INFO]
[INFO] --- maven-dependency-plugin:2.4:tree (default-cli) # sea-print ---
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building setup-docs 1.0.30-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] Failed to retrieve plugin descriptor for org.codehaus.mojo:gwt-maven-plugin:${gwt.version}: Plugin org.codehau
s.mojo:gwt-maven-plugin:${gwt.version} or one of its dependencies could not be resolved: Failed to read artifact descrip
tor for org.codehaus.mojo:gwt-maven-plugin:jar:${gwt.version}
[INFO]
[INFO] --- maven-dependency-plugin:2.4:tree (default-cli) # setup-docs ---
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building pdf-cuter 1.0.30-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] Failed to retrieve plugin descriptor for org.codehaus.mojo:gwt-maven-plugin:${gwt.version}: Plugin org.codehau
s.mojo:gwt-maven-plugin:${gwt.version} or one of its dependencies could not be resolved: Failed to read artifact descrip
tor for org.codehaus.mojo:gwt-maven-plugin:jar:${gwt.version}
[INFO]
[INFO] --- maven-dependency-plugin:2.4:tree (default-cli) # pdf-cuter ---
[INFO] ru.my-company.ea.old:pdf-cuter:jar:1.0.30-SNAPSHOT
[INFO] \- org.icepdf.os:icepdf-core:jar:6.1.2:compile
[INFO] +- org.bouncycastle:bcprov-jdk15on:jar:1.54:compile
[INFO] +- org.bouncycastle:bcprov-ext-jdk15on:jar:1.54:compile
[INFO] \- org.bouncycastle:bcpkix-jdk15on:jar:1.54:compile
[INFO] \- (org.bouncycastle:bcprov-jdk15on:jar:1.54:compile - omitted for duplicate)
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building sea-web 1.0.30-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.4:tree (default-cli) # sea-web ---
[INFO] ru.my-company.ea.old:sea-web:war:1.0.30-SNAPSHOT
[INFO] +- ru.my-company.ea.old:pdf-cuter:jar:1.0.30-SNAPSHOT:compile
[INFO] | \- org.icepdf.os:icepdf-core:jar:6.1.2:compile
[INFO] | +- org.bouncycastle:bcprov-jdk15on:jar:1.54:compile
[INFO] | +- org.bouncycastle:bcprov-ext-jdk15on:jar:1.54:compile
[INFO] | \- org.bouncycastle:bcpkix-jdk15on:jar:1.54:compile
[INFO] | \- (org.bouncycastle:bcprov-jdk15on:jar:1.54:compile - omitted for duplicate)
[INFO] \- net.sf.jasperreports:jasperreports:jar:4.7.1:compile
[INFO] \- com.lowagie:itext:jar:2.1.7:compile
[INFO] \- org.bouncycastle:bctsp-jdk14:jar:1.38:compile
[INFO] +- org.bouncycastle:bcprov-jdk14:jar:1.38:compile
[INFO] \- org.bouncycastle:bcmail-jdk14:jar:1.38:compile
[INFO] \- (org.bouncycastle:bcprov-jdk14:jar:1.38:compile - omitted for duplicate)
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building the-ear 1.0.30-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] Failed to retrieve plugin descriptor for org.codehaus.mojo:gwt-maven-plugin:${gwt.version}: Plugin org.codehau
s.mojo:gwt-maven-plugin:${gwt.version} or one of its dependencies could not be resolved: Failed to read artifact descrip
tor for org.codehaus.mojo:gwt-maven-plugin:jar:${gwt.version}
[INFO]
[INFO] --- maven-dependency-plugin:2.4:tree (default-cli) # the-ear ---
[INFO] ru.my-company.ea.old:the-ear:ear:1.0.30-SNAPSHOT
[INFO] \- net.sf.jasperreports:jasperreports:jar:4.7.1:compile
[INFO] \- com.lowagie:itext:jar:2.1.7:compile
[INFO] \- org.bouncycastle:bctsp-jdk14:jar:1.38:compile
[INFO] +- org.bouncycastle:bcprov-jdk14:jar:1.38:compile
[INFO] \- org.bouncycastle:bcmail-jdk14:jar:1.38:compile
[INFO] \- (org.bouncycastle:bcprov-jdk14:jar:1.38:compile - omitted for duplicate)
[INFO] ------------------------------------------------------------------------
........
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.698 s
[INFO] Finished at: 2018-09-07T11:26:32+05:00
[INFO] Final Memory: 21M/226M
[INFO] ------------------------------------------------------------------------
D:\Projects\sea-eclipse>

Related

vaadin jsoup security alert

In a recent security alert, referenced here, I see there might be security concerns with Vaadin 7 because of a jsoup vulnerability. Because of other factors, I cannot upgrade. So I thought about just including the jsoup directly in my project. So before it was included indirectly via vaadin-server, now it is included directly, and the version vaadin-server references is "omitted for conflict with 1.14.2". Is this a safe way to address this security concern?
I am using Vaadin 7.7.17 and maven.
I ask largely because Vaadin did not offer this as a possible solution, so I assumed it would fail. But since maven is showing no error, I am worried I am missing something that will only show up in some strange runtime behavior.
Here is the dependency tree built via mvn dependency:tree. First of all, the original version, stripped down:
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------< com.mobiwms:vaadinwebsite >----------------------
[INFO] Building vaadinwebsite 4.0.31
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) # vaadinwebsite ---
[INFO] com.mobiwms:vaadinwebsite:war:4.0.31
[INFO] +- javax.servlet:javax.servlet-api:jar:3.0.1:provided
[INFO] +- com.vaadin:vaadin-server:jar:7.7.17:compile
[INFO] | +- com.vaadin:vaadin-sass-compiler:jar:0.9.13:compile
[INFO] | | +- org.w3c.css:sac:jar:1.3:compile
[INFO] | | \- com.vaadin.external.flute:flute:jar:1.3.0.gg2:compile
[INFO] | +- com.vaadin:vaadin-shared:jar:7.7.17:compile
[INFO] | \- org.jsoup:jsoup:jar:1.8.3:compile
[INFO] +- com.vaadin:vaadin-push:jar:7.7.17:compile
[INFO] | \- com.vaadin.external.atmosphere:atmosphere-runtime:jar:2.2.13.vaadin1:compile
[INFO] | \- com.vaadin.external.slf4j:vaadin-slf4j-jdk14:jar:1.6.1:compile
[INFO] +- com.vaadin:vaadin-client:jar:7.7.17:provided
... // Stripped out unrelated portions of hierarchy.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.758 s
[INFO] Finished at: 2021-10-27T18:59:19-04:00
[INFO] ------------------------------------------------------------------------
And now the new version, stripped down:
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------< com.mobiwms:vaadinwebsite >----------------------
[INFO] Building vaadinwebsite 4.0.31
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) # vaadinwebsite ---
[INFO] com.mobiwms:vaadinwebsite:war:4.0.31
[INFO] +- javax.servlet:javax.servlet-api:jar:3.0.1:provided
[INFO] +- com.vaadin:vaadin-server:jar:7.7.17:compile
[INFO] | +- com.vaadin:vaadin-sass-compiler:jar:0.9.13:compile
[INFO] | | +- org.w3c.css:sac:jar:1.3:compile
[INFO] | | \- com.vaadin.external.flute:flute:jar:1.3.0.gg2:compile
[INFO] | \- com.vaadin:vaadin-shared:jar:7.7.17:compile
[INFO] +- com.vaadin:vaadin-push:jar:7.7.17:compile
[INFO] | \- com.vaadin.external.atmosphere:atmosphere-runtime:jar:2.2.13.vaadin1:compile
[INFO] | \- com.vaadin.external.slf4j:vaadin-slf4j-jdk14:jar:1.6.1:compile
[INFO] +- com.vaadin:vaadin-client:jar:7.7.17:provided
... // Stripped out unrelated portions of hierarchy.
[INFO] \- org.jsoup:jsoup:jar:1.14.2:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.285 s
[INFO] Finished at: 2021-10-27T18:56:01-04:00
[INFO] ------------------------------------------------------------------------
Just noting here. There is no actual problem in Vaadin 7 itself that would be impacted due potential Jsoup vulnerability in question. The dependency was updated to a newer version more in purpose to enforce application developers to use the newer version. Newer version of the Jsoup had some API changes that needed small code changes in Vaadin 7. If your application is not using Jsoup in the way that the vulnerability is not exposed, then the upgrade is not absolutely mandatory. Also reminding that Vaadin 7 versions newer than 7.7.17 require commercial license for extended support.

Maven dependency tree for parent pom with multiple profiles

I am having a nested multi module maven project as below.
The parent pom specifies the profiles to build various component.
Now I need to get the list of all dependencies of all component which I believe that I can get from dependency tree of eclipse ide. But it is not getting displayed. Is there any other way to get the list or I am trying a wrong thing.
Use the maven dependency plugin along with a profile in the normal way.
mvn dependency:tree -Pjava8
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] parent [pom]
[INFO] project-mod-1 [pom]
[INFO] java8 [jar]
[INFO] java7 [jar]
[INFO]
[INFO] --------------------------< com.greg:parent >---------------------------
[INFO] Building parent 1.0-SNAPSHOT [1/4]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) # parent ---
[INFO] com.greg:parent:pom:1.0-SNAPSHOT
[INFO]
[INFO] -----------------------< com.greg:project-mod-1 >-----------------------
[INFO] Building project-mod-1 1.0-SNAPSHOT [2/4]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) # project-mod-1 ---
[INFO] com.greg:project-mod-1:pom:1.0-SNAPSHOT
[INFO]
[INFO] ---------------------------< com.greg:java8 >---------------------------
[INFO] Building java8 1.0-SNAPSHOT [3/4]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) # java8 ---
[INFO] com.greg:java8:jar:1.0-SNAPSHOT
[INFO] \- junit:junit:jar:4.11:test
[INFO] \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO]
[INFO] ---------------------------< com.greg:java7 >---------------------------
[INFO] Building java7 1.0-SNAPSHOT [4/4]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) # java7 ---
[INFO] com.greg:java7:jar:1.0-SNAPSHOT
[INFO] \- junit:junit:jar:4.11:test
[INFO] \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for parent 1.0-SNAPSHOT:
[INFO]
[INFO] parent ............................................. SUCCESS [ 2.262 s]
[INFO] project-mod-1 ...................................... SUCCESS [ 0.015 s]
[INFO] java8 .............................................. SUCCESS [ 0.111 s]
[INFO] java7 .............................................. SUCCESS [ 0.250 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.169 s
[INFO] Finished at: 2019-03-20T08:18:24Z
[INFO] ------------------------------------------------------------------------

Wasabi fails on build - Maven plugin

See the solution below
Using Ubuntu 16.04 on Google Cloud
Everything is done as noted here https://github.com/intuit/wasabi.
After successfully bootstraping the wasabai
by running:
$ ./bin/wasabi.sh bootstrap
and getting
Everything looks all right!
...
installed dependencies.
Then I reboot the machine
$ sudo reboot
and try running the build
$ ./bin/wasabi.sh build
which obviously fails, this is the output I see:
[INFO] Scanning for projects...
[INFO] Inspecting build with total of 30 modules...
[INFO] Installing Nexus Staging features:
[INFO] ... total of 30 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] wasabi
[INFO] wasabi-experiment-objects
[INFO] wasabi-export
[INFO] wasabi-assignment-objects
[INFO] wasabi-exceptions
[INFO] wasabi-analytics-objects
[INFO] wasabi-authentication-objects
[INFO] wasabi-eventlog
[INFO] wasabi-auditlog-objects
[INFO] wasabi-authorization-objects
[INFO] wasabi-cassandra
[INFO] wasabi-database
[INFO] wasabi-feedback-objects
[INFO] wasabi-user-directory
[INFO] wasabi-repository
[INFO] wasabi-experiment
[INFO] wasabi-assignment
[INFO] wasabi-util
[INFO] wasabi-analytics
[INFO] wasabi-auditlog
[INFO] wasabi-event-objects
[INFO] wasabi-event
[INFO] wasabi-email
[INFO] wasabi-feedback
[INFO] wasabi-authentication
[INFO] wasabi-authorization
[INFO] wasabi-api
[INFO] wasabi-functional-test
[INFO] wasabi-main
[INFO] wasabi-swagger-ui
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building wasabi 1.0.20161107232436-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # wasabi ---
[INFO]
[INFO] --- maven-resources-plugin:2.7:copy-resources (copy-resources) # wasabi ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /var/www/html/wasabi/wasabi/src/main/env
[INFO]
[INFO] --- jacoco-maven-plugin:0.7.7.201606060606:prepare-agent (prepare-agent) # wasabi ---
[INFO] argLine set to -javaagent:/home/silversillu/.m2/repository/org/jacoco/org.jacoco.agent/0.7.7.201606060606/org.jacoco.agent-0.7.7.201606060606-runtime.jar=destfile=/var/www/html/wasabi/wasabi/target/jacoco.exec,excludes=com/intuit/wasabi/tests/**
[INFO]
[INFO] --- jacoco-maven-plugin:0.7.7.201606060606:report (post-unit-test) # wasabi ---
[INFO] Skipping JaCoCo execution due to missing execution data file.
[INFO]
[INFO] --- jacoco-maven-plugin:0.7.7.201606060606:report (report) # wasabi ---
[INFO] Skipping JaCoCo execution due to missing execution data file.
[INFO]
[INFO] --- maven-javadoc-plugin:2.10.3:jar (attach-javadocs) # wasabi ---
[INFO] Not executing Javadoc as the project is not a Java classpath-capable package
[INFO]
[INFO] --- maven-source-plugin:2.4:jar-no-fork (attach-sources) # wasabi ---
[INFO]
[INFO] --- build-helper-maven-plugin:1.10:remove-project-artifact (remove-old-artifacts) # wasabi ---
[INFO] /home/silversillu/.m2/repository/com/intuit/wasabi/wasabi removed.
[INFO]
[INFO] --- maven-site-plugin:3.4:attach-descriptor (attach-descriptor) # wasabi ---
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building wasabi-experiment-objects 1.0.20161107232436-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # wasabi-experiment-objects ---
[INFO]
[INFO] --- maven-resources-plugin:2.7:copy-resources (copy-resources) # wasabi-experiment-objects ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /var/www/html/wasabi/wasabi/modules/experiment-objects/src/main/env
[INFO]
[INFO] --- jacoco-maven-plugin:0.7.7.201606060606:prepare-agent (prepare-agent) # wasabi-experiment-objects ---
[INFO] argLine set to -javaagent:/home/silversillu/.m2/repository/org/jacoco/org.jacoco.agent/0.7.7.201606060606/org.jacoco.agent-0.7.7.201606060606-runtime.jar=destfile=/var/www/html/wasabi/wasabi/modules/experiment-objects/target/jacoco.exec,excludes=com/intuit/wasabi/tests/**
[INFO]
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) # wasabi-experiment-objects ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /var/www/html/wasabi/wasabi/modules/experiment-objects/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) # wasabi-experiment-objects ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 24 source files to /var/www/html/wasabi/wasabi/modules/experiment-objects/target/classes
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Skipping wasabi
[INFO] This project has been banned from the build due to previous failures.
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] wasabi ............................................. SUCCESS [ 4.085 s]
[INFO] wasabi-experiment-objects .......................... FAILURE [ 0.633 s]
[INFO] wasabi-export ...................................... SKIPPED
[INFO] wasabi-assignment-objects .......................... SKIPPED
[INFO] wasabi-exceptions .................................. SKIPPED
[INFO] wasabi-analytics-objects ........................... SKIPPED
[INFO] wasabi-authentication-objects ...................... SKIPPED
[INFO] wasabi-eventlog .................................... SKIPPED
[INFO] wasabi-auditlog-objects ............................ SKIPPED
[INFO] wasabi-authorization-objects ....................... SKIPPED
[INFO] wasabi-cassandra ................................... SKIPPED
[INFO] wasabi-database .................................... SKIPPED
[INFO] wasabi-feedback-objects ............................ SKIPPED
[INFO] wasabi-user-directory .............................. SKIPPED
[INFO] wasabi-repository .................................. SKIPPED
[INFO] wasabi-experiment .................................. SKIPPED
[INFO] wasabi-assignment .................................. SKIPPED
[INFO] wasabi-util ........................................ SKIPPED
[INFO] wasabi-analytics ................................... SKIPPED
[INFO] wasabi-auditlog .................................... SKIPPED
[INFO] wasabi-event-objects ............................... SKIPPED
[INFO] wasabi-event ....................................... SKIPPED
[INFO] wasabi-email ....................................... SKIPPED
[INFO] wasabi-feedback .................................... SKIPPED
[INFO] wasabi-authentication .............................. SKIPPED
[INFO] wasabi-authorization ............................... SKIPPED
[INFO] wasabi-api ......................................... SKIPPED
[INFO] wasabi-functional-test ............................. SKIPPED
[INFO] wasabi-main ........................................ SKIPPED
[INFO] wasabi-swagger-ui .................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.399 s
[INFO] Finished at: 2017-01-10T21:48:24+00:00
[INFO] Final Memory: 29M/70M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile (default-compile) on project wasabi-experiment-objects: Fatal error compiling: directory not found: /var/www/html/wasabi/wasabi/modules/experiment-objects/target/classes -> [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/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :wasabi-experiment-objects
error: invalid: mvn -Pdevelopment clean -Dmaven.test.skip=true package javadoc:aggregate
usage: build.sh [options]
options:
-b | --build [ true | false ] : build; default: false
-p | --profile [profile] : build profile; default: development
-t | --test [ true | false ] : test; default: false
-h | --help : help message
Solution
I don't know if it makes any sense but what fixed the issue was moving my cloud machine from micro to much more powerful one n1-standard-4 (4 vCPUs, 15 GB memory)
can you try the following:
% WASABI_MAVEN="-e -X" ./bin/wasabi.sh build
additionally one could try issuing the reported failed mvn invocation directly, ie:
% mvn -e -X -Pdevelopment clean -Dmaven.test.skip=true package javadoc:aggregate
clearly none of the codebase is compiling given the first module fails.
i don't see why a reboot would matter unless logged in as a different user, some directory is owned by 'root' and not writable/deletable, etc.
let's fix this :)

dependency:resolve and :tree resolve different dependencies?

When I run dependency:tree on my pom.xml I get the following output:
...
[INFO] --- maven-dependency-plugin:2.1:tree (default-cli) # com.test.client ---
[INFO] assemblies:com.test.client:jar:1.0.0-SNAPSHOT
[INFO] +- foundation:com.test.core:jar:1.0.0:compile
[INFO] | \- junit:junit:jar:4.11:compile
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.3:compile
[INFO] \- assemblies:com.test.security:jar:1.0.0-SNAPSHOT:compile
...
When I run dependency:resolve on the same pom I get:
...
[INFO] The following files have been resolved:
[INFO] assemblies:com.test.security:jar:1.0.0-SNAPSHOT:compile
[INFO] foundation:com.test.core:jar:1.0.1-SNAPSHOT:compile
[INFO] junit:junit:jar:4.11:compile
[INFO] org.hamcrest:hamcrest-core:jar:1.3:compile
...
Why is the version of com.test.core different between :resolve and :tree?
This seems to be a bug in Maven 3.0.4. I updated to version 3.2.1 and now dependency:tree and :resolve are resolving the same dependencies.

Maven Dependency Plugin appendOutput Parameter is Failing?

UPDATE: This issue seems to have resolved itself. I could still produce it on a copy of the source code, but it was a temporary copy that I deleted before realizing I would need it to pin this issue down. I'm continuing to track this and see if I can identify a root cause. If not, I will close the issue.
When I run mvn dependency:list -DoutputFile=/path/to/file.txt -DappendOutput=true from the root directory of a multi-module Maven project, the resultant output file only contains the dependencies of the last module declared in the modules section of the root pom.xml file. Is there something different I need to do to get the output of each submodule to append to the output file?
Configuration:
Maven 3.0.3
maven-dependency-plugin 2.6
When I'm using the following command: -
mvn dependency:list -DoutputFile=/path/to/file.txt -DappendOutput=true
The result is invalid and the Maven told me that
[INFO] --- maven-dependency-plugin:2.1:list (default-cli) # ...
Then I change to specify the version
mvn org.apache.maven.plugins:maven-dependency-plugin:2.6:list -DoutputFile=/path/to/file.txt -DappendOutput=true
The result is valid and the Maven told me that
[INFO] --- maven-dependency-plugin:2.6:list (default-cli) # ...
I would suggest you to ensure that the executing is the version 2.6. Anyhow I always use the following command as
mvn dependency:list > /path/to/file.txt
IMHO the result is better and more clear for each module as the following example: -
[INFO] Scanning for projects...
[INFO] -------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] my-parent
[INFO] my-sub1
[INFO] my-sub2
[INFO]
[INFO] -------------------------------------------------------------------
[INFO] Building my-parent
[INFO] -------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.1:list (default-cli) # my-parent ---
[INFO]
[INFO] The following files have been resolved:
...
[INFO] -------------------------------------------------------------------
[INFO] Building my-sub1
[INFO] -------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.1:list (default-cli) # my-sub1 ---
[INFO]
[INFO] The following files have been resolved:
...
[INFO] -------------------------------------------------------------------
[INFO] Building my-sub2
[INFO] -------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.1:list (default-cli) # my-sub2 ---
[INFO]
[INFO] The following files have been resolved:
...
[INFO]
[INFO] -------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] my-parent ........................................ SUCCESS [0.745s]
[INFO] my-sub1 .......................................... SUCCESS [0.675s]
[INFO] my-sub2 .......................................... SUCCESS [0.671s]
[INFO] -------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] -------------------------------------------------------------------
[INFO] Total time: 2.938s
[INFO] Finished at: Fri Mar 01 17:01:39 ICT 2013
[INFO] Final Memory: 17M/218M
[INFO] -------------------------------------------------------------------
I hope this may help.
Regards,
Charlee Ch.

Resources