Re: Maven POM file question
Have you taken a look at the Maven Release Plugin? It seems to do exactly what you want. In short: 1) Update the version in your pom to a stable version 2) Check in updated pom(s). 3) Label/tag the SCM with your current revision 4) Change the version in your pom to the next unstable version 5) Check in Voila, stable label and ready for next release. Hth, Nick Stolwijk ~~~ Try to leave this world a little better than you found it and, when your turn comes to die, you can die happy in feeling that at any rate you have not wasted your time but have done your best ~~~ Lord Baden-Powell On Tue, Feb 12, 2013 at 8:59 PM, Ron Wheeler wrote: > How are you using SNAPSHOTs and releases? > How do they relate to versions in the SCM? > > Is your problem only around releases? > > Why do you not have a stable release number? > Can you not do tagging in your SCM to identify the SCM version of the > release? > > There seems to be something missing from your explanation. > Your audit and traceability requirements seem to be pretty normal and > usually maven follows a pretty acceptable set of practices. > > Maybe you should share a few more of the factors that makes your situation > so unusual. > > Ron > > > > On 12/02/2013 12:21 PM, Patrick Haggerty wrote: > >> Just wondering if it can be done. Are locked into using only "pom.xml"? >> Let's say I make a label on my application and I build that application >> based on that label. >> I still need to modify the POM file to set the version. I do not want to >> change files that have been labeled. Is my understanding wrong? >> >> >> On Tue, Feb 12, 2013 at 12:15 PM, Wayne Fay wrote: >> >> How can I use a different name like "pom.company.xml" instead of >>> "pom.xml"? >>> >>> For all intents and purposes, you cannot. Why do you want to do this? >>> >>> Wayne >>> >>> --**--** >>> - >>> To unsubscribe, e-mail: >>> users-unsubscribe@maven.**apache.org >>> For additional commands, e-mail: users-h...@maven.apache.org >>> >>> >>> >> > > -- > Ron Wheeler > President > Artifact Software Inc > email: rwhee...@artifact-software.com > skype: ronaldmwheeler > phone: 866-970-2435, ext 102 > > > > --**--**- > To unsubscribe, e-mail: > users-unsubscribe@maven.**apache.org > For additional commands, e-mail: users-h...@maven.apache.org > >
Re: Maven POM file question
How are you using SNAPSHOTs and releases? How do they relate to versions in the SCM? Is your problem only around releases? Why do you not have a stable release number? Can you not do tagging in your SCM to identify the SCM version of the release? There seems to be something missing from your explanation. Your audit and traceability requirements seem to be pretty normal and usually maven follows a pretty acceptable set of practices. Maybe you should share a few more of the factors that makes your situation so unusual. Ron On 12/02/2013 12:21 PM, Patrick Haggerty wrote: Just wondering if it can be done. Are locked into using only "pom.xml"? Let's say I make a label on my application and I build that application based on that label. I still need to modify the POM file to set the version. I do not want to change files that have been labeled. Is my understanding wrong? On Tue, Feb 12, 2013 at 12:15 PM, Wayne Fay wrote: How can I use a different name like "pom.company.xml" instead of "pom.xml"? For all intents and purposes, you cannot. Why do you want to do this? Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org -- Ron Wheeler President Artifact Software Inc email: rwhee...@artifact-software.com skype: ronaldmwheeler phone: 866-970-2435, ext 102 - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven POM file question
> > How can I use a different name like "pom.company.xml" instead of > > "pom.xml"? > > Did you try the -f flag? > >mvn -f pom.company.xml ... > That will not work with other Maven related tools such as m2e though. /Anders > > Run "man mvn" for more details. > > HTH, > Curtis > > > On Tue, Feb 12, 2013 at 11:12 AM, Patrick Haggerty >wrote: > > > How can I use a different name like "pom.company.xml" instead of > "pom.xml"? > > -- > > > > Patrick D. Haggerty > > >
Re: Maven POM file question
Hi Patrick, > Would like to see the build version passed as a parameter so the pom > file does not get changed during the build. Definitely. You can use buildnumber-maven-plugin [1, 2] to embed your SCM revision in the JAR. For an actual build number, you can pass it as a parameter from your CIS (e.g., Jenkins uses ${BUILD_NUMBER}). -Curtis [1] http://mojo.codehaus.org/buildnumber-maven-plugin/ [2] Sample configuration: https://github.com/scijava/scijava-common/blob/a7f2089ccd3f1451b75bd0170b16d399aa73cb9c/pom-scijava/pom.xml. Search for "buildnumber" for all the important bits. On Tue, Feb 12, 2013 at 12:01 PM, Patrick Haggerty wrote: > Here are the steps in my proccess: > > Edit code, > Local build and test, > Check code in, > Apply Label to all files in my application, > Request Build based on label using Corporate Build system. (It gets code > based on the label and builds it, packages it and deploys it to Nexus then > to the Target App WAS servers. > > > During this process the pom file gets changed to satisfy the build #. > Now the POM files is different from the one that has been labeled. > Audit does not like the fact that the pom file changes during the build. > Would like to see the build version passed as a parameter so the pom file > does not get changed during the build. > > Thanks, > > PDH > > > On Tue, Feb 12, 2013 at 12:36 PM, Wayne Fay wrote: > > > > Let's say I make a label on my application and I build that application > > > based on that label. > > > > What does "make a label on my application" mean? Are you talking about > > tagging a build in source code? > > > > > I still need to modify the POM file to set the version. I do not want > to > > > change files that have been labeled. Is my understanding wrong? > > > > You need to describe things more completely if you want a better > > answer from this list. > > > > Wayne > > > > - > > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > > For additional commands, e-mail: users-h...@maven.apache.org > > > > > > > -- > > Patrick D. Haggerty >
Re: Maven POM file question
Here are the steps in my proccess: Edit code, Local build and test, Check code in, Apply Label to all files in my application, Request Build based on label using Corporate Build system. (It gets code based on the label and builds it, packages it and deploys it to Nexus then to the Target App WAS servers. During this process the pom file gets changed to satisfy the build #. Now the POM files is different from the one that has been labeled. Audit does not like the fact that the pom file changes during the build. Would like to see the build version passed as a parameter so the pom file does not get changed during the build. Thanks, PDH On Tue, Feb 12, 2013 at 12:36 PM, Wayne Fay wrote: > > Let's say I make a label on my application and I build that application > > based on that label. > > What does "make a label on my application" mean? Are you talking about > tagging a build in source code? > > > I still need to modify the POM file to set the version. I do not want to > > change files that have been labeled. Is my understanding wrong? > > You need to describe things more completely if you want a better > answer from this list. > > Wayne > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > -- Patrick D. Haggerty
Re: Maven POM file question
Hi Patrick, > How can I use a different name like "pom.company.xml" instead of > "pom.xml"? Did you try the -f flag? mvn -f pom.company.xml ... Run "man mvn" for more details. HTH, Curtis On Tue, Feb 12, 2013 at 11:12 AM, Patrick Haggerty wrote: > How can I use a different name like "pom.company.xml" instead of "pom.xml"? > -- > > Patrick D. Haggerty >
Re: Maven POM file question
> Let's say I make a label on my application and I build that application > based on that label. What does "make a label on my application" mean? Are you talking about tagging a build in source code? > I still need to modify the POM file to set the version. I do not want to > change files that have been labeled. Is my understanding wrong? You need to describe things more completely if you want a better answer from this list. Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Maven POM file question
Just wondering if it can be done. Are locked into using only "pom.xml"? Let's say I make a label on my application and I build that application based on that label. I still need to modify the POM file to set the version. I do not want to change files that have been labeled. Is my understanding wrong? On Tue, Feb 12, 2013 at 12:15 PM, Wayne Fay wrote: > > How can I use a different name like "pom.company.xml" instead of > "pom.xml"? > > For all intents and purposes, you cannot. Why do you want to do this? > > Wayne > > - > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org > For additional commands, e-mail: users-h...@maven.apache.org > > -- Patrick D. Haggerty
Re: Maven POM file question
> How can I use a different name like "pom.company.xml" instead of "pom.xml"? For all intents and purposes, you cannot. Why do you want to do this? Wayne - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org