Create and deploy a maven site for the most recent SNAPSHOT?
For the longest time I used the default site I specified in the distributionManagement
section of my POM to host the latest SNAPSHOT release's site. However now that I have my first version开发者_开发问答 out the door, I can't use that anymore as its holding the release site.
I've gone ahead and setup a new place to store the site SNAPSHOT release, but I can't figure out how to automate the site plugin deploying there. mvn site:deploy
and even mvn site:stage-deploy
simply deploys to specified release site in distributionManagement
, which isn't what I want. It seems the only way is to provide the URL over command line arguments, which isn't exactly an ideal situation.
Is there any way to specify a release repository and a SNAPSHOT repository for sites?
You can setup a profile for your SNAPSHOT builds that publishes to another location. Profiles let you alter numerous pom settings including distributionManagement and repositories. You would still need a way to tell maven to use the profile. There are several options to do that, some of which are automatic, and the best way is going to be dependent on your build process.
精彩评论