You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Todd Thiessen <th...@nortel.com> on 2008/12/10 22:19:41 UTC
Using a SNAPSHOT version for a parent
If I deploy a SNAPSHOT version of a parent POM, POMs that reference it
do not automatically download (even when running a bootstrap profile).
ie: Is this supported?
<parent>
<artifactId>theid</artifactId>
<groupId>thegroup</groupId>
<version>0.0.1-SNAPSHOT</version>
</parent>
If the artifact already exists in my local repo, everything is fine.
However, if I deploy a released version of the artifact and change the
parent reference accordingly
<parent>
<artifactId>theid</artifactId>
<groupId>thegroup</groupId>
<version>0.0.1</version>
</parent>
POMs that reference it, automatically download it.
Is it supposed to work this way?
---
Todd Thiessen
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: Using a SNAPSHOT version for a parent
Posted by Todd Thiessen <th...@nortel.com>.
Thanks for the response Brian. I was able to track it down from a few
hints from others on this list. The problem was in my settings.xml file.
I didn't set snapshots to true.
---
Todd Thiessen
> -----Original Message-----
> From: Brian E. Fox [mailto:brianf@reply.infinity.nu]
> Sent: Tuesday, December 16, 2008 9:52 PM
> To: Maven Users List
> Subject: RE: Using a SNAPSHOT version for a parent
>
> Yes what you have done is right. Can you show your settings
> so I can see how you're telling Maven about Nexus?
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: Using a SNAPSHOT version for a parent
Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
Yes what you have done is right. Can you show your settings so I can see
how you're telling Maven about Nexus?
-----Original Message-----
From: Todd Thiessen [mailto:thiessen@nortel.com]
Sent: Thursday, December 11, 2008 8:45 AM
To: Maven Users List
Subject: RE: Using a SNAPSHOT version for a parent
When you say "yes it's right" does that mean that SNAPSHOT parents
should automatically get downloaded or does that mean that SNAPSHOT
parents should NOT automatically get downloaded.
My snapshot Nexus repository is set to SNAPSHOT policy, which I believe
is correct.
---
Todd Thiessen
> -----Original Message-----
> From: Brian Fox [mailto:brianf@reply.infinity.nu]
> Sent: Wednesday, December 10, 2008 7:10 PM
> To: Maven Users List
> Subject: Re: Using a SNAPSHOT version for a parent
>
> Yes it's right but make sure you have enabled snapshots for
> the repo in question. By default only releases are enabled
> for repos --Brian (mobile)
>
>
> On Dec 10, 2008, at 4:19 PM, "Todd Thiessen" <th...@nortel.com>
> wrote:
>
> > If I deploy a SNAPSHOT version of a parent POM, POMs that
> reference it
> > do not automatically download (even when running a
> bootstrap profile).
> >
> > ie: Is this supported?
> >
> > <parent>
> > <artifactId>theid</artifactId>
> > <groupId>thegroup</groupId>
> > <version>0.0.1-SNAPSHOT</version>
> > </parent>
> >
> > If the artifact already exists in my local repo, everything is fine.
> >
> > However, if I deploy a released version of the artifact and
> change the
> > parent reference accordingly
> >
> > <parent>
> > <artifactId>theid</artifactId>
> > <groupId>thegroup</groupId>
> > <version>0.0.1</version>
> > </parent>
> >
> > POMs that reference it, automatically download it.
> >
> > Is it supposed to work this way?
> >
> > ---
> > Todd Thiessen
> >
> >
> ---------------------------------------------------------------------
> > 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: Using a SNAPSHOT version for a parent
Posted by Todd Thiessen <th...@nortel.com>.
Ok, I found the problem.
It was in my settings.xml file. When you guys said "your repository
probably isn't setup correctly" I thought that meant the repository
itself (ie: Nexus).
I had read this before in the definitive guide but it didn't dawn on me
right away. For anyone else who may want to know, I had to add this to
my settings file.
---
Todd Thiessen
> -----Original Message-----
> From: Thiessen, Todd (BVW:9T16)
> Sent: Thursday, December 11, 2008 3:57 PM
> To: Maven Users List
> Subject: RE: Using a SNAPSHOT version for a parent
>
> > -----Original Message-----
> > From: sirlyric@gmail.com [mailto:sirlyric@gmail.com] On
> Behalf Of John
> > Stoneham
> > Sent: Thursday, December 11, 2008 1:17 PM
> > To: Maven Users List
> > Subject: Re: Using a SNAPSHOT version for a parent
> >
> > >> > ie: Is this supported?
> > >> >
> > >> > <parent>
> > >> > <artifactId>theid</artifactId>
> > >> > <groupId>thegroup</groupId>
> > >> > <version>0.0.1-SNAPSHOT</version>
> > >> > </parent>
> >
> > Yep. Are you saying that, if no 0.0.1-SNAPSHOT already
> exists in your
> > local repository, but it does in the server repository,
> then it is not
> > downloaded by your local Maven run?
> >
> > If so it sounds like your repository may not be configured to serve
> > snapshots, as Brian suggested. Maven should list the
> repositories it's
> > attempting to download from, and give you even more
> information if you
> > pass -X.
> >
> > - John
>
> Yes, I am saying exactly that.
>
> And it does list the repos it is trying to download from. It
> just say it can't find it. Here is the exactly snippet of the error:
>
>
> Reason: Unable to download the artifact from any repository
>
> thegroup:theid:pom:0.0.1-SNAPSHOT
>
> from the specified remote repositories:
> Nexus (http://reposerver:8081/nexus/content/groups/public)
>
>
> The SNAPSHOT version is in my SNAPSHOT repo and the public
> group does contain the SNAPSHOT repo.
>
> It is likely that my Nexus repository isn't properly setup. I
> don't know what I am supposed to specifically change though.
> Its policy is set to "snapshot" and I thought that was all
> that was needed.
>
> I will investigate further.
>
> ---
> Todd Thiessen
>
> ---------------------------------------------------------------------
> 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: Using a SNAPSHOT version for a parent
Posted by Todd Thiessen <th...@nortel.com>.
Bah. Sent by mistake ;-)
I had to add this to my settings file.
<profile>
<id>development</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
</profile>
This is already documented in the guide.
Sorry for all the noice guys and thanks for helping.
---
Todd Thiessen
> -----Original Message-----
> From: Thiessen, Todd (BVW:9T16)
> Sent: Thursday, December 11, 2008 4:44 PM
> To: 'Maven Users List'
> Subject: RE: Using a SNAPSHOT version for a parent
>
> Ok, I found the problem.
>
> It was in my settings.xml file. When you guys said "your
> repository probably isn't setup correctly" I thought that
> meant the repository itself (ie: Nexus).
>
> I had read this before in the definitive guide but it didn't
> dawn on me right away. For anyone else who may want to know,
> I had to add this to my settings file.
>
>
>
>
> ---
> Todd Thiessen
>
>
> > -----Original Message-----
> > From: Thiessen, Todd (BVW:9T16)
> > Sent: Thursday, December 11, 2008 3:57 PM
> > To: Maven Users List
> > Subject: RE: Using a SNAPSHOT version for a parent
> >
> > > -----Original Message-----
> > > From: sirlyric@gmail.com [mailto:sirlyric@gmail.com] On
> > Behalf Of John
> > > Stoneham
> > > Sent: Thursday, December 11, 2008 1:17 PM
> > > To: Maven Users List
> > > Subject: Re: Using a SNAPSHOT version for a parent
> > >
> > > >> > ie: Is this supported?
> > > >> >
> > > >> > <parent>
> > > >> > <artifactId>theid</artifactId>
> > > >> > <groupId>thegroup</groupId>
> > > >> > <version>0.0.1-SNAPSHOT</version>
> > > >> > </parent>
> > >
> > > Yep. Are you saying that, if no 0.0.1-SNAPSHOT already
> > exists in your
> > > local repository, but it does in the server repository,
> > then it is not
> > > downloaded by your local Maven run?
> > >
> > > If so it sounds like your repository may not be
> configured to serve
> > > snapshots, as Brian suggested. Maven should list the
> > repositories it's
> > > attempting to download from, and give you even more
> > information if you
> > > pass -X.
> > >
> > > - John
> >
> > Yes, I am saying exactly that.
> >
> > And it does list the repos it is trying to download from.
> It just say
> > it can't find it. Here is the exactly snippet of the error:
> >
> >
> > Reason: Unable to download the artifact from any repository
> >
> > thegroup:theid:pom:0.0.1-SNAPSHOT
> >
> > from the specified remote repositories:
> > Nexus (http://reposerver:8081/nexus/content/groups/public)
> >
> >
> > The SNAPSHOT version is in my SNAPSHOT repo and the public
> group does
> > contain the SNAPSHOT repo.
> >
> > It is likely that my Nexus repository isn't properly setup. I don't
> > know what I am supposed to specifically change though.
> > Its policy is set to "snapshot" and I thought that was all that was
> > needed.
> >
> > I will investigate further.
> >
> > ---
> > Todd Thiessen
> >
> >
> ---------------------------------------------------------------------
> > 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: Using a SNAPSHOT version for a parent
Posted by Todd Thiessen <th...@nortel.com>.
> -----Original Message-----
> From: sirlyric@gmail.com [mailto:sirlyric@gmail.com] On
> Behalf Of John Stoneham
> Sent: Thursday, December 11, 2008 1:17 PM
> To: Maven Users List
> Subject: Re: Using a SNAPSHOT version for a parent
>
> >> > ie: Is this supported?
> >> >
> >> > <parent>
> >> > <artifactId>theid</artifactId>
> >> > <groupId>thegroup</groupId>
> >> > <version>0.0.1-SNAPSHOT</version>
> >> > </parent>
>
> Yep. Are you saying that, if no 0.0.1-SNAPSHOT already exists
> in your local repository, but it does in the server
> repository, then it is not downloaded by your local Maven run?
>
> If so it sounds like your repository may not be configured to
> serve snapshots, as Brian suggested. Maven should list the
> repositories it's attempting to download from, and give you
> even more information if you pass -X.
>
> - John
Yes, I am saying exactly that.
And it does list the repos it is trying to download from. It just say it
can't find it. Here is the exactly snippet of the error:
Reason: Unable to download the artifact from any repository
thegroup:theid:pom:0.0.1-SNAPSHOT
from the specified remote repositories:
Nexus (http://reposerver:8081/nexus/content/groups/public)
The SNAPSHOT version is in my SNAPSHOT repo and the public group does
contain the SNAPSHOT repo.
It is likely that my Nexus repository isn't properly setup. I don't know
what I am supposed to specifically change though. Its policy is set to
"snapshot" and I thought that was all that was needed.
I will investigate further.
---
Todd Thiessen
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Using a SNAPSHOT version for a parent
Posted by John Stoneham <ly...@lyrically.net>.
On Thu, Dec 11, 2008 at 8:44 AM, Todd Thiessen <th...@nortel.com> wrote:
> When you say "yes it's right" does that mean that SNAPSHOT parents
> should automatically get downloaded or does that mean that SNAPSHOT
> parents should NOT automatically get downloaded.
>
> My snapshot Nexus repository is set to SNAPSHOT policy, which I believe
> is correct.
I guess I'm a little confused. We use SNAPSHOT parents all the time.
They get downloaded just like anything else.
>> > ie: Is this supported?
>> >
>> > <parent>
>> > <artifactId>theid</artifactId>
>> > <groupId>thegroup</groupId>
>> > <version>0.0.1-SNAPSHOT</version>
>> > </parent>
Yep. Are you saying that, if no 0.0.1-SNAPSHOT already exists in your
local repository, but it does in the server repository, then it is not
downloaded by your local Maven run?
If so it sounds like your repository may not be configured to serve
snapshots, as Brian suggested. Maven should list the repositories it's
attempting to download from, and give you even more information if you
pass -X.
- John
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: Using a SNAPSHOT version for a parent
Posted by Todd Thiessen <th...@nortel.com>.
When you say "yes it's right" does that mean that SNAPSHOT parents
should automatically get downloaded or does that mean that SNAPSHOT
parents should NOT automatically get downloaded.
My snapshot Nexus repository is set to SNAPSHOT policy, which I believe
is correct.
---
Todd Thiessen
> -----Original Message-----
> From: Brian Fox [mailto:brianf@reply.infinity.nu]
> Sent: Wednesday, December 10, 2008 7:10 PM
> To: Maven Users List
> Subject: Re: Using a SNAPSHOT version for a parent
>
> Yes it's right but make sure you have enabled snapshots for
> the repo in question. By default only releases are enabled
> for repos --Brian (mobile)
>
>
> On Dec 10, 2008, at 4:19 PM, "Todd Thiessen" <th...@nortel.com>
> wrote:
>
> > If I deploy a SNAPSHOT version of a parent POM, POMs that
> reference it
> > do not automatically download (even when running a
> bootstrap profile).
> >
> > ie: Is this supported?
> >
> > <parent>
> > <artifactId>theid</artifactId>
> > <groupId>thegroup</groupId>
> > <version>0.0.1-SNAPSHOT</version>
> > </parent>
> >
> > If the artifact already exists in my local repo, everything is fine.
> >
> > However, if I deploy a released version of the artifact and
> change the
> > parent reference accordingly
> >
> > <parent>
> > <artifactId>theid</artifactId>
> > <groupId>thegroup</groupId>
> > <version>0.0.1</version>
> > </parent>
> >
> > POMs that reference it, automatically download it.
> >
> > Is it supposed to work this way?
> >
> > ---
> > Todd Thiessen
> >
> >
> ---------------------------------------------------------------------
> > 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: Using a SNAPSHOT version for a parent
Posted by Brian Fox <br...@reply.infinity.nu>.
Yes it's right but make sure you have enabled snapshots for the repo
in question. By default only releases are enabled for repos
--Brian (mobile)
On Dec 10, 2008, at 4:19 PM, "Todd Thiessen" <th...@nortel.com>
wrote:
> If I deploy a SNAPSHOT version of a parent POM, POMs that reference it
> do not automatically download (even when running a bootstrap profile).
>
> ie: Is this supported?
>
> <parent>
> <artifactId>theid</artifactId>
> <groupId>thegroup</groupId>
> <version>0.0.1-SNAPSHOT</version>
> </parent>
>
> If the artifact already exists in my local repo, everything is fine.
>
> However, if I deploy a released version of the artifact and change the
> parent reference accordingly
>
> <parent>
> <artifactId>theid</artifactId>
> <groupId>thegroup</groupId>
> <version>0.0.1</version>
> </parent>
>
> POMs that reference it, automatically download it.
>
> Is it supposed to work this way?
>
> ---
> Todd Thiessen
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>