You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jo...@barclayscapital.com on 2008/11/28 21:38:58 UTC

Third party jars

Hi,

Is there any way to get the maven build process to include a set of jars
when compiling/packaging that are not in the repository?  I have some
vendor jars and I don't fancy packing them all up and placing them into
the repository - I just want to point maven at a lib directory?

Thanks,


john
_______________________________________________

This e-mail may contain information that is confidential, privileged or otherwise protected from disclosure. If you are not an intended recipient of this e-mail, do not duplicate or redistribute it by any means. Please delete it and any attachments and notify the sender that you have received it in error. Unless specifically indicated, this e-mail is not an offer to buy or sell or a solicitation to buy or sell any securities, investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Barclays. Any views or opinions presented are solely those of the author and do not necessarily represent those of Barclays. This e-mail is subject to terms available at the following link: www.barcap.com/emaildisclaimer. By messaging with Barclays you consent to the foregoing.  Barclays Capital is the investment banking division of Barclays Bank PLC, a company registered in England (number 1026167) with its registered office at 1 Churchill Place, London, E14 5HP.  This email may relate to or be sent from other members of the Barclays Group.
_______________________________________________

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


Re: Third party jars

Posted by Graham Leggett <mi...@sharp.fm>.
John.Baker@barclayscapital.com wrote:

> Is there any way to get the maven build process to include a set of jars
> when compiling/packaging that are not in the repository?  I have some
> vendor jars and I don't fancy packing them all up and placing them into
> the repository - I just want to point maven at a lib directory?

Ideally you want to host for yourself a project wide maven repository, 
both to place your released artifacts into, and place the third party 
vendor jars into.

This guarantees that someone other than you can build the code, without 
encountering an error or complaints about missing jars.

Regards,
Graham
--

RE: Third party jars

Posted by Todd Thiessen <th...@nortel.com>.
SWEET.... I can't believe I missed that.

Thanks. 

---
Todd Thiessen

-----Original Message-----
From: Brian E. Fox [mailto:brianf@reply.infinity.nu] 
Sent: Friday, November 28, 2008 4:18 PM
To: Maven Users List
Subject: RE: Third party jars

Right click on a hosted release repository in the browse repo screen. If
you have proper permissions, you'll see the option.

See here for more:
http://books.sonatype.com/maven-book/reference/repository-manager.html#s
ect-upload-asset-ui

-----Original Message-----
From: Todd Thiessen [mailto:thiessen@nortel.com]
Sent: Friday, November 28, 2008 4:13 PM
To: Maven Users List
Subject: RE: Third party jars

I am curious about this myself.  I have Nexus running but I don't see an
option in the UI to upload a jar.  I was hopeful of somekind of option
like this that would create the pom and all metadata files that go along
with it.

Or is there a Maven command to deploy a third party jar to the repo? 


---
Todd Thiessen

-----Original Message-----
From: David C. Hicks [mailto:dhicks@i-hicks.org]
Sent: Friday, November 28, 2008 4:09 PM
To: Maven Users List
Subject: Re: Third party jars

Oops!  I missed the part about compiling.  True, that won't help if you
need those jars for the actual build.  Nexus would be my suggestion for
that.  Easy to install and maintain.  I just set it up at my company a
couple of weeks ago.


Brian E. Fox wrote:
> This won't help when compiling though. The best way is to get them 
> into an internal repo...something like Nexus. You can just upload it 
> directly via the ui and it will make the pom for you if you don't want

> to. (I believe the others can do it as well)
>
>
>   

---------------------------------------------------------------------
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: Third party jars

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
Right click on a hosted release repository in the browse repo screen. If
you have proper permissions, you'll see the option.

See here for more:
http://books.sonatype.com/maven-book/reference/repository-manager.html#s
ect-upload-asset-ui

-----Original Message-----
From: Todd Thiessen [mailto:thiessen@nortel.com] 
Sent: Friday, November 28, 2008 4:13 PM
To: Maven Users List
Subject: RE: Third party jars

I am curious about this myself.  I have Nexus running but I don't see an
option in the UI to upload a jar.  I was hopeful of somekind of option
like this that would create the pom and all metadata files that go along
with it.

Or is there a Maven command to deploy a third party jar to the repo? 


---
Todd Thiessen

-----Original Message-----
From: David C. Hicks [mailto:dhicks@i-hicks.org] 
Sent: Friday, November 28, 2008 4:09 PM
To: Maven Users List
Subject: Re: Third party jars

Oops!  I missed the part about compiling.  True, that won't help if you
need those jars for the actual build.  Nexus would be my suggestion for
that.  Easy to install and maintain.  I just set it up at my company a
couple of weeks ago.


Brian E. Fox wrote:
> This won't help when compiling though. The best way is to get them 
> into an internal repo...something like Nexus. You can just upload it 
> directly via the ui and it will make the pom for you if you don't want

> to. (I believe the others can do it as well)
>
>
>   

---------------------------------------------------------------------
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: Third party jars

Posted by Todd Thiessen <th...@nortel.com>.
I am curious about this myself.  I have Nexus running but I don't see an
option in the UI to upload a jar.  I was hopeful of somekind of option
like this that would create the pom and all metadata files that go along
with it.

Or is there a Maven command to deploy a third party jar to the repo? 


---
Todd Thiessen

-----Original Message-----
From: David C. Hicks [mailto:dhicks@i-hicks.org] 
Sent: Friday, November 28, 2008 4:09 PM
To: Maven Users List
Subject: Re: Third party jars

Oops!  I missed the part about compiling.  True, that won't help if you
need those jars for the actual build.  Nexus would be my suggestion for
that.  Easy to install and maintain.  I just set it up at my company a
couple of weeks ago.


Brian E. Fox wrote:
> This won't help when compiling though. The best way is to get them 
> into an internal repo...something like Nexus. You can just upload it 
> directly via the ui and it will make the pom for you if you don't want

> to. (I believe the others can do it as well)
>
>
>   

---------------------------------------------------------------------
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: Third party jars

Posted by "David C. Hicks" <dh...@i-hicks.org>.
Oops!  I missed the part about compiling.  True, that won't help if you 
need those jars for the actual build.  Nexus would be my suggestion for 
that.  Easy to install and maintain.  I just set it up at my company a 
couple of weeks ago.


Brian E. Fox wrote:
> This won't help when compiling though. The best way is to get them into
> an internal repo...something like Nexus. You can just upload it directly
> via the ui and it will make the pom for you if you don't want to. (I
> believe the others can do it as well)
>
>
>   

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


