Add site publication and building a Nexus Upload Bundle
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1559344 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/default.properties b/default.properties
index 228e930..3d1f6b4 100644
--- a/default.properties
+++ b/default.properties
@@ -42,7 +42,7 @@
component.title = Core Language Utilities
# The current version number of this component
-component.version = 3.2.2-SNAPSHOT
+component.version = 3.3-SNAPSHOT
# The name that is used to create the jar file
final.name = ${component.name}-${component.version}
diff --git a/src/release-tools/build.properties.sample b/src/release-tools/build.properties.sample
index 6e99d4a..eff0e94 100644
--- a/src/release-tools/build.properties.sample
+++ b/src/release-tools/build.properties.sample
@@ -16,7 +16,10 @@
# Sample Ant build.properties file for creating RCs and releasing
##########################################################################
-# Your apache ID - it is used for the Build-By MANIFEST header, when creating the RC jars
+# Your apache ID - it is used for the Build-By MANIFEST header, when
+# creating the RC jars and when uploading the website
apache.id=luckyRM
-# directory to use when crating the release
-release.path=${user.home}/lang-rc
\ No newline at end of file
+# checkout directory for the release distribution repo
+release.path=${user.home}/lang-rc
+# SSH keyfile holding the private key
+ssh.keyfile=${user.home}/.ssh/id_rsa
diff --git a/src/release-tools/build.xml b/src/release-tools/build.xml
index 46e06a1..c45541c 100644
--- a/src/release-tools/build.xml
+++ b/src/release-tools/build.xml
@@ -30,6 +30,7 @@
<!-- provide some defaults -->
<property name="release.path" value="${user.home}/lang-rc" />
<property name="apache.id" value="dev@commons.apache.org" />
+ <property name="ssh.keyfile" value="${user.home}/.ssh/id_rsa"/>
<property name="release.url" value="https://dist.apache.org/repos/dist/dev/commons/lang" />
<macrodef name="mvn">
@@ -77,7 +78,7 @@
</target>
<target name="-populate-dist-repo"
- depends="pre-rc, -build-maven-artifacts, -prepare-dist-area">
+ depends="-build-maven-artifacts, -prepare-dist-area">
<copy todir="${release.path}/binaries">
<fileset dir="${repo.path}">
<include name="*bin.zip*" />
@@ -103,6 +104,42 @@
<mvn goal="site"/>
</target>
+ <target name="upload-site" depends="-init"
+ description="Uploads and publishes the site to the RM's apache webspace">
+ <zip destfile="target/site.zip">
+ <zipfileset dir="target/site" prefix="${final.name}"/>
+ </zip>
+
+ <input message="Please enter ssh passphrase..." addproperty="ssh.pass">
+ <handler type="secure" />
+ </input>
+
+ <scp localFile="target/site.zip"
+ remoteToDir="${apache.id}@people.apache.org:."
+ keyfile="${ssh.keyfile}"
+ passphrase="${ssh.pass}"/>
+ <sshexec username="${apache.id}" host="people.apache.org"
+ command="unzip -d public_html site.zip"
+ keyfile="${ssh.keyfile}"
+ passphrase="${ssh.pass}"/>
+ <sshexec username="${apache.id}" host="people.apache.org"
+ command="rm site.zip"
+ keyfile="${ssh.keyfile}"
+ passphrase="${ssh.pass}"/>
+ </target>
+
+ <target name="nexus-bundle" depends="-build-maven-artifacts"
+ description="Creates an upload bundle suitable for Nexus Snapshot Upload">
+ <jar destfile="target/upload-bundle.jar">
+ <fileset dir="${repo.path}">
+ <include name="*.jar"/>
+ <include name="*.jar.asc"/>
+ <include name="*.pom"/>
+ <include name="*.pom.asc"/>
+ </fileset>
+ </jar>
+ </target>
+
<target name="-prepare-dist-area" depends="-checkout-dist, -update-dist"/>
<target name="-checkout-dist" depends="-init" unless="dist-dir-exists?">