You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "KARR, DAVID (ATTSI)" <dk...@att.com> on 2010/12/07 19:00:19 UTC

How to have release management incremental (or release) builds publish to Nexus, but not user builds?

I'm working on strategies to convert a large and complex Ant build
system to use Maven.

I'm assuming that developers who are working on individual modules will
do a build that pulls the artifacts of other modules (that they're not
working on) from the Nexus repository we have running on an intranet
server.  These will be both release artifacts and snapshot artifacts.

I also assume that incremental builds performed by the release
management team will publish snapshot artifacts to the Nexus repository,
but builds performed by developers will not publish to the Nexus
repository.

Is this reasonable?  If so, what mechanisms do I have to have in place
to make release management builds publish artifacts to Nexus, but not
developer builds?

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


RE: How to have release management incremental (or release) builds publish to Nexus, but not user builds?

Posted by "KARR, DAVID (ATTSI)" <dk...@att.com>.
> -----Original Message-----
> From: Kalle Korhonen [mailto:kalle.o.korhonen@gmail.com]
> Sent: Tuesday, December 07, 2010 10:11 AM
> To: Maven Users List
> Subject: Re: How to have release management incremental (or release)
> builds publish to Nexus, but not user builds?
> 
> Of course, developers never need to run "deploy" goal in the first
> place. Anyhow, it's a commonly used practice to deploy to different
> locations. Create a release profile and override the
> distributionManagement section as needed, for example see
> http://svn.codehaus.org/tynamo/trunk/tynamo-parent/pom.xml.

So you're saying that for the "release" profile, we would have a non-empty distributionManagement section, which specifies our Nexus server, but the "developer" profile would not have that section at all (the "repository" section determines where they download artifacts from)?

> On Tue, Dec 7, 2010 at 10:00 AM, KARR, DAVID (ATTSI) <dk...@att.com>
> wrote:
> > I'm working on strategies to convert a large and complex Ant build
> > system to use Maven.
> >
> > I'm assuming that developers who are working on individual modules
> will
> > do a build that pulls the artifacts of other modules (that they're
> not
> > working on) from the Nexus repository we have running on an intranet
> > server.  These will be both release artifacts and snapshot artifacts.
> >
> > I also assume that incremental builds performed by the release
> > management team will publish snapshot artifacts to the Nexus
> repository,
> > but builds performed by developers will not publish to the Nexus
> > repository.
> >
> > Is this reasonable?  If so, what mechanisms do I have to have in
> place
> > to make release management builds publish artifacts to Nexus, but not
> > developer builds?
> >
> > ---------------------------------------------------------------------
> > 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: How to have release management incremental (or release) builds publish to Nexus, but not user builds?

Posted by Anders Hammar <an...@hammar.net>.
Still, I don't see this as common practice.
First, developer don't normally do "mvn deploy". If they do, they most
likely want to deploy the snapshot for everyone to use.
Secondly, you should be restricting the possibility of doing deploys through
authorization.

/Anders

On Wed, Dec 8, 2010 at 08:02, KARR, DAVID (ATTSI) <dk...@att.com> wrote:

> > -----Original Message-----
> > From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On
> > Behalf Of Anders Hammar
> > Sent: Tuesday, December 07, 2010 9:49 PM
> > To: Maven Users List
> > Subject: Re: How to have release management incremental (or release)
> > builds publish to Nexus, but not user builds?
> >
> > Commonly used practice? Really? I don't think so. Are the users
> > supposed to
> > enable different snapshot repos depending on what "type" of snapshot
> > artifacts the want to use? Seems very complicated and error prone to
> me
> > and
> > simply just to difficult for the users to get right.
>
> I took his statement to mean that developers use a default profile
> that's defined in a common place, and release management builds uses
> specialized profiles that do alternate deployments.
>
> > On Tue, Dec 7, 2010 at 19:10, Kalle Korhonen
> > <ka...@gmail.com>wrote:
> >
> > > Of course, developers never need to run "deploy" goal in the first
> > > place. Anyhow, it's a commonly used practice to deploy to different
> > > locations. Create a release profile and override the
> > > distributionManagement section as needed, for example see
> > > http://svn.codehaus.org/tynamo/trunk/tynamo-parent/pom.xml.
> > >
> > > Kalle
> > >
> > >
> > > On Tue, Dec 7, 2010 at 10:00 AM, KARR, DAVID (ATTSI)
> <dk...@att.com>
> > > wrote:
> > > > I'm working on strategies to convert a large and complex Ant build
> > > > system to use Maven.
> > > >
> > > > I'm assuming that developers who are working on individual modules
> > will
> > > > do a build that pulls the artifacts of other modules (that they're
> > not
> > > > working on) from the Nexus repository we have running on an
> > intranet
> > > > server.  These will be both release artifacts and snapshot
> > artifacts.
> > > >
> > > > I also assume that incremental builds performed by the release
> > > > management team will publish snapshot artifacts to the Nexus
> > repository,
> > > > but builds performed by developers will not publish to the Nexus
> > > > repository.
> > > >
> > > > Is this reasonable?  If so, what mechanisms do I have to have in
> > place
> > > > to make release management builds publish artifacts to Nexus, but
> > not
> > > > developer builds?
> > > >
> > > >
> -------------------------------------------------------------------
> > --
> > > > 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: How to have release management incremental (or release) builds publish to Nexus, but not user builds?

Posted by "KARR, DAVID (ATTSI)" <dk...@att.com>.
> -----Original Message-----
> From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On
> Behalf Of Anders Hammar
> Sent: Tuesday, December 07, 2010 9:49 PM
> To: Maven Users List
> Subject: Re: How to have release management incremental (or release)
> builds publish to Nexus, but not user builds?
> 
> Commonly used practice? Really? I don't think so. Are the users
> supposed to
> enable different snapshot repos depending on what "type" of snapshot
> artifacts the want to use? Seems very complicated and error prone to
me
> and
> simply just to difficult for the users to get right.

I took his statement to mean that developers use a default profile
that's defined in a common place, and release management builds uses
specialized profiles that do alternate deployments.

> On Tue, Dec 7, 2010 at 19:10, Kalle Korhonen
> <ka...@gmail.com>wrote:
> 
> > Of course, developers never need to run "deploy" goal in the first
> > place. Anyhow, it's a commonly used practice to deploy to different
> > locations. Create a release profile and override the
> > distributionManagement section as needed, for example see
> > http://svn.codehaus.org/tynamo/trunk/tynamo-parent/pom.xml.
> >
> > Kalle
> >
> >
> > On Tue, Dec 7, 2010 at 10:00 AM, KARR, DAVID (ATTSI)
<dk...@att.com>
> > wrote:
> > > I'm working on strategies to convert a large and complex Ant build
> > > system to use Maven.
> > >
> > > I'm assuming that developers who are working on individual modules
> will
> > > do a build that pulls the artifacts of other modules (that they're
> not
> > > working on) from the Nexus repository we have running on an
> intranet
> > > server.  These will be both release artifacts and snapshot
> artifacts.
> > >
> > > I also assume that incremental builds performed by the release
> > > management team will publish snapshot artifacts to the Nexus
> repository,
> > > but builds performed by developers will not publish to the Nexus
> > > repository.
> > >
> > > Is this reasonable?  If so, what mechanisms do I have to have in
> place
> > > to make release management builds publish artifacts to Nexus, but
> not
> > > developer builds?
> > >
> > >
-------------------------------------------------------------------
> --
> > > 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: RE: How to have release management incremental (or release) builds publish to Nexus, but not user builds?

Posted by Wayne Fay <wa...@gmail.com>.
> This makes things very basic and therefore very easy to understand.
> Then who you will grant permission to do the deploy is up to you to decide.
> You can even grant different groups permission to deploy snapshots and
> release (e.g. a larger group of people might be allowed to deploy snapshots,

I agree (strongly) with Anders. Manage the upload permissions in Nexus
and not via a secret profile that only some people know about or have
access to.

Wayne

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


Re: RE: How to have release management incremental (or release) builds publish to Nexus, but not user builds?

Posted by Anders Hammar <an...@hammar.net>.
No. Check the reference for settings.xml:
http://maven.apache.org/settings.html
You have to put distMgmt in the pom.

If you don't have a parent pom to put it in, you have to put it in each and
every pom. Very quickly you'll see that you absolutely do need a parent pom.
This is what I recommend:
1. Create a corporate (parent) pom. This is where you declare distMgmt.
2. For each product (within the corp) you have a parent pom, which declares
the corp parent pom as parent.

If you can't get a corp pom in place right now, you can put the distMgmt
section in the product's parent pom for now. Then when the corp parent pom
exists (with distMgmt) you just remove that from the product's parent pom.

There are loads of example corp parent poms out there. However, some might
be better examples than others. I would recommend looking at the the apache
parent pom, the code parent pom or Sonatype's forge parent pom. They are
proven to work.

/Anders

On Wed, Dec 8, 2010 at 22:49, KARR, DAVID (ATTSI) <dk...@att.com> wrote:

> > -----Original Message-----
> > From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On
> > Behalf Of Anders Hammar
> > Sent: Wednesday, December 08, 2010 1:22 PM
> > To: Maven Users List
> > Subject: Re: RE: How to have release management incremental (or
> > release) builds publish to Nexus, but not user builds?
> >
> > You should put it in the pom.xml, not the settings.xml!
> > http://maven.apache.org/pom.html#Distribution_Management
>
> I'm aware of that.  As I said, I'm just trying to get this to work in
> this form until I can migrate it into a parent-pom.  Is it possible to
> get it to work with it in the settings.xml?
>
> > Have a look in any of the parent-poms I linked to earlier (apache
> > parent or
> > codehaus parent)!
>
> I've looked at those many times.  It doesn't solve my problem.
>
> > On Wed, Dec 8, 2010 at 21:03, KARR, DAVID (ATTSI) <dk...@att.com>
> > wrote:
> >
> > > > -----Original Message-----
> > > > From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com]
> > On
> > > > Behalf Of Anders Hammar
> > > > Sent: Wednesday, December 08, 2010 11:07 AM
> > > > To: Maven Users List
> > > > Subject: Re: RE: How to have release management incremental (or
> > > > release) builds publish to Nexus, but not user builds?
> > > >
> > > > > Ok, so when the release team runs an incremental build (not a
> > > release
> > > > > yet), they'll do something like this:
> > > > >
> > > > >    mvn -P releaseIncremental deploy
> > > > >
> > > > > Where "releaseIncremental" is the profile I defined with a
> > > > > "distributionManagement" element?
> > > > >
> > > >
> > > > No! I argue you should NOT have the distMgmt defined in a profile.
> > > > Define your distMgmt section with the release and snapshot repo
> > (and
> > > > possibly the site reo) in your pom, in the normal way (not within
> a
> > > > profile).
> > > > This will make it possible for anyone to execute mvn deploy and
> > have
> > > > Maven
> > > > try to deploy the snapshot or release. Then you control who can
> > > > actually do
> > > > that through permission in Nexus.
> > > > This makes things very basic and therefore very easy to
> understand.
> > > > Then who you will grant permission to do the deploy is up to you
> to
> > > > decide.
> > > > You can even grant different groups permission to deploy snapshots
> > and
> > > > release (e.g. a larger group of people might be allowed to deploy
> > > > snapshots,
> > > > while just he release manager can deploy the release). It will not
> > > > change
> > > > your maven projects in any way - it's controlled in your repo
> > manager
> > > > (i.e.
> > > > Nexus).
> > >
> > > Ok, fine.  That's great.  You're commenting on my strategy, and I'm
> > just
> > > trying to get something to work.  I'm fine with changing the
> > strategy, I
> > > just need to get it to work.
> > >
> > > Can you take my example settings and transform it to the way you
> > think
> > > it should be?  I will eventually get some of this into a parent pom,
> > but
> > > it's easier to tweak in my settings.xml.
> > >
> > > > >
> > > > > I tried this, but it's complaining thusly (changed project
> name):
> > > > >
> > > > > [ERROR] Failed to execute goal
> > > > > org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy
> (default-
> > > > deploy)
> > > > > on project myproject: Deployment failed: repository element was
> > not
> > > > > specified in the POM inside distributionManagement element or in
> > > > > -DaltDeploymentRepository=id::layout::url parameter -> [Help 1]
> > > > >
> > > > > This is the profile I added (changed hostname):
> > > > >
> > > > >    <profile>
> > > > >      <id>releaseIncremental</id>
> > > > >      <distributionManagement>
> > > > >        <snapshotRepository>
> > > > >          <id>nexus</id>
> > > > >
> > <url>http://myhost:8081/nexus/content/groups/public</url>
> > > > >        </snapshotRepository>
> > > > >      </distributionManagement>
> > > > >      <repositories>
> > > > >        <repository>
> > > > >          <id>central</id>
> > > > >          <url>http://central</url>
> > > > >          <releases><enabled>true</enabled></releases>
> > > > >          <snapshots><enabled>true</enabled></snapshots>
> > > > >        </repository>
> > > > >      </repositories>
> > > > >      <pluginRepositories>
> > > > >        <pluginRepository>
> > > > >          <id>central</id>
> > > > >          <url>http://central</url>
> > > > >          <releases><enabled>true</enabled></releases>
> > > > >          <snapshots><enabled>true</enabled></snapshots>
> > > > >        </pluginRepository>
> > > > >      </pluginRepositories>
> > > > >    </profile>
> > > > >
> > > > > I tried a simple-minded fix and added the following before the
> > > > > "snapshotRepository" element, but it gave the same error:
> > > > >
> > > > >        <repository>
> > > > >          <id>nexus</id>
> > > > >
> > <url>http://myhost:8081/nexus/content/groups/public</url>
> > > > >        </repository>
> > > > >
> > > > > If I set up deployment credentials in Nexus (I believe it's
> > already
> > > > set
> > > > > up), how do I provide them in Maven?
> > > > >
> > > > > > Den 8 dec 2010 15.56 skrev "KARR, DAVID (ATTSI)"
> > <dk...@att.com>:
> > > > > > >> -----Original Message-----
> > > > > > >> From: anders.g.hammar@gmail.com
> > > > [mailto:anders.g.hammar@gmail.com]
> > > > > > On
> > > > > > >> Behalf Of Anders Hammar
> > > > > > >> Sent: Tuesday, December 07, 2010 11:54 PM
> > > > > > >> To: Maven Users List
> > > > > > >> Subject: Re: How to have release management incremental (or
> > > > > release)
> > > > > > >> builds publish to Nexus, but not user builds?
> > > > > > >>
> > > > > > >> I'm arguing as I think you're sending the questioner off
> > into
> > > > the
> > > > > > >> wilderness
> > > > > > >> by suggesting something you call "common practice, which I
> > do
> > > > not
> > > > > > see
> > > > > > >> as
> > > > > > >> common practice. I'm just trying to stop someone not being
> a
> > > > Maven
> > > > > > >> expert
> > > > > > >> from going down a difficult path where he/she would run
> into
> > > all
> > > > > > kinds
> > > > > > >> of
> > > > > > >> strange behavior.
> > > > > > >
> > > > > > > Anders, thank you for protecting my interests. :)
> > > > > > >
> > > > > > > However, I'm much more interested in solving the problem I
> > had
> > > > with
> > > > > > my
> > > > > > > "releaseIncremental" profile that I reported in this chain
> > > > > yesterday.
> > > > > > >
> > > > > > >> I've checked both the apache parent and the codehaus parent
> > I
> > > > can't
> > > > > > >> find
> > > > > > >> what you're talking about.
> > > > > > >> http://repo2.maven.org/maven2/org/apache/apache/8/apache-
> > 8.pom
> > > > > > >> http://repo2.maven.org/maven2/org/codehaus/codehaus-
> > > > > > parent/3/codehaus-
> > > > > > >> parent-3.pom
> > > > > > >>
> > > > > > >> /Anders
> > > > > > >>
> > > > > > >> On Wed, Dec 8, 2010 at 08:45, Kalle Korhonen
> > > > > > >> <ka...@gmail.com>wrote:
> > > > > > >>
> > > > > > >> > The "commonness" of the practice is hardly the point of
> > this
> > > > > > thread
> > > > > > >> so
> > > > > > >> > it baffles me why you'd want to start arguing about it,
> > but
> > > > there
> > > > > > is
> > > > > > >> a
> > > > > > >> > specific distributionManagement section in the release
> > > > profiles
> > > > > of
> > > > > > >> > Apaches', Codehaus' parent poms and in the parent pom I
> > > linked
> > > > to
> > > > > > so
> > > > > > >> I
> > > > > > >> > offered a tried and widely used solution to the
> > questioner.
> > > > > > There's
> > > > > > >> > nothing difficult for users in it.
> > > > > > >> >
> > > > > > >> > Kalle
> > > > > > >> >
> > > > > > >> >
> > > > > > >> > On Tue, Dec 7, 2010 at 9:49 PM, Anders Hammar
> > > > <an...@hammar.net>
> > > > > > >> wrote:
> > > > > > >> > > Commonly used practice? Really? I don't think so. Are
> > the
> > > > users
> > > > > > >> supposed
> > > > > > >> > to
> > > > > > >> > > enable different snapshot repos depending on what
> "type"
> > of
> > > > > > >> snapshot
> > > > > > >> > > artifacts the want to use? Seems very complicated and
> > error
> > > > > > prone
> > > > > > >> to me
> > > > > > >> > and
> > > > > > >> > > simply just to difficult for the users to get right.
> > > > > > >> > >
> > > > > > >> > > /Anders
> > > > > > >> > >
> > > > > > >> > > On Tue, Dec 7, 2010 at 19:10, Kalle Korhonen
> > > > > > >> <kalle.o.korhonen@gmail.com
> > > > > > >> > >wrote:
> > > > > > >> > >
> > > > > > >> > >> Of course, developers never need to run "deploy" goal
> > in
> > > > the
> > > > > > > first
> > > > > > >> > >> place. Anyhow, it's a commonly used practice to deploy
> > to
> > > > > > >> different
> > > > > > >> > >> locations. Create a release profile and override the
> > > > > > >> > >> distributionManagement section as needed, for example
> > see
> > > > > > >> > >>
> > > http://svn.codehaus.org/tynamo/trunk/tynamo-parent/pom.xml.
> > > > > > >> > >>
> > > > > > >> > >> Kalle
> > > > > > >> > >>
> > > > > > >> > >>
> > > > > > >> > >> On Tue, Dec 7, 2010 at 10:00 AM, KARR, DAVID (ATTSI)
> > > > > > >> <dk...@att.com>
> > > > > > >> > >> wrote:
> > > > > > >> > >> > I'm working on strategies to convert a large and
> > complex
> > > > Ant
> > > > > > >> build
> > > > > > >> > >> > system to use Maven.
> > > > > > >> > >> >
> > > > > > >> > >> > I'm assuming that developers who are working on
> > > > individual
> > > > > > >> modules
> > > > > > >> > will
> > > > > > >> > >> > do a build that pulls the artifacts of other modules
> > > > (that
> > > > > > >> they're not
> > > > > > >> > >> > working on) from the Nexus repository we have
> running
> > on
> > > > an
> > > > > > >> intranet
> > > > > > >> > >> > server. These will be both release artifacts and
> > > snapshot
> > > > > > >> artifacts.
> > > > > > >> > >> >
> > > > > > >> > >> > I also assume that incremental builds performed by
> > the
> > > > > > release
> > > > > > >> > >> > management team will publish snapshot artifacts to
> > the
> > > > Nexus
> > > > > > >> > repository,
> > > > > > >> > >> > but builds performed by developers will not publish
> > to
> > > > the
> > > > > > > Nexus
> > > > > > >> > >> > repository.
> > > > > > >> > >> >
> > > > > > >> > >> > Is this reasonable? If so, what mechanisms do I have
> > to
> > > > have
> > > > > > > in
> > > > > > >> place
> > > > > > >> > >> > to make release management builds publish artifacts
> > to
> > > > > Nexus,
> > > > > > >> but not
> > > > > > >> > >> > developer builds?
> > > > > > >> > >> >
> > > > > > >> > >> >
> > > > > > >
> -------------------------------------------------------------
> > ---
> > > > > > >> -----
> > > > > > >> > >> > 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
> > > > > > >
> > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > 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: RE: How to have release management incremental (or release) builds publish to Nexus, but not user builds?

Posted by "KARR, DAVID (ATTSI)" <dk...@att.com>.
> -----Original Message-----
> From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On
> Behalf Of Anders Hammar
> Sent: Wednesday, December 08, 2010 1:22 PM
> To: Maven Users List
> Subject: Re: RE: How to have release management incremental (or
> release) builds publish to Nexus, but not user builds?
> 
> You should put it in the pom.xml, not the settings.xml!
> http://maven.apache.org/pom.html#Distribution_Management

I'm aware of that.  As I said, I'm just trying to get this to work in
this form until I can migrate it into a parent-pom.  Is it possible to
get it to work with it in the settings.xml?

> Have a look in any of the parent-poms I linked to earlier (apache
> parent or
> codehaus parent)!

I've looked at those many times.  It doesn't solve my problem.

> On Wed, Dec 8, 2010 at 21:03, KARR, DAVID (ATTSI) <dk...@att.com>
> wrote:
> 
> > > -----Original Message-----
> > > From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com]
> On
> > > Behalf Of Anders Hammar
> > > Sent: Wednesday, December 08, 2010 11:07 AM
> > > To: Maven Users List
> > > Subject: Re: RE: How to have release management incremental (or
> > > release) builds publish to Nexus, but not user builds?
> > >
> > > > Ok, so when the release team runs an incremental build (not a
> > release
> > > > yet), they'll do something like this:
> > > >
> > > >    mvn -P releaseIncremental deploy
> > > >
> > > > Where "releaseIncremental" is the profile I defined with a
> > > > "distributionManagement" element?
> > > >
> > >
> > > No! I argue you should NOT have the distMgmt defined in a profile.
> > > Define your distMgmt section with the release and snapshot repo
> (and
> > > possibly the site reo) in your pom, in the normal way (not within
a
> > > profile).
> > > This will make it possible for anyone to execute mvn deploy and
> have
> > > Maven
> > > try to deploy the snapshot or release. Then you control who can
> > > actually do
> > > that through permission in Nexus.
> > > This makes things very basic and therefore very easy to
understand.
> > > Then who you will grant permission to do the deploy is up to you
to
> > > decide.
> > > You can even grant different groups permission to deploy snapshots
> and
> > > release (e.g. a larger group of people might be allowed to deploy
> > > snapshots,
> > > while just he release manager can deploy the release). It will not
> > > change
> > > your maven projects in any way - it's controlled in your repo
> manager
> > > (i.e.
> > > Nexus).
> >
> > Ok, fine.  That's great.  You're commenting on my strategy, and I'm
> just
> > trying to get something to work.  I'm fine with changing the
> strategy, I
> > just need to get it to work.
> >
> > Can you take my example settings and transform it to the way you
> think
> > it should be?  I will eventually get some of this into a parent pom,
> but
> > it's easier to tweak in my settings.xml.
> >
> > > >
> > > > I tried this, but it's complaining thusly (changed project
name):
> > > >
> > > > [ERROR] Failed to execute goal
> > > > org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy
(default-
> > > deploy)
> > > > on project myproject: Deployment failed: repository element was
> not
> > > > specified in the POM inside distributionManagement element or in
> > > > -DaltDeploymentRepository=id::layout::url parameter -> [Help 1]
> > > >
> > > > This is the profile I added (changed hostname):
> > > >
> > > >    <profile>
> > > >      <id>releaseIncremental</id>
> > > >      <distributionManagement>
> > > >        <snapshotRepository>
> > > >          <id>nexus</id>
> > > >
> <url>http://myhost:8081/nexus/content/groups/public</url>
> > > >        </snapshotRepository>
> > > >      </distributionManagement>
> > > >      <repositories>
> > > >        <repository>
> > > >          <id>central</id>
> > > >          <url>http://central</url>
> > > >          <releases><enabled>true</enabled></releases>
> > > >          <snapshots><enabled>true</enabled></snapshots>
> > > >        </repository>
> > > >      </repositories>
> > > >      <pluginRepositories>
> > > >        <pluginRepository>
> > > >          <id>central</id>
> > > >          <url>http://central</url>
> > > >          <releases><enabled>true</enabled></releases>
> > > >          <snapshots><enabled>true</enabled></snapshots>
> > > >        </pluginRepository>
> > > >      </pluginRepositories>
> > > >    </profile>
> > > >
> > > > I tried a simple-minded fix and added the following before the
> > > > "snapshotRepository" element, but it gave the same error:
> > > >
> > > >        <repository>
> > > >          <id>nexus</id>
> > > >
> <url>http://myhost:8081/nexus/content/groups/public</url>
> > > >        </repository>
> > > >
> > > > If I set up deployment credentials in Nexus (I believe it's
> already
> > > set
> > > > up), how do I provide them in Maven?
> > > >
> > > > > Den 8 dec 2010 15.56 skrev "KARR, DAVID (ATTSI)"
> <dk...@att.com>:
> > > > > >> -----Original Message-----
> > > > > >> From: anders.g.hammar@gmail.com
> > > [mailto:anders.g.hammar@gmail.com]
> > > > > On
> > > > > >> Behalf Of Anders Hammar
> > > > > >> Sent: Tuesday, December 07, 2010 11:54 PM
> > > > > >> To: Maven Users List
> > > > > >> Subject: Re: How to have release management incremental (or
> > > > release)
> > > > > >> builds publish to Nexus, but not user builds?
> > > > > >>
> > > > > >> I'm arguing as I think you're sending the questioner off
> into
> > > the
> > > > > >> wilderness
> > > > > >> by suggesting something you call "common practice, which I
> do
> > > not
> > > > > see
> > > > > >> as
> > > > > >> common practice. I'm just trying to stop someone not being
a
> > > Maven
> > > > > >> expert
> > > > > >> from going down a difficult path where he/she would run
into
> > all
> > > > > kinds
> > > > > >> of
> > > > > >> strange behavior.
> > > > > >
> > > > > > Anders, thank you for protecting my interests. :)
> > > > > >
> > > > > > However, I'm much more interested in solving the problem I
> had
> > > with
> > > > > my
> > > > > > "releaseIncremental" profile that I reported in this chain
> > > > yesterday.
> > > > > >
> > > > > >> I've checked both the apache parent and the codehaus parent
> I
> > > can't
> > > > > >> find
> > > > > >> what you're talking about.
> > > > > >> http://repo2.maven.org/maven2/org/apache/apache/8/apache-
> 8.pom
> > > > > >> http://repo2.maven.org/maven2/org/codehaus/codehaus-
> > > > > parent/3/codehaus-
> > > > > >> parent-3.pom
> > > > > >>
> > > > > >> /Anders
> > > > > >>
> > > > > >> On Wed, Dec 8, 2010 at 08:45, Kalle Korhonen
> > > > > >> <ka...@gmail.com>wrote:
> > > > > >>
> > > > > >> > The "commonness" of the practice is hardly the point of
> this
> > > > > thread
> > > > > >> so
> > > > > >> > it baffles me why you'd want to start arguing about it,
> but
> > > there
> > > > > is
> > > > > >> a
> > > > > >> > specific distributionManagement section in the release
> > > profiles
> > > > of
> > > > > >> > Apaches', Codehaus' parent poms and in the parent pom I
> > linked
> > > to
> > > > > so
> > > > > >> I
> > > > > >> > offered a tried and widely used solution to the
> questioner.
> > > > > There's
> > > > > >> > nothing difficult for users in it.
> > > > > >> >
> > > > > >> > Kalle
> > > > > >> >
> > > > > >> >
> > > > > >> > On Tue, Dec 7, 2010 at 9:49 PM, Anders Hammar
> > > <an...@hammar.net>
> > > > > >> wrote:
> > > > > >> > > Commonly used practice? Really? I don't think so. Are
> the
> > > users
> > > > > >> supposed
> > > > > >> > to
> > > > > >> > > enable different snapshot repos depending on what
"type"
> of
> > > > > >> snapshot
> > > > > >> > > artifacts the want to use? Seems very complicated and
> error
> > > > > prone
> > > > > >> to me
> > > > > >> > and
> > > > > >> > > simply just to difficult for the users to get right.
> > > > > >> > >
> > > > > >> > > /Anders
> > > > > >> > >
> > > > > >> > > On Tue, Dec 7, 2010 at 19:10, Kalle Korhonen
> > > > > >> <kalle.o.korhonen@gmail.com
> > > > > >> > >wrote:
> > > > > >> > >
> > > > > >> > >> Of course, developers never need to run "deploy" goal
> in
> > > the
> > > > > > first
> > > > > >> > >> place. Anyhow, it's a commonly used practice to deploy
> to
> > > > > >> different
> > > > > >> > >> locations. Create a release profile and override the
> > > > > >> > >> distributionManagement section as needed, for example
> see
> > > > > >> > >>
> > http://svn.codehaus.org/tynamo/trunk/tynamo-parent/pom.xml.
> > > > > >> > >>
> > > > > >> > >> Kalle
> > > > > >> > >>
> > > > > >> > >>
> > > > > >> > >> On Tue, Dec 7, 2010 at 10:00 AM, KARR, DAVID (ATTSI)
> > > > > >> <dk...@att.com>
> > > > > >> > >> wrote:
> > > > > >> > >> > I'm working on strategies to convert a large and
> complex
> > > Ant
> > > > > >> build
> > > > > >> > >> > system to use Maven.
> > > > > >> > >> >
> > > > > >> > >> > I'm assuming that developers who are working on
> > > individual
> > > > > >> modules
> > > > > >> > will
> > > > > >> > >> > do a build that pulls the artifacts of other modules
> > > (that
> > > > > >> they're not
> > > > > >> > >> > working on) from the Nexus repository we have
running
> on
> > > an
> > > > > >> intranet
> > > > > >> > >> > server. These will be both release artifacts and
> > snapshot
> > > > > >> artifacts.
> > > > > >> > >> >
> > > > > >> > >> > I also assume that incremental builds performed by
> the
> > > > > release
> > > > > >> > >> > management team will publish snapshot artifacts to
> the
> > > Nexus
> > > > > >> > repository,
> > > > > >> > >> > but builds performed by developers will not publish
> to
> > > the
> > > > > > Nexus
> > > > > >> > >> > repository.
> > > > > >> > >> >
> > > > > >> > >> > Is this reasonable? If so, what mechanisms do I have
> to
> > > have
> > > > > > in
> > > > > >> place
> > > > > >> > >> > to make release management builds publish artifacts
> to
> > > > Nexus,
> > > > > >> but not
> > > > > >> > >> > developer builds?
> > > > > >> > >> >
> > > > > >> > >> >
> > > > > >
-------------------------------------------------------------
> ---
> > > > > >> -----
> > > > > >> > >> > 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
> > > > > >
> > > >
> > > >
> >
---------------------------------------------------------------------
> > > > 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: RE: How to have release management incremental (or release) builds publish to Nexus, but not user builds?

Posted by Anders Hammar <an...@hammar.net>.
You should put it in the pom.xml, not the settings.xml!
http://maven.apache.org/pom.html#Distribution_Management

Have a look in any of the parent-poms I linked to earlier (apache parent or
codehaus parent)!

/Anders

On Wed, Dec 8, 2010 at 21:03, KARR, DAVID (ATTSI) <dk...@att.com> wrote:

> > -----Original Message-----
> > From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On
> > Behalf Of Anders Hammar
> > Sent: Wednesday, December 08, 2010 11:07 AM
> > To: Maven Users List
> > Subject: Re: RE: How to have release management incremental (or
> > release) builds publish to Nexus, but not user builds?
> >
> > > Ok, so when the release team runs an incremental build (not a
> release
> > > yet), they'll do something like this:
> > >
> > >    mvn -P releaseIncremental deploy
> > >
> > > Where "releaseIncremental" is the profile I defined with a
> > > "distributionManagement" element?
> > >
> >
> > No! I argue you should NOT have the distMgmt defined in a profile.
> > Define your distMgmt section with the release and snapshot repo (and
> > possibly the site reo) in your pom, in the normal way (not within a
> > profile).
> > This will make it possible for anyone to execute mvn deploy and have
> > Maven
> > try to deploy the snapshot or release. Then you control who can
> > actually do
> > that through permission in Nexus.
> > This makes things very basic and therefore very easy to understand.
> > Then who you will grant permission to do the deploy is up to you to
> > decide.
> > You can even grant different groups permission to deploy snapshots and
> > release (e.g. a larger group of people might be allowed to deploy
> > snapshots,
> > while just he release manager can deploy the release). It will not
> > change
> > your maven projects in any way - it's controlled in your repo manager
> > (i.e.
> > Nexus).
>
> Ok, fine.  That's great.  You're commenting on my strategy, and I'm just
> trying to get something to work.  I'm fine with changing the strategy, I
> just need to get it to work.
>
> Can you take my example settings and transform it to the way you think
> it should be?  I will eventually get some of this into a parent pom, but
> it's easier to tweak in my settings.xml.
>
> > >
> > > I tried this, but it's complaining thusly (changed project name):
> > >
> > > [ERROR] Failed to execute goal
> > > org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy (default-
> > deploy)
> > > on project myproject: Deployment failed: repository element was not
> > > specified in the POM inside distributionManagement element or in
> > > -DaltDeploymentRepository=id::layout::url parameter -> [Help 1]
> > >
> > > This is the profile I added (changed hostname):
> > >
> > >    <profile>
> > >      <id>releaseIncremental</id>
> > >      <distributionManagement>
> > >        <snapshotRepository>
> > >          <id>nexus</id>
> > >          <url>http://myhost:8081/nexus/content/groups/public</url>
> > >        </snapshotRepository>
> > >      </distributionManagement>
> > >      <repositories>
> > >        <repository>
> > >          <id>central</id>
> > >          <url>http://central</url>
> > >          <releases><enabled>true</enabled></releases>
> > >          <snapshots><enabled>true</enabled></snapshots>
> > >        </repository>
> > >      </repositories>
> > >      <pluginRepositories>
> > >        <pluginRepository>
> > >          <id>central</id>
> > >          <url>http://central</url>
> > >          <releases><enabled>true</enabled></releases>
> > >          <snapshots><enabled>true</enabled></snapshots>
> > >        </pluginRepository>
> > >      </pluginRepositories>
> > >    </profile>
> > >
> > > I tried a simple-minded fix and added the following before the
> > > "snapshotRepository" element, but it gave the same error:
> > >
> > >        <repository>
> > >          <id>nexus</id>
> > >          <url>http://myhost:8081/nexus/content/groups/public</url>
> > >        </repository>
> > >
> > > If I set up deployment credentials in Nexus (I believe it's already
> > set
> > > up), how do I provide them in Maven?
> > >
> > > > Den 8 dec 2010 15.56 skrev "KARR, DAVID (ATTSI)" <dk...@att.com>:
> > > > >> -----Original Message-----
> > > > >> From: anders.g.hammar@gmail.com
> > [mailto:anders.g.hammar@gmail.com]
> > > > On
> > > > >> Behalf Of Anders Hammar
> > > > >> Sent: Tuesday, December 07, 2010 11:54 PM
> > > > >> To: Maven Users List
> > > > >> Subject: Re: How to have release management incremental (or
> > > release)
> > > > >> builds publish to Nexus, but not user builds?
> > > > >>
> > > > >> I'm arguing as I think you're sending the questioner off into
> > the
> > > > >> wilderness
> > > > >> by suggesting something you call "common practice, which I do
> > not
> > > > see
> > > > >> as
> > > > >> common practice. I'm just trying to stop someone not being a
> > Maven
> > > > >> expert
> > > > >> from going down a difficult path where he/she would run into
> all
> > > > kinds
> > > > >> of
> > > > >> strange behavior.
> > > > >
> > > > > Anders, thank you for protecting my interests. :)
> > > > >
> > > > > However, I'm much more interested in solving the problem I had
> > with
> > > > my
> > > > > "releaseIncremental" profile that I reported in this chain
> > > yesterday.
> > > > >
> > > > >> I've checked both the apache parent and the codehaus parent I
> > can't
> > > > >> find
> > > > >> what you're talking about.
> > > > >> http://repo2.maven.org/maven2/org/apache/apache/8/apache-8.pom
> > > > >> http://repo2.maven.org/maven2/org/codehaus/codehaus-
> > > > parent/3/codehaus-
> > > > >> parent-3.pom
> > > > >>
> > > > >> /Anders
> > > > >>
> > > > >> On Wed, Dec 8, 2010 at 08:45, Kalle Korhonen
> > > > >> <ka...@gmail.com>wrote:
> > > > >>
> > > > >> > The "commonness" of the practice is hardly the point of this
> > > > thread
> > > > >> so
> > > > >> > it baffles me why you'd want to start arguing about it, but
> > there
> > > > is
> > > > >> a
> > > > >> > specific distributionManagement section in the release
> > profiles
> > > of
> > > > >> > Apaches', Codehaus' parent poms and in the parent pom I
> linked
> > to
> > > > so
> > > > >> I
> > > > >> > offered a tried and widely used solution to the questioner.
> > > > There's
> > > > >> > nothing difficult for users in it.
> > > > >> >
> > > > >> > Kalle
> > > > >> >
> > > > >> >
> > > > >> > On Tue, Dec 7, 2010 at 9:49 PM, Anders Hammar
> > <an...@hammar.net>
> > > > >> wrote:
> > > > >> > > Commonly used practice? Really? I don't think so. Are the
> > users
> > > > >> supposed
> > > > >> > to
> > > > >> > > enable different snapshot repos depending on what "type" of
> > > > >> snapshot
> > > > >> > > artifacts the want to use? Seems very complicated and error
> > > > prone
> > > > >> to me
> > > > >> > and
> > > > >> > > simply just to difficult for the users to get right.
> > > > >> > >
> > > > >> > > /Anders
> > > > >> > >
> > > > >> > > On Tue, Dec 7, 2010 at 19:10, Kalle Korhonen
> > > > >> <kalle.o.korhonen@gmail.com
> > > > >> > >wrote:
> > > > >> > >
> > > > >> > >> Of course, developers never need to run "deploy" goal in
> > the
> > > > > first
> > > > >> > >> place. Anyhow, it's a commonly used practice to deploy to
> > > > >> different
> > > > >> > >> locations. Create a release profile and override the
> > > > >> > >> distributionManagement section as needed, for example see
> > > > >> > >>
> http://svn.codehaus.org/tynamo/trunk/tynamo-parent/pom.xml.
> > > > >> > >>
> > > > >> > >> Kalle
> > > > >> > >>
> > > > >> > >>
> > > > >> > >> On Tue, Dec 7, 2010 at 10:00 AM, KARR, DAVID (ATTSI)
> > > > >> <dk...@att.com>
> > > > >> > >> wrote:
> > > > >> > >> > I'm working on strategies to convert a large and complex
> > Ant
> > > > >> build
> > > > >> > >> > system to use Maven.
> > > > >> > >> >
> > > > >> > >> > I'm assuming that developers who are working on
> > individual
> > > > >> modules
> > > > >> > will
> > > > >> > >> > do a build that pulls the artifacts of other modules
> > (that
> > > > >> they're not
> > > > >> > >> > working on) from the Nexus repository we have running on
> > an
> > > > >> intranet
> > > > >> > >> > server. These will be both release artifacts and
> snapshot
> > > > >> artifacts.
> > > > >> > >> >
> > > > >> > >> > I also assume that incremental builds performed by the
> > > > release
> > > > >> > >> > management team will publish snapshot artifacts to the
> > Nexus
> > > > >> > repository,
> > > > >> > >> > but builds performed by developers will not publish to
> > the
> > > > > Nexus
> > > > >> > >> > repository.
> > > > >> > >> >
> > > > >> > >> > Is this reasonable? If so, what mechanisms do I have to
> > have
> > > > > in
> > > > >> place
> > > > >> > >> > to make release management builds publish artifacts to
> > > Nexus,
> > > > >> but not
> > > > >> > >> > developer builds?
> > > > >> > >> >
> > > > >> > >> >
> > > > > ----------------------------------------------------------------
> > > > >> -----
> > > > >> > >> > 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
> > > > >
> > >
> > >
> ---------------------------------------------------------------------
> > > 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: How to have release management incremental (or release) builds publish to Nexus, but not user builds?

Posted by "KARR, DAVID (ATTSI)" <dk...@att.com>.
> -----Original Message-----
> From: Ron Wheeler [mailto:rwheeler@artifact-software.com]
> Sent: Wednesday, December 08, 2010 2:11 PM
> To: users@maven.apache.org
> Subject: Re: How to have release management incremental (or release)
> builds publish to Nexus, but not user builds?
> 
> On 08/12/2010 3:03 PM, KARR, DAVID (ATTSI) wrote:
> >> -----Original Message-----
> >> From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com]
> On
> >> Behalf Of Anders Hammar
> >> Sent: Wednesday, December 08, 2010 11:07 AM
> >> To: Maven Users List
> >> Subject: Re: RE: How to have release management incremental (or
> >> release) builds publish to Nexus, but not user builds?
> >>
> >>> Ok, so when the release team runs an incremental build (not a
> > release
> >>> yet), they'll do something like this:
> >>>
> >>>     mvn -P releaseIncremental deploy
> >>>
> >>> Where "releaseIncremental" is the profile I defined with a
> >>> "distributionManagement" element?
> >>>
> >> No! I argue you should NOT have the distMgmt defined in a profile.
> >> Define your distMgmt section with the release and snapshot repo
(and
> >> possibly the site reo) in your pom, in the normal way (not within a
> >> profile).
> >> This will make it possible for anyone to execute mvn deploy and
have
> >> Maven
> >> try to deploy the snapshot or release. Then you control who can
> >> actually do
> >> that through permission in Nexus.
> >> This makes things very basic and therefore very easy to understand.
> >> Then who you will grant permission to do the deploy is up to you to
> >> decide.
> >> You can even grant different groups permission to deploy snapshots
> and
> >> release (e.g. a larger group of people might be allowed to deploy
> >> snapshots,
> >> while just he release manager can deploy the release). It will not
> >> change
> >> your maven projects in any way - it's controlled in your repo
> manager
> >> (i.e.
> >> Nexus).
> > Ok, fine.  That's great.  You're commenting on my strategy, and I'm
> just
> > trying to get something to work.  I'm fine with changing the
> strategy, I
> > just need to get it to work.
> The right strategy will make the rest a lot easier.
> > Can you take my example settings and transform it to the way you
> think
> > it should be?  I will eventually get some of this into a parent pom,
> but
> > it's easier to tweak in my settings.xml.
> >
> Remember, you have a very talented person with tremendous in-depth
> knowledge of Maven helping you for free.
> As I less talented and less experienced person, I can only encourage
> you
> to follow Ander's advice.

I understand that, and I appreciate it.  I'm just trying to figure out
how to translate that advice into a form I can understand.

> Do you have your groups set up on the Nexus repo with the right
> privileges?

I don't understand how to do this, and even after reading the
documentation on how to set this on the client side, I don't understand
that either.

> General concepts:
> 1) Maven projects within a company generally all have the same
> repository setup for dependency resolution so this is usually set in
> your settings.xml.
> Nexus will proxy all the external repos that you need, so individuals
> can tell Maven that your Nexus proxies everything.

I'm ok with that.  I already have a build working that got everything
from my Nexus repo, which got it from the external repos.

> 2) Individual applications generally have the same repository
> structures
> for all of the projects in the application so the deployment setup is
> described in the parent pom for the application

I'm fine with that also.  I've already started to build a parent pom
that specifies the distributionManagement section.

> 3) Project POMs generally do not have repository descriptions.

No problem.

> 4) Nexus controls who can deploy so that even if your parent pom tells
> you where to deploy , you are not guaranteed to be able to if you are
> not authorized.

I'm still unclear on this.  I know there is a "deployment" login and
I've verified the credentials for that in the Nexus admin console, but I
don't understand how to specify those credentials in the client.

> This means that you can get what you want by just following the
> out-of-the-box instructions from the Nexus installation guide

Yeah, the "installation" part is simple.  The parts about actually using
it are less obvious.

> Your situation is no different from everyone else's except you have a
> smaller list of people allowed to deploy.
> You do not really need a high valued consultant like Anders to set you
> up.
> 
> Keep it simple. Follow the installation guide with particular
attention
> paid to authorization within Nexus and you will be fine.

No problem, but as far as I can see, it says nothing about authorization
OUTSIDE OF Nexus, which is what I need.