RE: Third party jars

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
This won't help when compiling though. The best way is to get them into
an internal repo...something like Nexus. You can just upload it directly
via the ui and it will make the pom for you if you don't want to. (I
believe the others can do it as well)

-----Original Message-----
From: David C. Hicks [mailto:dhicks@i-hicks.org] 
Sent: Friday, November 28, 2008 3:54 PM
To: Maven Users List
Subject: Re: Third party jars

Sure.  The attached assembly.xml is used by the following profile.  The
profile just makes sure that the assembly plugin runs during the
"package" phase and includes all attached artifacts.  The real work is
in the attached assembly.xml.

Dave

        <profile>
            <id>release_assembly</id>
            <build>
                <plugins>
                    <plugin>
                        
<artifactId>maven-assembly-plugin</artifactId>               
                        <configuration>
                            <descriptor>assembly.xml</descriptor>
                        </configuration>
                        <executions>
                            <execution>
                                <id>make-assembly</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>attached</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>


John.Baker@barclayscapital.com wrote:
> Excellent - do you happen to have a pom extract to, say, include the 
> contents of ./lib on the compile path?
>
>   
>> -----Original Message-----
>> From: David C. Hicks [mailto:dhicks@i-hicks.org]
>> Sent: 28 November 2008 20:45
>> To: Maven Users List
>> Subject: Re: Third party jars
>>
>> The assembly plugin can add arbitrary files to your package.
>>
>>
>> John.Baker@barclayscapital.com wrote:
>>     
>>> Hi,
>>>
>>> Is there any way to get the maven build process to include a set of 
>>> jars when compiling/packaging that are not in the
>>>       
>> repository?  I have
>>     
>>> some vendor jars and I don't fancy packing them all up and placing 
>>> them into the repository - I just want to point maven at a
>>>       
>> lib directory?
>>     
>>> Thanks,
>>>
>>>
>>> john
>>> _______________________________________________
>>>
>>> This e-mail may contain information that is confidential,
>>>       
>> privileged or otherwise protected from disclosure. If you are not an 
>> intended recipient of this e-mail, do not duplicate or redistribute 
>> it by any means. Please delete it and any attachments and notify the 
>> sender that you have received it in error. Unless specifically 
>> indicated, this e-mail is not an offer to buy or sell or a 
>> solicitation to buy or sell any securities, investment products or 
>> other financial product or service, an official confirmation of any 
>> transaction, or an official statement of Barclays. Any views or 
>> opinions presented are solely those of the author and do not 
>> necessarily represent those of Barclays. This e-mail is subject to 
>> terms available at the following link:
>> www.barcap.com/emaildisclaimer. By messaging with Barclays you 
>> consent to the foregoing.  Barclays Capital is the investment banking

>> division of Barclays Bank PLC, a company registered in England 
>> (number 1026167) with its registered office at 1 Churchill Place, 
>> London, E14 5HP.  This email may relate to or be sent from other 
>> members of the Barclays Group.
>>     
>>> _______________________________________________
>>>
>>>
>>>       
>> ---------------------------------------------------------------------
>>     
>>> 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
>>
>>
>>     
> _______________________________________________
>
> This e-mail may contain information that is confidential, privileged
or otherwise protected from disclosure. If you are not an intended
recipient of this e-mail, do not duplicate or redistribute it by any
means. Please delete it and any attachments and notify the sender that
you have received it in error. Unless specifically indicated, this
e-mail is not an offer to buy or sell or a solicitation to buy or sell
any securities, investment products or other financial product or
service, an official confirmation of any transaction, or an official
statement of Barclays. Any views or opinions presented are solely those
of the author and do not necessarily represent those of Barclays. This
e-mail is subject to terms available at the following link:
www.barcap.com/emaildisclaimer. By messaging with Barclays you consent
to the foregoing.  Barclays Capital is the investment banking division
of Barclays Bank PLC, a company registered in England (number 1026167)
with its registered office at 1 Churchill Place, London, E14 5HP.  This
email may relate to or be sent from other members of the Barclays Group.
> _______________________________________________
>
> ---------------------------------------------------------------------
> 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: Third party jars

Posted by "David C. Hicks" <dh...@i-hicks.org>.
Sure.  The attached assembly.xml is used by the following profile.  The 
profile just makes sure that the assembly plugin runs during the 
"package" phase and includes all attached artifacts.  The real work is 
in the attached assembly.xml.

Dave

        <profile>
            <id>release_assembly</id>
            <build>
                <plugins>
                    <plugin>
                        
<artifactId>maven-assembly-plugin</artifactId>               
                        <configuration>
                            <descriptor>assembly.xml</descriptor>
                        </configuration>
                        <executions>
                            <execution>
                                <id>make-assembly</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>attached</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>


John.Baker@barclayscapital.com wrote:
> Excellent - do you happen to have a pom extract to, say, include the
> contents of ./lib on the compile path? 
>
>   
>> -----Original Message-----
>> From: David C. Hicks [mailto:dhicks@i-hicks.org] 
>> Sent: 28 November 2008 20:45
>> To: Maven Users List
>> Subject: Re: Third party jars
>>
>> The assembly plugin can add arbitrary files to your package.
>>
>>
>> John.Baker@barclayscapital.com wrote:
>>     
>>> Hi,
>>>
>>> Is there any way to get the maven build process to include a set of 
>>> jars when compiling/packaging that are not in the 
>>>       
>> repository?  I have 
>>     
>>> some vendor jars and I don't fancy packing them all up and placing 
>>> them into the repository - I just want to point maven at a 
>>>       
>> lib directory?
>>     
>>> Thanks,
>>>
>>>
>>> john
>>> _______________________________________________
>>>
>>> This e-mail may contain information that is confidential, 
>>>       
>> privileged or otherwise protected from disclosure. If you are 
>> not an intended recipient of this e-mail, do not duplicate or 
>> redistribute it by any means. Please delete it and any 
>> attachments and notify the sender that you have received it 
>> in error. Unless specifically indicated, this e-mail is not 
>> an offer to buy or sell or a solicitation to buy or sell any 
>> securities, investment products or other financial product or 
>> service, an official confirmation of any transaction, or an 
>> official statement of Barclays. Any views or opinions 
>> presented are solely those of the author and do not 
>> necessarily represent those of Barclays. This e-mail is 
>> subject to terms available at the following link: 
>> www.barcap.com/emaildisclaimer. By messaging with Barclays 
>> you consent to the foregoing.  Barclays Capital is the 
>> investment banking division of Barclays Bank PLC, a company 
>> registered in England (number 1026167) with its registered 
>> office at 1 Churchill Place, London, E14 5HP.  This email may 
>> relate to or be sent from other members of the Barclays Group.
>>     
>>> _______________________________________________
>>>
>>>
>>>       
>> ---------------------------------------------------------------------
>>     
>>> 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
>>
>>
>>     
> _______________________________________________
>
> This e-mail may contain information that is confidential, privileged or otherwise protected from disclosure. If you are not an intended recipient of this e-mail, do not duplicate or redistribute it by any means. Please delete it and any attachments and notify the sender that you have received it in error. Unless specifically indicated, this e-mail is not an offer to buy or sell or a solicitation to buy or sell any securities, investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Barclays. Any views or opinions presented are solely those of the author and do not necessarily represent those of Barclays. This e-mail is subject to terms available at the following link: www.barcap.com/emaildisclaimer. By messaging with Barclays you consent to the foregoing.  Barclays Capital is the investment banking division of Barclays Bank PLC, a company registered in England (number 1026167) with its registered office at 1 Churchill Place, London, E14 5HP.  This email may relate to or be sent from other members of the Barclays Group.
> _______________________________________________
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>   

RE: Third party jars

Posted by Jo...@barclayscapital.com.
Excellent - do you happen to have a pom extract to, say, include the
contents of ./lib on the compile path? 

> -----Original Message-----
> From: David C. Hicks [mailto:dhicks@i-hicks.org] 
> Sent: 28 November 2008 20:45
> To: Maven Users List
> Subject: Re: Third party jars
> 
> The assembly plugin can add arbitrary files to your package.
> 
> 
> John.Baker@barclayscapital.com wrote:
> > Hi,
> >
> > Is there any way to get the maven build process to include a set of 
> > jars when compiling/packaging that are not in the 
> repository?  I have 
> > some vendor jars and I don't fancy packing them all up and placing 
> > them into the repository - I just want to point maven at a 
> lib directory?
> >
> > Thanks,
> >
> >
> > john
> > _______________________________________________
> >
> > This e-mail may contain information that is confidential, 
> privileged or otherwise protected from disclosure. If you are 
> not an intended recipient of this e-mail, do not duplicate or 
> redistribute it by any means. Please delete it and any 
> attachments and notify the sender that you have received it 
> in error. Unless specifically indicated, this e-mail is not 
> an offer to buy or sell or a solicitation to buy or sell any 
> securities, investment products or other financial product or 
> service, an official confirmation of any transaction, or an 
> official statement of Barclays. Any views or opinions 
> presented are solely those of the author and do not 
> necessarily represent those of Barclays. This e-mail is 
> subject to terms available at the following link: 
> www.barcap.com/emaildisclaimer. By messaging with Barclays 
> you consent to the foregoing.  Barclays Capital is the 
> investment banking division of Barclays Bank PLC, a company 
> registered in England (number 1026167) with its registered 
> office at 1 Churchill Place, London, E14 5HP.  This email may 
> relate to or be sent from other members of the Barclays Group.
> > _______________________________________________
> >
> > 
> ---------------------------------------------------------------------
> > 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
> 
> 
_______________________________________________

This e-mail may contain information that is confidential, privileged or otherwise protected from disclosure. If you are not an intended recipient of this e-mail, do not duplicate or redistribute it by any means. Please delete it and any attachments and notify the sender that you have received it in error. Unless specifically indicated, this e-mail is not an offer to buy or sell or a solicitation to buy or sell any securities, investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Barclays. Any views or opinions presented are solely those of the author and do not necessarily represent those of Barclays. This e-mail is subject to terms available at the following link: www.barcap.com/emaildisclaimer. By messaging with Barclays you consent to the foregoing.  Barclays Capital is the investment banking division of Barclays Bank PLC, a company registered in England (number 1026167) with its registered office at 1 Churchill Place, London, E14 5HP.  This email may relate to or be sent from other members of the Barclays Group.
_______________________________________________

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


Re: Third party jars

Posted by "David C. Hicks" <dh...@i-hicks.org>.
The assembly plugin can add arbitrary files to your package.


John.Baker@barclayscapital.com wrote:
> Hi,
>
> Is there any way to get the maven build process to include a set of jars
> when compiling/packaging that are not in the repository?  I have some
> vendor jars and I don't fancy packing them all up and placing them into
> the repository - I just want to point maven at a lib directory?
>
> Thanks,
>
>
> john
> _______________________________________________
>
> This e-mail may contain information that is confidential, privileged or otherwise protected from disclosure. If you are not an intended recipient of this e-mail, do not duplicate or redistribute it by any means. Please delete it and any attachments and notify the sender that you have received it in error. Unless specifically indicated, this e-mail is not an offer to buy or sell or a solicitation to buy or sell any securities, investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Barclays. Any views or opinions presented are solely those of the author and do not necessarily represent those of Barclays. This e-mail is subject to terms available at the following link: www.barcap.com/emaildisclaimer. By messaging with Barclays you consent to the foregoing.  Barclays Capital is the investment banking division of Barclays Bank PLC, a company registered in England (number 1026167) with its registered office at 1 Churchill Place, London, E14 5HP.  This email may relate to or be sent from other members of the Barclays Group.
> _______________________________________________
>
> ---------------------------------------------------------------------
> 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: Third party jars

Posted by Wayne Fay <wa...@gmail.com>.
> Thanks for the suggestion, but I was already aware of this and I was
> wondering if there's an easier mechanism?   Such as mvn being smart with
> the jar name and coming up with the group/artifact ID, but I suspect
> that's beginning to ask too much!

This just isn't something Maven can help you with. Write a shell
script that receives the version and groupId, runs through all the
items named *.jar in the directoy, uses the file name as the
artifactId, and then outputs the <dependencies> list at the end after
using "mvn install" or "mvn deploy" on them. I know someone posted
something along these lines a while back on this list, but don't
remember specifics, so you can search the archives and try to find it.

If you do create something, please send it back to this list or put it
in the Maven Users Wiki so others can benefit in the future.

Wayne

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


RE: Third party jars

Posted by Jo...@barclayscapital.com.
Hi,

Thanks for the suggestion, but I was already aware of this and I was
wondering if there's an easier mechanism?   Such as mvn being smart with
the jar name and coming up with the group/artifact ID, but I suspect
that's beginning to ask too much!


John

> -----Original Message-----
> From: Stephen Connolly [mailto:stephen.alan.connolly@gmail.com] 
> Sent: 01 December 2008 08:49
> To: Maven Users List
> Subject: Re: Third party jars
> 
> mvn deploy:deploy-file -DgroupId=foo -DartifactId=bar 
> -Dversion=1.0-foo -Dpackaging=jar -DgeneratePom=true 
> -Dfile=foo.jar ...
> 
> And with newer versions of the maven-deploy-plugin, 
> generatePom defaults to true.
> 
> It should be trivial for you to write a shell script or batch 
> file that loops through all the jar files in a directory and 
> just calls mvn to do the deploy for you.
> 
> (BTW, the generated pom is a minimal pom, and does not 
> specify dependencies, but you just want to pull them all in, 
> so it will work for you and get you up and running)
> 
> -Stephen
> 
> 2008/12/1 <Jo...@barclayscapital.com>
> 
> > Hi,
> >
> > Thanks for all the feedback.  I guess my reasoning was that 
> inventing 
> > the meta data (group/artifactId/version) for 20 jars is a 
> little time 
> > consuming - is there an easier way to do this?  I.e. Is 
> there a maven 
> > command to take a directory full of jars and upload them 
> into my local 
> > repository (~/.m2/repository) and generate a set of dependency 
> > information for me?  Or even a pom with all the dependencies!
> >
> >
> > John
> >
> > > -----Original Message-----
> > > From: Alex Athanasopoulos [mailto:alex.a.athens.gr@gmail.com]
> > > Sent: 29 November 2008 10:34
> > > To: Maven Users List
> > > Subject: Re: Third party jars
> > >
> > > Why not put the jars in a repository?  A repository is 
> perfect for 
> > > containing 3rd party jars, and one of maven's major 
> benefits.  Once 
> > > you do that, you don't need to refer to the jars through 
> a hardcoded 
> > > path, but simply by a portable artifact identifier.  You 
> don't need 
> > > any special tools or repository managers, but you do need 
> to setup 
> > > your own remote repository somehow.
> > >
> > > I simply use mvn install:install-file, and then copy the 
> generated 
> > > files from my local repository to a remote repository that I have 
> > > created just for 3rd party libs.
> > >
> > > I'm fairly new to maven, and this is one of the first 
> things I had 
> > > to do.
> > >  The rest is just defining and managing repositories, 
> which can be a 
> > > discussion of its own.  I'm not using any repository managers yet 
> > > (learning to live with maven is enough work for me right 
> now).  My 
> > > A-B-Cs of repository management have been the following:
> > >
> > > A)  At first I used only my local repository, which I shared with 
> > > other developers by putting it under version control in svn, just 
> > > like I had my
> > > 3rd party libs before maven.   I used mvn -o most of the
> > > time, to avoid
> > > accessing Maven's central repository.  I was a bit annoyed that I 
> > > had to use -o.  I tried to use the <offline> configuration in 
> > > settings.xml, but I couldn't get it to work (one of my first 
> > > frustrations with maven).  mvn -o worked reliably, but I had to 
> > > remember to use it.  Whenever I needed a piece of Maven that I 
> > > didn't have, I used mvn without the -o flag, and once everything 
> > > worked, I added the new artifacts from my local 
> repository to svn.  
> > > I did not add my snapshots.
> > >
> > > B)  I then figured out how to avoid the -o flag, by defining a 
> > > mirror of the central repository in my settings.xml.  The 
> mirror was 
> > > simply an http-accessible location of the single svn-managed 
> > > repository that I had.
> > >  Whenever I needed to use a new piece of maven, I 
> commented out the 
> > > mirror specifiction in my settings.xml, ran mvn so it 
> could get new 
> > > pieces from repo1.maven.org, and then took the comment out of 
> > > settings.xml.  The rest was as in A.
> > >
> > > C)  I now use two repositories:
> > > 1)  A repository of non-maven released artifacts.
> > > Essentially this contains 3rd party libraries.  These are 
> libraries 
> > > that I've gotten directly from their source, and which 
> I've entered 
> > > in the repository through install:install-file.  I plan 
> to also put 
> > > my own released artifacts there.
> > >
> > > 2)  A central-mirror repository that has just the things 
> that maven 
> > > needs (plugins and their dependencies).  This is the most 
> difficult 
> > > repository to manage, and a source of problems, as I find maven's 
> > > dependencies chaotic and unstable.  This is why I've 
> isolated them 
> > > from my other artifacts.
> > >
> > > D)  I plan to also use a snapshots repository that is 
> automatically 
> > > updated with my daily build artifacts.  In fact, I may simply 
> > > provide http access to the daily build's local repository.
> > > For now, I rebuild all of my artifacts locally.
> > >
> > > Alex
> > >
> > > On Fri, Nov 28, 2008 at 10:38 PM,
> > > <Jo...@barclayscapital.com> wrote:
> > >
> > > > Hi,
> > > >
> > > > Is there any way to get the maven build process to 
> include a set 
> > > > of jars when compiling/packaging that are not in the
> > > repository?  I have
> > > > some vendor jars and I don't fancy packing them all up 
> and placing 
> > > > them into the repository - I just want to point maven at a
> > > lib directory?
> > > >
> > > > Thanks,
> > > >
> > > >
> > > > john
> > > > _______________________________________________
> > > >
> > > > This e-mail may contain information that is confidential,
> > > privileged
> > > > or otherwise protected from disclosure. If you are not 
> an intended 
> > > > recipient of this e-mail, do not duplicate or redistribute
> > > it by any
> > > > means. Please delete it and any attachments and notify the
> > > sender that
> > > > you have received it in error. Unless specifically 
> indicated, this 
> > > > e-mail is not an offer to buy or sell or a solicitation to
> > > buy or sell
> > > > any securities, investment products or other financial 
> product or 
> > > > service, an official confirmation of any transaction, or an
> > > official
> > > > statement of Barclays. Any views or opinions presented 
> are solely 
> > > > those of the author and do not necessarily represent those of 
> > > > Barclays. This e-mail is subject to terms available at the
> > > following
> > > > link: www.barcap.com/emaildisclaimer. By messaging with
> > > Barclays you
> > > > consent to the foregoing.  Barclays Capital is the
> > > investment banking
> > > > division of Barclays Bank PLC, a company registered in
> > > England (number
> > > > 1026167) with its registered office at 1 Churchill Place,
> > > London, E14 5HP.
> > > >  This email may relate to or be sent from other members of the 
> > > > Barclays Group.
> > > > _______________________________________________
> > > >
> > > >
> > > 
> --------------------------------------------------------------------
> > > -
> > > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > > For additional commands, e-mail: users-help@maven.apache.org
> > > >
> > > >
> > >
> > _______________________________________________
> >
> > This e-mail may contain information that is confidential, 
> privileged 
> > or otherwise protected from disclosure. If you are not an intended 
> > recipient of this e-mail, do not duplicate or redistribute 
> it by any 
> > means. Please delete it and any attachments and notify the 
> sender that 
> > you have received it in error. Unless specifically indicated, this 
> > e-mail is not an offer to buy or sell or a solicitation to 
> buy or sell 
> > any securities, investment products or other financial product or 
> > service, an official confirmation of any transaction, or an 
> official 
> > statement of Barclays. Any views or opinions presented are solely 
> > those of the author and do not necessarily represent those of 
> > Barclays. This e-mail is subject to terms available at the 
> following 
> > link: www.barcap.com/emaildisclaimer. By messaging with 
> Barclays you 
> > consent to the foregoing.  Barclays Capital is the 
> investment banking 
> > division of Barclays Bank PLC, a company registered in 
> England (number
> > 1026167) with its registered office at 1 Churchill Place, 
> London, E14 5HP.
> >  This email may relate to or be sent from other members of the 
> > Barclays Group.
> > _______________________________________________
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> 
_______________________________________________

