You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Alex Vollmer <al...@tenzing.com> on 2004/01/26 23:14:48 UTC

Classpath within a plugin?

I have a Java executable class I need to run and I am unable to
determine how to run the <java> task with a classpath that points to the
classes packaged within my plugin. Is there any way to access this?

Alex Vollmer

alex.vollmer@tenzing.com

Software Engineer
Tenzing Communications, Inc.
705 Fifth Avenue South, Suite 700
Seattle, WA 98104 USA

T:  +1 206.607.2869

Bring your laptop and try inflight email on your next United,
Continental or Cathay Pacific flight. All you need is your laptop, user
ID, password, and email server URL. Tenzing Communications, Inc.
provides inflight email systems that help airborne travelers stay in
touch.

Re: Classpath within a plugin?

Posted by Eric Giguere <er...@videotron.ca>.
hehe, nice.
thx Chad. I'm currently writing a plugin and I'll also need to execute a 
class with the dependency classpath.

Very helpfull :)

Eric.

Chad Brandon wrote:

>Alex,
>
>Eric almost got it right, but it should be "plugin.getDependencyClasspath()"
>instead of "pom.getDependencyClasspath()" if you're within a plugin. Or you
>can include a single dependency at a time:
>"plugin:getDependencyPath("groupId:artifactId")".
>
>Chad
>
>----- Original Message ----- 
>From: "Eric Giguere" <er...@videotron.ca>
>To: "Maven Users List" <us...@maven.apache.org>
>Sent: Tuesday, January 27, 2004 1:26 PM
>Subject: Re: Classpath within a plugin?
>
>
>  
>
>>Hi Alex
>>
>>Did you try using this call : pom.getDependencyClasspath() ?
>>By embedding this in an ant tag, you can pass it classpath info.
>>...
>>    <ant:path id="project.class.path">
>>        <pathelement location="${maven.build.dest}"/>
>>        <pathelement path="${pom.getDependencyClasspath()}"/>
>>    </ant:path>
>>...> Alex Vollmer wrote:
>>
>>    
>>
>>>I have a Java executable class I need to run and I am unable to
>>>determine how to run the <java> task with a classpath that points to the
>>>      
>>>
>>Hope it helps, I'm not sure though. My example is made in a maven.xml
>>file of a project, not from a plugin but still... should work.
>>
>>Eric.
>>
>>    
>>
>
>  
>
>>>classes packaged within my plugin. Is there any way to access this?
>>>
>>>Alex Vollmer
>>>
>>>alex.vollmer@tenzing.com
>>>
>>>Software Engineer
>>>Tenzing Communications, Inc.
>>>705 Fifth Avenue South, Suite 700
>>>Seattle, WA 98104 USA
>>>
>>>T:  +1 206.607.2869
>>>
>>>Bring your laptop and try inflight email on your next United,
>>>Continental or Cathay Pacific flight. All you need is your laptop, user
>>>ID, password, and email server URL. Tenzing Communications, Inc.
>>>provides inflight email systems that help airborne travelers stay in
>>>touch.
>>>
>>>
>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>For additional commands, e-mail: users-help@maven.apache.org
>>    
>>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>For additional commands, e-mail: users-help@maven.apache.org
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Classpath within a plugin?

Posted by Chad Brandon <ch...@yahoo.com>.
Alex,

Eric almost got it right, but it should be "plugin.getDependencyClasspath()"
instead of "pom.getDependencyClasspath()" if you're within a plugin. Or you
can include a single dependency at a time:
"plugin:getDependencyPath("groupId:artifactId")".

Chad

----- Original Message ----- 
From: "Eric Giguere" <er...@videotron.ca>
To: "Maven Users List" <us...@maven.apache.org>
Sent: Tuesday, January 27, 2004 1:26 PM
Subject: Re: Classpath within a plugin?


> Hi Alex
>
> Did you try using this call : pom.getDependencyClasspath() ?
> By embedding this in an ant tag, you can pass it classpath info.
> ...
>     <ant:path id="project.class.path">
>         <pathelement location="${maven.build.dest}"/>
>         <pathelement path="${pom.getDependencyClasspath()}"/>
>     </ant:path>
> ...> Alex Vollmer wrote:
>
> >I have a Java executable class I need to run and I am unable to
> >determine how to run the <java> task with a classpath that points to the
>
> Hope it helps, I'm not sure though. My example is made in a maven.xml
> file of a project, not from a plugin but still... should work.
>
> Eric.
>

> >classes packaged within my plugin. Is there any way to access this?
> >
> >Alex Vollmer
> >
> >alex.vollmer@tenzing.com
> >
> >Software Engineer
> >Tenzing Communications, Inc.
> >705 Fifth Avenue South, Suite 700
> >Seattle, WA 98104 USA
> >
> >T:  +1 206.607.2869
> >
> >Bring your laptop and try inflight email on your next United,
> >Continental or Cathay Pacific flight. All you need is your laptop, user
> >ID, password, and email server URL. Tenzing Communications, Inc.
> >provides inflight email systems that help airborne travelers stay in
> >touch.
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Classpath within a plugin?

Posted by Eric Giguere <er...@videotron.ca>.
Hi Alex

Did you try using this call : pom.getDependencyClasspath() ?
By embedding this in an ant tag, you can pass it classpath info.
...
    <ant:path id="project.class.path">
        <pathelement location="${maven.build.dest}"/>       
        <pathelement path="${pom.getDependencyClasspath()}"/>
    </ant:path>   
...

Hope it helps, I'm not sure though. My example is made in a maven.xml 
file of a project, not from a plugin but still... should work.

Eric.

Alex Vollmer wrote:

>I have a Java executable class I need to run and I am unable to
>determine how to run the <java> task with a classpath that points to the
>classes packaged within my plugin. Is there any way to access this?
>
>Alex Vollmer
>
>alex.vollmer@tenzing.com
>
>Software Engineer
>Tenzing Communications, Inc.
>705 Fifth Avenue South, Suite 700
>Seattle, WA 98104 USA
>
>T:  +1 206.607.2869
>
>Bring your laptop and try inflight email on your next United,
>Continental or Cathay Pacific flight. All you need is your laptop, user
>ID, password, and email server URL. Tenzing Communications, Inc.
>provides inflight email systems that help airborne travelers stay in
>touch.
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org