Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I've updated my problem description to mention my preference for declaring non-snapshot dependencies in my poms (at least for the release versions), in order to get consistent results (across my laptop, the hudson server, and other people's checkouts) - I really want other people to be able to check out my code and get going with zero mucking about looking for unknowable snapshot dependencies.</p> <p>It was wanting to use non-snapshot versions in my dependencies that led to this question- Hudson's normal behaviour didn't make using 'release' versions easy, at least without waiting for the release version of the dependency to cycle thru to maven central.</p> <p>However, I've decided that if I want to be true to my underlying requirement - that people can easily checkout and build my code - then that is what I have to do: i.e. wait for maven central to sync up.</p> <p>I only want to hold myself to this for release builds (otherwise I'd never get anything <em>done</em>!), and so will happily develop using snapshot deps - up until the point where I actually <strong>do</strong> want to make a version release, at which point I want all the deps to be properly available in maven central.</p> <p>I wasn't aware of any way to enforce this until recently, but a bit more googling found me the 'enforcer' plugin:</p> <p><a href="http://maven.apache.org/enforcer/enforcer-rules/requireReleaseDeps.html" rel="nofollow">http://maven.apache.org/enforcer/enforcer-rules/requireReleaseDeps.html</a></p> <p>-with the 'onlyWhenRelease' flag set to true, it looks like it should perfectly enforce what I want to do.</p> <p>In answer to my original headline question then ('How can I make Hudson automatically build &amp; install release artifacts, rather than just snapshots?'), my answer is:</p> <ol> <li>There appears to be no completely trivial way of making Hudson do this (without the side-effect of Hudson also attempting to do a 'release' with every checkin it detects, which can require additional 'profile' configuration to stop the actual normal actions of a release, eg GPG signing)</li> <li>Don't do that.</li> </ol>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload