You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Fong Chan <FC...@mrl.ubc.ca> on 2007/04/11 01:09:26 UTC

Maven and 3rd Party Libraries

Hello all,
 
I am having some problems with Maven right now.
 
Just to give some background.  I currently have installed all of Taverna's (A workflow management system that uses Maven) classes into the Maven repository and I am able to use them no problem.
 
For one of my programs, I would like to use Taverna's class and also another external library called Jakarta POI (able to manipulate Excel from Java).  The thing is the POI downloads do not come in a maven format and make it different to install them into the repository easily.  So instead, I have imported them as external jars in eclipse.  
 
>From there, I want to install my program as a Taverna Artifact into the library, but when installing I get the maven errors that it can't find the POI classes.  I am assuming it is because the POI are not artifacts in the repository...
 
I was just wondering whether there was a way to use external libraries without having to install them into the maven repository.  
 
Fong


***CONFIDENTIALITY NOTICE***
This electronic message is intended only for the use of the addressee and may contain information that is privileged and confidential.  Any dissemination, distribution or copying of this communication by unauthorized individuals is strictly prohibited. If you have received this communication in error, please notify the sender immediately by reply e-mail and delete the original and all copies from your system.

Re: Maven and 3rd Party Libraries

Posted by franz see <fr...@gmail.com>.
Good day,

Kindly take a look at [1]. You will see there the dependency tag and the
scope and systemPath elements Eric mentioned.

Cheers,
Franz

[1] http://maven.apache.org/ref/current/maven-model/maven.html


Wayne Fay wrote:
> 
> Yes. Search the list archives (at Nabble.com) for more information, or
> the Maven site itself; there are several examples available.
> 
> Wayne
> 
> On 4/10/07, Fong Chan <FC...@mrl.ubc.ca> wrote:
>> Sorry you'll have to excuse my ignorance as I am still new to Maven.
>>
>> But when you say "set the 'scope' of the jar as 'system' in dependency,
>> then set 'systemPath' to the path of the jar."
>>
>> Do you mean setting the properties in the pom.xml of the project?
>>
>> Thanks,
>>
>> Fong
>>
>> >>> "Eric Redmond" <er...@gmail.com> 04/10/07 4:17 PM >>>
>> On 4/10/07, Fong Chan <FC...@mrl.ubc.ca> wrote:
>> >
>> > Hello all,
>> >
>> > I am having some problems with Maven right now.
>> >
>> > Just to give some background.  I currently have installed all of
>> Taverna's
>> > (A workflow management system that uses Maven) classes into the Maven
>> > repository and I am able to use them no problem.
>> >
>> > For one of my programs, I would like to use Taverna's class and also
>> > another external library called Jakarta POI (able to manipulate Excel
>> from
>> > Java).  The thing is the POI downloads do not come in a maven format
>> and
>> > make it different to install them into the repository easily.  So
>> instead, I
>> > have imported them as external jars in eclipse.
>> >
>> > From there, I want to install my program as a Taverna Artifact into the
>> > library, but when installing I get the maven errors that it can't find
>> the
>> > POI classes.  I am assuming it is because the POI are not artifacts in
>> the
>> > repository...
>> >
>> > I was just wondering whether there was a way to use external libraries
>> > without having to install them into the maven repository.
>>
>>
>> It's not usually desired, but you can set the "scope" of the jar as
>> "system"
>> in dependency, then set "systemPath" to the path of the jar.
>>
>> Fong
>> >
>> >
>> > ***CONFIDENTIALITY NOTICE***
>> > This electronic message is intended only for the use of the addressee
>> and
>> > may contain information that is privileged and confidential.  Any
>> > dissemination, distribution or copying of this communication by
>> unauthorized
>> > individuals is strictly prohibited. If you have received this
>> communication
>> > in error, please notify the sender immediately by reply e-mail and
>> delete
>> > the original and all copies from your system.
>> >
>>
>>
>>
>> --
>> Eric Redmond
>> http://codehaus.org/~eredmond
>>
>>
>>
>> ***CONFIDENTIALITY NOTICE***
>> This electronic message is intended only for the use of the addressee and
>> may contain information that is privileged and confidential.  Any
>> dissemination, distribution or copying of this communication by
>> unauthorized individuals is strictly prohibited. If you have received
>> this communication in error, please notify the sender immediately by
>> reply e-mail and delete the original and all copies from your system.
>>
>> ---------------------------------------------------------------------
>> 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Maven-and-3rd-Party-Libraries-tf3556449s177.html#a9932041
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: Maven and 3rd Party Libraries