This e-mail may contain information that is confidential, privileged or otherwise protected from disclosure. If you are not an intended recipient of this e-mail, do not duplicate or redistribute it by any means. Please delete it and any attachments and notify the sender that you have received it in error. Unless specifically indicated, this e-mail is not an offer to buy or sell or a solicitation to buy or sell any securities, investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Barclays. Any views or opinions presented are solely those of the author and do not necessarily represent those of Barclays. This e-mail is subject to terms available at the following link: www.barcap.com/emaildisclaimer. By messaging with Barclays you consent to the foregoing.  Barclays Capital is the investment banking division of Barclays Bank PLC, a company registered in England (number 1026167) with its registered office at 1 Churchill Place, London, E14 5HP.  This email may relate to or be sent from other members of the Barclays Group.
_______________________________________________

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


Re: Third party jars

Posted by Stephen Connolly <st...@gmail.com>.
mvn deploy:deploy-file -DgroupId=foo -DartifactId=bar -Dversion=1.0-foo
-Dpackaging=jar -DgeneratePom=true -Dfile=foo.jar ...

And with newer versions of the maven-deploy-plugin, generatePom defaults to
true.

It should be trivial for you to write a shell script or batch file that
loops through all the jar files in a directory and just calls mvn to do the
deploy for you.

(BTW, the generated pom is a minimal pom, and does not specify dependencies,
but you just want to pull them all in, so it will work for you and get you
up and running)

-Stephen

2008/12/1 <Jo...@barclayscapital.com>

> Hi,
>
> Thanks for all the feedback.  I guess my reasoning was that inventing
> the meta data (group/artifactId/version) for 20 jars is a little time
> consuming - is there an easier way to do this?  I.e. Is there a maven
> command to take a directory full of jars and upload them into my local
> repository (~/.m2/repository) and generate a set of dependency
> information for me?  Or even a pom with all the dependencies!
>
>
> John
>
> > -----Original Message-----
> > From: Alex Athanasopoulos [mailto:alex.a.athens.gr@gmail.com]
> > Sent: 29 November 2008 10:34
> > To: Maven Users List
> > Subject: Re: Third party jars
> >
> > Why not put the jars in a repository?  A repository is
> > perfect for containing 3rd party jars, and one of maven's
> > major benefits.  Once you do that, you don't need to refer to
> > the jars through a hardcoded path, but simply by a portable
> > artifact identifier.  You don't need any special tools or
> > repository managers, but you do need to setup your own remote
> > repository somehow.
> >
> > I simply use mvn install:install-file, and then copy the
> > generated files from my local repository to a remote
> > repository that I have created just for 3rd party libs.
> >
> > I'm fairly new to maven, and this is one of the first things
> > I had to do.
> >  The rest is just defining and managing repositories, which
> > can be a discussion of its own.  I'm not using any repository
> > managers yet (learning to live with maven is enough work for
> > me right now).  My A-B-Cs of repository management have been
> > the following:
> >
> > A)  At first I used only my local repository, which I shared
> > with other developers by putting it under version control in
> > svn, just like I had my
> > 3rd party libs before maven.   I used mvn -o most of the
> > time, to avoid
> > accessing Maven's central repository.  I was a bit annoyed
> > that I had to use -o.  I tried to use the <offline>
> > configuration in settings.xml, but I couldn't get it to work
> > (one of my first frustrations with maven).  mvn -o worked
> > reliably, but I had to remember to use it.  Whenever I needed
> > a piece of Maven that I didn't have, I used mvn without the
> > -o flag, and once everything worked, I added the new
> > artifacts from my local repository to svn.  I did not add my
> > snapshots.
> >
> > B)  I then figured out how to avoid the -o flag, by defining
> > a mirror of the central repository in my settings.xml.  The
> > mirror was simply an http-accessible location of the single
> > svn-managed repository that I had.
> >  Whenever I needed to use a new piece of maven, I commented
> > out the mirror specifiction in my settings.xml, ran mvn so it
> > could get new pieces from repo1.maven.org, and then took the
> > comment out of settings.xml.  The rest was as in A.
> >
> > C)  I now use two repositories:
> > 1)  A repository of non-maven released artifacts.
> > Essentially this contains 3rd party libraries.  These are
> > libraries that I've gotten directly from their source, and
> > which I've entered in the repository through
> > install:install-file.  I plan to also put my own released
> > artifacts there.
> >
> > 2)  A central-mirror repository that has just the things that
> > maven needs (plugins and their dependencies).  This is the
> > most difficult repository to manage, and a source of
> > problems, as I find maven's dependencies chaotic and
> > unstable.  This is why I've isolated them from my other artifacts.
> >
> > D)  I plan to also use a snapshots repository that is
> > automatically updated with my daily build artifacts.  In
> > fact, I may simply provide http access to the daily build's
> > local repository.
> > For now, I rebuild all of my artifacts locally.
> >
> > Alex
> >
> > On Fri, Nov 28, 2008 at 10:38 PM,
> > <Jo...@barclayscapital.com> wrote:
> >
> > > Hi,
> > >
> > > Is there any way to get the maven build process to include a set of
> > > jars when compiling/packaging that are not in the
> > repository?  I have
> > > some vendor jars and I don't fancy packing them all up and placing
> > > them into the repository - I just want to point maven at a
> > lib directory?
> > >
> > > Thanks,
> > >
> > >
> > > john
> > > _______________________________________________
> > >
> > > This e-mail may contain information that is confidential,
> > privileged
> > > or otherwise protected from disclosure. If you are not an intended
> > > recipient of this e-mail, do not duplicate or redistribute
> > it by any
> > > means. Please delete it and any attachments and notify the
> > sender that
> > > you have received it in error. Unless specifically indicated, this
> > > e-mail is not an offer to buy or sell or a solicitation to
> > buy or sell
> > > any securities, investment products or other financial product or
> > > service, an official confirmation of any transaction, or an
> > official
> > > statement of Barclays. Any views or opinions presented are solely
> > > those of the author and do not necessarily represent those of
> > > Barclays. This e-mail is subject to terms available at the
> > following
> > > link: www.barcap.com/emaildisclaimer. By messaging with
> > Barclays you
> > > consent to the foregoing.  Barclays Capital is the
> > investment banking
> > > division of Barclays Bank PLC, a company registered in
> > England (number
> > > 1026167) with its registered office at 1 Churchill Place,
> > London, E14 5HP.
> > >  This email may relate to or be sent from other members of the
> > > Barclays Group.
> > > _______________________________________________
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
> _______________________________________________
>
> This e-mail may contain information that is confidential, privileged or
> otherwise protected from disclosure. If you are not an intended recipient of
> this e-mail, do not duplicate or redistribute it by any means. Please delete
> it and any attachments and notify the sender that you have received it in
> error. Unless specifically indicated, this e-mail is not an offer to buy or
> sell or a solicitation to buy or sell any securities, investment products or
> other financial product or service, an official confirmation of any
> transaction, or an official statement of Barclays. Any views or opinions
> presented are solely those of the author and do not necessarily represent
> those of Barclays. This e-mail is subject to terms available at the
> following link: www.barcap.com/emaildisclaimer. By messaging with Barclays
> you consent to the foregoing.  Barclays Capital is the investment banking
> division of Barclays Bank PLC, a company registered in England (number
> 1026167) with its registered office at 1 Churchill Place, London, E14 5HP.
>  This email may relate to or be sent from other members of the Barclays
> Group.
> _______________________________________________
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Third party jars

