This only returns whatever the systemPath tag is, which is not
specified (as expected).
What you want is to enumerate project.getArtifacts() - which includes
all transitive dependencies, not just the ones listed - and use
artifact.getFile() to get the location.
To ensure the dependencies are resolved, you need to add
@resolveTransitiveDependencies
to the mojo metadat.a
Cheers,
Brett
On 10/31/05, Régis LOWE <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I want to know how can I get the path of a dependency.
> I've tried dependency.getSystemPath() but it returns
> null.
>
> //////////////////////////////////////////////////////////
>
> for (Iterator it =
> project.getDependencies().iterator(); it.hasNext();) {
> Dependency dependency = (Dependency) it.next();
> dependency.getSystemPath();//null
> }
>
> here is my pom:
> ...
> <packaging>maven-plugin</packaging>
> <version>1.0-SNAPSHOT</version>
> <name>Maven Mojo Archetype</name>
> <url>http://maven.apache.org</url>
> <dependencies>
> <dependency>
> <groupId>org.apache.maven</groupId>
> <artifactId>maven-plugin-api</artifactId>
> <version>2.0</version>
> </dependency>
> <dependency>
> <groupId>ant</groupId>
> <artifactId>ant</artifactId>
> <version>1.6.5</version>
> </dependency>
> <dependency>
> <groupId>org.apache.maven</groupId>
> <artifactId>maven-project</artifactId>
> <version>2.0</version>
> </dependency>
> </dependencies>
> ...
>
>
>
>
>
>
>
> ___________________________________________________________________________
> Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
> Téléchargez cette version sur http://fr.messenger.yahoo.com
>
> ---------------------------------------------------------------------
> 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]