maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Taciano Tres (JIRA)" <j...@codehaus.org>
Subject [jira] (MDEP-375) dependency:tree fails with NPE if executed twice
Date Mon, 10 Sep 2012 14:36:36 GMT
Taciano Tres created MDEP-375:
---------------------------------

             Summary: dependency:tree fails with NPE if executed twice
                 Key: MDEP-375
                 URL: https://jira.codehaus.org/browse/MDEP-375
             Project: Maven 2.x Dependency Plugin
          Issue Type: Bug
          Components: tree
    Affects Versions: 2.5.1, 2.5
         Environment: Apache Maven 2.2.1 (r801777; 2009-08-06 16:16:01-0300)
Java version: 1.7.0_05
Java home: /usr/lib/jvm/jdk1.7.0_05/jre
Default locale: pt_BR, platform encoding: UTF-8
OS name: "linux" version: "2.6.32-41-generic" arch: "amd64" Family: "unix"
            Reporter: Taciano Tres


Plugin fails to generate the dependency tree when executed twice, the second one for Cobertura
life cycle:
{quote}
$ mvn --batch-mode --update-snapshots --errors clean install dependency:analyze-only cobertura:cobertura
(...)
[INFO] [dependency:tree {execution: gerar-dependency-tree}]
[INFO] Wrote dependency tree to: /target/classes/META-INF/bom/dependency-tree.txt
(...)
[INFO] Preparing cobertura:cobertura
(...)
[INFO] [dependency:tree {execution: gerar-dependency-tree}]
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] null
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NullPointerException
	at org.apache.maven.shared.dependency.tree.DefaultDependencyTreeBuilder.buildDependencyTree(DefaultDependencyTreeBuilder.java:139)
	at org.apache.maven.shared.dependency.graph.internal.Maven2DependencyGraphBuilder.buildDependencyGraph(Maven2DependencyGraphBuilder.java:55)
	at org.apache.maven.shared.dependency.graph.internal.DefaultDependencyGraphBuilder.buildDependencyGraph(DefaultDependencyGraphBuilder.java:63)
	at org.apache.maven.plugin.dependency.TreeMojo.execute(TreeMojo.java:202)
	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle(DefaultLifecycleExecutor.java:1205)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(DefaultLifecycleExecutor.java:1038)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:643)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
	at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO] ----
[INFO] Total time: 11 seconds
[INFO] Finished at: Mon Sep 10 11:02:34 BRT 2012
[INFO] Final Memory: 69M/379M
[INFO] ----
{quote}

The plugin is defined in {{pom.xml}} as:
{code:xml}
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<version>2.5</version>
				<executions>
					<execution>
						<id>gerar-dependency-tree</id>
						<phase>initialize</phase>
						<goals>
							<goal>tree</goal>
						</goals>
						<configuration>
							<appendOutput>false</appendOutput>
							<outputFile>${project.build.outputDirectory}/META-INF/bom/dependency-tree.txt</outputFile>
							<outputType>text</outputType>
						</configuration>
					</execution>
				</executions>
				<inherited>true</inherited>
			</plugin>
{code}

When I use Maven 3.0.4 it works correctly, but our CI server is stucked in Maven 2.2.1.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message