This week's book giveaway is in the Testing forum. We're giving away four copies of Practical Unit Testing with TestNG and Mockito and have Tomek Kaczanowski on-line! See this thread for details.
Is it possible to pass in command line arguments to Maven?
In my build process, I call my goal overnightBuild which performs the entire process. I want to change the process that you can pass in an argument that specifies which branch the build is to be run off. So is it possible to pass in something like "maven overnightBuild betaBranch" or an equivalent? Looking at their documentation and don't see anything about it or anything similar...
Jon Strayer
Ranch Hand
Joined: Dec 04, 2002
Posts: 133
posted
0
Originally posted by Paul Connolly: Is it possible to pass in command line arguments to Maven?
In my build process, I call my goal overnightBuild which performs the entire process. I want to change the process that you can pass in an argument that specifies which branch the build is to be run off. So is it possible to pass in something like "maven overnightBuild betaBranch" or an equivalent? Looking at their documentation and don't see anything about it or anything similar...
You would have to do some work on overnightBuild to have it use some property (for example buildBranch) and then call it like this: