MavenProject.getDependencyArtifacts() returns null when executed from custom
lifecycle
--------------------------------------------------------------------------------------
Key: MNG-4851
URL: http://jira.codehaus.org/browse/MNG-4851
Project: Maven 2 & 3
Issue Type: Bug
Components: Artifacts and Repositories
Affects Versions: 2.2.x (to be reviewed)
Environment: Ubuntu Linux 10.04, kernel version 2.6.35-5-generic-pae
#6-Ubuntu SMP Tue Jun 22 08:21:56 UTC 2010 i686 GNU/Linux
Reporter: Michael Cramer
Attachments: maven-testbug-plugin.zip
When executing a plugin mojo, there seems to be a case when the call to
MavenProject.getDependencyArtifacts() returns null when executed from a mojo
that forks a custom lifecycle execution. The method works fine when the mojo
is invoked directly or from pom. Compare the two cases in the included sample
plugin...
mvn test:maven-testbug-plugin:testbug1
mvn test:maven-testbug-plugin:testbug2
Executing the first will result in the dependencies being printed. Executing
the second results in a null pointer exception. But all the second really does
is call the first, unless I'm misunderstanding something...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira