You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Claudio Di Vita <c....@gmail.com> on 2007/12/07 22:12:31 UTC

Add third parties libraries as dependencies

I'm persuading my Team Leader to use Maven as build tool, but I have to
demonstrate him that with Maven we'll handle our project dependencies
effortless.

I've obtained good results, but I have some problems with some jar libraries
provided, through a quite complex installation process, by a software.

So I've tried to create an "empty" Maven artifact which has these libraries
as system dependencies (yes, the dependency scope is system).

After I installed the artifact, I inserted it as a compile dependency for
another project called, for example, ABC. But when I try to resolve projects
dependencies I obtain the following message:

    [WARNING] POM for ''<artifact-info>" is invalid. It will be ignored for
artifact resolution.
                       Reason: Failed to validate POM for project
<artifact-info>

And the resolution fails.

Instead if I put these libraries as system dependencies of project ABC,
everything works. I think, because it's not written in Maven documentation,
that system dependencies are not transitive....I'm right ??

But my question is: I can use these external libraries as dependencies
without put them in a local repository ??

Thank you for help,

Claudio Di Vita
-- 
View this message in context: http://www.nabble.com/Add-third-parties-libraries-as-dependencies-tf4964483s177.html#a14220690
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: Add third parties libraries as dependencies

Posted by Claudio Di Vita <c....@gmail.com>.
Both of you, thanks so much.

But I'm wondering why Maven works like that. We're agree that system scoped
dependencies are dangerous, but they represents a clean solution for these
situations.


-----
.........not everything that counts can be counted
-- 
View this message in context: http://www.nabble.com/Add-third-parties-libraries-as-dependencies-tf4964483s177.html#a14222917
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: Add third parties libraries as dependencies

Posted by Wayne Fay <wa...@gmail.com>.
System-scoped dependencies are just a generally bad idea for a lot of reasons.

Check these jars into your repo (mvn install:install-file ...) and use
the proper scoping (which may be provided, or compile etc), as
suggested below.

Wayne

On 12/7/07, Blue.Thomas@ubs.com <Bl...@ubs.com> wrote:
> I've run into this as well.  If you depend on an artifact that in turn
> has system scoped dependencies, the build fails during validation (mvn
> -X gives you more info).  Either the intention is to keep system scoped
> dependencies defined in the pom of the project you're building (and keep
> them out of artifacts intended to be shared as dependencies), or it's a
> bug (?).
>
> I got around this by deploying the third party jar into our internal
> repository and scoped it as 'provided'.  I created a third party
> repository just for this reason.
>
> -----Original Message-----
> From: Claudio Di Vita [mailto:c.divita@gmail.com]
> Sent: Friday, December 07, 2007 4:13 PM
> To: users@maven.apache.org
> Subject: Add third parties libraries as dependencies
>
>
> I'm persuading my Team Leader to use Maven as build tool, but I have to
> demonstrate him that with Maven we'll handle our project dependencies
> effortless.
>
> I've obtained good results, but I have some problems with some jar
> libraries provided, through a quite complex installation process, by a
> software.
>
> So I've tried to create an "empty" Maven artifact which has these
> libraries as system dependencies (yes, the dependency scope is system).
>
> After I installed the artifact, I inserted it as a compile dependency
> for another project called, for example, ABC. But when I try to resolve
> projects dependencies I obtain the following message:
>
>    [WARNING] POM for ''<artifact-info>" is invalid. It will be ignored
> for artifact resolution.
>                       Reason: Failed to validate POM for project
> <artifact-info>
>
> And the resolution fails.
>
> Instead if I put these libraries as system dependencies of project ABC,
> everything works. I think, because it's not written in Maven
> documentation, that system dependencies are not transitive....I'm right
> ??
>
> But my question is: I can use these external libraries as dependencies
> without put them in a local repository ??
>
> Thank you for help,
>
> Claudio Di Vita
> --
> View this message in context:
> http://www.nabble.com/Add-third-parties-libraries-as-dependencies-tf4964
> 483s177.html#a14220690
> 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
>
>
> Visit our website at http://www.ubs.com
>
> This message contains confidential information and is intended only
> for the individual named.  If you are not the named addressee you
> should not disseminate, distribute or copy this e-mail.  Please
> notify the sender immediately by e-mail if you have received this
> e-mail by mistake and delete this e-mail from your system.
>
> E-mail transmission cannot be guaranteed to be secure or error-free
> as information could be intercepted, corrupted, lost, destroyed,
> arrive late or incomplete, or contain viruses.  The sender therefore
> does not accept liability for any errors or omissions in the contents
> of this message which arise as a result of e-mail transmission.  If
> verification is required please request a hard-copy version.  This
> message is provided for informational purposes and should not be
> construed as a solicitation or offer to buy or sell any securities or
> related financial instruments.
>
>
> ---------------------------------------------------------------------
> 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: Add third parties libraries as dependencies

Posted by Bl...@ubs.com.
I've run into this as well.  If you depend on an artifact that in turn
has system scoped dependencies, the build fails during validation (mvn
-X gives you more info).  Either the intention is to keep system scoped
dependencies defined in the pom of the project you're building (and keep
them out of artifacts intended to be shared as dependencies), or it's a
bug (?).

I got around this by deploying the third party jar into our internal
repository and scoped it as 'provided'.  I created a third party
repository just for this reason.

-----Original Message-----
From: Claudio Di Vita [mailto:c.divita@gmail.com] 
Sent: Friday, December 07, 2007 4:13 PM
To: users@maven.apache.org
Subject: Add third parties libraries as dependencies


I'm persuading my Team Leader to use Maven as build tool, but I have to
demonstrate him that with Maven we'll handle our project dependencies
effortless.

I've obtained good results, but I have some problems with some jar
libraries provided, through a quite complex installation process, by a
software.

So I've tried to create an "empty" Maven artifact which has these
libraries as system dependencies (yes, the dependency scope is system).

After I installed the artifact, I inserted it as a compile dependency
for another project called, for example, ABC. But when I try to resolve
projects dependencies I obtain the following message:

    [WARNING] POM for ''<artifact-info>" is invalid. It will be ignored
for artifact resolution.
                       Reason: Failed to validate POM for project
<artifact-info>

And the resolution fails.

Instead if I put these libraries as system dependencies of project ABC,
everything works. I think, because it's not written in Maven
documentation, that system dependencies are not transitive....I'm right
??

But my question is: I can use these external libraries as dependencies
without put them in a local repository ??

Thank you for help,

Claudio Di Vita
--
View this message in context:
http://www.nabble.com/Add-third-parties-libraries-as-dependencies-tf4964
483s177.html#a14220690
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


Visit our website at http://www.ubs.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of e-mail transmission.  If 
verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.


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


RE: Add third parties libraries as dependencies

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
You need to create a minimal pom for these jars for maven to be able to
use them. If you use install:install-file or better deploy:deploy-file,
it can create the minimal pom for you.

-----Original Message-----
From: Claudio Di Vita [mailto:c.divita@gmail.com] 
Sent: Friday, December 07, 2007 4:13 PM
To: users@maven.apache.org
Subject: Add third parties libraries as dependencies


I'm persuading my Team Leader to use Maven as build tool, but I have to
demonstrate him that with Maven we'll handle our project dependencies
effortless.

I've obtained good results, but I have some problems with some jar
libraries
provided, through a quite complex installation process, by a software.

So I've tried to create an "empty" Maven artifact which has these
libraries
as system dependencies (yes, the dependency scope is system).

After I installed the artifact, I inserted it as a compile dependency
for
another project called, for example, ABC. But when I try to resolve
projects
dependencies I obtain the following message:

    [WARNING] POM for ''<artifact-info>" is invalid. It will be ignored
for
artifact resolution.
                       Reason: Failed to validate POM for project
<artifact-info>

And the resolution fails.

Instead if I put these libraries as system dependencies of project ABC,
everything works. I think, because it's not written in Maven
documentation,
that system dependencies are not transitive....I'm right ??

But my question is: I can use these external libraries as dependencies
without put them in a local repository ??

Thank you for help,

Claudio Di Vita
-- 
View this message in context:
http://www.nabble.com/Add-third-parties-libraries-as-dependencies-tf4964
483s177.html#a14220690
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


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