> >>> I tried this, but it's complaining thusly (changed project name):
> >>>
> >>> [ERROR] Failed to execute goal
> >>> org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy (default-
> >> deploy)
> >>> on project myproject: Deployment failed: repository element was
not
> >>> specified in the POM inside distributionManagement element or in
> >>> -DaltDeploymentRepository=id::layout::url parameter ->  [Help 1]
> >>>
> >>> This is the profile I added (changed hostname):
> >>>
> >>>     <profile>
> >>>       <id>releaseIncremental</id>
> >>>       <distributionManagement>
> >>>         <snapshotRepository>
> >>>           <id>nexus</id>
> >>>
<url>http://myhost:8081/nexus/content/groups/public</url>
> >>>         </snapshotRepository>
> >>>       </distributionManagement>
> >>>       <repositories>
> >>>         <repository>
> >>>           <id>central</id>
> >>>           <url>http://central</url>
> >>>           <releases><enabled>true</enabled></releases>
> >>>           <snapshots><enabled>true</enabled></snapshots>
> >>>         </repository>
> >>>       </repositories>
> >>>       <pluginRepositories>
> >>>         <pluginRepository>
> >>>           <id>central</id>
> >>>           <url>http://central</url>
> >>>           <releases><enabled>true</enabled></releases>
> >>>           <snapshots><enabled>true</enabled></snapshots>
> >>>         </pluginRepository>
> >>>       </pluginRepositories>
> >>>     </profile>
> >>>
> >>> I tried a simple-minded fix and added the following before the
> >>> "snapshotRepository" element, but it gave the same error:
> >>>
> >>>         <repository>
> >>>           <id>nexus</id>
> >>>
<url>http://myhost:8081/nexus/content/groups/public</url>
> >>>         </repository>
> >>>
> >>> If I set up deployment credentials in Nexus (I believe it's
already
> >> set
> >>> up), how do I provide them in Maven?
> >>>
> >>>> Den 8 dec 2010 15.56 skrev "KARR, DAVID (ATTSI)"<dk...@att.com>:
> >>>>>> -----Original Message-----
> >>>>>> From: anders.g.hammar@gmail.com
> >> [mailto:anders.g.hammar@gmail.com]
> >>>> On
> >>>>>> Behalf Of Anders Hammar
> >>>>>> Sent: Tuesday, December 07, 2010 11:54 PM
> >>>>>> To: Maven Users List
> >>>>>> Subject: Re: How to have release management incremental (or
> >>> release)
> >>>>>> builds publish to Nexus, but not user builds?
> >>>>>>
> >>>>>> I'm arguing as I think you're sending the questioner off into
> >> the
> >>>>>> wilderness
> >>>>>> by suggesting something you call "common practice, which I do
> >> not
> >>>> see
> >>>>>> as
> >>>>>> common practice. I'm just trying to stop someone not being a
> >> Maven
> >>>>>> expert
> >>>>>> from going down a difficult path where he/she would run into
> > all
> >>>> kinds
> >>>>>> of
> >>>>>> strange behavior.
> >>>>> Anders, thank you for protecting my interests. :)
> >>>>>
> >>>>> However, I'm much more interested in solving the problem I had
> >> with
> >>>> my
> >>>>> "releaseIncremental" profile that I reported in this chain
> >>> yesterday.
> >>>>>> I've checked both the apache parent and the codehaus parent I
> >> can't
> >>>>>> find
> >>>>>> what you're talking about.
> >>>>>> http://repo2.maven.org/maven2/org/apache/apache/8/apache-8.pom
> >>>>>> http://repo2.maven.org/maven2/org/codehaus/codehaus-
> >>>> parent/3/codehaus-
> >>>>>> parent-3.pom
> >>>>>>
> >>>>>> /Anders
> >>>>>>
> >>>>>> On Wed, Dec 8, 2010 at 08:45, Kalle Korhonen
> >>>>>> <ka...@gmail.com>wrote:
> >>>>>>
> >>>>>>> The "commonness" of the practice is hardly the point of this
> >>>> thread
> >>>>>> so
> >>>>>>> it baffles me why you'd want to start arguing about it, but
> >> there
> >>>> is
> >>>>>> a
> >>>>>>> specific distributionManagement section in the release
> >> profiles
> >>> of
> >>>>>>> Apaches', Codehaus' parent poms and in the parent pom I
> > linked
> >> to
> >>>> so
> >>>>>> I
> >>>>>>> offered a tried and widely used solution to the questioner.
> >>>> There's
> >>>>>>> nothing difficult for users in it.
> >>>>>>>
> >>>>>>> Kalle
> >>>>>>>
> >>>>>>>
> >>>>>>> On Tue, Dec 7, 2010 at 9:49 PM, Anders Hammar
> >> <an...@hammar.net>
> >>>>>> wrote:
> >>>>>>>> Commonly used practice? Really? I don't think so. Are the
> >> users
> >>>>>> supposed
> >>>>>>> to
> >>>>>>>> enable different snapshot repos depending on what "type" of
> >>>>>> snapshot
> >>>>>>>> artifacts the want to use? Seems very complicated and error
> >>>> prone
> >>>>>> to me
> >>>>>>> and
> >>>>>>>> simply just to difficult for the users to get right.
> >>>>>>>>
> >>>>>>>> /Anders
> >>>>>>>>
> >>>>>>>> On Tue, Dec 7, 2010 at 19:10, Kalle Korhonen
> >>>>>> <kalle.o.korhonen@gmail.com
> >>>>>>>> wrote:
> >>>>>>>>
> >>>>>>>>> Of course, developers never need to run "deploy" goal in
> >> the
> >>>>> first
> >>>>>>>>> place. Anyhow, it's a commonly used practice to deploy to
> >>>>>> different
> >>>>>>>>> locations. Create a release profile and override the
> >>>>>>>>> distributionManagement section as needed, for example see
> >>>>>>>>>
> > http://svn.codehaus.org/tynamo/trunk/tynamo-parent/pom.xml.
> >>>>>>>>> Kalle
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>> On Tue, Dec 7, 2010 at 10:00 AM, KARR, DAVID (ATTSI)
> >>>>>> <dk...@att.com>
> >>>>>>>>> wrote:
> >>>>>>>>>> I'm working on strategies to convert a large and complex
> >> Ant
> >>>>>> build
> >>>>>>>>>> system to use Maven.
> >>>>>>>>>>
> >>>>>>>>>> I'm assuming that developers who are working on
> >> individual
> >>>>>> modules
> >>>>>>> will
> >>>>>>>>>> do a build that pulls the artifacts of other modules
> >> (that
> >>>>>> they're not
> >>>>>>>>>> working on) from the Nexus repository we have running on
> >> an
> >>>>>> intranet
> >>>>>>>>>> server. These will be both release artifacts and
> > snapshot
> >>>>>> artifacts.
> >>>>>>>>>> I also assume that incremental builds performed by the
> >>>> release
> >>>>>>>>>> management team will publish snapshot artifacts to the
> >> Nexus
> >>>>>>> repository,
> >>>>>>>>>> but builds performed by developers will not publish to
> >> the
> >>>>> Nexus
> >>>>>>>>>> repository.
> >>>>>>>>>>
> >>>>>>>>>> Is this reasonable? If so, what mechanisms do I have to
> >> have
> >>>>> in
> >>>>>> place
> >>>>>>>>>> to make release management builds publish artifacts to
> >>> Nexus,
> >>>>>> but not
> >>>>>>>>>> developer builds?
> >>>>>>>>>>
> >>>>>>>>>>
> >>>>> ----------------------------------------------------------------
> >>>>>> -----
> >>>>>>>>>> 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
> >>>>>
> >>>
> >
---------------------------------------------------------------------
> >>> 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: How to have release management incremental (or release) builds publish to Nexus, but not user builds?

Posted by Ron Wheeler <rw...@artifact-software.com>.
On 08/12/2010 3:03 PM, KARR, DAVID (ATTSI) wrote:
>> -----Original Message-----
>> From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On
>> Behalf Of Anders Hammar
>> Sent: Wednesday, December 08, 2010 11:07 AM
>> To: Maven Users List
>> Subject: Re: RE: How to have release management incremental (or
>> release) builds publish to Nexus, but not user builds?
>>
>>> Ok, so when the release team runs an incremental build (not a
> release
>>> yet), they'll do something like this:
>>>
>>>     mvn -P releaseIncremental deploy
>>>
>>> Where "releaseIncremental" is the profile I defined with a
>>> "distributionManagement" element?
>>>
>> No! I argue you should NOT have the distMgmt defined in a profile.
>> Define your distMgmt section with the release and snapshot repo (and
>> possibly the site reo) in your pom, in the normal way (not within a
>> profile).
>> This will make it possible for anyone to execute mvn deploy and have
>> Maven
>> try to deploy the snapshot or release. Then you control who can
>> actually do
>> that through permission in Nexus.
>> This makes things very basic and therefore very easy to understand.
>> Then who you will grant permission to do the deploy is up to you to
>> decide.
>> You can even grant different groups permission to deploy snapshots and
>> release (e.g. a larger group of people might be allowed to deploy
>> snapshots,
>> while just he release manager can deploy the release). It will not
>> change
>> your maven projects in any way - it's controlled in your repo manager
>> (i.e.
>> Nexus).
> Ok, fine.  That's great.  You're commenting on my strategy, and I'm just
> trying to get something to work.  I'm fine with changing the strategy, I
> just need to get it to work.
The right strategy will make the rest a lot easier.
> Can you take my example settings and transform it to the way you think
> it should be?  I will eventually get some of this into a parent pom, but
> it's easier to tweak in my settings.xml.
>
Remember, you have a very talented person with tremendous in-depth 
knowledge of Maven helping you for free.
As I less talented and less experienced person, I can only encourage you 
to follow Ander's advice.

Do you have your groups set up on the Nexus repo with the right privileges?

General concepts:
1) Maven projects within a company generally all have the same 
repository setup for dependency resolution so this is usually set in 
your settings.xml.
Nexus will proxy all the external repos that you need, so individuals 
can tell Maven that your Nexus proxies everything.

2) Individual applications generally have the same repository structures 
for all of the projects in the application so the deployment setup is 
described in the parent pom for the application

3) Project POMs generally do not have repository descriptions.

4) Nexus controls who can deploy so that even if your parent pom tells 
you where to deploy , you are not guaranteed to be able to if you are 
not authorized.


This means that you can get what you want by just following the 
out-of-the-box instructions from the Nexus installation guide
.
Your situation is no different from everyone else's except you have a 
smaller list of people allowed to deploy.
You do not really need a high valued consultant like Anders to set you up.

Keep it simple. Follow the installation guide with particular attention 
paid to authorization within Nexus and you will be fine.

If you are tempted to bend Maven or Nexus, take a step back and ask "Is 
my situation so off the mainstream of software development that I need 
to buld something that no one else uses?" If the answer is "No.", 
reconsider how you are looking at the problem and see if there is a 
natural Maven way to get this done simply.
If the answer is yes, then you can start to consider oddball setups that 
are not clearly documented in the Guides, Manuals and Books. At this 
point, hiring Anders (or getting him for free by asking here) is a good 
idea.

I hope that this helps.
Good luck and don't be afraid to ask questions.
Everyone here is very friendly and genuinely wants to help you(even if 
the advice is sometimes cryptic and often not what the questioner had in 
mind as an answer).

Ron




>>> I tried this, but it's complaining thusly (changed project name):
>>>
>>> [ERROR] Failed to execute goal
>>> org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy (default-
>> deploy)
>>> on project myproject: Deployment failed: repository element was not
>>> specified in the POM inside distributionManagement element or in
>>> -DaltDeploymentRepository=id::layout::url parameter ->  [Help 1]
>>>
>>> This is the profile I added (changed hostname):
>>>
>>>     <profile>
>>>       <id>releaseIncremental</id>
>>>       <distributionManagement>
>>>         <snapshotRepository>
>>>           <id>nexus</id>
>>>           <url>http://myhost:8081/nexus/content/groups/public</url>
>>>         </snapshotRepository>
>>>       </distributionManagement>
>>>       <repositories>
>>>         <repository>
>>>           <id>central</id>
>>>           <url>http://central</url>
>>>           <releases><enabled>true</enabled></releases>
>>>           <snapshots><enabled>true</enabled></snapshots>
>>>         </repository>
>>>       </repositories>
>>>       <pluginRepositories>
>>>         <pluginRepository>
>>>           <id>central</id>
>>>           <url>http://central</url>
>>>           <releases><enabled>true</enabled></releases>
>>>           <snapshots><enabled>true</enabled></snapshots>
>>>         </pluginRepository>
>>>       </pluginRepositories>
>>>     </profile>
>>>
>>> I tried a simple-minded fix and added the following before the
>>> "snapshotRepository" element, but it gave the same error:
>>>
>>>         <repository>
>>>           <id>nexus</id>
>>>           <url>http://myhost:8081/nexus/content/groups/public</url>
>>>         </repository>
>>>
>>> If I set up deployment credentials in Nexus (I believe it's already
>> set
>>> up), how do I provide them in Maven?
>>>
>>>> Den 8 dec 2010 15.56 skrev "KARR, DAVID (ATTSI)"<dk...@att.com>:
>>>>>> -----Original Message-----
>>>>>> From: anders.g.hammar@gmail.com
>> [mailto:anders.g.hammar@gmail.com]
>>>> On
>>>>>> Behalf Of Anders Hammar
>>>>>> Sent: Tuesday, December 07, 2010 11:54 PM
>>>>>> To: Maven Users List
>>>>>> Subject: Re: How to have release management incremental (or
>>> release)
>>>>>> builds publish to Nexus, but not user builds?
>>>>>>
>>>>>> I'm arguing as I think you're sending the questioner off into
>> the
>>>>>> wilderness
>>>>>> by suggesting something you call "common practice, which I do
>> not
>>>> see
>>>>>> as
>>>>>> common practice. I'm just trying to stop someone not being a
>> Maven
>>>>>> expert
>>>>>> from going down a difficult path where he/she would run into
> all
>>>> kinds
>>>>>> of
>>>>>> strange behavior.
>>>>> Anders, thank you for protecting my interests. :)
>>>>>
>>>>> However, I'm much more interested in solving the problem I had
>> with
>>>> my
>>>>> "releaseIncremental" profile that I reported in this chain
>>> yesterday.
>>>>>> I've checked both the apache parent and the codehaus parent I
>> can't
>>>>>> find
>>>>>> what you're talking about.
>>>>>> http://repo2.maven.org/maven2/org/apache/apache/8/apache-8.pom
>>>>>> http://repo2.maven.org/maven2/org/codehaus/codehaus-
>>>> parent/3/codehaus-
>>>>>> parent-3.pom
>>>>>>
>>>>>> /Anders
>>>>>>
>>>>>> On Wed, Dec 8, 2010 at 08:45, Kalle Korhonen
>>>>>> <ka...@gmail.com>wrote:
>>>>>>
>>>>>>> The "commonness" of the practice is hardly the point of this
>>>> thread
>>>>>> so
>>>>>>> it baffles me why you'd want to start arguing about it, but
>> there
>>>> is
>>>>>> a
>>>>>>> specific distributionManagement section in the release
>> profiles
>>> of
>>>>>>> Apaches', Codehaus' parent poms and in the parent pom I
> linked
>> to
>>>> so
>>>>>> I
>>>>>>> offered a tried and widely used solution to the questioner.
>>>> There's
>>>>>>> nothing difficult for users in it.
>>>>>>>
>>>>>>> Kalle
>>>>>>>
>>>>>>>
>>>>>>> On Tue, Dec 7, 2010 at 9:49 PM, Anders Hammar
>> <an...@hammar.net>
>>>>>> wrote:
>>>>>>>> Commonly used practice? Really? I don't think so. Are the
>> users
>>>>>> supposed
>>>>>>> to
>>>>>>>> enable different snapshot repos depending on what "type" of
>>>>>> snapshot
>>>>>>>> artifacts the want to use? Seems very complicated and error
>>>> prone
>>>>>> to me
>>>>>>> and
>>>>>>>> simply just to difficult for the users to get right.
>>>>>>>>
>>>>>>>> /Anders
>>>>>>>>
>>>>>>>> On Tue, Dec 7, 2010 at 19:10, Kalle Korhonen
>>>>>> <kalle.o.korhonen@gmail.com
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>> Of course, developers never need to run "deploy" goal in
>> the
>>>>> first
>>>>>>>>> place. Anyhow, it's a commonly used practice to deploy to
>>>>>> different
>>>>>>>>> locations. Create a release profile and override the
>>>>>>>>> distributionManagement section as needed, for example see
>>>>>>>>>
> http://svn.codehaus.org/tynamo/trunk/tynamo-parent/pom.xml.
>>>>>>>>> Kalle
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Tue, Dec 7, 2010 at 10:00 AM, KARR, DAVID (ATTSI)
>>>>>> <dk...@att.com>
>>>>>>>>> wrote:
>>>>>>>>>> I'm working on strategies to convert a large and complex
>> Ant
>>>>>> build
>>>>>>>>>> system to use Maven.
>>>>>>>>>>
>>>>>>>>>> I'm assuming that developers who are working on
>> individual
>>>>>> modules
>>>>>>> will
>>>>>>>>>> do a build that pulls the artifacts of other modules
>> (that
>>>>>> they're not
>>>>>>>>>> working on) from the Nexus repository we have running on
>> an
>>>>>> intranet
>>>>>>>>>> server. These will be both release artifacts and
> snapshot
>>>>>> artifacts.
>>>>>>>>>> I also assume that incremental builds performed by the
>>>> release
>>>>>>>>>> management team will publish snapshot artifacts to the
>> Nexus
>>>>>>> repository,
>>>>>>>>>> but builds performed by developers will not publish to
>> the
>>>>> Nexus
>>>>>>>>>> repository.
>>>>>>>>>>
>>>>>>>>>> Is this reasonable? If so, what mechanisms do I have to
>> have
>>>>> in
>>>>>> place
>>>>>>>>>> to make release management builds publish artifacts to
>>> Nexus,
>>>>>> but not
>>>>>>>>>> developer builds?
>>>>>>>>>>
>>>>>>>>>>
>>>>> ----------------------------------------------------------------
>>>>>> -----
>>>>>>>>>> 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
>>>>>
>>>
> ---------------------------------------------------------------------
>>> 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: RE: How to have release management incremental (or release) builds publish to Nexus, but not user builds?

