Hi,
I tried this. All its returning is my project output classes dir
(target/classes). Why doesn't it have the dependencies mantioned 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

Thanks
-Jagan 

-----Original Message-----
From: Allan Ramirez [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 02, 2005 7:17 PM
To: Maven Users List
Subject: Re: Maven2 dependency classpath in Java plugin

Hi there,

I think this is what you are looking for

getCompileClasspathElements()

you can find it in the maven-project component  source.
org\apache\maven\project\MavenProject.java

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
> 
> 
>
>  
>
>-----------------------------------------------------------------------
>-
>
>No virus found in this incoming message.
>Checked by AVG Free Edition.
>Version: 7.1.362 / Virus Database: 267.13.11/191 - Release Date: 
>12/2/2005
>  
>

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

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

Reply via email to