[jbosstools-issues] [JBoss JIRA] (JBIDE-15460) bumping plugin version with tycho 0.18.1 fails with NPE

Andre Dietisheim (JIRA) jira-events at lists.jboss.org
Fri Sep 6 10:21:03 EDT 2013


Andre Dietisheim created JBIDE-15460:
----------------------------------------

             Summary: bumping plugin version with tycho 0.18.1 fails with NPE
                 Key: JBIDE-15460
                 URL: https://issues.jboss.org/browse/JBIDE-15460
             Project: Tools (JBoss Tools)
          Issue Type: Bug
          Components: openshift
    Affects Versions: 4.2.0.Alpha1
            Reporter: Andre Dietisheim
            Assignee: Andre Dietisheim
             Fix For: 4.2.0.Alpha1


0) bumped plugin version: 

{code}
mvn org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion=2.5.1-SNAPSHOT
{code}

which ended up in tycho failing with an NPE:
{code}
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-versions-plugin:0.18.1:set-version (default-cli) on project openshift: Execution default-cli of goal org.eclipse.tycho:tycho-versions-plugin:0.18.1:set-version failed. NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.eclipse.tycho:tycho-versions-plugin:0.18.1:set-version (default-cli) on project openshift: Execution default-cli of goal org.eclipse.tycho:tycho-versions-plugin:0.18.1:set-version failed.
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
	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.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.eclipse.tycho:tycho-versions-plugin:0.18.1:set-version failed.
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
	... 19 more
Caused by: java.lang.NullPointerException
	at org.eclipse.tycho.versions.pom.GAV.getGroupId(GAV.java:23)
	at org.eclipse.tycho.versions.manipulation.PomManipulator.isGavEquals(PomManipulator.java:154)
	at org.eclipse.tycho.versions.manipulation.PomManipulator.changePlugins(PomManipulator.java:129)
	at org.eclipse.tycho.versions.manipulation.PomManipulator.changeBuild(PomManipulator.java:117)
	at org.eclipse.tycho.versions.manipulation.PomManipulator.applyChange(PomManipulator.java:83)
	at org.eclipse.tycho.versions.engine.VersionsEngine.applyChange(VersionsEngine.java:165)
	at org.eclipse.tycho.versions.engine.VersionsEngine.apply(VersionsEngine.java:142)
	at org.eclipse.tycho.versions.SetMojo.execute(SetMojo.java:78)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
	... 20 more
{code}

there are 2 ways to fix this:

* use tycho 0.17 (not 0.18.1):
{code}
mvn org.eclipse.tycho:tycho-versions-plugin:0.17.0:set-version -DnewVersion=2.5.1-SNAPSHOT
{code}

* look for artifactId that's missing a groupId. For me it was using maven-clean-plugin:
{code}
	<build>
		<plugins>
			<plugin>
				<artifactId>maven-dependency-plugin</artifactId>
				<version>2.7</version><!--$NO-MVN-MAN-VER$-->
				<executions>
					<execution>
						<id>get-libs</id>
						<goals>
							<goal>copy</goal>
						</goals>
						<phase>generate-resources</phase>
					</execution>
				</executions>
{code}

correcting it fixed the NPE in tycho 0.18.1
{code}

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<version>2.7</version><!--$NO-MVN-MAN-VER$-->
{code}


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


More information about the jbosstools-issues mailing list