Posted by "KARR, DAVID (ATTSI)" <dk...@att.com>.
> -----Original Message-----
> From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On
> Behalf Of Anders Hammar
> Sent: Wednesday, December 08, 2010 11:07 AM
> To: Maven Users List
> Subject: Re: RE: How to have release management incremental (or
> release) builds publish to Nexus, but not user builds?
> 
> > Ok, so when the release team runs an incremental build (not a
release
> > yet), they'll do something like this:
> >
> >    mvn -P releaseIncremental deploy
> >
> > Where "releaseIncremental" is the profile I defined with a
> > "distributionManagement" element?
> >
> 
> No! I argue you should NOT have the distMgmt defined in a profile.
> Define your distMgmt section with the release and snapshot repo (and
> possibly the site reo) in your pom, in the normal way (not within a
> profile).
> This will make it possible for anyone to execute mvn deploy and have
> Maven
> try to deploy the snapshot or release. Then you control who can
> actually do
> that through permission in Nexus.
> This makes things very basic and therefore very easy to understand.
> Then who you will grant permission to do the deploy is up to you to
> decide.
> You can even grant different groups permission to deploy snapshots and
> release (e.g. a larger group of people might be allowed to deploy
> snapshots,
> while just he release manager can deploy the release). It will not
> change
> your maven projects in any way - it's controlled in your repo manager
> (i.e.
> Nexus).

Ok, fine.  That's great.  You're commenting on my strategy, and I'm just
trying to get something to work.  I'm fine with changing the strategy, I
just need to get it to work.

Can you take my example settings and transform it to the way you think
it should be?  I will eventually get some of this into a parent pom, but
it's easier to tweak in my settings.xml.

> >
> > I tried this, but it's complaining thusly (changed project name):
> >
> > [ERROR] Failed to execute goal
> > org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy (default-
> deploy)
> > on project myproject: Deployment failed: repository element was not
> > specified in the POM inside distributionManagement element or in
> > -DaltDeploymentRepository=id::layout::url parameter -> [Help 1]
> >
> > This is the profile I added (changed hostname):
> >
> >    <profile>
> >      <id>releaseIncremental</id>
> >      <distributionManagement>
> >        <snapshotRepository>
> >          <id>nexus</id>
> >          <url>http://myhost:8081/nexus/content/groups/public</url>
> >        </snapshotRepository>
> >      </distributionManagement>
> >      <repositories>
> >        <repository>
> >          <id>central</id>
> >          <url>http://central</url>
> >          <releases><enabled>true</enabled></releases>
> >          <snapshots><enabled>true</enabled></snapshots>
> >        </repository>
> >      </repositories>
> >      <pluginRepositories>
> >        <pluginRepository>
> >          <id>central</id>
> >          <url>http://central</url>
> >          <releases><enabled>true</enabled></releases>
> >          <snapshots><enabled>true</enabled></snapshots>
> >        </pluginRepository>
> >      </pluginRepositories>
> >    </profile>
> >
> > I tried a simple-minded fix and added the following before the
> > "snapshotRepository" element, but it gave the same error:
> >
> >        <repository>
> >          <id>nexus</id>
> >          <url>http://myhost:8081/nexus/content/groups/public</url>
> >        </repository>
> >
> > If I set up deployment credentials in Nexus (I believe it's already
> set
> > up), how do I provide them in Maven?
> >
> > > Den 8 dec 2010 15.56 skrev "KARR, DAVID (ATTSI)" <dk...@att.com>:
> > > >> -----Original Message-----
> > > >> From: anders.g.hammar@gmail.com
> [mailto:anders.g.hammar@gmail.com]
> > > On
> > > >> Behalf Of Anders Hammar
> > > >> Sent: Tuesday, December 07, 2010 11:54 PM
> > > >> To: Maven Users List
> > > >> Subject: Re: How to have release management incremental (or
> > release)
> > > >> builds publish to Nexus, but not user builds?
> > > >>
> > > >> I'm arguing as I think you're sending the questioner off into
> the
> > > >> wilderness
> > > >> by suggesting something you call "common practice, which I do
> not
> > > see
> > > >> as
> > > >> common practice. I'm just trying to stop someone not being a
> Maven
> > > >> expert
> > > >> from going down a difficult path where he/she would run into
all
> > > kinds
> > > >> of
> > > >> strange behavior.
> > > >
> > > > Anders, thank you for protecting my interests. :)
> > > >
> > > > However, I'm much more interested in solving the problem I had
> with
> > > my
> > > > "releaseIncremental" profile that I reported in this chain
> > yesterday.
> > > >
> > > >> I've checked both the apache parent and the codehaus parent I
> can't
> > > >> find
> > > >> what you're talking about.
> > > >> http://repo2.maven.org/maven2/org/apache/apache/8/apache-8.pom
> > > >> http://repo2.maven.org/maven2/org/codehaus/codehaus-
> > > parent/3/codehaus-
> > > >> parent-3.pom
> > > >>
> > > >> /Anders
> > > >>
> > > >> On Wed, Dec 8, 2010 at 08:45, Kalle Korhonen
> > > >> <ka...@gmail.com>wrote:
> > > >>
> > > >> > The "commonness" of the practice is hardly the point of this
> > > thread
> > > >> so
> > > >> > it baffles me why you'd want to start arguing about it, but
> there
> > > is
> > > >> a
> > > >> > specific distributionManagement section in the release
> profiles
> > of
> > > >> > Apaches', Codehaus' parent poms and in the parent pom I
linked
> to
> > > so
> > > >> I
> > > >> > offered a tried and widely used solution to the questioner.
> > > There's
> > > >> > nothing difficult for users in it.
> > > >> >
> > > >> > Kalle
> > > >> >
> > > >> >
> > > >> > On Tue, Dec 7, 2010 at 9:49 PM, Anders Hammar
> <an...@hammar.net>
> > > >> wrote:
> > > >> > > Commonly used practice? Really? I don't think so. Are the
> users
> > > >> supposed
> > > >> > to
> > > >> > > enable different snapshot repos depending on what "type" of
> > > >> snapshot
> > > >> > > artifacts the want to use? Seems very complicated and error
> > > prone
> > > >> to me
> > > >> > and
> > > >> > > simply just to difficult for the users to get right.
> > > >> > >
> > > >> > > /Anders
> > > >> > >
> > > >> > > On Tue, Dec 7, 2010 at 19:10, Kalle Korhonen
> > > >> <kalle.o.korhonen@gmail.com
> > > >> > >wrote:
> > > >> > >
> > > >> > >> Of course, developers never need to run "deploy" goal in
> the
> > > > first
> > > >> > >> place. Anyhow, it's a commonly used practice to deploy to
> > > >> different
> > > >> > >> locations. Create a release profile and override the
> > > >> > >> distributionManagement section as needed, for example see
> > > >> > >>
http://svn.codehaus.org/tynamo/trunk/tynamo-parent/pom.xml.
> > > >> > >>
> > > >> > >> Kalle
> > > >> > >>
> > > >> > >>
> > > >> > >> On Tue, Dec 7, 2010 at 10:00 AM, KARR, DAVID (ATTSI)
> > > >> <dk...@att.com>
> > > >> > >> wrote:
> > > >> > >> > I'm working on strategies to convert a large and complex
> Ant
> > > >> build
> > > >> > >> > system to use Maven.
> > > >> > >> >
> > > >> > >> > I'm assuming that developers who are working on
> individual
> > > >> modules
> > > >> > will
> > > >> > >> > do a build that pulls the artifacts of other modules
> (that
> > > >> they're not
> > > >> > >> > working on) from the Nexus repository we have running on
> an
> > > >> intranet
> > > >> > >> > server. These will be both release artifacts and
snapshot
> > > >> artifacts.
> > > >> > >> >
> > > >> > >> > I also assume that incremental builds performed by the
> > > release
> > > >> > >> > management team will publish snapshot artifacts to the
> Nexus
> > > >> > repository,
> > > >> > >> > but builds performed by developers will not publish to
> the
> > > > Nexus
> > > >> > >> > repository.
> > > >> > >> >
> > > >> > >> > Is this reasonable? If so, what mechanisms do I have to
> have
> > > > in
> > > >> place
> > > >> > >> > to make release management builds publish artifacts to
> > Nexus,
> > > >> but not
> > > >> > >> > developer builds?
> > > >> > >> >
> > > >> > >> >
> > > > ----------------------------------------------------------------
> > > >> -----
> > > >> > >> > 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
> > > >
> >
> >
---------------------------------------------------------------------
> > 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: RE: How to have release management incremental (or release) builds publish to Nexus, but not user builds?

Posted by Anders Hammar <an...@hammar.net>.
> Ok, so when the release team runs an incremental build (not a release
> yet), they'll do something like this:
>
>    mvn -P releaseIncremental deploy
>
> Where "releaseIncremental" is the profile I defined with a
> "distributionManagement" element?
>

No! I argue you should NOT have the distMgmt defined in a profile.
Define your distMgmt section with the release and snapshot repo (and
possibly the site reo) in your pom, in the normal way (not within a
profile).
This will make it possible for anyone to execute mvn deploy and have Maven
try to deploy the snapshot or release. Then you control who can actually do
that through permission in Nexus.
This makes things very basic and therefore very easy to understand.
Then who you will grant permission to do the deploy is up to you to decide.
You can even grant different groups permission to deploy snapshots and
release (e.g. a larger group of people might be allowed to deploy snapshots,
while just he release manager can deploy the release). It will not change
your maven projects in any way - it's controlled in your repo manager (i.e.
Nexus).

/Anders


>
> I tried this, but it's complaining thusly (changed project name):
>
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy (default-deploy)
> on project myproject: Deployment failed: repository element was not
> specified in the POM inside distributionManagement element or in
> -DaltDeploymentRepository=id::layout::url parameter -> [Help 1]
>
> This is the profile I added (changed hostname):
>
>    <profile>
>      <id>releaseIncremental</id>
>      <distributionManagement>
>        <snapshotRepository>
>          <id>nexus</id>
>          <url>http://myhost:8081/nexus/content/groups/public</url>
>        </snapshotRepository>
>      </distributionManagement>
>      <repositories>
>        <repository>
>          <id>central</id>
>          <url>http://central</url>
>          <releases><enabled>true</enabled></releases>
>          <snapshots><enabled>true</enabled></snapshots>
>        </repository>
>      </repositories>
>      <pluginRepositories>
>        <pluginRepository>
>          <id>central</id>
>          <url>http://central</url>
>          <releases><enabled>true</enabled></releases>
>          <snapshots><enabled>true</enabled></snapshots>
>        </pluginRepository>
>      </pluginRepositories>
>    </profile>
>
> I tried a simple-minded fix and added the following before the
> "snapshotRepository" element, but it gave the same error:
>
>        <repository>
>          <id>nexus</id>
>          <url>http://myhost:8081/nexus/content/groups/public</url>
>        </repository>
>
> If I set up deployment credentials in Nexus (I believe it's already set
> up), how do I provide them in Maven?
>
> > Den 8 dec 2010 15.56 skrev "KARR, DAVID (ATTSI)" <dk...@att.com>:
> > >> -----Original Message-----
> > >> From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com]
> > On
> > >> Behalf Of Anders Hammar
> > >> Sent: Tuesday, December 07, 2010 11:54 PM
> > >> To: Maven Users List
> > >> Subject: Re: How to have release management incremental (or
> release)
> > >> builds publish to Nexus, but not user builds?
> > >>
> > >> I'm arguing as I think you're sending the questioner off into the
> > >> wilderness
> > >> by suggesting something you call "common practice, which I do not
> > see
> > >> as
> > >> common practice. I'm just trying to stop someone not being a Maven
> > >> expert
> > >> from going down a difficult path where he/she would run into all
> > kinds
> > >> of
> > >> strange behavior.
> > >
> > > Anders, thank you for protecting my interests. :)
> > >
> > > However, I'm much more interested in solving the problem I had with
> > my
> > > "releaseIncremental" profile that I reported in this chain
> yesterday.
> > >
> > >> I've checked both the apache parent and the codehaus parent I can't
> > >> find
> > >> what you're talking about.
> > >> http://repo2.maven.org/maven2/org/apache/apache/8/apache-8.pom
> > >> http://repo2.maven.org/maven2/org/codehaus/codehaus-
> > parent/3/codehaus-
> > >> parent-3.pom
> > >>
> > >> /Anders
> > >>
> > >> On Wed, Dec 8, 2010 at 08:45, Kalle Korhonen
> > >> <ka...@gmail.com>wrote:
> > >>
> > >> > The "commonness" of the practice is hardly the point of this
> > thread
> > >> so
> > >> > it baffles me why you'd want to start arguing about it, but there
> > is
> > >> a
> > >> > specific distributionManagement section in the release profiles
> of
> > >> > Apaches', Codehaus' parent poms and in the parent pom I linked to
> > so
> > >> I
> > >> > offered a tried and widely used solution to the questioner.
> > There's
> > >> > nothing difficult for users in it.
> > >> >
> > >> > Kalle
> > >> >
> > >> >
> > >> > On Tue, Dec 7, 2010 at 9:49 PM, Anders Hammar <an...@hammar.net>
> > >> wrote:
> > >> > > Commonly used practice? Really? I don't think so. Are the users
> > >> supposed
> > >> > to
> > >> > > enable different snapshot repos depending on what "type" of
> > >> snapshot
> > >> > > artifacts the want to use? Seems very complicated and error
> > prone
> > >> to me
> > >> > and
> > >> > > simply just to difficult for the users to get right.
> > >> > >
> > >> > > /Anders
> > >> > >
> > >> > > On Tue, Dec 7, 2010 at 19:10, Kalle Korhonen
> > >> <kalle.o.korhonen@gmail.com
> > >> > >wrote:
> > >> > >
> > >> > >> Of course, developers never need to run "deploy" goal in the
> > > first
> > >> > >> place. Anyhow, it's a commonly used practice to deploy to
> > >> different
> > >> > >> locations. Create a release profile and override the
> > >> > >> distributionManagement section as needed, for example see
> > >> > >> http://svn.codehaus.org/tynamo/trunk/tynamo-parent/pom.xml.
> > >> > >>
> > >> > >> Kalle
> > >> > >>
> > >> > >>
> > >> > >> On Tue, Dec 7, 2010 at 10:00 AM, KARR, DAVID (ATTSI)
> > >> <dk...@att.com>
> > >> > >> wrote:
> > >> > >> > I'm working on strategies to convert a large and complex Ant
> > >> build
> > >> > >> > system to use Maven.
> > >> > >> >
> > >> > >> > I'm assuming that developers who are working on individual
> > >> modules
> > >> > will
> > >> > >> > do a build that pulls the artifacts of other modules (that
> > >> they're not
> > >> > >> > working on) from the Nexus repository we have running on an
> > >> intranet
> > >> > >> > server. These will be both release artifacts and snapshot
> > >> artifacts.
> > >> > >> >
> > >> > >> > I also assume that incremental builds performed by the
> > release
> > >> > >> > management team will publish snapshot artifacts to the Nexus
> > >> > repository,
> > >> > >> > but builds performed by developers will not publish to the
> > > Nexus
> > >> > >> > repository.
> > >> > >> >
> > >> > >> > Is this reasonable? If so, what mechanisms do I have to have
> > > in
> > >> place
> > >> > >> > to make release management builds publish artifacts to
> Nexus,
> > >> but not
> > >> > >> > developer builds?
> > >> > >> >
> > >> > >> >
> > > ----------------------------------------------------------------
> > >> -----
> > >> > >> > 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
> > >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

RE: RE: How to have release management incremental (or release) builds publish to Nexus, but not user builds?

Posted by "KARR, DAVID (ATTSI)" <dk...@att.com>.
> -----Original Message-----
> From: Kalle Korhonen [mailto:kalle.o.korhonen@gmail.com]
> Sent: Wednesday, December 08, 2010 3:36 PM
> To: Maven Users List
> Subject: Re: RE: How to have release management incremental (or
> release) builds publish to Nexus, but not user builds?
> 
> On Wed, Dec 8, 2010 at 3:26 PM, KARR, DAVID (ATTSI) <dk...@att.com>
> wrote:
> >> -----Original Message-----
> > What is a "destination"?  What exact field in the pom does the
> server/id correspond to?
> 
> Module's deployment destination is specified by the distribution URL.
> Server id corresponds to the server id in both places, for example see
> http://www.sonatype.com/books/nexus-book/reference/staging-sect-
> deployment.html

Success!  Does the "settings/servers/server/id" value have to match the "project/distributionManagement/repository/id" value?  That's what I have now, and it works.  I can't find any statement to this effect in the documentation I've seen so far (including this latest link).

My "deploy" test now uploads the snapshots to the snapshot repo, and I can browse them in Nexus.


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


Re: RE: How to have release management incremental (or release) builds publish to Nexus, but not user builds?

Posted by Kalle Korhonen <ka...@gmail.com>.
On Wed, Dec 8, 2010 at 3:26 PM, KARR, DAVID (ATTSI) <dk...@att.com> wrote:
>> -----Original Message-----
> What is a "destination"?  What exact field in the pom does the server/id correspond to?

Module's deployment destination is specified by the distribution URL.
Server id corresponds to the server id in both places, for example see
http://www.sonatype.com/books/nexus-book/reference/staging-sect-deployment.html

Kalle

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


RE: RE: How to have release management incremental (or release) builds publish to Nexus, but not user builds?

Posted by "KARR, DAVID (ATTSI)" <dk...@att.com>.
> -----Original Message-----
> From: Kalle Korhonen [mailto:kalle.o.korhonen@gmail.com]
> Sent: Wednesday, December 08, 2010 3:18 PM
> To: Maven Users List
> Subject: Re: RE: How to have release management incremental (or
> release) builds publish to Nexus, but not user builds?
> 
> On Wed, Dec 8, 2010 at 9:16 AM, KARR, DAVID (ATTSI) <dk...@att.com>
> wrote:
> >> -----Original Message-----
> >> From: Nick Stolwijk [mailto:nick.stolwijk@gmail.com]
> > [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-
> plugin:2.5:deploy (default-deploy) on project myproject: Deployment
> failed: repository element was not specified in the POM inside
> distributionManagement element or in -
> DaltDeploymentRepository=id::layout::url parameter -> [Help 1]
> > With a command line of this:
> >   mvn -P releaseIncremental deploy
> 
> You don't specify but your latter post suggests that you are trying to
> configure all of it in your settings. Put at least the the
> distributionManagement section into your pom as the error message says
> and it will work.

Yes, I had started with having some things in the settings.xml that should be in the parent pom.  I've already retreated from that.  I'm willing to do whatever is reasonable, as long as I can get it to work, which I haven't done yet.

> > Not that this is an issue yet, but what is the significance of the
> "id" element in the "server" element?  Does that value have to
> correspond to anything?
> 
> The pom is shared and the settings are yours. The id serves as a
> bridge between them. So you specify a destination in your pom and the
> id helps Maven to find the correct credentials for that specific
> destination.

What is a "destination"?  What exact field in the pom does the server/id correspond to?


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


Re: RE: How to have release management incremental (or release) builds publish to Nexus, but not user builds?

Posted by Kalle Korhonen <ka...@gmail.com>.
On Wed, Dec 8, 2010 at 9:16 AM, KARR, DAVID (ATTSI) <dk...@att.com> wrote:
>> -----Original Message-----
>> From: Nick Stolwijk [mailto:nick.stolwijk@gmail.com]
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy (default-deploy) on project myproject: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter -> [Help 1]
> With a command line of this:
>   mvn -P releaseIncremental deploy

You don't specify but your latter post suggests that you are trying to
configure all of it in your settings. Put at least the the
distributionManagement section into your pom as the error message says
and it will work.

> Not that this is an issue yet, but what is the significance of the "id" element in the "server" element?  Does that value have to correspond to anything?

The pom is shared and the settings are yours. The id serves as a
bridge between them. So you specify a destination in your pom and the
id helps Maven to find the correct credentials for that specific
destination.

For others about the rest, it's not a choice between using a profile
or credentials. Of course you should be forced to properly
authenticate for deploying, but if you need multiple distribution
locations, profiles are a simple way and natural way to achieve it.

Kalle

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


RE: RE: How to have release management incremental (or release) builds publish to Nexus, but not user builds?

Posted by "KARR, DAVID (ATTSI)" <dk...@att.com>.
> -----Original Message-----
> From: Nick Stolwijk [mailto:nick.stolwijk@gmail.com]
> Sent: Wednesday, December 08, 2010 8:51 AM
> To: Maven Users List
> Subject: Re: RE: How to have release management incremental (or
> release) builds publish to Nexus, but not user builds?
> 
> Also, I see you are trying to deploy to a group. I don't think nexus
> is very happy about that:
> 
>      <distributionManagement>
>        <snapshotRepository>
>          <id>nexus</id>
>          <url>http://myhost:8081/nexus/content/groups/public</url>
>        </snapshotRepository>
>      </distributionManagement>
> 
> Try something like this:
>      <distributionManagement>
>        <repository>
>          <id>nexus-inhouse</id>
>          <url>http://myhost:8081/nexus/content/inhouse</url>
>        </repository>
>        <snapshotRepository>
>          <id>nexus-inhouse-snapshot</id>
>          <url>http://myhost:8081/nexus/content/inhouse-snapshot</url>
>        </snapshotRepository>
>      </distributionManagement>
> 
> And create the inhouse and inhouse-snapshot repositories inside nexus
> and add them to the right groups.

Ok, I created "inhouse" and "inhouse-snapshot" as "hosted repositories".  The URLs it created for them is:

* http:/myhost:8081/nexus/content/repositories/inhouse/
* http://myhost:8081/nexus/content/repositories/inhouse-snapshot/

I don't know what you mean by "add them to the right groups".

I changed my profile to this:

    <profile>
      <id>releaseIncremental</id>
      <servers>
        <server>
          <id>nexus</id>
          <username>deployment</username>
          <password>deployment123</password>
        </server>
      </servers>
      <distributionManagement>
        <repository>
          <id>inhouse</id>
          <url>http://myhost:8081/nexus/content/repositories/inhouse</url>
        </repository>
        <snapshotRepository>
          <id>inhouse-snapshot</id>
          <url>http://myhost:8081/nexus/content/repositories/inhouse-snapshot</url>
        </snapshotRepository>
      </distributionManagement>
      <repositories>
        <repository>
          <id>central</id>
          <url>http://central</url>
          <releases><enabled>true</enabled></releases>
          <snapshots><enabled>true</enabled></snapshots>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <id>central</id>
          <url>http://central</url>
          <releases><enabled>true</enabled></releases>
          <snapshots><enabled>true</enabled></snapshots>
        </pluginRepository>
      </pluginRepositories>
    </profile>

My result was the same.  It still says this:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy (default-deploy) on project myproject: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter -> [Help 1]

With a command line of this:

   mvn -P releaseIncremental deploy

Not that this is an issue yet, but what is the significance of the "id" element in the "server" element?  Does that value have to correspond to anything?

> On Wed, Dec 8, 2010 at 5:49 PM, Nick Stolwijk <ni...@gmail.com>
> wrote:
> > If you still have the same snippet in your pom, you only have the
> > snapshotRepository and not the normal repository element.
> >
> > With regards,
> >
> > Nick Stolwijk
> > ~Java Developer~
> >
> > iPROFS
> > Wagenweg 208
> > 2012 NM Haarlem
> > T +31 23 547 6369
> > F +31 23 547 6370
> > I www.iprofs.nl
> >
> >
> >
> > On Wed, Dec 8, 2010 at 5:44 PM, KARR, DAVID (ATTSI) <dk...@att.com>
> wrote:
> >>> -----Original Message-----
> >>> From: Wayne Fay [mailto:waynefay@gmail.com]
> >>> Sent: Wednesday, December 08, 2010 8:40 AM
> >>> To: Maven Users List
> >>> Subject: Re: RE: How to have release management incremental (or
> >>> release) builds publish to Nexus, but not user builds?
> >>>
> >>> > If I set up deployment credentials in Nexus (I believe it's
> already
> >>> set
> >>> > up), how do I provide them in Maven?
> >>>
> >>> Googling for "maven nexus deployment credentials" gives me this
> link
> >>> which is exactly what you are looking for...
> >>>
> >>> http://www.sonatype.com/books/nexus-book/reference/ch13s04.html
> >>
> >> Yeah, I figured out that part a minute after I wrote that.  It
> doesn't solve the problem, however.  It still complains about the
> missing "repository" element (which is there, as far as I can tell).
> >>
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org


Re: RE: How to have release management incremental (or release) builds publish to Nexus, but not user builds?

Posted by Nick Stolwijk <ni...@gmail.com>.
Also, I see you are trying to deploy to a group. I don't think nexus
is very happy about that:

     <distributionManagement>
       <snapshotRepository>
         <id>nexus</id>
         <url>http://myhost:8081/nexus/content/groups/public</url>
       </snapshotRepository>
     </distributionManagement>

Try something like this:
     <distributionManagement>
       <repository>
         <id>nexus-inhouse</id>
         <url>http://myhost:8081/nexus/content/inhouse</url>
       </repository>
       <snapshotRepository>
         <id>nexus-inhouse-snapshot</id>
         <url>http://myhost:8081/nexus/content/inhouse-snapshot</url>
       </snapshotRepository>
     </distributionManagement>

And create the inhouse and inhouse-snapshot repositories inside nexus
and add them to the right groups.

With regards,

Nick Stolwijk
~Java Developer~

iPROFS
Wagenweg 208
2012 NM Haarlem
T +31 23 547 6369
F +31 23 547 6370
I www.iprofs.nl



On Wed, Dec 8, 2010 at 5:49 PM, Nick Stolwijk <ni...@gmail.com> wrote:
> If you still have the same snippet in your pom, you only have the
> snapshotRepository and not the normal repository element.
>
> With regards,
>
> Nick Stolwijk
> ~Java Developer~
>
> iPROFS
> Wagenweg 208
> 2012 NM Haarlem
> T +31 23 547 6369
> F +31 23 547 6370
> I www.iprofs.nl
>
>
>
> On Wed, Dec 8, 2010 at 5:44 PM, KARR, DAVID (ATTSI) <dk...@att.com> wrote:
>>> -----Original Message-----
>>> From: Wayne Fay [mailto:waynefay@gmail.com]
>>> Sent: Wednesday, December 08, 2010 8:40 AM
>>> To: Maven Users List
>>> Subject: Re: RE: How to have release management incremental (or
>>> release) builds publish to Nexus, but not user builds?
>>>
>>> > If I set up deployment credentials in Nexus (I believe it's already
>>> set
>>> > up), how do I provide them in Maven?
>>>
>>> Googling for "maven nexus deployment credentials" gives me this link
>>> which is exactly what you are looking for...
>>>
>>> http://www.sonatype.com/books/nexus-book/reference/ch13s04.html
>>
>> Yeah, I figured out that part a minute after I wrote that.  It doesn't solve the problem, however.  It still complains about the missing "repository" element (which is there, as far as I can tell).
>>
>

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


Re: RE: How to have release management incremental (or release) builds publish to Nexus, but not user builds?

Posted by Nick Stolwijk <ni...@gmail.com>.
If you still have the same snippet in your pom, you only have the
snapshotRepository and not the normal repository element.

With regards,

Nick Stolwijk
~Java Developer~

iPROFS
Wagenweg 208
2012 NM Haarlem
T +31 23 547 6369
F +31 23 547 6370
I www.iprofs.nl



On Wed, Dec 8, 2010 at 5:44 PM, KARR, DAVID (ATTSI) <dk...@att.com> wrote:
>> -----Original Message-----
>> From: Wayne Fay [mailto:waynefay@gmail.com]
>> Sent: Wednesday, December 08, 2010 8:40 AM
>> To: Maven Users List
>> Subject: Re: RE: How to have release management incremental (or
>> release) builds publish to Nexus, but not user builds?
>>
>> > If I set up deployment credentials in Nexus (I believe it's already
>> set
>> > up), how do I provide them in Maven?
>>
>> Googling for "maven nexus deployment credentials" gives me this link
>> which is exactly what you are looking for...
>>
>> http://www.sonatype.com/books/nexus-book/reference/ch13s04.html
>
> Yeah, I figured out that part a minute after I wrote that.  It doesn't solve the problem, however.  It still complains about the missing "repository" element (which is there, as far as I can tell).
>

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


RE: RE: How to have release management incremental (or release) builds publish to Nexus, but not user builds?

Posted by "KARR, DAVID (ATTSI)" <dk...@att.com>.
> -----Original Message-----
> From: Wayne Fay [mailto:waynefay@gmail.com]
> Sent: Wednesday, December 08, 2010 8:40 AM
> To: Maven Users List
> Subject: Re: RE: How to have release management incremental (or
> release) builds publish to Nexus, but not user builds?
> 
> > If I set up deployment credentials in Nexus (I believe it's already
> set
> > up), how do I provide them in Maven?
> 
> Googling for "maven nexus deployment credentials" gives me this link
> which is exactly what you are looking for...
> 
> http://www.sonatype.com/books/nexus-book/reference/ch13s04.html

Yeah, I figured out that part a minute after I wrote that.  It doesn't solve the problem, however.  It still complains about the missing "repository" element (which is there, as far as I can tell).

Re: RE: How to have release management incremental (or release) builds publish to Nexus, but not user builds?

Posted by Wayne Fay <wa...@gmail.com>.
> If I set up deployment credentials in Nexus (I believe it's already set
> up), how do I provide them in Maven?

Googling for "maven nexus deployment credentials" gives me this link
which is exactly what you are looking for...

http://www.sonatype.com/books/nexus-book/reference/ch13s04.html

Wayne

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


RE: RE: How to have release management incremental (or release) builds publish to Nexus, but not user builds?

Posted by "KARR, DAVID (ATTSI)" <dk...@att.com>.
> -----Original Message-----
> From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On
> Behalf Of Anders Hammar
> Sent: Wednesday, December 08, 2010 7:42 AM
> To: Maven Users List
> Subject: Re: RE: How to have release management incremental (or
> release) builds publish to Nexus, but not user builds?
> 
> Right, and the answer is adding different permissions in your repo
> manager
> for your build server and your devs. Only the build server, and maybe
> some
> trusted devs, will be authz to deploy.

I'll repeat the question I think you're trying to answer.

Ok, so when the release team runs an incremental build (not a release
yet), they'll do something like this:

    mvn -P releaseIncremental deploy

Where "releaseIncremental" is the profile I defined with a
"distributionManagement" element?

I tried this, but it's complaining thusly (changed project name):

[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy (default-deploy)
on project myproject: Deployment failed: repository element was not
specified in the POM inside distributionManagement element or in
-DaltDeploymentRepository=id::layout::url parameter -> [Help 1]

This is the profile I added (changed hostname):

    <profile>
      <id>releaseIncremental</id>
      <distributionManagement>
        <snapshotRepository>
          <id>nexus</id>
          <url>http://myhost:8081/nexus/content/groups/public</url>
        </snapshotRepository>
      </distributionManagement>
      <repositories>
        <repository>
          <id>central</id>
          <url>http://central</url>
          <releases><enabled>true</enabled></releases>
          <snapshots><enabled>true</enabled></snapshots>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <id>central</id>
          <url>http://central</url>
          <releases><enabled>true</enabled></releases>
          <snapshots><enabled>true</enabled></snapshots>
        </pluginRepository>
      </pluginRepositories>
    </profile>

I tried a simple-minded fix and added the following before the
"snapshotRepository" element, but it gave the same error:

        <repository>
          <id>nexus</id>
          <url>http://myhost:8081/nexus/content/groups/public</url>
        </repository>

If I set up deployment credentials in Nexus (I believe it's already set
up), how do I provide them in Maven?

> Den 8 dec 2010 15.56 skrev "KARR, DAVID (ATTSI)" <dk...@att.com>:
> >> -----Original Message-----
> >> From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com]
> On
> >> Behalf Of Anders Hammar
> >> Sent: Tuesday, December 07, 2010 11:54 PM
> >> To: Maven Users List
> >> Subject: Re: How to have release management incremental (or
release)
> >> builds publish to Nexus, but not user builds?
> >>
> >> I'm arguing as I think you're sending the questioner off into the
> >> wilderness
> >> by suggesting something you call "common practice, which I do not
> see
> >> as
> >> common practice. I'm just trying to stop someone not being a Maven
> >> expert
> >> from going down a difficult path where he/she would run into all
> kinds
> >> of
> >> strange behavior.
> >
> > Anders, thank you for protecting my interests. :)
> >
> > However, I'm much more interested in solving the problem I had with
> my
> > "releaseIncremental" profile that I reported in this chain
yesterday.
> >
> >> I've checked both the apache parent and the codehaus parent I can't
> >> find
> >> what you're talking about.
> >> http://repo2.maven.org/maven2/org/apache/apache/8/apache-8.pom
> >> http://repo2.maven.org/maven2/org/codehaus/codehaus-
> parent/3/codehaus-
> >> parent-3.pom
> >>
> >> /Anders
> >>
> >> On Wed, Dec 8, 2010 at 08:45, Kalle Korhonen
> >> <ka...@gmail.com>wrote:
> >>
> >> > The "commonness" of the practice is hardly the point of this
> thread
> >> so
> >> > it baffles me why you'd want to start arguing about it, but there
> is
> >> a
> >> > specific distributionManagement section in the release profiles
of
> >> > Apaches', Codehaus' parent poms and in the parent pom I linked to
> so
> >> I
> >> > offered a tried and widely used solution to the questioner.
> There's
> >> > nothing difficult for users in it.
> >> >
> >> > Kalle
> >> >
> >> >
> >> > On Tue, Dec 7, 2010 at 9:49 PM, Anders Hammar <an...@hammar.net>
> >> wrote:
> >> > > Commonly used practice? Really? I don't think so. Are the users
> >> supposed
> >> > to
> >> > > enable different snapshot repos depending on what "type" of
> >> snapshot
> >> > > artifacts the want to use? Seems very complicated and error
> prone
> >> to me
> >> > and
> >> > > simply just to difficult for the users to get right.
> >> > >
> >> > > /Anders
> >> > >
> >> > > On Tue, Dec 7, 2010 at 19:10, Kalle Korhonen
> >> <kalle.o.korhonen@gmail.com
> >> > >wrote:
> >> > >
> >> > >> Of course, developers never need to run "deploy" goal in the
> > first
> >> > >> place. Anyhow, it's a commonly used practice to deploy to
> >> different
> >> > >> locations. Create a release profile and override the
> >> > >> distributionManagement section as needed, for example see
> >> > >> http://svn.codehaus.org/tynamo/trunk/tynamo-parent/pom.xml.
> >> > >>
> >> > >> Kalle
> >> > >>
> >> > >>
> >> > >> On Tue, Dec 7, 2010 at 10:00 AM, KARR, DAVID (ATTSI)
> >> <dk...@att.com>
> >> > >> wrote:
> >> > >> > I'm working on strategies to convert a large and complex Ant
> >> build
> >> > >> > system to use Maven.
> >> > >> >
> >> > >> > I'm assuming that developers who are working on individual
> >> modules
> >> > will
> >> > >> > do a build that pulls the artifacts of other modules (that
> >> they're not
> >> > >> > working on) from the Nexus repository we have running on an
> >> intranet
> >> > >> > server. These will be both release artifacts and snapshot
> >> artifacts.
> >> > >> >
> >> > >> > I also assume that incremental builds performed by the
> release
> >> > >> > management team will publish snapshot artifacts to the Nexus
> >> > repository,
> >> > >> > but builds performed by developers will not publish to the
> > Nexus
> >> > >> > repository.
> >> > >> >
> >> > >> > Is this reasonable? If so, what mechanisms do I have to have
> > in
> >> place
> >> > >> > to make release management builds publish artifacts to
Nexus,
> >> but not
> >> > >> > developer builds?
> >> > >> >
> >> > >> >
> > ----------------------------------------------------------------
> >> -----
> >> > >> > 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
> >

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


Re: RE: How to have release management incremental (or release) builds publish to Nexus, but not user builds?

Posted by Anders Hammar <an...@hammar.net>.
Right, and the answer is adding different permissions in your repo manager
for your build server and your devs. Only the build server, and maybe some
trusted devs, will be authz to deploy.

/Anders (mobile)
Den 8 dec 2010 15.56 skrev "KARR, DAVID (ATTSI)" <dk...@att.com>:
>> -----Original Message-----
>> From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On
>> Behalf Of Anders Hammar
>> Sent: Tuesday, December 07, 2010 11:54 PM
>> To: Maven Users List
>> Subject: Re: How to have release management incremental (or release)
>> builds publish to Nexus, but not user builds?
>>
>> I'm arguing as I think you're sending the questioner off into the
>> wilderness
>> by suggesting something you call "common practice, which I do not see
>> as
>> common practice. I'm just trying to stop someone not being a Maven
>> expert
>> from going down a difficult path where he/she would run into all kinds
>> of
>> strange behavior.
>
> Anders, thank you for protecting my interests. :)
>
> However, I'm much more interested in solving the problem I had with my
> "releaseIncremental" profile that I reported in this chain yesterday.
>
>> I've checked both the apache parent and the codehaus parent I can't
>> find
>> what you're talking about.
>> http://repo2.maven.org/maven2/org/apache/apache/8/apache-8.pom
>> http://repo2.maven.org/maven2/org/codehaus/codehaus-parent/3/codehaus-
>> parent-3.pom
>>
>> /Anders
>>
>> On Wed, Dec 8, 2010 at 08:45, Kalle Korhonen
>> <ka...@gmail.com>wrote:
>>
>> > The "commonness" of the practice is hardly the point of this thread
>> so
>> > it baffles me why you'd want to start arguing about it, but there is
>> a
>> > specific distributionManagement section in the release profiles of
>> > Apaches', Codehaus' parent poms and in the parent pom I linked to so
>> I
>> > offered a tried and widely used solution to the questioner. There's
>> > nothing difficult for users in it.
>> >
>> > Kalle
>> >
>> >
>> > On Tue, Dec 7, 2010 at 9:49 PM, Anders Hammar <an...@hammar.net>
>> wrote:
>> > > Commonly used practice? Really? I don't think so. Are the users
>> supposed
>> > to
>> > > enable different snapshot repos depending on what "type" of
>> snapshot
>> > > artifacts the want to use? Seems very complicated and error prone
>> to me
>> > and
>> > > simply just to difficult for the users to get right.
>> > >
>> > > /Anders
>> > >
>> > > On Tue, Dec 7, 2010 at 19:10, Kalle Korhonen
>> <kalle.o.korhonen@gmail.com
>> > >wrote:
>> > >
>> > >> Of course, developers never need to run "deploy" goal in the
> first
>> > >> place. Anyhow, it's a commonly used practice to deploy to
>> different
>> > >> locations. Create a release profile and override the
>> > >> distributionManagement section as needed, for example see
>> > >> http://svn.codehaus.org/tynamo/trunk/tynamo-parent/pom.xml.
>> > >>
>> > >> Kalle
>> > >>
>> > >>
>> > >> On Tue, Dec 7, 2010 at 10:00 AM, KARR, DAVID (ATTSI)
>> <dk...@att.com>
>> > >> wrote:
>> > >> > I'm working on strategies to convert a large and complex Ant
>> build
>> > >> > system to use Maven.
>> > >> >
>> > >> > I'm assuming that developers who are working on individual
>> modules
>> > will
>> > >> > do a build that pulls the artifacts of other modules (that
>> they're not
>> > >> > working on) from the Nexus repository we have running on an
>> intranet
>> > >> > server. These will be both release artifacts and snapshot
>> artifacts.
>> > >> >
>> > >> > I also assume that incremental builds performed by the release
>> > >> > management team will publish snapshot artifacts to the Nexus
>> > repository,
>> > >> > but builds performed by developers will not publish to the
> Nexus
>> > >> > repository.
>> > >> >
>> > >> > Is this reasonable? If so, what mechanisms do I have to have
> in
>> place
>> > >> > to make release management builds publish artifacts to Nexus,
>> but not
>> > >> > developer builds?
>> > >> >
>> > >> >
> ----------------------------------------------------------------
>> -----
>> > >> > 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: How to have release management incremental (or release) builds publish to Nexus, but not user builds?

Posted by "KARR, DAVID (ATTSI)" <dk...@att.com>.
> -----Original Message-----
> From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On
> Behalf Of Anders Hammar
> Sent: Tuesday, December 07, 2010 11:54 PM
> To: Maven Users List
> Subject: Re: How to have release management incremental (or release)
> builds publish to Nexus, but not user builds?
> 
> I'm arguing as I think you're sending the questioner off into the
> wilderness
> by suggesting something you call "common practice, which I do not see
> as
> common practice. I'm just trying to stop someone not being a Maven
> expert
> from going down a difficult path where he/she would run into all kinds
> of
> strange behavior.

Anders, thank you for protecting my interests. :)

However, I'm much more interested in solving the problem I had with my
"releaseIncremental" profile that I reported in this chain yesterday.

> I've checked both the apache parent and the codehaus parent I can't
> find
> what you're talking about.
> http://repo2.maven.org/maven2/org/apache/apache/8/apache-8.pom
> http://repo2.maven.org/maven2/org/codehaus/codehaus-parent/3/codehaus-
> parent-3.pom
> 
> /Anders
> 
> On Wed, Dec 8, 2010 at 08:45, Kalle Korhonen
> <ka...@gmail.com>wrote:
> 
> > The "commonness" of the practice is hardly the point of this thread
> so
> > it baffles me why you'd want to start arguing about it, but there is
> a
> > specific distributionManagement section in the release profiles of
> > Apaches', Codehaus' parent poms and in the parent pom I linked to so
> I
> > offered a tried and widely used solution to the questioner. There's
> > nothing difficult for users in it.
> >
> > Kalle
> >
> >
> > On Tue, Dec 7, 2010 at 9:49 PM, Anders Hammar <an...@hammar.net>
> wrote:
> > > Commonly used practice? Really? I don't think so. Are the users
> supposed
> > to
> > > enable different snapshot repos depending on what "type" of
> snapshot
> > > artifacts the want to use? Seems very complicated and error prone
> to me
> > and
> > > simply just to difficult for the users to get right.
> > >
> > > /Anders
> > >
> > > On Tue, Dec 7, 2010 at 19:10, Kalle Korhonen
> <kalle.o.korhonen@gmail.com
> > >wrote:
> > >
> > >> Of course, developers never need to run "deploy" goal in the
first
> > >> place. Anyhow, it's a commonly used practice to deploy to
> different
> > >> locations. Create a release profile and override the
> > >> distributionManagement section as needed, for example see
> > >> http://svn.codehaus.org/tynamo/trunk/tynamo-parent/pom.xml.
> > >>
> > >> Kalle
> > >>
> > >>
> > >> On Tue, Dec 7, 2010 at 10:00 AM, KARR, DAVID (ATTSI)
> <dk...@att.com>
> > >> wrote:
> > >> > I'm working on strategies to convert a large and complex Ant
> build
> > >> > system to use Maven.
> > >> >
> > >> > I'm assuming that developers who are working on individual
> modules
> > will
> > >> > do a build that pulls the artifacts of other modules (that
> they're not
> > >> > working on) from the Nexus repository we have running on an
> intranet
> > >> > server.  These will be both release artifacts and snapshot
> artifacts.
> > >> >
> > >> > I also assume that incremental builds performed by the release
> > >> > management team will publish snapshot artifacts to the Nexus
> > repository,
> > >> > but builds performed by developers will not publish to the
Nexus
> > >> > repository.
> > >> >
> > >> > Is this reasonable?  If so, what mechanisms do I have to have
in
> place
> > >> > to make release management builds publish artifacts to Nexus,
> but not
> > >> > developer builds?
> > >> >
> > >> >
----------------------------------------------------------------
> -----
> > >> > 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: How to have release management incremental (or release) builds publish to Nexus, but not user builds?

Posted by Anders Hammar <an...@hammar.net>.
I'm arguing as I think you're sending the questioner off into the wilderness
by suggesting something you call "common practice, which I do not see as
common practice. I'm just trying to stop someone not being a Maven expert
from going down a difficult path where he/she would run into all kinds of
strange behavior.

I've checked both the apache parent and the codehaus parent I can't find
what you're talking about.
http://repo2.maven.org/maven2/org/apache/apache/8/apache-8.pom
http://repo2.maven.org/maven2/org/codehaus/codehaus-parent/3/codehaus-parent-3.pom

/Anders

On Wed, Dec 8, 2010 at 08:45, Kalle Korhonen <ka...@gmail.com>wrote:

> The "commonness" of the practice is hardly the point of this thread so
> it baffles me why you'd want to start arguing about it, but there is a
> specific distributionManagement section in the release profiles of
> Apaches', Codehaus' parent poms and in the parent pom I linked to so I
> offered a tried and widely used solution to the questioner. There's
> nothing difficult for users in it.
>
> Kalle
>
>
> On Tue, Dec 7, 2010 at 9:49 PM, Anders Hammar <an...@hammar.net> wrote:
> > Commonly used practice? Really? I don't think so. Are the users supposed
> to
> > enable different snapshot repos depending on what "type" of snapshot
> > artifacts the want to use? Seems very complicated and error prone to me
> and
> > simply just to difficult for the users to get right.
> >
> > /Anders
> >
> > On Tue, Dec 7, 2010 at 19:10, Kalle Korhonen <kalle.o.korhonen@gmail.com
> >wrote:
> >
> >> Of course, developers never need to run "deploy" goal in the first
> >> place. Anyhow, it's a commonly used practice to deploy to different
> >> locations. Create a release profile and override the
> >> distributionManagement section as needed, for example see
> >> http://svn.codehaus.org/tynamo/trunk/tynamo-parent/pom.xml.
> >>
> >> Kalle
> >>
> >>
> >> On Tue, Dec 7, 2010 at 10:00 AM, KARR, DAVID (ATTSI) <dk...@att.com>
> >> wrote:
> >> > I'm working on strategies to convert a large and complex Ant build
> >> > system to use Maven.
> >> >
> >> > I'm assuming that developers who are working on individual modules
> will
> >> > do a build that pulls the artifacts of other modules (that they're not
> >> > working on) from the Nexus repository we have running on an intranet
> >> > server.  These will be both release artifacts and snapshot artifacts.
> >> >
> >> > I also assume that incremental builds performed by the release
> >> > management team will publish snapshot artifacts to the Nexus
> repository,
> >> > but builds performed by developers will not publish to the Nexus
> >> > repository.
> >> >
> >> > Is this reasonable?  If so, what mechanisms do I have to have in place
> >> > to make release management builds publish artifacts to Nexus, but not
> >> > developer builds?
> >> >
> >> > ---------------------------------------------------------------------
> >> > 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: How to have release management incremental (or release) builds publish to Nexus, but not user builds?

Posted by Kalle Korhonen <ka...@gmail.com>.
The "commonness" of the practice is hardly the point of this thread so
it baffles me why you'd want to start arguing about it, but there is a
specific distributionManagement section in the release profiles of
Apaches', Codehaus' parent poms and in the parent pom I linked to so I
offered a tried and widely used solution to the questioner. There's
nothing difficult for users in it.

Kalle


On Tue, Dec 7, 2010 at 9:49 PM, Anders Hammar <an...@hammar.net> wrote:
> Commonly used practice? Really? I don't think so. Are the users supposed to
> enable different snapshot repos depending on what "type" of snapshot
> artifacts the want to use? Seems very complicated and error prone to me and
> simply just to difficult for the users to get right.
>
> /Anders
>
> On Tue, Dec 7, 2010 at 19:10, Kalle Korhonen <ka...@gmail.com>wrote:
>
>> Of course, developers never need to run "deploy" goal in the first
>> place. Anyhow, it's a commonly used practice to deploy to different
>> locations. Create a release profile and override the
>> distributionManagement section as needed, for example see
>> http://svn.codehaus.org/tynamo/trunk/tynamo-parent/pom.xml.
>>
>> Kalle
>>
>>
>> On Tue, Dec 7, 2010 at 10:00 AM, KARR, DAVID (ATTSI) <dk...@att.com>
>> wrote:
>> > I'm working on strategies to convert a large and complex Ant build
>> > system to use Maven.
>> >
>> > I'm assuming that developers who are working on individual modules will
>> > do a build that pulls the artifacts of other modules (that they're not
>> > working on) from the Nexus repository we have running on an intranet
>> > server.  These will be both release artifacts and snapshot artifacts.
>> >
>> > I also assume that incremental builds performed by the release
>> > management team will publish snapshot artifacts to the Nexus repository,
>> > but builds performed by developers will not publish to the Nexus
>> > repository.
>> >
>> > Is this reasonable?  If so, what mechanisms do I have to have in place
>> > to make release management builds publish artifacts to Nexus, but not
>> > developer builds?
>> >
>> > ---------------------------------------------------------------------
>> > 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: How to have release management incremental (or release) builds publish to Nexus, but not user builds?

Posted by Anders Hammar <an...@hammar.net>.
Commonly used practice? Really? I don't think so. Are the users supposed to
enable different snapshot repos depending on what "type" of snapshot
artifacts the want to use? Seems very complicated and error prone to me and
simply just to difficult for the users to get right.

/Anders

On Tue, Dec 7, 2010 at 19:10, Kalle Korhonen <ka...@gmail.com>wrote:

> Of course, developers never need to run "deploy" goal in the first
> place. Anyhow, it's a commonly used practice to deploy to different
> locations. Create a release profile and override the
> distributionManagement section as needed, for example see
> http://svn.codehaus.org/tynamo/trunk/tynamo-parent/pom.xml.
>
> Kalle
>
>
> On Tue, Dec 7, 2010 at 10:00 AM, KARR, DAVID (ATTSI) <dk...@att.com>
> wrote:
> > I'm working on strategies to convert a large and complex Ant build
> > system to use Maven.
> >
> > I'm assuming that developers who are working on individual modules will
> > do a build that pulls the artifacts of other modules (that they're not
> > working on) from the Nexus repository we have running on an intranet
> > server.  These will be both release artifacts and snapshot artifacts.
> >
> > I also assume that incremental builds performed by the release
> > management team will publish snapshot artifacts to the Nexus repository,
> > but builds performed by developers will not publish to the Nexus
> > repository.
> >
> > Is this reasonable?  If so, what mechanisms do I have to have in place
> > to make release management builds publish artifacts to Nexus, but not
> > developer builds?
> >
> > ---------------------------------------------------------------------
> > 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: How to have release management incremental (or release) builds publish to Nexus, but not user builds?

Posted by "KARR, DAVID (ATTSI)" <dk...@att.com>.
> -----Original Message-----
> From: Kalle Korhonen [mailto:kalle.o.korhonen@gmail.com]
> Sent: Tuesday, December 07, 2010 10:11 AM
> To: Maven Users List
> Subject: Re: How to have release management incremental (or release)
> builds publish to Nexus, but not user builds?
> 
> Of course, developers never need to run "deploy" goal in the first
> place. Anyhow, it's a commonly used practice to deploy to different
> locations. Create a release profile and override the
> distributionManagement section as needed, for example see
> http://svn.codehaus.org/tynamo/trunk/tynamo-parent/pom.xml.

Ok, so when the release team runs an incremental build (not a release yet), they'll do something like this:

    mvn -P releaseIncremental deploy

Where "releaseIncremental" is the profile I defined with a "distributionManagement" element?

I tried this, but it's complaining thusly (changed project name):

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy (default-deploy) on project myproject: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter -> [Help 1]

This is the profile I added (changed hostname):

    <profile>
      <id>releaseIncremental</id>
      <distributionManagement>
        <snapshotRepository>
          <id>nexus</id>
          <url>http://myhost:8081/nexus/content/groups/public</url>
        </snapshotRepository>
      </distributionManagement>
      <repositories>
        <repository>
          <id>central</id>
          <url>http://central</url>
          <releases><enabled>true</enabled></releases>
          <snapshots><enabled>true</enabled></snapshots>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <id>central</id>
          <url>http://central</url>
          <releases><enabled>true</enabled></releases>
          <snapshots><enabled>true</enabled></snapshots>
        </pluginRepository>
      </pluginRepositories>
    </profile>

I tried a simple-minded fix and added the following before the "snapshotRepository" element, but it gave the same error:

        <repository>
          <id>nexus</id>
          <url>http://myhost:8081/nexus/content/groups/public</url>
        </repository>

> On Tue, Dec 7, 2010 at 10:00 AM, KARR, DAVID (ATTSI) <dk...@att.com>
> wrote:
> > I'm working on strategies to convert a large and complex Ant build
> > system to use Maven.
> >
> > I'm assuming that developers who are working on individual modules
> will
> > do a build that pulls the artifacts of other modules (that they're
> not
> > working on) from the Nexus repository we have running on an intranet
> > server.  These will be both release artifacts and snapshot artifacts.
> >
> > I also assume that incremental builds performed by the release
> > management team will publish snapshot artifacts to the Nexus
> repository,
> > but builds performed by developers will not publish to the Nexus
> > repository.
> >
> > Is this reasonable?  If so, what mechanisms do I have to have in
> place
> > to make release management builds publish artifacts to Nexus, but not
> > developer builds?
> >
> > ---------------------------------------------------------------------
> > 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: How to have release management incremental (or release) builds publish to Nexus, but not user builds?

Posted by Kalle Korhonen <ka...@gmail.com>.
Of course, developers never need to run "deploy" goal in the first
place. Anyhow, it's a commonly used practice to deploy to different
locations. Create a release profile and override the
distributionManagement section as needed, for example see
http://svn.codehaus.org/tynamo/trunk/tynamo-parent/pom.xml.

Kalle


On Tue, Dec 7, 2010 at 10:00 AM, KARR, DAVID (ATTSI) <dk...@att.com> wrote:
> I'm working on strategies to convert a large and complex Ant build
> system to use Maven.
>
> I'm assuming that developers who are working on individual modules will
> do a build that pulls the artifacts of other modules (that they're not
> working on) from the Nexus repository we have running on an intranet
> server.  These will be both release artifacts and snapshot artifacts.
>
> I also assume that incremental builds performed by the release
> management team will publish snapshot artifacts to the Nexus repository,
> but builds performed by developers will not publish to the Nexus
> repository.
>
> Is this reasonable?  If so, what mechanisms do I have to have in place
> to make release management builds publish artifacts to Nexus, but not
> developer builds?
>
> ---------------------------------------------------------------------
> 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: How to have release management incremental (or release) builds publish to Nexus, but not user builds?

Posted by Ron Wheeler <rw...@artifact-software.com>.
On 07/12/2010 1:00 PM, KARR, DAVID (ATTSI) wrote:
> I'm working on strategies to convert a large and complex Ant build
> system to use Maven.
>
> I'm assuming that developers who are working on individual modules will
> do a build that pulls the artifacts of other modules (that they're not
> working on) from the Nexus repository we have running on an intranet
> server.  These will be both release artifacts and snapshot artifacts.
Sounds good
> I also assume that incremental builds performed by the release
> management team will publish snapshot artifacts to the Nexus repository,
> but builds performed by developers will not publish to the Nexus
> repository.
>
This assumes that your release managers can get SNAPSHOTs released in 
time to keep developers working together properly.
I would be tempted to allow developers to release snapshots so that 
testing moves at a decent pace.
In our small team, SNAPSHOTs get released once or twice a day while 2 
people are working on getting new functionality in place.
At the beginning of the development cycle, SNAPSHOTS include mock 
functions and stubs for utilities or web services that the user 
interface guys need to support their building and testing. These 
SNAPSHOTs get updated very quickly as the two development groups rapidly 
add functionality and require more functionality from the other group to 
move forward.
> Is this reasonable?  If so, what mechanisms do I have to have in place
> to make release management builds publish artifacts to Nexus, but not
> developer builds?
>
Nexus has access controls with passwords.

> ---------------------------------------------------------------------
> 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