You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Stephen Milner <sm...@redhat.com> on 2006/02/13 22:45:33 UTC

Maven and Classpaths

I'm sure this has been brought up a lot of times but I couldn't find it 
via google or the mailing list .....

I'm using the maven plugin for creating jars like so:

     <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <mainClass>com.mycorp.ProtomanMain</mainClass>
              <addClasspath>True</addClasspath>
            </manifest>
          </archive>
        </configuration>
      </plugin>

I would like to add items that Maven doesn't keep track of (jars that 
are added internally as plugins that may be dropped in at times). How do 
I explicitly tell maven to add these items in to the classpath? Even if 
I have to use a directive for each item added it would be fine.

Thanks,
Steve


Re: Maven and Classpaths

Posted by Stephen Duncan <st...@gmail.com>.
If you really don't ever want to put them into a private repository,
then use system scope dependencies...

-Stephen

On 2/14/06, Stephen Milner <sm...@redhat.com> wrote:
> To explain further,
>
> I need to be able to add class path jars to the manifest file that are
> not tracked by maven. These are internal jars that will not be in public
> or private repos. Currently, when I use the maven xml code from bellow I
> get all the items that I said my package depends on that maven tracks.
> The items that maven does not track do not show up in the manifest (aka
> the 3 jars in maven are there, items that are in my class path variable
> are not.). I don't mind explicitly saying I need them I just can't find
> anything that lets me know how.
>
> Thanks!
>
> Edwin Punzalan wrote:
>
> >
> > Hi,
> >
> > Is the use of <extensions> not good enough?
> >
> > How about dependencies with <scope>system</scope> ?
> >
> > Can you explain further as I maybe misunderstanding what you want to do.
> > ^_^
> >
> >
> >
> > Stephen Milner wrote:
> >
> >> I'm sure this has been brought up a lot of times but I couldn't find
> >> it via google or the mailing list .....
> >>
> >> I'm using the maven plugin for creating jars like so:
> >>
> >>     <plugin>
> >>        <groupId>org.apache.maven.plugins</groupId>
> >>        <artifactId>maven-jar-plugin</artifactId>
> >>        <configuration>
> >>          <archive>
> >>            <manifest>
> >>              <mainClass>com.mycorp.ProtomanMain</mainClass>
> >>              <addClasspath>True</addClasspath>
> >>            </manifest>
> >>          </archive>
> >>        </configuration>
> >>      </plugin>
> >>
> >> I would like to add items that Maven doesn't keep track of (jars that
> >> are added internally as plugins that may be dropped in at times). How
> >> do I explicitly tell maven to add these items in to the classpath?
> >> Even if I have to use a directive for each item added it would be fine.
> >>
> >> Thanks,
> >> Steve
> >>
> >> ------------------------------------------------------------------------
> >>
> >> ---------------------------------------------------------------------
> >> 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
>
>


--
Stephen Duncan Jr
www.stephenduncanjr.com

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


Re: Maven and Classpaths

Posted by Milos Kleint <mk...@gmail.com>.
I don't know the answer to your question, but from past experience I
guess you would save a lot of  time/trouble by going the "maven way"
and drop the internal jars to a local/internal remote repository and
declare these as regular dependencies..

just my 2 cents..

Milos