Posted by Wayne Fay <wa...@gmail.com>.
Yes. Search the list archives (at Nabble.com) for more information, or
the Maven site itself; there are several examples available.

Wayne

On 4/10/07, Fong Chan <FC...@mrl.ubc.ca> wrote:
> Sorry you'll have to excuse my ignorance as I am still new to Maven.
>
> But when you say "set the 'scope' of the jar as 'system' in dependency, then set 'systemPath' to the path of the jar."
>
> Do you mean setting the properties in the pom.xml of the project?
>
> Thanks,
>
> Fong
>
> >>> "Eric Redmond" <er...@gmail.com> 04/10/07 4:17 PM >>>
> On 4/10/07, Fong Chan <FC...@mrl.ubc.ca> wrote:
> >
> > Hello all,
> >
> > I am having some problems with Maven right now.
> >
> > Just to give some background.  I currently have installed all of Taverna's
> > (A workflow management system that uses Maven) classes into the Maven
> > repository and I am able to use them no problem.
> >
> > For one of my programs, I would like to use Taverna's class and also
> > another external library called Jakarta POI (able to manipulate Excel from
> > Java).  The thing is the POI downloads do not come in a maven format and
> > make it different to install them into the repository easily.  So instead, I
> > have imported them as external jars in eclipse.
> >
> > From there, I want to install my program as a Taverna Artifact into the
> > library, but when installing I get the maven errors that it can't find the
> > POI classes.  I am assuming it is because the POI are not artifacts in the
> > repository...
> >
> > I was just wondering whether there was a way to use external libraries
> > without having to install them into the maven repository.
>
>
> It's not usually desired, but you can set the "scope" of the jar as "system"
> in dependency, then set "systemPath" to the path of the jar.
>
> Fong
> >
> >
> > ***CONFIDENTIALITY NOTICE***
> > This electronic message is intended only for the use of the addressee and
> > may contain information that is privileged and confidential.  Any
> > dissemination, distribution or copying of this communication by unauthorized
> > individuals is strictly prohibited. If you have received this communication
> > in error, please notify the sender immediately by reply e-mail and delete
> > the original and all copies from your system.
> >
>
>
>
> --
> Eric Redmond
> http://codehaus.org/~eredmond
>
>
>
> ***CONFIDENTIALITY NOTICE***
> This electronic message is intended only for the use of the addressee and may contain information that is privileged and confidential.  Any dissemination, distribution or copying of this communication by unauthorized individuals is strictly prohibited. If you have received this communication in error, please notify the sender immediately by reply e-mail and delete the original and all copies from your system.
>
> ---------------------------------------------------------------------
> 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 3rd Party Libraries

Posted by Fong Chan <FC...@mrl.ubc.ca>.
Sorry you'll have to excuse my ignorance as I am still new to Maven.

But when you say "set the 'scope' of the jar as 'system' in dependency, then set 'systemPath' to the path of the jar."  

Do you mean setting the properties in the pom.xml of the project?  

Thanks,

Fong