Posted by Brian Fox <br...@reply.infinity.nu>.
Yes we do have a tool for this

--Brian (mobile)


On Dec 24, 2008, at 3:55 PM, "John Stoneham" <ly...@lyrically.net>  
wrote:

> On Wed, Dec 24, 2008 at 9:20 AM, Alex Athanasopoulos
> <al...@gmail.com> wrote:
>> Is there a way to convert a local repository into a remote  
>> repository, or
>> should I upload each artifact to Nexus again? (I have a few dozen).
>
> I understand that Nexus 1.2 features some command-line scripts to do
> exactly this sort of thing, and an option to regenerate
> maven-metadata.xml. But Nexus stores as flat files on disk, so you
> ought to be able to instantiate your Nexus repository and copy
> directly in.
>
> I'd venture to say any further discussion ought to move to the
> nexus-users list however.
>
> - John
>
> ---------------------------------------------------------------------
> 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: Third party jars

Posted by John Stoneham <ly...@lyrically.net>.
On Wed, Dec 24, 2008 at 9:20 AM, Alex Athanasopoulos
<al...@gmail.com> wrote:
> Is there a way to convert a local repository into a remote repository, or
> should I upload each artifact to Nexus again? (I have a few dozen).

I understand that Nexus 1.2 features some command-line scripts to do
exactly this sort of thing, and an option to regenerate
maven-metadata.xml. But Nexus stores as flat files on disk, so you
ought to be able to instantiate your Nexus repository and copy
directly in.

I'd venture to say any further discussion ought to move to the
nexus-users list however.

- John

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


Re: Third party jars

Posted by Alex Athanasopoulos <al...@gmail.com>.
Thank you Brian,

I am now using Nexus Repository Manager, and it does save me from a lot of
hassle.  It was easier than I thought.  I just resisted at first, because
switching from Ant to Maven was more work than I thought it would be, so I
didn't want to get deeper into trouble with repository managers.

Is there a way to convert a local repository into a remote repository, or
should I upload each artifact to Nexus again? (I have a few dozen).

For now, I've copied my 3rd party section from my local repository directly
to the Nexus 3rd-party repo, and it seems to work.  I removed the metadata
files, since they are local repo metadata.  Of course, I'm now adding new
3rd party jars through Nexus.

I've found this related issue, but it doesn't explain the solution:

https://issues.sonatype.org/browse/NEXUS-996

-Alex

On Sat, Nov 29, 2008 at 8:27 PM, Brian Fox <br...@reply.infinity.nu> wrote:

> You could save youself a lot of hassle with a repo manager. You shouldn't
> use local repos as remote repos because the metadata is different. Also with
> unmanaged repos, snapshot accumulation will become a problem.
>
> --Brian (mobile)
>
>

Re: Third party jars

Posted by Brian Fox <br...@reply.infinity.nu>.
You could save youself a lot of hassle with a repo manager. You  
shouldn't use local repos as remote repos because the metadata is  
different. Also with unmanaged repos, snapshot accumulation will  
become a problem.

--Brian (mobile)


On Nov 29, 2008, at 5:33 AM, "Alex Athanasopoulos" <alex.a.athens.gr@gmail.com 
 > wrote:

