I've had this issue before too.
Weichsel, Ingo wrote:

Hello,

after upgrading to maven-artifact-ant-2.0 the classpath for a dependent
artifact is not set correctly, unless the artifact was installed locally
before running ant.


The ant task and our repository definition:

        <typedef resource="org/apache/maven/artifact/ant/antlib.xml"
uri="maven-artifact-ant">
                <classpath>
                        <pathelement
location="${basedir}/../lib/maven-artifact-ant-2.0-dep.jar" />
                </classpath>
        </typedef>
        
        <!-- declaring our remote repository -->
<artifact:remoteRepository id="central" url="http://company.de:9999/repository/";
        />


Definition of the dependency:


<artifact:dependencies pathId="myartifact.classpath"
filesetId="myartifact.fileset" verbose="true">
<dependency groupId="company" artifactId="myartifact" version="1.0-SNAPSHOT" />
        <remoteRepository refid="central" />
</artifact:dependencies>


"myartifact" depends on one other artifact "departifact".
Both "myartifact" and "departifact" are downloaded, if I delete the loacal
repository. But the artifact "myartifact" is neither included in the
classpath myartifact.classpath nor in the fileset. The artifact, it depends
on, is included.

If I build "myartifact" locally with mvn before running ant,
ant-artifact-maven works correctly.

I noticed a difference in the local repository between downloading via
maven-artifact-ant and installing locally.

My local repository after (deleting it and) running ant:

myartifact-1.0-20051025.085345-4.jar
myartifact-1.0-20051025.085345-4.pom
myartifact-1.0-SNAPSHOT.jar
myartifact-1.0-SNAPSHOT.pom
maven-metadata-remote.xml

My local repository after (deleting it and) installing by calling mvn:

myartifact-1.0-SNAPSHOT.jar
maven-metadata-local.xml
myartifact-1.0-SNAPSHOT.pom

Can anyone help me?

Greetings

        Ingo Weichsel

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