generate aggregated javadocs for
@@ -25,6 +25,7 @@ try {
def asfsite = 'asf-site'
def build = 'build'
def jbake = 'jbake'
+ def pom
node( 'ubuntu' ) {
def JAVA_JDK_8=tool name: 'JDK 1.8 (latest)', type: 'hudson.model.JDK'
@@ -46,6 +47,10 @@ try {
sh "mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install -Pattach-additional-artifacts $SONAR_MAVEN_GOAL"
}
}
+ pom = readMavenPom file: 'pom.xml'
+ writeFile file: 'target/classes/apidocs.txt', text: 'file created in order to allow aggregated javadoc generation, target/classes is needed for all modules'
+ writeFile file: 'jspwiki-it-tests/target/classes/apidocs.txt', text: 'file created in order to allow aggregated javadoc generation, target/classes is needed for all modules'
+ sh 'mvn package javadoc:aggregate-no-fork -DskipTests -pl !jspwiki-portable'
}
}
@@ -53,7 +58,7 @@ try {
withEnv( [ "Path+JDK=$JAVA_JDK_8/bin", "Path+MAVEN=$MAVEN_3_LATEST/bin", "JAVA_HOME=$JAVA_JDK_8" ] ) {
dir( jbake ) {
git branch: jbake, url: siteRepo, credentialsId: creds, poll: false
- sh 'mvn clean process-resources'
+ sh 'mvn clean process-resources -Dplugin.japicmp.jspwiki-new=' + pom.version
}
stash name: 'jbake-website'
}
@@ -68,11 +73,17 @@ try {
dir( asfsite ) {
git branch: asfsite, url: siteRepo, credentialsId: creds, poll: false
sh "cp -rf ../$jbake/target/content/* ./"
+ }
+ def apidocs = asfsite + '/apidocs/' + pom.version
+ dir( apidocs ) {
+ sh "cp -rf ../../../$build/target/site/apidocs/* ."
+ }
+ dir( asfsite ) {
timeout( 15 ) { // 15 minutes
sh 'git add .'
sh 'git commit -m "Automatic Site Publish by Buildbot"'
echo "pushing to $siteRepo"
- sh "git push origin asf-site"
+ sh 'git push origin asf-site'
}
}
}