On 2/14/06, Stephen Milner <sm...@redhat.com> wrote:
> To explain further,
>
> I need to be able to add class path jars to the manifest file that are
> not tracked by maven. These are internal jars that will not be in public
> or private repos. Currently, when I use the maven xml code from bellow I
> get all the items that I said my package depends on that maven tracks.
> The items that maven does not track do not show up in the manifest (aka
> the 3 jars in maven are there, items that are in my class path variable
> are not.). I don't mind explicitly saying I need them I just can't find
> anything that lets me know how.
>
> Thanks!
>
> Edwin Punzalan wrote:
>
> >
> > Hi,
> >
> > Is the use of <extensions> not good enough?
> >
> > How about dependencies with <scope>system</scope> ?
> >
> > Can you explain further as I maybe misunderstanding what you want to do.
> > ^_^
> >
> >
> >
> > Stephen Milner wrote:
> >
> >> I'm sure this has been brought up a lot of times but I couldn't find
> >> it via google or the mailing list .....
> >>
> >> I'm using the maven plugin for creating jars like so:
> >>
> >>     <plugin>
> >>        <groupId>org.apache.maven.plugins</groupId>
> >>        <artifactId>maven-jar-plugin</artifactId>
> >>        <configuration>
> >>          <archive>
> >>            <manifest>
> >>              <mainClass>com.mycorp.ProtomanMain</mainClass>
> >>              <addClasspath>True</addClasspath>
> >>            </manifest>
> >>          </archive>
> >>        </configuration>
> >>      </plugin>
> >>
> >> I would like to add items that Maven doesn't keep track of (jars that
> >> are added internally as plugins that may be dropped in at times). How
> >> do I explicitly tell maven to add these items in to the classpath?
> >> Even if I have to use a directive for each item added it would be fine.
> >>
> >> Thanks,
> >> Steve
> >>
> >> ------------------------------------------------------------------------
> >>
> >> ---------------------------------------------------------------------
> >> 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
>
>

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


Re: Maven and Classpaths

Posted by Stephen Milner <sm...@redhat.com>.
To explain further,

I need to be able to add class path jars to the manifest file that are 
not tracked by maven. These are internal jars that will not be in public 
or private repos. Currently, when I use the maven xml code from bellow I 
get all the items that I said my package depends on that maven tracks. 
The items that maven does not track do not show up in the manifest (aka 
the 3 jars in maven are there, items that are in my class path variable 
are not.). I don't mind explicitly saying I need them I just can't find 
anything that lets me know how.

Thanks!

Edwin Punzalan wrote:

>
> Hi,
>
> Is the use of <extensions> not good enough?
>
> How about dependencies with <scope>system</scope> ?
>
> Can you explain further as I maybe misunderstanding what you want to do.
> ^_^
>
>
>
> Stephen Milner wrote:
>
>> I'm sure this has been brought up a lot of times but I couldn't find 
>> it via google or the mailing list .....
>>
>> I'm using the maven plugin for creating jars like so:
>>
>>     <plugin>
>>        <groupId>org.apache.maven.plugins</groupId>
>>        <artifactId>maven-jar-plugin</artifactId>
>>        <configuration>
>>          <archive>
>>            <manifest>
>>              <mainClass>com.mycorp.ProtomanMain</mainClass>
>>              <addClasspath>True</addClasspath>
>>            </manifest>
>>          </archive>
>>        </configuration>
>>      </plugin>
>>
>> I would like to add items that Maven doesn't keep track of (jars that 
>> are added internally as plugins that may be dropped in at times). How 
>> do I explicitly tell maven to add these items in to the classpath? 
>> Even if I have to use a directive for each item added it would be fine.
>>
>> Thanks,
>> Steve
>>
>> ------------------------------------------------------------------------
>>
>> ---------------------------------------------------------------------
>> 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: Maven and Classpaths

Posted by Edwin Punzalan <ep...@exist.com>.
Hi,

Is the use of <extensions> not good enough?

How about dependencies with <scope>system</scope> ?

Can you explain further as I maybe misunderstanding what you want to do. 

^_^



Stephen Milner wrote:

> I'm sure this has been brought up a lot of times but I couldn't find 
> it via google or the mailing list .....
>
> I'm using the maven plugin for creating jars like so:
>
>     <plugin>
>        <groupId>org.apache.maven.plugins</groupId>
>        <artifactId>maven-jar-plugin</artifactId>
>        <configuration>
>          <archive>
>            <manifest>
>              <mainClass>com.mycorp.ProtomanMain</mainClass>
>              <addClasspath>True</addClasspath>
>            </manifest>
>          </archive>
>        </configuration>
>      </plugin>
>
> I would like to add items that Maven doesn't keep track of (jars that 
> are added internally as plugins that may be dropped in at times). How 
> do I explicitly tell maven to add these items in to the classpath? 
> Even if I have to use a directive for each item added it would be fine.
>
> Thanks,
> Steve
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>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