I believe the following is correct. groupId artifactId version triangulate the POM and, therefore, the artifact for which this POM is responsible. By enabling dependency management you have made your second POM the child of the first and allowed any version of a dependencies artifact to be overriden in this child. If you are using eclipse have you looked at the POM xml it produces? Within the dependency management tags there should be the 'long' description of your artifacts. Without dependency management, the <dependencyManagement> tag, declared you would just depend on the <dependencies> tag to define all needed artifacts. I believe there is still some confusion here as the POMs you show are the artifact POMs, not the project POMs, but my guess is that you have created two project POMs unintentionally? For your scenario you would do one of three things. Define both artifact versions within the same project POM. Both artifacts sit side by side and both are on the class path - which class path depends on how scope is defined. Define both artifact versions with the same POM, but use profiles so that only one of them is 'seen' in any one situation. Have different local project POMs depending on need of the user each with only one of the different artifacts defined. Adam
2009/7/31 Qureshi,Shahzad [Ontario] <[email protected]> > Nevermind, it works fine. I had not enabled dependency management in > eclipse and kept thinking that it wasn't getting latest version. > > Thanks adasal for your input > > > -------------------------------------------- > Shahzad Qureshi > Systems Analyst/Programmer > Applications Directorate, CIOB > Environment Canada > 416-739-4702 > [email protected] > > -----Original Message----- > From: adasal [mailto:[email protected]] > Sent: Friday, July 31, 2009 3:07 PM > To: Maven Users List > Subject: Re: Uploading a new version to internal remote repository > > Are you sure? > I think you have misconfigured something. > The pom dictates the version of artifact you are using. > This doesn't make sense to me. > Adam > > 2009/7/31 Qureshi,Shahzad [Ontario] <[email protected]> > > > Hi all, > > > > I've an internal remote repository setup which is working fine. I just > > > have one confusion. > > > > I uploaded a internally developed library to the internal remote > > repository a few months ago which worked fine. However, now there is a > > > new version for it available and I wanted to upload the new version > > but I also don't want to remove the older version yet as there are few > > > modules that require the old version. > > > > I simply updated the version number in the pom file of the library and > > > updated the file name in the upload script and it was uploaded fine. > > > > I updated the pom file on my module to the new version, however I > > still get the older version downloaded in the module that needs to use > > > the new version. > > > > Someone had mentioned to me before that if I use SNAPSHOT I won't get > > this problem however, is that the rite approach though? I thought > > SNAPSHOT is used only for the libraries/modules that are actively > > under development and not for the stable/production versions? > > > > Hows do log4j for instance do this? I can simply change the version > > for log4j in my pom file to whatever I want and I'll get that version. > > > > > > > > -------------------------------------------- > > Shahzad Qureshi > > Systems Analyst/Programmer > > Applications Directorate, CIOB > > Environment Canada > > 416-739-4702 > > [email protected] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
