You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by SiSi'mon <s_...@purpleblade.net> on 2007/05/31 21:35:13 UTC

How to tell Maven where to find jar (specify classpath)

We have a product we wish to deliver that requires compliation.  We have a
pom.xml file that specifies all the dependencies but there is one dependency
(Oracle jdbc jars) for which there is no repository so we must package the
.jar files in a /lib/ directory under our application.

Outside of this all dependencies can be handled by Maven2.  How do you
specify the location of the jar or class files on the maven command line? 
we need to tell maven where the ojdbc jars are when it runs.

thanks

Si'mon
-- 
View this message in context: http://www.nabble.com/How-to-tell-Maven-where-to-find-jar-%28specify-classpath%29-tf3848482s177.html#a10900554
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: How to tell Maven where to find jar (specify classpath)

Posted by nicolas de loof <ni...@gmail.com>.
You can also point to an existing location in maven public repo (
http://repo1.maven.org/maven2/com/oracle/)

When trying to compile, maven will complain not finding the dependecy and
output the command required to install the file in the local repository. The
POM gives the URL to download the jar

You may also deploy it in a corporate/private repository, used as a proxy to
maven repo, so that developpers don't have to wory about where it comes
from.

Nico.

2007/6/2, Michael Meyer <mi...@bluewin.ch>:
>
> Hi
> you could try adding the dependency with scope "system" [1].
>
> <dependency>
>   <groupId>oracle</groupId>
>   <artifactId>oracle</artifactId>
>   <version>x.x.x</version>
>   <scope>system</scope>
>   <systemPath>${basedir}/lib/oracle.jar</systemPath>
> </dependency>
>
> Cheers, michael
>
> [1]
> http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
>
> SiSi'mon schrieb:
> > We have a product we wish to deliver that requires compliation.  We have
> a
> > pom.xml file that specifies all the dependencies but there is one
> dependency
> > (Oracle jdbc jars) for which there is no repository so we must package
> the
> > .jar files in a /lib/ directory under our application.
> >
> > Outside of this all dependencies can be handled by Maven2.  How do you
> > specify the location of the jar or class files on the maven command
> line?
> > we need to tell maven where the ojdbc jars are when it runs.
> >
> > thanks
> >
> > Si'mon
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: How to tell Maven where to find jar (specify classpath)

Posted by Michael Meyer <mi...@bluewin.ch>.
Hi
you could try adding the dependency with scope "system" [1].

<dependency>
   <groupId>oracle</groupId>
   <artifactId>oracle</artifactId>
   <version>x.x.x</version>
   <scope>system</scope>
   <systemPath>${basedir}/lib/oracle.jar</systemPath>
</dependency>

Cheers, michael

[1] http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html

SiSi'mon schrieb:
> We have a product we wish to deliver that requires compliation.  We have a
> pom.xml file that specifies all the dependencies but there is one dependency
> (Oracle jdbc jars) for which there is no repository so we must package the
> .jar files in a /lib/ directory under our application.
> 
> Outside of this all dependencies can be handled by Maven2.  How do you
> specify the location of the jar or class files on the maven command line? 
> we need to tell maven where the ojdbc jars are when it runs.
> 
> thanks
> 
> Si'mon


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


Re: How to tell Maven where to find jar (specify classpath)

Posted by Carlos Sanchez <ca...@apache.org>.
On 5/31/07, SiSi'mon <s_...@purpleblade.net> wrote:
>
> We do not have the ability to run a maven repository for customers to serve
> them and oracle.jar - too many headaches and approval and hoops to jump
> through with IT.
>
> Is there a way to tell maven about another jar?

no, only what people already told you about install:install-file

>
> Or is there a maven repository out there with Oracle jars?

no

>
> thanks
>
>
> Si'mon
>
>
> Wendy Smoak-3 wrote:
> >
> > On 5/31/07, SiSi'mon <s_...@purpleblade.net> wrote:
> >
> >> We have a product we wish to deliver that requires compliation.  We have
> >> a
> >> pom.xml file that specifies all the dependencies but there is one
> >> dependency
> >> (Oracle jdbc jars) for which there is no repository so we must package
> >> the
> >> .jar files in a /lib/ directory under our application.
> >
> > Instead, you should either install these jars in your local
> > repostiory, or establish an internal corporate repository to share
> > them among your development team (assuming that's allowed by the
> > license.)
> >
> > --
> > Wendy
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/How-to-tell-Maven-where-to-find-jar-%28specify-classpath%29-tf3848482s177.html#a10901912
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
I could give you my word as a Spaniard.
No good. I've known too many Spaniards.
                             -- The Princess Bride

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


Re: How to tell Maven where to find jar (specify classpath)

Posted by Mark Derricutt <ma...@talios.com>.
Could you not include the jar and a pom for it in a repository in your
distribution relative to the pom you mentioned originally - then reference
this repo relative to your pom?

On 6/1/07, SiSi'mon <s_...@purpleblade.net> wrote:
>
>
> Is there a way to tell maven about another jar?
>
>

Re: How to tell Maven where to find jar (specify classpath)

Posted by SiSi'mon <s_...@purpleblade.net>.
We do not have the ability to run a maven repository for customers to serve
them and oracle.jar - too many headaches and approval and hoops to jump
through with IT.

Is there a way to tell maven about another jar?

Or is there a maven repository out there with Oracle jars?

thanks


Si'mon


Wendy Smoak-3 wrote:
> 
> On 5/31/07, SiSi'mon <s_...@purpleblade.net> wrote:
> 
>> We have a product we wish to deliver that requires compliation.  We have
>> a
>> pom.xml file that specifies all the dependencies but there is one
>> dependency
>> (Oracle jdbc jars) for which there is no repository so we must package
>> the
>> .jar files in a /lib/ directory under our application.
> 
> Instead, you should either install these jars in your local
> repostiory, or establish an internal corporate repository to share
> them among your development team (assuming that's allowed by the
> license.)
> 
> -- 
> Wendy
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-tell-Maven-where-to-find-jar-%28specify-classpath%29-tf3848482s177.html#a10901912
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: How to tell Maven where to find jar (specify classpath)

Posted by Wendy Smoak <ws...@gmail.com>.
On 5/31/07, SiSi'mon <s_...@purpleblade.net> wrote:

> We have a product we wish to deliver that requires compliation.  We have a
> pom.xml file that specifies all the dependencies but there is one dependency
> (Oracle jdbc jars) for which there is no repository so we must package the
> .jar files in a /lib/ directory under our application.

Instead, you should either install these jars in your local
repostiory, or establish an internal corporate repository to share
them among your development team (assuming that's allowed by the
license.)

-- 
Wendy

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