> Why not put the jars in a repository?  A repository is perfect for
> containing 3rd party jars, and one of maven's major benefits.  Once  
> you do
> that, you don't need to refer to the jars through a hardcoded path,  
> but
> simply by a portable artifact identifier.  You don't need any  
> special tools
> or repository managers, but you do need to setup your own remote  
> repository
> somehow.
>
> I simply use mvn install:install-file, and then copy the generated  
> files
> from my local repository to a remote repository that I have created  
> just for
> 3rd party libs.
>
> I'm fairly new to maven, and this is one of the first things I had  
> to do.
>  The rest is just defining and managing repositories, which can be a
> discussion of its own.  I'm not using any repository managers yet  
> (learning
> to live with maven is enough work for me right now).  My A-B-Cs of
> repository management have been the following:
>
> A)  At first I used only my local repository, which I shared with  
> other
> developers by putting it under version control in svn, just like I  
> had my
> 3rd party libs before maven.   I used mvn -o most of the time, to  
> avoid
> accessing Maven's central repository.  I was a bit annoyed that I  
> had to use
> -o.  I tried to use the <offline> configuration in settings.xml, but I
> couldn't get it to work (one of my first frustrations with maven).   
> mvn -o
> worked reliably, but I had to remember to use it.  Whenever I needed  
> a piece
> of Maven that I didn't have, I used mvn without the -o flag, and once
> everything worked, I added the new artifacts from my local  
> repository to
> svn.  I did not add my snapshots.
>
> B)  I then figured out how to avoid the -o flag, by defining a  
> mirror of the
> central repository in my settings.xml.  The mirror was simply an
> http-accessible location of the single svn-managed repository that I  
> had.
>  Whenever I needed to use a new piece of maven, I commented out the  
> mirror
> specifiction in my settings.xml, ran mvn so it could get new pieces  
> from
> repo1.maven.org, and then took the comment out of settings.xml.  The  
> rest
> was as in A.
>
> C)  I now use two repositories:
> 1)  A repository of non-maven released artifacts.  Essentially this  
> contains
> 3rd party libraries.  These are libraries that I've gotten directly  
> from
> their source, and which I've entered in the repository through
> install:install-file.  I plan to also put my own released artifacts  
> there.
>
> 2)  A central-mirror repository that has just the things that maven  
> needs
> (plugins and their dependencies).  This is the most difficult  
> repository to
> manage, and a source of problems, as I find maven's dependencies  
> chaotic and
> unstable.  This is why I've isolated them from my other artifacts.
>
> D)  I plan to also use a snapshots repository that is automatically  
> updated
> with my daily build artifacts.  In fact, I may simply provide http  
> access to
> the daily build's local repository.
> For now, I rebuild all of my artifacts locally.
>
> Alex
>
> On Fri, Nov 28, 2008 at 10:38 PM, <Jo...@barclayscapital.com>  
> wrote:
>
> > Hi,
> >
> > Is there any way to get the maven build process to include a set  
> of jars
> > when compiling/packaging that are not in the repository?  I have  
> some
> > vendor jars and I don't fancy packing them all up and placing them  
> into
> > the repository - I just want to point maven at a lib directory?
> >
> > Thanks,
> >
> >
> > john
> > _______________________________________________
> >
> > This e-mail may contain information that is confidential,  
> privileged or
> > otherwise protected from disclosure. If you are not an intended  
> recipient of
> > this e-mail, do not duplicate or redistribute it by any means.  
> Please delete
> > it and any attachments and notify the sender that you have  
> received it in
> > error. Unless specifically indicated, this e-mail is not an offer  
> to buy or
> > sell or a solicitation to buy or sell any securities, investment  
> products or
> > other financial product or service, an official confirmation of any
> > transaction, or an official statement of Barclays. Any views or  
> opinions
> > presented are solely those of the author and do not necessarily  
> represent
> > those of Barclays. This e-mail is subject to terms available at the
> > following link: www.barcap.com/emaildisclaimer. By messaging with  
> Barclays
> > you consent to the foregoing.  Barclays Capital is the investment  
> banking
> > division of Barclays Bank PLC, a company registered in England  
> (number
> > 1026167) with its registered office at 1 Churchill Place, London,  
> E14 5HP.
> >  This email may relate to or be sent from other members of the  
> Barclays
> > Group.
> > _______________________________________________
> >
> >  
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >

Re: Third party jars

Posted by Wayne Fay <wa...@gmail.com>.
> consuming - is there an easier way to do this?  I.e. Is there a maven

Depend on fewer third-party jars...

But seriously, the first couple Maven projects are a little painful
due to things like this and the usual learning curve with a new tool,
but then it gets much easier.

Wayne

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


RE: Third party jars

Posted by Jo...@barclayscapital.com.
Hi,

Thanks for all the feedback.  I guess my reasoning was that inventing
the meta data (group/artifactId/version) for 20 jars is a little time
consuming - is there an easier way to do this?  I.e. Is there a maven
command to take a directory full of jars and upload them into my local
repository (~/.m2/repository) and generate a set of dependency
information for me?  Or even a pom with all the dependencies!


John 

> -----Original Message-----
> From: Alex Athanasopoulos [mailto:alex.a.athens.gr@gmail.com] 
> Sent: 29 November 2008 10:34
> To: Maven Users List
> Subject: Re: Third party jars
> 
> Why not put the jars in a repository?  A repository is 
> perfect for containing 3rd party jars, and one of maven's 
> major benefits.  Once you do that, you don't need to refer to 
> the jars through a hardcoded path, but simply by a portable 
> artifact identifier.  You don't need any special tools or 
> repository managers, but you do need to setup your own remote 
> repository somehow.
> 
> I simply use mvn install:install-file, and then copy the 
> generated files from my local repository to a remote 
> repository that I have created just for 3rd party libs.
> 
> I'm fairly new to maven, and this is one of the first things 
> I had to do.
>  The rest is just defining and managing repositories, which 
> can be a discussion of its own.  I'm not using any repository 
> managers yet (learning to live with maven is enough work for 
> me right now).  My A-B-Cs of repository management have been 
> the following:
> 
> A)  At first I used only my local repository, which I shared 
> with other developers by putting it under version control in 
> svn, just like I had my
> 3rd party libs before maven.   I used mvn -o most of the 
> time, to avoid
> accessing Maven's central repository.  I was a bit annoyed 
> that I had to use -o.  I tried to use the <offline> 
> configuration in settings.xml, but I couldn't get it to work 
> (one of my first frustrations with maven).  mvn -o worked 
> reliably, but I had to remember to use it.  Whenever I needed 
> a piece of Maven that I didn't have, I used mvn without the 
> -o flag, and once everything worked, I added the new 
> artifacts from my local repository to svn.  I did not add my 
> snapshots.
> 
> B)  I then figured out how to avoid the -o flag, by defining 
> a mirror of the central repository in my settings.xml.  The 
> mirror was simply an http-accessible location of the single 
> svn-managed repository that I had.
>  Whenever I needed to use a new piece of maven, I commented 
> out the mirror specifiction in my settings.xml, ran mvn so it 
> could get new pieces from repo1.maven.org, and then took the 
> comment out of settings.xml.  The rest was as in A.
> 
> C)  I now use two repositories:
> 1)  A repository of non-maven released artifacts.  
> Essentially this contains 3rd party libraries.  These are 
> libraries that I've gotten directly from their source, and 
> which I've entered in the repository through 
> install:install-file.  I plan to also put my own released 
> artifacts there.
> 
> 2)  A central-mirror repository that has just the things that 
> maven needs (plugins and their dependencies).  This is the 
> most difficult repository to manage, and a source of 
> problems, as I find maven's dependencies chaotic and 
> unstable.  This is why I've isolated them from my other artifacts.
> 
> D)  I plan to also use a snapshots repository that is 
> automatically updated with my daily build artifacts.  In 
> fact, I may simply provide http access to the daily build's 
> local repository.
> For now, I rebuild all of my artifacts locally.
> 
> Alex
> 
> On Fri, Nov 28, 2008 at 10:38 PM, 
> <Jo...@barclayscapital.com> wrote:
> 
> > Hi,
> >
> > Is there any way to get the maven build process to include a set of 
> > jars when compiling/packaging that are not in the 
> repository?  I have 
> > some vendor jars and I don't fancy packing them all up and placing 
> > them into the repository - I just want to point maven at a 
> lib directory?
> >
> > Thanks,
> >
> >
> > john
> > _______________________________________________
> >
> > This e-mail may contain information that is confidential, 
> privileged 
> > or otherwise protected from disclosure. If you are not an intended 
> > recipient of this e-mail, do not duplicate or redistribute 
> it by any 
> > means. Please delete it and any attachments and notify the 
> sender that 
> > you have received it in error. Unless specifically indicated, this 
> > e-mail is not an offer to buy or sell or a solicitation to 
> buy or sell 
> > any securities, investment products or other financial product or 
> > service, an official confirmation of any transaction, or an 
> official 
> > statement of Barclays. Any views or opinions presented are solely 
> > those of the author and do not necessarily represent those of 
> > Barclays. This e-mail is subject to terms available at the 
> following 
> > link: www.barcap.com/emaildisclaimer. By messaging with 
> Barclays you 
> > consent to the foregoing.  Barclays Capital is the 
> investment banking 
> > division of Barclays Bank PLC, a company registered in 
> England (number
> > 1026167) with its registered office at 1 Churchill Place, 
> London, E14 5HP.
> >  This email may relate to or be sent from other members of the 
> > Barclays Group.
> > _______________________________________________
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> 
_______________________________________________

