You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Baz <ba...@gmail.com> on 2007/07/26 07:47:13 UTC

How can i build a specific version without changing the pom.xml?

All,

How can i build a specific version or depend on specific version without
changing the pom.xml?

For example, if pom.xml of product A is building version 1.0 of product A
and depending on version 5.6 of xyz.

Can i type something like "mvn -Dversion=0.1 -Dxyz_version=2.0 install" to
build version 0.1 of product A and depending on version 2.0 of xyz?

Thank you.

A.

Re: How can i build a specific version without changing the pom.xml?

Posted by Thorsten Heit <th...@gmx.de>.
Hi,

> I agreed with your comments. Here is the practical usage:
>
> The version under source code is building against xyz version 5.6.1.0.
> However, we need the capability to build against the non-release  
> quality of
> version xyz that comes out every day or week, say 5.6.1.1, then  
> 5.6.1.2,
> then 5.6.1.3, ...etc.

What about using snapshot releases? I.e. called 5.6.2-SNAPSHOT as  
long as you think they don't have release quality, and finally change  
the version to 5.6.2 if you think it's good enough(tm)...


Cheers

Thorsten

Re: How can i build a specific version without changing the pom.xml?

Posted by Thorsten Heit <th...@gmx.de>.
> In that case, you will need to change pom.xml everytime right?

As long as you're using snapshots: No.
You only have to change your pom.xml if you decide that the code is  
stable enough to be called a new release.


> Or, we can have profile defined in profiles.xml or settings.xml to  
> avoid
> pom.xml changes?

