mvn release:prepare -Dsome-property=foo
Although this works for regular build, it will not work for a release build. This is because the release plugin forks a new instance for the release build, and properties passed to the parent are not propagated to the forked build.
To solve this problem, you need to propagate the properties yourself by configuring the argument property of the release plugin. For example:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.overstock.example</groupId>
<artifactId>helloworld</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>helloworld</name>
<url>http://maven.apache.org</url>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<arguments>-Dsome-property=${some-property}</arguments>
</configuration>
</plugin>
</plugins>
</build>
</project>
If you need to propagate more than 1 property, the arguments property allows for multiple values separated by spaces.
This really helped! Thanks alot mate
ReplyDeleteHello, I just wanted to compliment and thank you for your excellent work. As I guess, this is one of the most unique and informative sites that I visited in a couple of days. As you have great and engaging content and very well laid out and it was easy to read and understand. I also do a similar kind of content marketing practice. Please have a look and share your views.
ReplyDeleteseo india
india seo service company
Hire Data Scientists
front end web developer
Hello there! This is my first comment here, so I just wanted to give a quick shout out and say I genuinely enjoy reading your articles.
ReplyDeletevirtual assistant
freelance web developer
freelance web developer
I wish for the great of success in all of our destiny endeavors 검증업체
ReplyDeleteI intended to put you one very small word to help give thanks as
ReplyDeletebefore with the extraordinary thoughts you have shared in this case.대구오피
Excellent post however , I was wondering if you could write a litte more on this subject?
ReplyDeleteI’d be very grateful if you could elaborate a little bit further.
Thank you!
my web page; 대구오피
(jk)
When some one searches for his vital thing, thus he/she desires to be available
ReplyDeletethat in detail, so that thing is maintained over here.
click me here 바카라
LG
I got this web site from my friend who informed me regarding this website and at the moment this time I am visiting
ReplyDeletethis web page and reading very informative content here.
메이저사이트
온라인경마
I like the helpful information you supply to your articles. I'll bookmark your weblog and test again here regularly. I am fairly certain I'll be informed many new stuff proper here!
ReplyDeleteBest of luck for the following!
바카라사이트
토토사이트
Wow, amazing blog layout! How lengthy have you been running
ReplyDeletea blog for? you make running a blog glance easy. The full glance of your website is great, as neatly as the content material!
majortotositepro1
racesitepro1
oncasinositenet1
totopickpro1
Herbal Treatment: Cure Herpes Virus Permanently. A Lasting Solution..Great service... robinsonbucler @ Gmail.....com,,,,,,,,,,,,,,,,,,,,,,,,,,,
ReplyDelete