xp-forge/build-core — pull request #9 by ohinckel (2012-08-31 11:59:57+00:00)
Title: Only use integration/release artifacts in integration builds

Usually you want to do integration builds to tests the a module against other modules. This way you'll get feedback as soon as your module does not work properly with another module.

Artifact resolving
============
The build system currently resolves the artifacts using the following resolver chain:
* snapshots
* milestones
* releases

The means the newest version of an artifact found in this chain will be used. This is OK and works well, since we always increase the version numbers when releasing modules.

Working with milestones
==================
But it does not work well when using milestone releases and the artifacts. For example we have a module which is released in version `1.0.0` and which has the version set to `1.1.0-SNAPSHOT`. While developing on this module there's a point we want to release the first release candidate. So we build a milestone release with version `1.1.0-RC1`.

At this point we're also working on another module which depends on the module mentioned above. When doing an integration build, the version `1.1.0-RC1` will be downloaded, since the milestone release has precedence before a snapshot release!

The problem
=========
The precedence is not a problem until we also want to develop something again in the other module and want to test the integration for the other module depending on this. Since the milestone release has precedence, the build system always use the milestone release (`1.1.0-RC1`) instead of the newer snapshot release (`1.1.0-SNAPSHOT`), and our integration will fail, because the old milestone release does not contain the recent changes.

The workaround is to create a new milestone release (e.g. `1.1.0-RC2`) whenever the depending module is changed. But this we actually should use the newer snapshot release instead of the milestone release.

Solution
======
There are two options how to solve this resolving issue:
* for integration builds only use snapshot releases and just ignore the milestone releases (this is was this pull request includes)
* find a way to tell Ivy to check also the modification date for snapshot release and prefer these before older milestone releases