You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by MeJ <jo...@gmail.com> on 2012/09/11 11:09:56 UTC

configuring jars dependencies in pom

hi,
I have a project developed in java using eclipse. This project is using a
set of jars. We are trying to execute now this project using maven.
I have configured the pom file for every jar dependecy smth like:
<dependency>
			<groupId>org.eclipse.uml2</groupId>
			<artifactId>uml</artifactId>
			<version>3.2.1</version>
		</dependency>

I am trying to use same version of libraries we have in the project.
I am facing two problems:
1. If i just specify the library just like this it gives me error that it
can not download from the default repository that maven is using. 
2. if i specify the repository in my pom smth like:
/<repositories>
     <repository>
       <id>Indigo Release</id>
      
<url>https://raw.github.com/eclipse/acceleo/master/maven/repository/releases/indigo</url>
     </repository>
     <repository>
       <id>Juno Release</id>
      
<url>https://raw.github.com/eclipse/acceleo/master/maven/repository/releases/juno</url>
     </repository>
     <repository>
       <id>Snapshots</id>
      
<url>https://raw.github.com/eclipse/acceleo/master/maven/repository/snapshots</url>
     </repository>
   </repositories>
   <pluginRepositories>
     <pluginRepository>
       <id>Indigo Release</id>
      
<url>https://raw.github.com/eclipse/acceleo/master/maven/repository/releases/indigo</url>
     </pluginRepository>
     <pluginRepository>
       <id>Juno Release</id>
      
<url>https://raw.github.com/eclipse/acceleo/master/maven/repository/releases/juno</url>
     </pluginRepository>
     <pluginRepository>
       <id>Snapshots</id>
      
<url>https://raw.github.com/eclipse/acceleo/master/maven/repository/snapshots</url>
     </pluginRepository>
   </pluginRepositories>/

than the version which is in this repositories is not  the one i want to
download.

I tried to download libraries manually in mz local repository but its a lot
of work. Isnt there any simple way to do this ?

Thank you in advance



--
View this message in context: http://maven.40175.n5.nabble.com/configuring-jars-dependencies-in-pom-tp5721155.html
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: configuring jars dependencies in pom

Posted by Ron Wheeler <rw...@artifact-software.com>.
On 11/09/2012 8:36 AM, Brian Topping wrote:
> On Sep 11, 2012, at 2:54 PM, Ron Wheeler <rw...@artifact-software.com> wrote:
>
>> Using Maven without your own Repo is a horrible waste of time.
>> Get one of the repos (We use Nexus) installed and configured and you life will get a lot simpler.
> Really?  It's that bad?  Why doesn't it say this in the Maven documentation then?
I don't know. It is a deficiency as far as I am concerned.
>
> A lack of understanding of repositories will just kick the can upstream to where repositories and groups now need to be configured.  If the OP still doesn't the nuances of repositories, now he has to learn them in the context of how to configure Nexus.  Knowledge that might help him solve this problem without a repository in the first place.
>
> I'm not advocating that one runs a build for a team without a copy of Nexus, I agree it is worth the investment to learn, but Maven is not a "waste of time" without it.
I started with Maven 2 so I do not go back as far as a lot of the really 
experienced people here.
We started out without a repo and looking back we wasted a ton of time 
trying to understand repos, chasing jars not in Central, etc.
Once we got Nexus in, we understood Maven and repos a lot better. We 
were able to easily set up the third party libraries properly, we were 
able to collaborate much better, we understood how to structure a big 
project much better and so on.

> Please don't take this the wrong way, Ron, but these kinds of statements are sensationalistic and false.  We all got by for years without repositories and Maven hasn't substantially changed anything such that they are a requirement now.
I will accept sensationalistic but I do want to get the attention of new 
Maven users and save them the grief that we went through.
I can defend the "false" accusation.

I suspect that the Maven pioneers were a pretty smart bunch of guys who 
had the patience and interest in dealing with Maven.
The late adapters like me, just want something to work and not get in 
the way of developing our applications.
We do not expect to have to deal with the kinds of problems that the 
original poster was up against.
Installing a repo has a huge return.

> To the original poster:
>
> You need to study more about repositories and understand which artifacts need to come from where.  If a repository has the wrong version of an artifact, do not include it in your list of repositories or it will be downloaded.  Further, there is a difference between <repository> and <pluginRepository>, and you should not need the latter unless there is a Maven plugin that is not being found.
>
> When you have artifact dependencies that are *not* a part of your build *and not* a part of any repository, *then* you cannot get by without a repository of some sort.  It *is* possible to host a repository on a plain HTTP server and "deploy" to file: URLs, but it is a bit masochistic to do so.  In that case, it is easiest to bite the bullet and just deploy Nexus to start with.
>
> I hope this helps without being incendiary.  I care about you guys more than that. :-)
I will support the "I care about you guys more than that" statement.
The oldtimers and Apache project members in this forum are extremely 
generous with their support and advice.

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


-- 
Ron Wheeler
President
Artifact Software Inc
email: rwheeler@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


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


Re: configuring jars dependencies in pom

Posted by Brian Topping <to...@codehaus.org>.
On Sep 11, 2012, at 2:54 PM, Ron Wheeler <rw...@artifact-software.com> wrote:

> Using Maven without your own Repo is a horrible waste of time.
> Get one of the repos (We use Nexus) installed and configured and you life will get a lot simpler.

Really?  It's that bad?  Why doesn't it say this in the Maven documentation then?

A lack of understanding of repositories will just kick the can upstream to where repositories and groups now need to be configured.  If the OP still doesn't the nuances of repositories, now he has to learn them in the context of how to configure Nexus.  Knowledge that might help him solve this problem without a repository in the first place.

I'm not advocating that one runs a build for a team without a copy of Nexus, I agree it is worth the investment to learn, but Maven is not a "waste of time" without it.  

Please don't take this the wrong way, Ron, but these kinds of statements are sensationalistic and false.  We all got by for years without repositories and Maven hasn't substantially changed anything such that they are a requirement now.

To the original poster:

You need to study more about repositories and understand which artifacts need to come from where.  If a repository has the wrong version of an artifact, do not include it in your list of repositories or it will be downloaded.  Further, there is a difference between <repository> and <pluginRepository>, and you should not need the latter unless there is a Maven plugin that is not being found.  

When you have artifact dependencies that are *not* a part of your build *and not* a part of any repository, *then* you cannot get by without a repository of some sort.  It *is* possible to host a repository on a plain HTTP server and "deploy" to file: URLs, but it is a bit masochistic to do so.  In that case, it is easiest to bite the bullet and just deploy Nexus to start with.

I hope this helps without being incendiary.  I care about you guys more than that. :-)

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


Re: configuring jars dependencies in pom

Posted by Ron Wheeler <rw...@artifact-software.com>.
Using Maven without your own Repo is a horrible waste of time.
Get one of the repos (We use Nexus) installed and configured and you 
life will get a lot simpler.

Ron

On 11/09/2012 5:09 AM, MeJ wrote:
> hi,
> I have a project developed in java using eclipse. This project is using a
> set of jars. We are trying to execute now this project using maven.
> I have configured the pom file for every jar dependecy smth like:
> <dependency>
> 			<groupId>org.eclipse.uml2</groupId>
> 			<artifactId>uml</artifactId>
> 			<version>3.2.1</version>
> 		</dependency>
>
> I am trying to use same version of libraries we have in the project.
> I am facing two problems:
> 1. If i just specify the library just like this it gives me error that it
> can not download from the default repository that maven is using.
> 2. if i specify the repository in my pom smth like:
> /<repositories>
>       <repository>
>         <id>Indigo Release</id>
>        
> <url>https://raw.github.com/eclipse/acceleo/master/maven/repository/releases/indigo</url>
>       </repository>
>       <repository>
>         <id>Juno Release</id>
>        
> <url>https://raw.github.com/eclipse/acceleo/master/maven/repository/releases/juno</url>
>       </repository>
>       <repository>
>         <id>Snapshots</id>
>        
> <url>https://raw.github.com/eclipse/acceleo/master/maven/repository/snapshots</url>
>       </repository>
>     </repositories>
>     <pluginRepositories>
>       <pluginRepository>
>         <id>Indigo Release</id>
>        
> <url>https://raw.github.com/eclipse/acceleo/master/maven/repository/releases/indigo</url>
>       </pluginRepository>
>       <pluginRepository>
>         <id>Juno Release</id>
>        
> <url>https://raw.github.com/eclipse/acceleo/master/maven/repository/releases/juno</url>
>       </pluginRepository>
>       <pluginRepository>
>         <id>Snapshots</id>
>        
> <url>https://raw.github.com/eclipse/acceleo/master/maven/repository/snapshots</url>
>       </pluginRepository>
>     </pluginRepositories>/
>
> than the version which is in this repositories is not  the one i want to
> download.
>
> I tried to download libraries manually in mz local repository but its a lot
> of work. Isnt there any simple way to do this ?
>
> Thank you in advance
>
>
>
> --
> View this message in context: http://maven.40175.n5.nabble.com/configuring-jars-dependencies-in-pom-tp5721155.html
> 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
>
>


-- 
Ron Wheeler
President
Artifact Software Inc
email: rwheeler@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


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