Hi Brett,
I tried this. All its returning is my project output classes dir
(target/classes). Why doesn't it have the dependencies mentioned in the
POM file. I checked the project.getArtifacts() &
project.getDependencyArtifacts(). These 2 are returning null.

Project.getDependencies is returning an object like this,
Dependency {groupId=junit, artifactId=junit, version=3.8.1,
type=jar},Dependency {groupId=org.apache.maven,
artifactId=maven-project, version=2.0-beta-3, type=jar},

What I am trying to do is,
To get the classpath from maven and pass it to another command using
"-classpath" option. I need to have all the dependency jars in this
classpath.
Isn't there a easy way to get the classpath var just like $CLASSPATH

Please let me know at your earliest.

Thanks
-Jagan

-----Original Message-----
From: Brett Porter [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 02, 2005 9:31 PM
To: Maven Developers List
Subject: Re: Maven2 dependency classpath in Java plugin

The expression you are looking for is:

${project.runtimeClasspathElements}

You might like to look at a plugin such as the WAR plugin for an
example.

- Brett

Jagan Padmanabha Pillai -X (jpadmana - Insight Solutions, Inc. at Cisco)
wrote:
>  
> Hi,
> I am trying to get the mvn dependency classpath inside the plugin 
> written using java.
> In maven 1 there seems to be a way for ant using 
> {maven.dependency.classpath}.
>  
> Does anyone know how to get this classpath in maven2 ????
>  
> Also in org.apache.maven.project.Project seems to have a method 
> getdependecyClassPath(). But I am not sure which jar file is this 
> Project class is in. when I put the above class in import statement 
> its erroring out.
>  
> Please let me know
>  
> Thanks
> Jagan
>  
>  
> 
> ---------------------------------------------------------------------
> 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]

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

  • ... Jagan Padmanabha Pillai -X \(jpadmana - Insight Solutions, Inc. at Cisco\)
    • ... Brett Porter
    • ... Jagan Padmanabha Pillai -X \(jpadmana - Insight Solutions, Inc. at Cisco\)

Reply via email to