Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrescobar2011-01-24 22:56:09 +0000
committerRyan D. Brooks2011-01-24 22:56:09 +0000
commit61fc01c01238ef5468d6525d253ca44b349e4288 (patch)
tree05c673937f9b7cad539560f79fd97a7e5005d376
parent03c6063dbee370fc4ce19fe62927b808ae6db012 (diff)
downloadorg.eclipse.osee-61fc01c01238ef5468d6525d253ca44b349e4288.tar.gz
org.eclipse.osee-61fc01c01238ef5468d6525d253ca44b349e4288.tar.xz
org.eclipse.osee-61fc01c01238ef5468d6525d253ca44b349e4288.zip
feature: Add Javadoc generation to build
-rw-r--r--releng/org.eclipse.osee.client.releng/build.properties4
-rw-r--r--releng/org.eclipse.osee.client.releng/build.xml4
-rw-r--r--releng/org.eclipse.osee.client.releng/buildExtra.xml4
-rw-r--r--releng/org.eclipse.osee.client.releng/scripts/createJavadoc.xml148
-rwxr-xr-xreleng/org.eclipse.osee.server.releng/build.xml8
-rw-r--r--releng/org.eclipse.osee.server.releng/buildExtra.xml1
-rw-r--r--releng/org.eclipse.osee.server.releng/scripts/createJavadoc.xml148
7 files changed, 312 insertions, 5 deletions
diff --git a/releng/org.eclipse.osee.client.releng/build.properties b/releng/org.eclipse.osee.client.releng/build.properties
index abeecf3735b..9b379fc78af 100644
--- a/releng/org.eclipse.osee.client.releng/build.properties
+++ b/releng/org.eclipse.osee.client.releng/build.properties
@@ -26,7 +26,7 @@ oseeAppServerSnapshotPath=\
${hudsonJobsPath}/org.eclipse.osee.server_nightly/lastSuccessfulBuild/artifact/snapshot
oseeAppServerURL=\
-${oseeAppServerSnapshotPath}/osee_server-incubation-osgi-runtime-N-Snapshot.zip
+${oseeAppServerSnapshotPath}/osee_server-osgi-runtime-incubation-N-Snapshot.zip
associate.sites=\
http://download.eclipse.org/releases/helios,\
@@ -41,7 +41,7 @@ http://download.eclipse.org/technology/nebula/cwt/update-N/
repositoryURLs=\
${associate.sites},\
-${oseeAppServerSnapshotPath}/osee_server-incubation-update-N-Snapshot.zip
+${oseeAppServerSnapshotPath}/osee_server-update-incubation-N-Snapshot.zip
dependencyURLs=\
${downloadMirror}/eclipse/downloads/drops/R-3.6.1-201009090800/eclipse-test-framework-3.6.1.zip
diff --git a/releng/org.eclipse.osee.client.releng/build.xml b/releng/org.eclipse.osee.client.releng/build.xml
index 79adb2e7ec1..700ea208f2c 100644
--- a/releng/org.eclipse.osee.client.releng/build.xml
+++ b/releng/org.eclipse.osee.client.releng/build.xml
@@ -159,6 +159,7 @@
<copy flatten="true" toDir="${snapshotFolder}" failonerror="true" includeemptydirs="false">
<fileset dir="${buildFolder}" includes="athena/*-Update-*.zip" />
<fileset dir="${buildFolder}" includes="athena/*-Automated-Tests-*.zip" />
+ <fileset dir="${buildFolder}" includes="athena/*-Javadoc-*.zip" />
</copy>
<available file="${snapshotFolder}" property="containsFile" />
@@ -173,6 +174,9 @@
<filename name="*-Update-*.zip" />
</fileset>
</move>
+ <move includeemptydirs="false" tofile="${snapshotFolder}/${zipPrefix}-javadoc${incubation}-${BUILDTYPE}-Snapshot.zip" filtering="true">
+ <fileset dir="${snapshotFolder}" includes="*-Javadoc-*.zip" />
+ </move>
</target>
<target name="createUnitTestSnapshot">
diff --git a/releng/org.eclipse.osee.client.releng/buildExtra.xml b/releng/org.eclipse.osee.client.releng/buildExtra.xml
index 9b6a84507d5..296b758316c 100644
--- a/releng/org.eclipse.osee.client.releng/buildExtra.xml
+++ b/releng/org.eclipse.osee.client.releng/buildExtra.xml
@@ -84,5 +84,7 @@
<target name="preProcess" />
<target name="postProcess" />
<target name="postBuild" />
- <target name="extraPackaging" />
+ <target name="extraPackaging">
+ <ant antfile="${relengBuilderDir}/scripts/createJavadoc.xml" target="run" inheritrefs="true" inheritall="true" />
+ </target>
</project>
diff --git a/releng/org.eclipse.osee.client.releng/scripts/createJavadoc.xml b/releng/org.eclipse.osee.client.releng/scripts/createJavadoc.xml
new file mode 100644
index 00000000000..71714e58212
--- /dev/null
+++ b/releng/org.eclipse.osee.client.releng/scripts/createJavadoc.xml
@@ -0,0 +1,148 @@
+<project name="Generates OSEE Application Server Javadoc Bundle"
+ default="run">
+
+ <!-- Sample Variables for local setup -->
+ <!-- <property name="buildDirectory" value="C:/UserData/javadocTest/build" />
+ <property name="buildLabel" value="athena" />
+ <property name="buildDir" value="C:/UserData/javadocTest/build/athena" />
+ <property name="masterZip"
+ value="osee_server-Master-incubation-N201101250825.zip" />
+ <property name="projectid" value="OSEE TEST" />
+ <property name="targetPlatform" value="C:/UserData/OSEE_RC" />
+
+ <target name="init">
+ <taskdef resource="net/sf/antcontrib/antlib.xml">
+ <classpath>
+ <pathelement path="${classpath}" />
+ <pathelement location="${buildDirectory}/3rdPartyJars/ant-contrib.jar" />
+ </classpath>
+ </taskdef>
+ </target> -->
+
+ <target name="setup">
+ <propertyregex property="updateSiteArchive" input="${masterZip}"
+ defaultvalue="${masterZip}" regexp="-Master-" replace="-Update-"
+ casesensitive="false" override="true" />
+
+ <property name="tempSource"
+ value="${buildDirectory}/${buildLabel}/${updateSiteArchive}_src_tmp" />
+ <delete dir="${tempSource}" />
+ <mkdir dir="${tempSource}" />
+
+ <unzip src="${buildDirectory}/${buildLabel}/${updateSiteArchive}"
+ dest="${tempSource}">
+ <patternset includes="plugins/*source_*" />
+ </unzip>
+
+ <property name="javadocOutput" value="${buildDir}/javadoc" />
+ </target>
+
+ <target name="unpackJars">
+ <pathconvert property="source.jars" setonempty="false"
+ pathsep=";">
+ <path>
+ <fileset dir="${tempSource}/plugins" includes="*source_*" />
+ </path>
+ </pathconvert>
+
+ <condition property="isWindows">
+ <os family="windows" />
+ </condition>
+
+
+ <var name="expSeparator" value="${file.separator}" />
+ <if>
+ <equals arg1="${isWindows}" arg2="true" />
+ <then>
+ <var name="expSeparator" value="\\\\" />
+ </then>
+ </if>
+
+ <for param="jarToProcess" delimiter=";" list="${source.jars}">
+ <sequential>
+
+ <propertyregex property="jar.name" override="true"
+ input="@{jarToProcess}" regexp="[^${expSeparator}]+$" select="\0"
+ casesensitive="false" />
+ <propertyregex property="bundle.source.name" override="true"
+ input="${jar.name}" regexp="(.*)?_" select="\1" casesensitive="false" />
+ <propertyregex property="bundle.name" override="true"
+ input="${bundle.source.name}" defaultvalue="${bundle.source.name}"
+ regexp="\.source" replace="" casesensitive="false" />
+
+ <!--<var name="source.bundle.name" value="${bundle.name}.source_${bundle.suffix}"
+ /> -->
+ <!--<echo message="${jar.name} | ${bundle.source.name} | ${bundle.name}"
+ /> -->
+
+ <var name="project.folder" value="${tempSource}/source/${bundle.name}" />
+ <var name="source.dest" value="${project.folder}/src" />
+
+ <delete dir="${source.dest}" />
+ <mkdir dir="${source.dest}" />
+
+ <trycatch>
+ <try>
+ <unzip src="@{jarToProcess}" dest="${source.dest}" />
+
+ <mkdir dir="${project.folder}/META-INF" />
+ <copy file="${source.dest}/META-INF/MANIFEST.MF" tofile="${project.folder}/META-INF/MANIFEST.MF" />
+ <delete dir="${source.dest}/META-INF" />
+ <copy file="${source.dest}/plugin.properties" tofile="${project.folder}/plugin.properties" />
+ <delete file="${source.dest}/plugin.properties" />
+ </try>
+ <catch>
+ <echo message="Warning: no source found for @{jarToProcess}" />
+ </catch>
+ </trycatch>
+ </sequential>
+ </for>
+ </target>
+
+ <target name="pack">
+ <propertyregex property="serverJavaDocFile" input="${masterZip}"
+ defaultvalue="javadoc.zip" regexp="-Master-" replace="-Javadoc-"
+ casesensitive="false" override="true" />
+ <zip destfile="${buildDirectory}/../${serverJavaDocFile}">
+ <fileset dir="${javadocOutput}" />
+ </zip>
+ </target>
+
+ <target name="cleanup">
+ <delete dir="${tempSource}" failonerror="false" />
+ </target>
+
+ <target name="run" depends="setup,unpackJars,create.javadoc,pack,cleanup" />
+
+ <target name="create.javadoc">
+ <property name="projectName" value="${projectid}" />
+ <property name="output" value="${javadocOutput}" />
+ <property name="sourcesLocation" value="${tempSource}/source" />
+ <property name="targetPlatform" value="${buildDir}/eclipse" />
+
+ <echo message="Source code location [${sourcesLocation}]" />
+ <echo message="Javadoc output location [${output}]" />
+ <echo message="Target platform path [${targetPlatform}]" />
+
+ <!-- Define classpath -->
+ <path id="javadoc-classpath">
+ <fileset dir="${targetPlatform}">
+ <include name="**/*.jar" />
+ </fileset>
+ </path>
+
+ <!-- Prepare dirs -->
+ <delete dir="${output}" />
+ <mkdir dir="${output}" />
+
+ <javadoc destdir="${output}" Encoding="ISO-8859-1"
+ classpathref="javadoc-classpath" maxmemory="1024m" source="1.6"
+ useexternalfile="true" author="true" version="true" use="true"
+ windowtitle="${projectName} Documentation">
+ <fileset dir="${sourcesLocation}" defaultexcludes="true">
+ <include name="**/*.java" />
+ <!-- <exclude name="**/test/**" />-->
+ </fileset>
+ </javadoc>
+ </target>
+</project>
diff --git a/releng/org.eclipse.osee.server.releng/build.xml b/releng/org.eclipse.osee.server.releng/build.xml
index 62aacdeb232..12d254ead23 100755
--- a/releng/org.eclipse.osee.server.releng/build.xml
+++ b/releng/org.eclipse.osee.server.releng/build.xml
@@ -160,6 +160,7 @@
<fileset dir="${buildFolder}" includes="athena/*-Update-*.zip" />
<fileset dir="${buildFolder}" includes="athena/*-osgi-runtime-*.zip" />
<fileset dir="${buildFolder}" includes="athena/*-Automated-Tests-*.zip" />
+ <fileset dir="${buildFolder}" includes="athena/*-Javadoc-*.zip" />
</copy>
<available file="${snapshotFolder}" property="containsFile" />
@@ -169,12 +170,15 @@
<target name="doMoveZip" if="containsFile">
<echo>Renaming file to ${zipPrefix}${incubation}-${BUILDTYPE}-Snapshot.zip</echo>
- <move includeemptydirs="false" tofile="${snapshotFolder}/${zipPrefix}${incubation}-update-${BUILDTYPE}-Snapshot.zip" filtering="true">
+ <move includeemptydirs="false" tofile="${snapshotFolder}/${zipPrefix}-update${incubation}-${BUILDTYPE}-Snapshot.zip" filtering="true">
<fileset dir="${snapshotFolder}" includes="*-Update-*.zip" />
</move>
- <move includeemptydirs="false" tofile="${snapshotFolder}/${zipPrefix}${incubation}-osgi-runtime-${BUILDTYPE}-Snapshot.zip" filtering="true">
+ <move includeemptydirs="false" tofile="${snapshotFolder}/${zipPrefix}-osgi-runtime${incubation}-${BUILDTYPE}-Snapshot.zip" filtering="true">
<fileset dir="${snapshotFolder}" includes="*-osgi-runtime-*.zip" />
</move>
+ <move includeemptydirs="false" tofile="${snapshotFolder}/${zipPrefix}-javadoc${incubation}-${BUILDTYPE}-Snapshot.zip" filtering="true">
+ <fileset dir="${snapshotFolder}" includes="*-Javadoc-*.zip" />
+ </move>
</target>
<target name="createUnitTestSnapshot">
diff --git a/releng/org.eclipse.osee.server.releng/buildExtra.xml b/releng/org.eclipse.osee.server.releng/buildExtra.xml
index d09a60fa9db..189e055da54 100644
--- a/releng/org.eclipse.osee.server.releng/buildExtra.xml
+++ b/releng/org.eclipse.osee.server.releng/buildExtra.xml
@@ -78,5 +78,6 @@
<target name="extraPackaging">
<ant antfile="${relengBuilderDir}/scripts/createServerRuntime.xml" target="run" inheritrefs="true" inheritall="true" />
+ <ant antfile="${relengBuilderDir}/scripts/createJavadoc.xml" target="run" inheritrefs="true" inheritall="true" />
</target>
</project>
diff --git a/releng/org.eclipse.osee.server.releng/scripts/createJavadoc.xml b/releng/org.eclipse.osee.server.releng/scripts/createJavadoc.xml
new file mode 100644
index 00000000000..71714e58212
--- /dev/null
+++ b/releng/org.eclipse.osee.server.releng/scripts/createJavadoc.xml
@@ -0,0 +1,148 @@
+<project name="Generates OSEE Application Server Javadoc Bundle"
+ default="run">
+
+ <!-- Sample Variables for local setup -->
+ <!-- <property name="buildDirectory" value="C:/UserData/javadocTest/build" />
+ <property name="buildLabel" value="athena" />
+ <property name="buildDir" value="C:/UserData/javadocTest/build/athena" />
+ <property name="masterZip"
+ value="osee_server-Master-incubation-N201101250825.zip" />
+ <property name="projectid" value="OSEE TEST" />
+ <property name="targetPlatform" value="C:/UserData/OSEE_RC" />
+
+ <target name="init">
+ <taskdef resource="net/sf/antcontrib/antlib.xml">
+ <classpath>
+ <pathelement path="${classpath}" />
+ <pathelement location="${buildDirectory}/3rdPartyJars/ant-contrib.jar" />
+ </classpath>
+ </taskdef>
+ </target> -->
+
+ <target name="setup">
+ <propertyregex property="updateSiteArchive" input="${masterZip}"
+ defaultvalue="${masterZip}" regexp="-Master-" replace="-Update-"
+ casesensitive="false" override="true" />
+
+ <property name="tempSource"
+ value="${buildDirectory}/${buildLabel}/${updateSiteArchive}_src_tmp" />
+ <delete dir="${tempSource}" />
+ <mkdir dir="${tempSource}" />
+
+ <unzip src="${buildDirectory}/${buildLabel}/${updateSiteArchive}"
+ dest="${tempSource}">
+ <patternset includes="plugins/*source_*" />
+ </unzip>
+
+ <property name="javadocOutput" value="${buildDir}/javadoc" />
+ </target>
+
+ <target name="unpackJars">
+ <pathconvert property="source.jars" setonempty="false"
+ pathsep=";">
+ <path>
+ <fileset dir="${tempSource}/plugins" includes="*source_*" />
+ </path>
+ </pathconvert>
+
+ <condition property="isWindows">
+ <os family="windows" />
+ </condition>
+
+
+ <var name="expSeparator" value="${file.separator}" />
+ <if>
+ <equals arg1="${isWindows}" arg2="true" />
+ <then>
+ <var name="expSeparator" value="\\\\" />
+ </then>
+ </if>
+
+ <for param="jarToProcess" delimiter=";" list="${source.jars}">
+ <sequential>
+
+ <propertyregex property="jar.name" override="true"
+ input="@{jarToProcess}" regexp="[^${expSeparator}]+$" select="\0"
+ casesensitive="false" />
+ <propertyregex property="bundle.source.name" override="true"
+ input="${jar.name}" regexp="(.*)?_" select="\1" casesensitive="false" />
+ <propertyregex property="bundle.name" override="true"
+ input="${bundle.source.name}" defaultvalue="${bundle.source.name}"
+ regexp="\.source" replace="" casesensitive="false" />
+
+ <!--<var name="source.bundle.name" value="${bundle.name}.source_${bundle.suffix}"
+ /> -->
+ <!--<echo message="${jar.name} | ${bundle.source.name} | ${bundle.name}"
+ /> -->
+
+ <var name="project.folder" value="${tempSource}/source/${bundle.name}" />
+ <var name="source.dest" value="${project.folder}/src" />
+
+ <delete dir="${source.dest}" />
+ <mkdir dir="${source.dest}" />
+
+ <trycatch>
+ <try>
+ <unzip src="@{jarToProcess}" dest="${source.dest}" />
+
+ <mkdir dir="${project.folder}/META-INF" />
+ <copy file="${source.dest}/META-INF/MANIFEST.MF" tofile="${project.folder}/META-INF/MANIFEST.MF" />
+ <delete dir="${source.dest}/META-INF" />
+ <copy file="${source.dest}/plugin.properties" tofile="${project.folder}/plugin.properties" />
+ <delete file="${source.dest}/plugin.properties" />
+ </try>
+ <catch>
+ <echo message="Warning: no source found for @{jarToProcess}" />
+ </catch>
+ </trycatch>
+ </sequential>
+ </for>
+ </target>
+
+ <target name="pack">
+ <propertyregex property="serverJavaDocFile" input="${masterZip}"
+ defaultvalue="javadoc.zip" regexp="-Master-" replace="-Javadoc-"
+ casesensitive="false" override="true" />
+ <zip destfile="${buildDirectory}/../${serverJavaDocFile}">
+ <fileset dir="${javadocOutput}" />
+ </zip>
+ </target>
+
+ <target name="cleanup">
+ <delete dir="${tempSource}" failonerror="false" />
+ </target>
+
+ <target name="run" depends="setup,unpackJars,create.javadoc,pack,cleanup" />
+
+ <target name="create.javadoc">
+ <property name="projectName" value="${projectid}" />
+ <property name="output" value="${javadocOutput}" />
+ <property name="sourcesLocation" value="${tempSource}/source" />
+ <property name="targetPlatform" value="${buildDir}/eclipse" />
+
+ <echo message="Source code location [${sourcesLocation}]" />
+ <echo message="Javadoc output location [${output}]" />
+ <echo message="Target platform path [${targetPlatform}]" />
+
+ <!-- Define classpath -->
+ <path id="javadoc-classpath">
+ <fileset dir="${targetPlatform}">
+ <include name="**/*.jar" />
+ </fileset>
+ </path>
+
+ <!-- Prepare dirs -->
+ <delete dir="${output}" />
+ <mkdir dir="${output}" />
+
+ <javadoc destdir="${output}" Encoding="ISO-8859-1"
+ classpathref="javadoc-classpath" maxmemory="1024m" source="1.6"
+ useexternalfile="true" author="true" version="true" use="true"
+ windowtitle="${projectName} Documentation">
+ <fileset dir="${sourcesLocation}" defaultexcludes="true">
+ <include name="**/*.java" />
+ <!-- <exclude name="**/test/**" />-->
+ </fileset>
+ </javadoc>
+ </target>
+</project>

Back to the top