[fedora-java] Help needed with maven-ant-tasks

Deepak Bhole dbhole at redhat.com
Thu Aug 26 20:40:30 UTC 2010


* Orion Poplawski <orion at cora.nwra.com> [2010-08-23 17:47]:
> On 08/23/2010 02:35 PM, Deepak Bhole wrote:
> >* Orion Poplawski<orion at cora.nwra.com>  [2010-08-23 15:52]:
> >>On 08/23/2010 12:45 PM, Deepak Bhole wrote:
> >>>
> >>>Ah I see. In that case, you will also need to pass
> >>>-DDmaven.repo.local=... and ensure that the value matches what you
> >>>provided via the original mvn-jpp call in the spec file.
> >>
> >>Tried that, but it really looks like the invoker.mavenOpts just
> >>aren't making it to the maven execution.
> >>
> >>[DEBUG] Interpolate
> >>/builddir/build/BUILD/maven-ant-tasks-2.1.1/src/it/settings.xml to /builddir/build/BUILD/maven-ant-tasks-2.1.1/target/it/interpolated-settings.xml
> >>[INFO] Building: ant-run-plugin-with-ant-1.8.0/pom.xml
> >>[DEBUG] Using invoker properties:
> >>[DEBUG]   invoker.goals = validate
> >>[DEBUG]   invoker.mavenOpts = -Dmaven2.jpp.mode
> >>[DEBUG]   invoker.offline = true
> >>[DEBUG] build log initialized in: /builddir/build/BUILD/maven-ant-tasks-2.1.1/target/it/ant-run-plugin-with-ant-1.8.0/build.log
> >>[DEBUG] Using MAVEN_OPTS: -Dmaven2.jpp.mode
> >>[DEBUG] Executing: /bin/sh -c cd /builddir/build/BUILD/maven-ant-tasks-2.1.1/target/it/ant-run-plugin-with-ant-1.8.0
> >>&&  /usr/share/maven2/bin/mvn -B -o -X -D maven.repo.local=/builddir/build/BUILD/maven-ant-tasks-2.1.1/target/local-repo
> >>-s /builddir/build/BUILD/maven-ant-tasks-2.1.1/target/
> >>it/interpolated-settings.xml validate
> >>[INFO] ..FAILED (1.0 s)
> >>
> >>
> >>
> >>[DEBUG] Building Maven user-level plugin registry from:
> >>'/builddir/.m2/plugin-registry.xml'
> >>[DEBUG] Building Maven global-level plugin registry from:
> >>'/usr/share/maven2/conf/plugin-registry.xml'
> >>[INFO] NOTE: Maven is executing in offline mode. Any artifacts not
> >>already in your local repository will be inaccessible.
> >>
> >>Project ID: org.apache.maven.plugins:maven-antrun-plugin
> >>
> >>Reason: POM 'org.apache.maven.plugins:maven-antrun-plugin' not found
> >>in repository: System is off line.
> >>
> >>   org.apache.maven.plugins:maven-antrun-plugin:pom:1.3
> >>
> >>  for project org.apache.maven.plugins:maven-antrun-plugin
> >>
> >>
> >>http://www.cora.nwra.com/~orion/fedora/maven-ant-tasks/build.log
> >>http://www.cora.nwra.com/~orion/fedora/maven-ant-tasks/ant-run-plugin-with-ant-1.8.0/build.log
> >>http://www.cora.nwra.com/~orion/fedora/maven-ant-tasks/ant-run-plugin-with-ant-1.6/build.log
> >>http://www.cora.nwra.com/~orion/fedora/maven-ant-tasks/ant-tasks-in-ant-run-plugin/build.log
> >>
> >
> >Doh! Sorry, I haven't used the invoker plugin enough to know what to do
> >in this case :/ If you can provide me with a latest srpm, I can try
> >building it and might be able to trace the issue..
> 
>  http://www.cora.nwra.com/~orion/fedora/maven-ant-tasks-2.1.1-1.fc13.src.rpm
> 
> Really seems like invoker should be handling this.  Thanks for looking at it.
> 

After lots of poking, I think I finally found the problem. It comes down
to this file:

http://svn.apache.org/repos/asf/maven/shared/tags/maven-shared-components-15/maven-invoker/src/main/java/org/apache/maven/shared/invoker/MavenCommandLineBuilder.java

That line builds the mvn command that gets executed and what is
happening is that it is setting maven.repo.local based on the parent
(mvn-jpp) call which has it set. However, there is a bug in the
setEnvironmentPaths() function which causes it to provide the "-D" and
"maven.repo.local..." as 2 separate args instead of one.

Outside of patching the above file, afaik here is no way to fix 
this and you are probably better off just disabling the 
integration tests.

Cheers,
Deepak


> -- 
> Orion Poplawski
> Technical Manager                     303-415-9701 x222
> NWRA/CoRA Division                    FAX: 303-415-9702
> 3380 Mitchell Lane                  orion at cora.nwra.com
> Boulder, CO 80301              http://www.cora.nwra.com


More information about the java-devel mailing list