[ http://jira.codehaus.org/browse/MNG-1408?page=comments#action_64194 ]
Dan Rollo commented on MNG-1408: -------------------------------- FWIW, I'm seeing this problem with v2.0.4, but BOTH the fileset and classpath attribs are incorrect (which also means no workaround exists that I can find). Below are the relevant snippets from a build, in case it helps. This was generated after deleting the bhatestutil dependency from my local repo. Path shown when fetching artifact from remote rep: ...util/1.0-SNAPSHOT/bhatestutil-1.0-20060422.014944-34.jar But then when the fileset is created for Ant, the (incorrect) path shown is: ...util/bhatestutil/1.0-20060422.014944-34/bhatestutil-1.0-20060422.014944-34.jar build.xml: <artifact:dependencies verbose="true" filesetId="fs.deps.test" pathId="cp.deps.test" useScope="test"> <pom refid="maven.project"/> </artifact:dependencies> <property name="cp.compilet.kludge2" refid="cp.deps.test"/> <property name="classpath.compile.test" value="${cp.compilet.kludge2}"/> <javac srcdir="${dir.test}" destdir="${dir.classes.test}" classpath="${dir.classes};${classpath.compile.test}" debug="on" optimize="off" deprecation="on" source="1.3" target="1.2" /> Output from ant compile: [artifact:dependencies] Downloading: com/bhaweb/testutil/bhatestutil/1.0-SNAPSHOT/bhatestutil-1.0-20060422.01 4944-34.jar [artifact:dependencies] Transferring 19K Adding reference: cp.deps.test Adding reference: fs.deps.test ... Setting project property: cp.compilet.kludge2 -> /home/dan/.m2/repository/com/bhaweb/testutil/bhatestutil/1.0-20060422.01 4944-34/bhatestutil-1.0-20060422.014944-34.jar:/home/dan/.m2/repository/ junit/junit/3.8.1/junit-3.8.1.jar: ... [javac] Using modern compiler dropping /home/dan/.m2/repository/com/bhaweb/testutil/bhatestutil/1.0-20060422.01 4944-34/bhatestutil-1.0-20060422.014944-34.jar from path as it doesn't exist > filesetId does not contain all dependencies when artifact was not yet locally > installed > --------------------------------------------------------------------------------------- > > Key: MNG-1408 > URL: http://jira.codehaus.org/browse/MNG-1408 > Project: Maven 2 > Type: Bug > Components: Ant tasks > Versions: 2.0 > Environment: java version "1.4.2_04", Linux 2.6.11.12, Apache Ant version > 1.6.5 > Reporter: Ingo Weichsel > Fix For: 2.0.5 > Attachments: patch.txt > > > In the artifact:dependencies task the filesetId is only correctly set, when > the artifact was installed locally before running ant. > After deletion of the local repository the dependant artifacts will be > downloaded to the local repository, but only one of two dependant files will > be included in the ant fileset. The classpath is set correctly. > After running "mvn install" locally for the "as-base-launcher" maven project, > ant computes the correct filesetId. > The ant-project depends on the artifact "as-base-launcher" which itselfs > depends only on classworlds. Snippets from ant buildfiles, poms and ant > output follows: > From the ant buildfile: > <target name="launcherJAR" depends="init"> > <artifact:pom id="as-base.project" file="../poms/as-base.xml" /> > > <artifact:dependencies filesetId="as-launcher.fileset" > pathId="as-launcher.classpath" verbose="true"> > <pom refid="as-base.project"/> > <remoteRepository refid="actisRepository" /> > </artifact:dependencies> > <pathconvert property="mypath" targetos="unix"> > <path> > <path refid="as-launcher.classpath" /> > </path> > </pathconvert> > <echo message="CLASSPATH: ${mypath}"/> > <pathconvert property="myset" targetos="unix"> > <path> > <fileset refid="as-launcher.fileset"/> > </path> > </pathconvert> > <echo message="FILESET: ${myset}"/> > </target> > The referenced POM defining the ant dependencies: > <project> > <modelVersion>4.0.0</modelVersion> > <groupId>actis</groupId> > <artifactId>ant-as-base</artifactId> > <version>1.0-SNAPSHOT</version> > <dependencies> > <dependency> > <groupId>actis</groupId> > <artifactId>as-base-launcher</artifactId> > <version>1.0-SNAPSHOT</version> > </dependency> > </dependencies> > <repositories> > <repository> > <id>actisRepository</id> > <name>actisRepository</name> > <url>http://company.com:9999/repository/</url> > </repository> > </repositories> > </project> > Output of the ant run: > launcherJAR: > actis:ant-as-base:jar:1.0-SNAPSHOT (selected) > actis:as-base-launcher:jar:1.0-SNAPSHOT (selected) > classworlds:classworlds:jar:1.1-alpha-1 (selected) > [echo] CLASSPATH: > /home/iwe/.m2/repository/classworlds/classworlds/1.1-alpha-1/classworlds-1.1-alpha-1.jar:/home/iwe/.m2/repository/actis/as-base-launcher/1.0-20051103.102305-8/as-base-launcher-1.0-20051103.102305-8.jar > [echo] FILESET: > /home/iwe/.m2/repository/classworlds/classworlds/1.1-alpha-1/classworlds-1.1-alpha-1.jar -- 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