Hi Hilco,

Le mercredi 29 août 2007, Hilco Wijbenga a écrit :
> Hi all,
>
> I ran into something strange while using the Maven Ant Tasks (2.0.7).
> My Ant build now includes a POM which refers to a parent POM.
>
> If I have the parent POM available in my local repository everything
> works fine. If not, then the build fails because it can't download the
> parent POM. (If I use Maven instead of Maven Ant Tasks then it works
> regardless.)
>
> My settings.xml contains the remote repository's location and my
> build.xml contains:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns:artifact="urn:maven-artifact-ant" default="build">
>   <target name="build">
>     <typedef resource="org/apache/maven/artifact/ant/antlib.xml"
> uri="urn:maven-artifact-ant">
>       <classpath>
>         <pathelement location="lib/maven-ant-tasks-2.0.7.jar"/>
>       </classpath>
>     </typedef>
>     <artifact:pom id="maven.project" file="pom.xml"/>
>     <artifact:dependencies verbose="true"
> filesetId="maven-ant-tasks.dependency.fileset">
>       <pom refid="maven.project"/>
>       <artifact:remoteRepository id="remote"
> url="http://maven.example.com/repository"/>
>     </artifact:dependencies>
>   </target>
> </project>
>
> Firstly, removing <artifact:remoteRepository> from build.xml fails the
> build. Apparently, settings.xml is ignored?
Can you precise how you declared this repository in your settings.xml?
Is it in a profile? Or is it a mirrorOf declaration? Or ...?
If you run ant with "-v" option, you'll see more precisely what is done.

>
> Secondly, why doesn't it download the parent POM? It's in the same
> repository as the JARs and those *are* downloaded (provided I've
> installed the parent POM locally).
Did you try not to use pom reference? Like:
     <artifact:dependencies verbose="true" 
filesetId="maven-ant-tasks.dependency.fileset">
       <pom file="pom.xml"/>

If you can create a testcase (with file:// remote repositories), it will be 
easier to help you.

Hervé

>
> Cheers,
> Hilco
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to