[prev in list] [next in list] [prev in thread] [next in thread] 

List:       maven-user
Subject:    Re: Uploading a new version to internal remote repository
From:       adasal <adam.saltiel () gmail ! com>
Date:       2009-07-31 22:10:40
Message-ID: e8aa138c0907311510p79246aa6se3d836fd6c872383 () mail ! gmail ! com
[Download RAW message or body]


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] <Shahzad.Qureshi@ec.gc.ca>

> 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
> shahzad.qureshi@ec.gc.ca
>
> -----Original Message-----
> From: adasal [mailto:adam.saltiel@gmail.com]
> 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] <Shahzad.Qureshi@ec.gc.ca>
>
> > 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
> > shahzad.qureshi@ec.gc.ca
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic