You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/22 21:14:50 UTC
[sling-tooling-release] 01/08: SLING-4005 - Deploy API
documentation for Sling 7
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-tooling-release.git
commit 34514ea74418a9d5cadb09f73ed6eb9ef5a96c11
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Tue Oct 7 09:52:41 2014 +0000
SLING-4005 - Deploy API documentation for Sling 7
Add the release tooling to SVN
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1629844 13f79535-47bb-0310-9956-ffa450edef68
---
bundleList-to-tagNames.xslt | 17 ++++++
generate_javadoc_for_release.sh | 85 ++++++++++++++++++++++++++
patches/org.apache.sling.discovery.impl-1.0.10 | 10 +++
3 files changed, 112 insertions(+)
diff --git a/bundleList-to-tagNames.xslt b/bundleList-to-tagNames.xslt
new file mode 100644
index 0000000..7739082
--- /dev/null
+++ b/bundleList-to-tagNames.xslt
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+ <xsl:output method="text" omit-xml-declaration="yes"/>
+
+ <!-- start at the root node and apply templates for all nodes named 'bundle' whose groupId child is equal to 'org.apache.sling' -->
+ <xsl:template match="/">
+ <xsl:apply-templates select="//bundle[groupId='org.apache.sling']"/>
+ </xsl:template>
+
+ <!-- for each matched bundle node output the expected SVN tag value - ${artifactId}-${groupId} - on a single line -->
+ <xsl:template match="bundle">
+ <xsl:value-of select="artifactId"/>
+ <xsl:text>-</xsl:text>
+ <xsl:value-of select="version"/>
+ <xsl:text><!-- newline -->
</xsl:text>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/generate_javadoc_for_release.sh b/generate_javadoc_for_release.sh
new file mode 100755
index 0000000..5b4b49f
--- /dev/null
+++ b/generate_javadoc_for_release.sh
@@ -0,0 +1,85 @@
+#!/bin/bash -e
+
+VERSION=7
+WORKDIR=out
+
+# create work directory
+if [ ! -d $WORKDIR ] ; then
+ mkdir -p $WORKDIR
+fi
+
+# get bundle list
+if [ -f $WORKDIR/bundleList.xml ] ; then
+ echo "bundleList.xml already present, not downloading";
+else
+ echo "Downloading bundleList for Sling $VERSION"
+ wget https://repo1.maven.org/maven2/org/apache/sling/org.apache.sling.launchpad/$VERSION/org.apache.sling.launchpad-$VERSION-bundlelist.xml -O $WORKDIR/bundleList.xml
+fi
+
+# checkout tags
+artifacts=$(xsltproc bundleList-to-tagNames.xslt $WORKDIR/bundleList.xml)
+
+for artifact in $artifacts; do
+ if [ -d $WORKDIR/$artifact ] ; then
+ echo "Not checking out $artifact, already present";
+ else
+ echo "Exporting $artifact from source control"
+ svn export https://svn.apache.org/repos/asf/sling/tags/$artifact $WORKDIR/$artifact
+ if [ -f patches/$artifact ]; then
+ echo "Applying patch"
+ pushd $WORKDIR/$artifact
+ patch -p0 < ../../patches/$artifact
+ popd
+ fi
+ fi
+done
+
+# generate dummy pom.xml
+
+echo "Generating pom.xml"
+
+POM=$WORKDIR/pom.xml
+echo "<project>" > $POM
+echo " <modelVersion>4.0.0</modelVersion>" >> $POM
+echo " <groupId>org.apache.sling</groupId>" >> $POM
+echo " <artifactId>org.apache.sling.javadoc-builder</artifactId>" >> $POM
+echo " <packaging>pom</packaging>" >> $POM
+echo " <version>$VERSION</version>" >> $POM
+echo >> $POM
+echo " <parent>" >> $POM
+echo " <groupId>org.apache</groupId>" >> $POM
+echo " <artifactId>apache</artifactId>" >> $POM
+echo " <version>8</version>" >> $POM
+echo " </parent>" >> $POM
+echo >> $POM
+echo " <name>Apache Sling</name>" >> $POM
+echo >> $POM
+echo " <properties>" >> $POM
+echo " <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>" >> $POM
+echo " </properties>" >> $POM
+echo >> $POM
+echo " <modules> " >> $POM
+
+for artifact in $artifacts; do
+ echo " <module>$artifact</module>" >> $POM
+done
+
+echo " </modules>" >> $POM
+echo "</project>" >> $POM
+
+if [ ! -f $WORKDIR/src/main/javadoc/overview.html ] ; then
+ echo "Downloading javadoc overview file"
+ mkdir -p $WORKDIR/src/main/javadoc
+ wget https://svn.apache.org/repos/asf/sling/trunk/src/main/javadoc/overview.html -O $WORKDIR/src/main/javadoc/overview.html
+fi
+
+# generate javadoc
+
+echo "Starting javadoc generation"
+
+pushd $WORKDIR
+mvn -DexcludePackageNames="*.impl:*.internal:*.jsp:sun.misc:*.juli:*.testservices:*.integrationtest:*.maven:javax.*:org.osgi.*" \
+ org.apache.maven.plugins:maven-javadoc-plugin:2.9.1:aggregate
+popd
+
+echo "Generated Javadocs can be found in $WORKDIR/target/site/apidocs/"
diff --git a/patches/org.apache.sling.discovery.impl-1.0.10 b/patches/org.apache.sling.discovery.impl-1.0.10
new file mode 100644
index 0000000..289652d
--- /dev/null
+++ b/patches/org.apache.sling.discovery.impl-1.0.10
@@ -0,0 +1,10 @@
+--- pom.xml.orig 2014-10-05 23:20:24.955180364 +0300
++++ pom.xml 2014-10-05 23:20:30.675149845 +0300
+@@ -246,7 +246,6 @@
+ <groupId>org.apache.sling</groupId>
+ <artifactId>org.apache.sling.commons.threads</artifactId>
+ <version>3.1.0</version>
+- <type>bundle</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.