This e-mail may contain information that is confidential, privileged or otherwise protected from disclosure. If you are not an intended recipient of this e-mail, do not duplicate or redistribute it by any means. Please delete it and any attachments and notify the sender that you have received it in error. Unless specifically indicated, this e-mail is not an offer to buy or sell or a solicitation to buy or sell any securities, investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Barclays. Any views or opinions presented are solely those of the author and do not necessarily represent those of Barclays. This e-mail is subject to terms available at the following link: www.barcap.com/emaildisclaimer. By messaging with Barclays you consent to the foregoing.  Barclays Capital is the investment banking division of Barclays Bank PLC, a company registered in England (number 1026167) with its registered office at 1 Churchill Place, London, E14 5HP.  This email may relate to or be sent from other members of the Barclays Group.
_______________________________________________

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


Re: Third party jars

Posted by Alex Athanasopoulos <al...@gmail.com>.
Why not put the jars in a repository?  A repository is perfect for
containing 3rd party jars, and one of maven's major benefits.  Once you do
that, you don't need to refer to the jars through a hardcoded path, but
simply by a portable artifact identifier.  You don't need any special tools
or repository managers, but you do need to setup your own remote repository
somehow.

I simply use mvn install:install-file, and then copy the generated files
from my local repository to a remote repository that I have created just for
3rd party libs.

I'm fairly new to maven, and this is one of the first things I had to do.
 The rest is just defining and managing repositories, which can be a
discussion of its own.  I'm not using any repository managers yet (learning
to live with maven is enough work for me right now).  My A-B-Cs of
repository management have been the following:

A)  At first I used only my local repository, which I shared with other
developers by putting it under version control in svn, just like I had my
3rd party libs before maven.   I used mvn -o most of the time, to avoid
accessing Maven's central repository.  I was a bit annoyed that I had to use
-o.  I tried to use the <offline> configuration in settings.xml, but I
couldn't get it to work (one of my first frustrations with maven).  mvn -o
worked reliably, but I had to remember to use it.  Whenever I needed a piece
of Maven that I didn't have, I used mvn without the -o flag, and once
everything worked, I added the new artifacts from my local repository to
svn.  I did not add my snapshots.

B)  I then figured out how to avoid the -o flag, by defining a mirror of the
central repository in my settings.xml.  The mirror was simply an
http-accessible location of the single svn-managed repository that I had.
 Whenever I needed to use a new piece of maven, I commented out the mirror
specifiction in my settings.xml, ran mvn so it could get new pieces from
repo1.maven.org, and then took the comment out of settings.xml.  The rest
was as in A.

C)  I now use two repositories:
1)  A repository of non-maven released artifacts.  Essentially this contains
3rd party libraries.  These are libraries that I've gotten directly from
their source, and which I've entered in the repository through
install:install-file.  I plan to also put my own released artifacts there.

2)  A central-mirror repository that has just the things that maven needs
(plugins and their dependencies).  This is the most difficult repository to
manage, and a source of problems, as I find maven's dependencies chaotic and
unstable.  This is why I've isolated them from my other artifacts.

D)  I plan to also use a snapshots repository that is automatically updated
with my daily build artifacts.  In fact, I may simply provide http access to
the daily build's local repository.
For now, I rebuild all of my artifacts locally.

Alex

On Fri, Nov 28, 2008 at 10:38 PM, <Jo...@barclayscapital.com> wrote:

> Hi,
>
> Is there any way to get the maven build process to include a set of jars
> when compiling/packaging that are not in the repository?  I have some
> vendor jars and I don't fancy packing them all up and placing them into
> the repository - I just want to point maven at a lib directory?
>
> Thanks,
>
>
> john
> _______________________________________________
>
> This e-mail may contain information that is confidential, privileged or
> otherwise protected from disclosure. If you are not an intended recipient of
> this e-mail, do not duplicate or redistribute it by any means. Please delete
> it and any attachments and notify the sender that you have received it in
> error. Unless specifically indicated, this e-mail is not an offer to buy or
> sell or a solicitation to buy or sell any securities, investment products or
> other financial product or service, an official confirmation of any
> transaction, or an official statement of Barclays. Any views or opinions
> presented are solely those of the author and do not necessarily represent
> those of Barclays. This e-mail is subject to terms available at the
> following link: www.barcap.com/emaildisclaimer. By messaging with Barclays
> you consent to the foregoing.  Barclays Capital is the investment banking
> division of Barclays Bank PLC, a company registered in England (number
> 1026167) with its registered office at 1 Churchill Place, London, E14 5HP.
>  This email may relate to or be sent from other members of the Barclays
> Group.
> _______________________________________________
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>