>>> "Eric Redmond" <er...@gmail.com> 04/10/07 4:17 PM >>>
On 4/10/07, Fong Chan <FC...@mrl.ubc.ca> wrote:
>
> Hello all,
>
> I am having some problems with Maven right now.
>
> Just to give some background.  I currently have installed all of Taverna's
> (A workflow management system that uses Maven) classes into the Maven
> repository and I am able to use them no problem.
>
> For one of my programs, I would like to use Taverna's class and also
> another external library called Jakarta POI (able to manipulate Excel from
> Java).  The thing is the POI downloads do not come in a maven format and
> make it different to install them into the repository easily.  So instead, I
> have imported them as external jars in eclipse.
>
> From there, I want to install my program as a Taverna Artifact into the
> library, but when installing I get the maven errors that it can't find the
> POI classes.  I am assuming it is because the POI are not artifacts in the
> repository...
>
> I was just wondering whether there was a way to use external libraries
> without having to install them into the maven repository.


It's not usually desired, but you can set the "scope" of the jar as "system"
in dependency, then set "systemPath" to the path of the jar.

Fong
>
>
> ***CONFIDENTIALITY NOTICE***
> This electronic message is intended only for the use of the addressee and
> may contain information that is privileged and confidential.  Any
> dissemination, distribution or copying of this communication by unauthorized
> individuals is strictly prohibited. If you have received this communication
> in error, please notify the sender immediately by reply e-mail and delete
> the original and all copies from your system.
>



-- 
Eric Redmond
http://codehaus.org/~eredmond 



***CONFIDENTIALITY NOTICE***
This electronic message is intended only for the use of the addressee and may contain information that is privileged and confidential.  Any dissemination, distribution or copying of this communication by unauthorized individuals is strictly prohibited. If you have received this communication in error, please notify the sender immediately by reply e-mail and delete the original and all copies from your system.

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


Re: Maven and 3rd Party Libraries

Posted by Eric Redmond <er...@gmail.com>.
On 4/10/07, Fong Chan <FC...@mrl.ubc.ca> wrote:
>
> Hello all,
>
> I am having some problems with Maven right now.
>
> Just to give some background.  I currently have installed all of Taverna's
> (A workflow management system that uses Maven) classes into the Maven
> repository and I am able to use them no problem.
>
> For one of my programs, I would like to use Taverna's class and also
> another external library called Jakarta POI (able to manipulate Excel from
> Java).  The thing is the POI downloads do not come in a maven format and
> make it different to install them into the repository easily.  So instead, I
> have imported them as external jars in eclipse.
>
> From there, I want to install my program as a Taverna Artifact into the
> library, but when installing I get the maven errors that it can't find the
> POI classes.  I am assuming it is because the POI are not artifacts in the
> repository...
>
> I was just wondering whether there was a way to use external libraries
> without having to install them into the maven repository.


It's not usually desired, but you can set the "scope" of the jar as "system"
in dependency, then set "systemPath" to the path of the jar.

Fong
>
>
> ***CONFIDENTIALITY NOTICE***
> This electronic message is intended only for the use of the addressee and
> may contain information that is privileged and confidential.  Any
> dissemination, distribution or copying of this communication by unauthorized
> individuals is strictly prohibited. If you have received this communication
> in error, please notify the sender immediately by reply e-mail and delete
> the original and all copies from your system.
>



-- 
Eric Redmond
http://codehaus.org/~eredmond

Re: Maven and 3rd Party Libraries

Posted by Dirk Olmes <di...@xanthippe.ping.de>.
Fong Chan wrote:
> Hello all,
> 
> I am having some problems with Maven right now.
> 
> Just to give some background.  I currently have installed all of
> Taverna's (A workflow management system that uses Maven) classes into
> the Maven repository and I am able to use them no problem.
> 
> For one of my programs, I would like to use Taverna's class and also
> another external library called Jakarta POI (able to manipulate Excel
> from Java).  The thing is the POI downloads do not come in a maven
> format and make it different to install them into the repository
> easily.  So instead, I have imported them as external jars in
> eclipse.

Finding the right groupId and artifactId for your dependencies is a bit
hard but for POI take a look at http://repo1.maven.org/maven2/poi/poi/.
I used it in a previous project just fine.

If the .jar you want to use is not available in any public repo the only
option you have is to either import it into your local repo or setup
your own repository.

-dirk

--
A: Maybe because some people are too annoyed by top-posting.
Q: Why do I not get an answer to my question(s)?
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?


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