Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.9
-
None
-
None
Description
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
and this is the ant 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>
NB: the first install, which is of type 'jar' works.