Hello,
Is it possible to reference system-scoped dependencies from a pom
using the antlib tasks such that those system-scoped dependencies
could be included in a compile classpath?
I created a pom for a project containing a number of "compile"
dependencies that were successfully downloaded from the central repo.
It also has a couple of "system" scope dependencies on local jars.
But those jars do not seem to get resolved correctly when declaring
and using a path id.
For example, in my pom.xml I have a system dependency as follows:
<dependency>
<groupId>com.mycompany.myapp</groupId>
<artifactId>my-jar</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>/path/to/jar/my-jar-1.0.jar</systemPath>
</dependency>
I defined the dependencies in my build.xml as follows:
<artifact:pom id="maven.project" file="pom.xml" />
<artifact:dependencies filesetId="compile.dependencies.fileset"
pathId="compile.dependencies.path" useScope="compile" verbose="true">
<pom refid="maven.project"/>
</artifact:dependencies>
The verbose setting lists the system jar as:
com.mycompany.myapp:my-jar:jar:1.0 (selected)
however, it is not picked up during compilation using classpath
refid="compile.dependencies.path"
If I echo the pathId:
<property name="out" refid="compile.dependencies.path"/>
<echo>${out}</echo>
it lists (among all the other jars):
/home/tim/.m2/repository/com/mycompany/myapp/my-jar/1.0/my-jar-1.0.jar
Cleary, that system dependency does not live there.
BTW, I also tried:
<artifact:dependencies filesetId="compile.dependencies.fileset"
pathId="compile.dependencies.path" useScope="system" verbose="true">
<pom refid="maven.project"/>
</artifact:dependencies>
but got an Ant error when trying to print it out:
No files specified for filelist.
Is what I'm trying to do possible. Should system scope dependencies
be resolved in the "compile" scope?
Obviously as a workaround I can simply add those other jars to the
classpath inside the ant build.xml, but I was trying to list all the
jars in a single location (the pom.xml).
Thanks in advance for any insight,
Cheers,
Tim
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]