maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antony Stubbs (JIRA)" <j...@codehaus.org>
Subject [jira] Commented: (MANTTASKS-116) NPE if installing pom with type pom
Date Wed, 13 Aug 2008 06:37:26 GMT

    [ http://jira.codehaus.org/browse/MANTTASKS-116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=144889#action_144889
] 

Antony Stubbs commented on MANTTASKS-116:
-----------------------------------------

ok my bad. actually forgot to change the type to 'pom' in the pom.xml. 

Can we change the title of the issue to NPE when install target is missing file and pom type
is JAR? ;)

> NPE if installing pom with type pom
> -----------------------------------
>
>                 Key: MANTTASKS-116
>                 URL: http://jira.codehaus.org/browse/MANTTASKS-116
>             Project: Maven 2.x Ant Tasks
>          Issue Type: Bug
>            Reporter: Antony Stubbs
>
> {code}
> maven-repo-install:
> parsing buildfile jar:file:/C:/dev/tools/maven-ant-tasks-lib/maven-ant-tasks-2.0.9.jar!/org/apache/maven/artifact/ant/antlib.xml
with URI = jar:file:/C:/dev/tools/maven-ant-tasks-lib/maven-ant-tasks-2.0.9.jar!/org/apache/maven/artifact/ant/antlib.xml
> [artifact:dependencies] Loading Maven settings file: C:\dev\tools\maven\conf\settings.xml
> [artifact:dependencies] Maven Ant Tasks version: 2.0.9
> [artifact:dependencies] Using local repository: C:\repository
> [artifact:dependencies] There were no dependencies specified
> [artifact:dependencies] Resolving dependencies...
> [artifact:dependencies] Using remote repositories:
>   - id=central, url=http://repo1.maven.org/maven2, releases=enabled, snapshots=disabled,
proxy=10.106.42.46
>   - id=central, url=http://repo1.maven.org/maven2, releases=enabled, snapshots=disabled,
proxy=10.106.42.46
> org.apache.maven:super-pom:jar:2.0 (selected)
> [artifact:pom] Using remote repositories:
>   - id=central, url=http://repo1.maven.org/maven2, releases=enabled, snapshots=disabled
> [artifact:install] [INFO] Installing C:\dev\enterprise-ws\dist\client-es-2.0.12.jar to
c:\repository\...\enterprise-ws-client\1.1-SNAPSHOT\enterprise-ws-client-1.1-SNAPSHOT.jar
> [artifact:pom] Using remote repositories:
>   - id=central, url=http://repo1.maven.org/maven2, releases=enabled, snapshots=disabled
>      [echo] installing pom
> BUILD FAILED
> C:\dev\enterprise-ws\build.xml:231: java.lang.NullPointerException
> 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:115)
> 	at org.apache.tools.ant.Task.perform(Task.java:348)
> 	at org.apache.tools.ant.Target.execute(Target.java:357)
> 	at org.apache.tools.ant.Target.performTasks(Target.java:385)
> 	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
> 	at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
> 	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
> 	at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
> 	at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
> 	at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
> 	at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
> Caused by: java.lang.NullPointerException
> 	at org.apache.maven.artifact.installer.DefaultArtifactInstaller.install(DefaultArtifactInstaller.java:71)
> 	at org.apache.maven.artifact.ant.InstallTask.doExecute(InstallTask.java:62)
> 	at org.apache.maven.artifact.ant.AbstractArtifactTask.execute(AbstractArtifactTask.java:665)
> 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
> 	... 10 more
> --- Nested Exception ---
> java.lang.NullPointerException
> 	at org.apache.maven.artifact.installer.DefaultArtifactInstaller.install(DefaultArtifactInstaller.java:71)
> 	at org.apache.maven.artifact.ant.InstallTask.doExecute(InstallTask.java:62)
> 	at org.apache.maven.artifact.ant.AbstractArtifactTask.execute(AbstractArtifactTask.java:665)
> 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
> 	at org.apache.tools.ant.Task.perform(Task.java:348)
> 	at org.apache.tools.ant.Target.execute(Target.java:357)
> 	at org.apache.tools.ant.Target.performTasks(Target.java:385)
> 	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
> 	at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
> 	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
> 	at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
> 	at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
> 	at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
> 	at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
> Total time: 5 seconds
> {code}
> and this is the ant code
> {code}
> 		<!-- install client jar into maven repo -->
> 		<artifact:dependencies settingsFile="../tools/maven/conf/settings.xml" />
> 		<property name="M2_HOME" value="../tools/maven" />
> 		<artifact:localRepository id="local.repository" path="c:/repository" layout="default"
/>
> 		<artifact:pom id="pom.es-client" file="etc/maven-client-es/pom.xml">
> 			<localRepository refid="local.repository" />
> 		</artifact:pom>
> 		<artifact:install file="${dist.dir}/client-${es.jar}">
> 			<localRepository refid="local.repository" />
> 			<pom refid="pom.es-client" />
> 		</artifact:install>
> 		<!-- install main pom -->
> 		<artifact:pom id="pom.es" file="pom.xml">
> 			<localRepository refid="local.repository" />
> 		</artifact:pom>
> <echo>installing pom</echo>
> 		<artifact:install>
> 			<localRepository refid="local.repository" />
> 			<pom refid="pom.es" />
> 		</artifact:install>
> {code}
> NB: the first install, which is of type 'jar' works.

-- 
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

        

Mime
View raw message