You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2014/01/28 17:10:51 UTC
svn commit: r1562105 - in /httpcomponents/project-release-tools/trunk:
build.gradle buildSrc/src/main/groovy/Mvn.groovy
Author: olegk
Date: Tue Jan 28 16:10:50 2014
New Revision: 1562105
URL: http://svn.apache.org/r1562105
Log:
Reverted GPG passphrase passing to Maven via process command line argument; added task to build snapshot; added task to display RC directory location
Modified:
httpcomponents/project-release-tools/trunk/build.gradle
httpcomponents/project-release-tools/trunk/buildSrc/src/main/groovy/Mvn.groovy
Modified: httpcomponents/project-release-tools/trunk/build.gradle
URL: http://svn.apache.org/viewvc/httpcomponents/project-release-tools/trunk/build.gradle?rev=1562105&r1=1562104&r2=1562105&view=diff
==============================================================================
--- httpcomponents/project-release-tools/trunk/build.gradle (original)
+++ httpcomponents/project-release-tools/trunk/build.gradle Tue Jan 28 16:10:50 2014
@@ -77,6 +77,29 @@ File distRelRevisionFile = new File(pr
File nextVerFile = new File(project.buildDir, 'next-ver.txt')
File nextVerRevisionFile = new File(project.buildDir, 'next-ver-revision.txt')
+if (!rcTagFile.exists()) {
+
+ task buildSnapshot(dependsOn: checkoutSnapshot) {
+ group = 'Release'
+ description = "Compiles and builds snapshot artifacts."
+ inputs.files fileTree(dir: checkoutSnapshot.localDir, excludes:['**/target/**','**/.svn/**'])
+ outputs.files fileTree(dir: checkoutSnapshot.localDir, includes:['**/target/*.jar'])
+ doLast {
+ Svn.revert(checkoutSnapshot.localDir)
+
+ File pomFile = new File(checkoutSnapshot.localDir, 'pom.xml')
+ def pomModel = new XmlSlurper().parse(pomFile)
+ String artifactId = pomModel.artifactId
+ String version = pomModel.version
+ String name = getProductName(artifactId)
+
+ println "Building ${name} ${version}"
+ mvn.exec(checkoutSnapshot.localDir, 'clean', 'install')
+ }
+ }
+
+}
+
task prepareRelease(dependsOn: checkoutSnapshot) {
group = 'Release'
description = "Prepares release based on development snapshot from ${checkoutSnapshot.repo}."
@@ -233,6 +256,24 @@ if (rcTagFile.exists() && rcRevisionFile
File dir = checkoutRC.localDir
if (dir.exists() && file("${dir}/target").exists()) {
+ task locateRC(dependsOn: buildRC) {
+ group = 'Release'
+ description = "Displays RC location."
+ doLast {
+ String releaseVer = releaseVerFile.text.trim()
+ String rcQualifier = rcQualifierFile.text.trim()
+
+ File pomFile = new File(checkoutRC.localDir, 'pom.xml')
+ def pomModel = new XmlSlurper().parse(pomFile)
+ String artifactId = pomModel.artifactId
+ String name = getProductName(artifactId)
+
+ println "Please deploy ${name} ${releaseVer} based on ${rcQualifier} " +
+ "from the following directory using 'mvn deploy -Prelease'"
+ println checkoutRC.localDir
+ }
+ }
+
task deployRC(dependsOn: buildRC) {
group = 'Release'
description = "Deploys RC artifacts to Apache staging repository."
@@ -246,8 +287,7 @@ if (rcTagFile.exists() && rcRevisionFile
String name = getProductName(artifactId)
println "Deploying ${name} ${releaseVer} based on ${rcQualifier}"
- mvn.exec(checkoutRC.localDir, 'deploy', '-Prelease', '-Dmaven.test.skip=true',
- '-Dgpg.passphrase=' + project.ext.'signing.password')
+ mvn.exec(checkoutRC.localDir, 'deploy', '-Prelease')
}
}
Modified: httpcomponents/project-release-tools/trunk/buildSrc/src/main/groovy/Mvn.groovy
URL: http://svn.apache.org/viewvc/httpcomponents/project-release-tools/trunk/buildSrc/src/main/groovy/Mvn.groovy?rev=1562105&r1=1562104&r2=1562105&view=diff
==============================================================================
--- httpcomponents/project-release-tools/trunk/buildSrc/src/main/groovy/Mvn.groovy (original)
+++ httpcomponents/project-release-tools/trunk/buildSrc/src/main/groovy/Mvn.groovy Tue Jan 28 16:10:50 2014
@@ -40,7 +40,8 @@ class Mvn {
void exec(File mvnProjectDir, String... params) {
project.javaexec {
classpath "${mvnHomeDir}/boot/plexus-classworlds-2.4.jar"
- jvmArgs "-Dclassworlds.conf=${mvnHomeDir}/bin/m2.conf", "-Dmaven.home=${mvnHomeDir}"
+ jvmArgs "-Dclassworlds.conf=${mvnHomeDir}/bin/m2.conf", "-Xmx256m", '-XX:PermSize=128m',
+ "-Dmaven.home=${mvnHomeDir}"
main = "org.codehaus.plexus.classworlds.launcher.Launcher"
workingDir = mvnProjectDir
args params