I absolutely recommend to not omit the project version number in your  
pom (don't know if that ever work, btw). I'd be afraid to be unable  
to verify that some piece of code I have in my IDE really belongs to  
a certain deployed release that is in use somewhere...


HTH

Thorsten

Re: How can i build a specific version without changing the pom.xml?

Posted by Baz <ba...@gmail.com>.
In that case, you will need to change pom.xml everytime right?

Or, we can have profile defined in profiles.xml or settings.xml to avoid
pom.xml changes?


On 7/27/07, John Patrick <nh...@gmail.com> wrote:
>
> Yeah I follow you more now.
>
> We similar by having a developer profile active by default using snapshot
> versions and the release and continuous profiles using non snapshot
> versions.
>
> John
> On 27/07/07, Baz <ba...@gmail.com> wrote:
> >
> > John,
> >
> > I agreed with your comments. Here is the practical usage:
> >
> > The version under source code is building against xyz version 5.6.1.0.
> > However, we need the capability to build against the non-release quality
> > of
> > version xyz that comes out every day or week, say 5.6.1.1, then 5.6.1.2,
> > then 5.6.1.3, ...etc.
> >
> > I should alter the dependency information in my pom.xml for product A
> > since
> > I really do not know which version of xyz will pass QA. Does it make
> > sense?
> >
> > Baz
> >
> >
> > On 7/26/07, John Patrick <nh...@gmail.com> wrote:
> > >
> > > Baz,
> > >
> > > I would put this type of information into a profile within the pom.
> Then
> > > its
> > > simple and repeatable. Also trackable if your project is under source
> > > control, instead of just relying on people knowing the correct command
> > > line
> > > arguments to use.
> > >
> > > Personally I think building a different version from what the pom says
> > is
> > > a
> > > very bad idea as from my experience, definitively knowing from a file
> > its
> > > artifact id and version number is a huge advantage. It can give you a
> > link
> > > into a source control tag or label and maintenance and support effect
> > can
> > > be
> > > more efficiently used.
> > >
> > > If a defect gets raised for version 0.1 how will support know its
> > actually
> > > 1.0 with version 2.0 of xyz and not version 0.1 with what ever version
> > of
> > > xyz was defined at the point.
> > >
> > > I apologise for the rant but I've been called in several times to help
> > > with
> > > issues with supporting non maven projects and finding out versions of
> > jars
> > > being used and setting up a test environment took 85% of the time with
> > the
> > > rest doing the actual fix and proving it works. Where as with a maven
> > > project, get the pom from the main jar and then sync to that tag/label
> > and
> > > your setup in minuets not hours.
> > >
> > > John
> > >
> > > On 26/07/07, Baz <ba...@gmail.com> wrote:
> > > >
> > > > All,
> > > >
> > > > How can i build a specific version or depend on specific version
> > without
> > > > changing the pom.xml ?
> > > >
> > > > For example, if pom.xml of product A is building version 1.0 of
> > product
> > > A
> > > > and depending on version 5.6 of xyz.
> > > >
> > > > Can i type something like "mvn -Dversion=0.1 -Dxyz_version=
> 2.0install"
> > > to
> > > > build version 0.1 of product A and depending on version 2.0 of xyz?
> > > >
> > > > Thank you.
> > > >
> > > > A.
> > > >
> > >
> > >
> > >
> > > On 26/07/07, Baz <ba...@gmail.com> wrote:
> > > >
> > > > All,
> > > >
> > > > How can i build a specific version or depend on specific version
> > without
> > > > changing the pom.xml ?
> > > >
> > > > For example, if pom.xml of product A is building version 1.0 of
> > product
> > > A
> > > > and depending on version 5.6 of xyz.
> > > >
> > > > Can i type something like "mvn -Dversion=0.1 -Dxyz_version=
> 2.0install"
> > > to
> > > > build version 0.1 of product A and depending on version 2.0 of xyz?
> > > >
> > > > Thank you.
> > > >
> > > > A.
> > > >
> > >
> >
>

Re: How can i build a specific version without changing the pom.xml?

Posted by John Patrick <nh...@gmail.com>.
Yeah I follow you more now.

We similar by having a developer profile active by default using snapshot
versions and the release and continuous profiles using non snapshot
versions.

John
On 27/07/07, Baz <ba...@gmail.com> wrote:
>
> John,
>
> I agreed with your comments. Here is the practical usage:
>
> The version under source code is building against xyz version 5.6.1.0.
> However, we need the capability to build against the non-release quality
> of
> version xyz that comes out every day or week, say 5.6.1.1, then 5.6.1.2,
> then 5.6.1.3, ...etc.
>
> I should alter the dependency information in my pom.xml for product A
> since
> I really do not know which version of xyz will pass QA. Does it make
> sense?
>
> Baz
>
>
> On 7/26/07, John Patrick <nh...@gmail.com> wrote:
> >
> > Baz,
> >
> > I would put this type of information into a profile within the pom. Then
> > its
> > simple and repeatable. Also trackable if your project is under source
> > control, instead of just relying on people knowing the correct command
> > line
> > arguments to use.
> >
> > Personally I think building a different version from what the pom says
> is
> > a
> > very bad idea as from my experience, definitively knowing from a file
> its
> > artifact id and version number is a huge advantage. It can give you a
> link
> > into a source control tag or label and maintenance and support effect
> can
> > be
> > more efficiently used.
> >
> > If a defect gets raised for version 0.1 how will support know its
> actually
> > 1.0 with version 2.0 of xyz and not version 0.1 with what ever version
> of
> > xyz was defined at the point.
> >
> > I apologise for the rant but I've been called in several times to help
> > with
> > issues with supporting non maven projects and finding out versions of
> jars
> > being used and setting up a test environment took 85% of the time with
> the
> > rest doing the actual fix and proving it works. Where as with a maven
> > project, get the pom from the main jar and then sync to that tag/label
> and
> > your setup in minuets not hours.
> >
> > John
> >
> > On 26/07/07, Baz <ba...@gmail.com> wrote:
> > >
> > > All,
> > >
> > > How can i build a specific version or depend on specific version
> without
> > > changing the pom.xml ?
> > >
> > > For example, if pom.xml of product A is building version 1.0 of
> product
> > A
> > > and depending on version 5.6 of xyz.
> > >
> > > Can i type something like "mvn -Dversion=0.1 -Dxyz_version=2.0install"
> > to
> > > build version 0.1 of product A and depending on version 2.0 of xyz?
> > >
> > > Thank you.
> > >
> > > A.
> > >
> >
> >
> >
> > On 26/07/07, Baz <ba...@gmail.com> wrote:
> > >
> > > All,
> > >
> > > How can i build a specific version or depend on specific version
> without
> > > changing the pom.xml ?
> > >
> > > For example, if pom.xml of product A is building version 1.0 of
> product
> > A
> > > and depending on version 5.6 of xyz.
> > >
> > > Can i type something like "mvn -Dversion=0.1 -Dxyz_version=2.0install"
> > to
> > > build version 0.1 of product A and depending on version 2.0 of xyz?
> > >
> > > Thank you.
> > >
> > > A.
> > >
> >
>

Re: How can i build a specific version without changing the pom.xml?

Posted by Baz <ba...@gmail.com>.
John,

I agreed with your comments. Here is the practical usage:

The version under source code is building against xyz version 5.6.1.0.
However, we need the capability to build against the non-release quality of
version xyz that comes out every day or week, say 5.6.1.1, then 5.6.1.2,
then 5.6.1.3, ...etc.

I should alter the dependency information in my pom.xml for product A since
I really do not know which version of xyz will pass QA. Does it make sense?

Baz


On 7/26/07, John Patrick <nh...@gmail.com> wrote:
>
> Baz,
>
> I would put this type of information into a profile within the pom. Then
> its
> simple and repeatable. Also trackable if your project is under source
> control, instead of just relying on people knowing the correct command
> line
> arguments to use.
>
> Personally I think building a different version from what the pom says is
> a
> very bad idea as from my experience, definitively knowing from a file its
> artifact id and version number is a huge advantage. It can give you a link
> into a source control tag or label and maintenance and support effect can
> be
> more efficiently used.
>
> If a defect gets raised for version 0.1 how will support know its actually
> 1.0 with version 2.0 of xyz and not version 0.1 with what ever version of
> xyz was defined at the point.
>
> I apologise for the rant but I've been called in several times to help
> with
> issues with supporting non maven projects and finding out versions of jars
> being used and setting up a test environment took 85% of the time with the
> rest doing the actual fix and proving it works. Where as with a maven
> project, get the pom from the main jar and then sync to that tag/label and
> your setup in minuets not hours.
>
> John
>
> On 26/07/07, Baz <ba...@gmail.com> wrote:
> >
> > All,
> >
> > How can i build a specific version or depend on specific version without
> > changing the pom.xml ?
> >
> > For example, if pom.xml of product A is building version 1.0 of product
> A
> > and depending on version 5.6 of xyz.
> >
> > Can i type something like "mvn -Dversion=0.1 -Dxyz_version=2.0 install"
> to
> > build version 0.1 of product A and depending on version 2.0 of xyz?
> >
> > Thank you.
> >
> > A.
> >
>
>
>
> On 26/07/07, Baz <ba...@gmail.com> wrote:
> >
> > All,
> >
> > How can i build a specific version or depend on specific version without
> > changing the pom.xml ?
> >
> > For example, if pom.xml of product A is building version 1.0 of product
> A
> > and depending on version 5.6 of xyz.
> >
> > Can i type something like "mvn -Dversion=0.1 -Dxyz_version=2.0 install"
> to
> > build version 0.1 of product A and depending on version 2.0 of xyz?
> >
> > Thank you.
> >
> > A.
> >
>

Re: How can i build a specific version without changing the pom.xml?

Posted by John Patrick <nh...@gmail.com>.
Baz,

I would put this type of information into a profile within the pom. Then its
simple and repeatable. Also trackable if your project is under source
control, instead of just relying on people knowing the correct command line
arguments to use.

Personally I think building a different version from what the pom says is a
very bad idea as from my experience, definitively knowing from a file its
artifact id and version number is a huge advantage. It can give you a link
into a source control tag or label and maintenance and support effect can be
more efficiently used.

If a defect gets raised for version 0.1 how will support know its actually
1.0 with version 2.0 of xyz and not version 0.1 with what ever version of
xyz was defined at the point.

I apologise for the rant but I've been called in several times to help with
issues with supporting non maven projects and finding out versions of jars
being used and setting up a test environment took 85% of the time with the
rest doing the actual fix and proving it works. Where as with a maven
project, get the pom from the main jar and then sync to that tag/label and
your setup in minuets not hours.

John

On 26/07/07, Baz <ba...@gmail.com> wrote:
>
> All,
>
> How can i build a specific version or depend on specific version without
> changing the pom.xml ?
>
> For example, if pom.xml of product A is building version 1.0 of product A
> and depending on version 5.6 of xyz.
>
> Can i type something like "mvn -Dversion=0.1 -Dxyz_version=2.0 install" to
> build version 0.1 of product A and depending on version 2.0 of xyz?
>
> Thank you.
>
> A.
>



On 26/07/07, Baz <ba...@gmail.com> wrote:
>
> All,
>
> How can i build a specific version or depend on specific version without
> changing the pom.xml ?
>
> For example, if pom.xml of product A is building version 1.0 of product A
> and depending on version 5.6 of xyz.
>
> Can i type something like "mvn -Dversion=0.1 -Dxyz_version=2.0 install" to
> build version 0.1 of product A and depending on version 2.0 of xyz?
>
> Thank you.
>
> A.
>