maven-plugins/release/plugin.jelly
2003-02-02 16:43:27 +00:00

103 lines
3.3 KiB
XML

<?xml version="1.0"?>
<project
xmlns:j="jelly:core"
xmlns:maven="jelly:maven"
xmlns:define="jelly:define"
xmlns:deploy="deploy"
xmlns:util="jelly:util"
xmlns:log="jelly:log"
xmlns:m="maven">
<!-- ================================================================== -->
<!-- R E L E A S E T A G L I B R A R Y -->
<!-- ================================================================== -->
<!--
| Process for a release:
|
| o tagging cvs
| o building source distribution
| o building binary distribution
| o notifying lists - we need a mailtag that can deal with authorization.
| my smtp for example will not let me poke it without a password.
| o pushing out RSS feeds maybe to javablogs?
| o updating the <version/> element in the POM
| o updating changes document
| o updating the status page
| o flipping the site from HEAD to release and deploy the site
| o all SNAPSHOT references must be changed to timestamped versions
| o incrementing the version - what rules do we want to follow? they
| have to be documented so we need a document to adhere to.
| o Deploying the POM for the released version so there is always history on
| what went into a specific version. Eventually it would also be nice to
| trace back through the POMs so you could build any version of any
| project from sources at any point in time.
| Q: so how do we find the latest timestamped version.
| A: when a snapshot is deployed we need a file with the real version
| of the latest snapshot.
-->
<!--
|
| Convert SNAPSHOT version identifiers to real snapshot versions.
| You cannot leave SNAPSHOT version identifiers in the POM for a
| release.
|
-->
<goal name="convert-snapshots">
<j:useBean var="snapshots" class="java.util.ArrayList"/>
<j:forEach var="dependency" items="${pom.dependencies}">
<j:if test="${dependency.version == 'SNAPSHOT'}">
<j:set var="dummy" value="${snapshots.add(dependency)}"/>
</j:if>
</j:forEach>
<j:if test="${size(snapshots) > 0}">
<j:forEach var="dependency" items="${snapshots}">
<get
dest="${maven.build.dir}/${dependency.artifactId}-snapshot-version"
usetimestamp="false"
ignoreerrors="true"
src="http://www.ibiblio.org/${dependency.groupId}/jars/${dependency.artifactId}-snapshot-version"
/>
</j:forEach>
</j:if>
</goal>
<!--
|
| Validate the POM for a release. This consists of:
|
| 1) Making sure all SNAPSHOT version identifiers are converted.
|
-->
<goal name="validate-pom-for-release">
<j:useBean var="snapshots" class="java.util.ArrayList"/>
<j:forEach var="dependency" items="${pom.dependencies}">
<j:if test="${dependency.version == 'SNAPSHOT'}">
<j:set var="dummy" value="${snapshots.add(dependency)}"/>
</j:if>
</j:forEach>
<j:if test="${size(snapshots) > 0}">
<echo/>
<echo>The following dependencies have SNAPSHOT identifiers:</echo>
<echo/>
<j:forEach var="dependency" items="${snapshots}">
<echo>${dependency.artifactId}</echo>
</j:forEach>
<fail message="">
</fail>
</j:if>
</goal>
</project>