Permalink
Browse files

initial commit to open-source repository

  • Loading branch information...
0 parents commit a91218d6b3013c20857f51d437dc8db8a0a77934 @martinlippert martinlippert committed Mar 6, 2012
Showing 304 changed files with 29,725 additions and 0 deletions.
@@ -0,0 +1 @@
+target/
@@ -0,0 +1,96 @@
+#!/bin/bash
+
+set -e
+#set -x
+
+#trap 'on_exit' EXIT
+#
+#on_exit()
+#{
+# if [ "$BAMBOO" == "1" ]
+# then
+# svn revert -R .
+# fi
+#}
+
+grep "STS PARENT POM" pom.xml > /dev/null || (echo "Script must be run from top-level directory"; exit 1)
+
+echo "Booting..."
+ulimit -a
+
+ARGS=""
+if [ "$BAMBOO" == "1" ]
+then
+ ARGS="-Dmaven.repo.local=/opt/bamboo-home/.m2/repository-cloudfoundry -Dhttpclient.retry-max=20"
+
+ if [ "$JAVA_5" == "1" ]
+ then
+ export JAVA_HOME=/opt/java/jdk/Sun/1.5/jre
+ else
+ export JAVA_HOME=/opt/java/jdk/Sun/1.6
+ fi
+ export MAVEN_HOME=/opt/java/tools/maven/apache-maven-3.0
+ export PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$PATH
+ export DISPLAY=:1
+
+# svn revert -R .
+fi
+
+# clean up
+echo "Cleaning test reports and screenshots..."
+find -type d -name surefire-reports -print -exec rm -r {} +
+find -type d -name screenshots -print -exec rm -r {} +
+
+# build
+echo "Building..."
+
+if [ "$HEARTBEAT" == "1" ]
+then
+
+# compile and test
+mvn \
+-V -B -e \
+${ARGS} \
+$* \
+clean compile integration-test
+
+elif [ "$SKIP_TEST" == "1" ]
+then
+
+# compile and deploy
+mvn \
+--fail-at-end -V -B -e \
+${ARGS} \
+-Dmaven.test.skip=true \
+$* \
+clean deploy
+
+elif [ "$TEST_AND_DEPLOY" == "1" ]
+then
+
+mvn \
+--fail-at-end -V -B -e \
+${ARGS} \
+-Dmaven.test.failure.ignore=true \
+-Dmaven.test.error.ignore=true \
+$* \
+clean deploy
+
+else
+
+# compile
+mvn \
+--fail-at-end -V -B -e \
+${ARGS} \
+-Dmaven.test.skip=true \
+$* \
+clean package
+
+# test and deploy
+mvn \
+--fail-at-end -B -e \
+${ARGS} \
+$* \
+deploy
+
+fi
@@ -0,0 +1,187 @@
+<project name="build" default="" basedir=".">
+
+ <taskdef resource="net/sf/antcontrib/antcontrib.properties" />
+
+ <dirname property="scriptdir" file="${ant.file.build}"/>
+ <property name="pack200" value="${java.home}/bin"/>
+
+ <echo>Running on ${os.name} ${os.version} (${os.arch}) / ${ant.version} / ${java.vendor} ${java.vm.name} ${java.version}</echo>
+
+ <target name="prepare-tests">
+ <!-- setup dummy keystore password -->
+ <echo file="${project.build.directory}/keystore.password">.</echo>
+
+ <if>
+ <available file="${basedir}/../../releng/com.springsource.sts.releng/epp/dist.tar.gz" />
+ <then>
+ <!-- setup for tc Server tests -->
+ <untar src="${basedir}/../../releng/com.springsource.sts.releng/epp/dist.tar.gz"
+ compression="gzip"
+ dest="${project.build.directory}">
+ <patternset>
+ <include name="DIST/bundle/**" />
+ </patternset>
+ <mapper>
+ <globmapper from="DIST/bundle/*" to="*" />
+ </mapper>
+ </untar>
+
+ <!-- make shell scripts executable -->
+ <chmod perm="755">
+ <fileset dir="${project.build.directory}">
+ <include name="tc-server*/**/*.sh"/>
+ </fileset>
+ </chmod>
+ </then>
+ </if>
+
+ <if>
+ <available file="${scriptdir}/../plugins/com.springsource.sts.grails.test.util/resources/grailses/grails-1.3.6.zip" />
+ <then>
+ <unzip src="${scriptdir}/../plugins/com.springsource.sts.grails.test.util/resources/grailses/grails-1.3.6.zip" dest="${project.build.directory}" />
+ </then>
+ </if>
+
+ <if>
+ <available file="${scriptdir}/../plugins/com.springsource.sts.grails.test.ui/resources/servers/tc-server-developer-2.1.1.RELEASE.zip" />
+ <then>
+ <unzip src="${scriptdir}/../plugins/com.springsource.sts.grails.test.ui/resources/servers/tc-server-developer-2.1.1.RELEASE.zip" dest="${project.build.directory}" />
+ <chmod perm="755">
+ <fileset dir="${project.build.directory}">
+ <include name="tc-server*/**/*.sh"/>
+ </fileset>
+ </chmod>
+ </then>
+ </if>
+
+ <get src="http://www.apache.org/dist/maven/binaries/apache-maven-2.2.1-bin.zip"
+ dest="${project.build.directory}/../apache-maven-2.2.1-bin.zip"
+ verbose="true"
+ skipexisting="true"/>
+ <if>
+ <available file="${project.build.directory}/../apache-maven-2.2.1-bin.zip" />
+ <then>
+ <unzip src="${project.build.directory}/../apache-maven-2.2.1-bin.zip" dest="${project.build.directory}">
+ <mapper>
+ <globmapper from="apache-maven*" to="maven*" />
+ </mapper>
+ </unzip>
+ </then>
+ </if>
+
+ <get src="http://s3.amazonaws.com/dist.springframework.org/release/ROO/spring-roo-1.1.3.RELEASE.zip"
+ dest="${project.build.directory}/../spring-roo-1.1.3.RELEASE.zip"
+ verbose="true"
+ skipexisting="true"/>
+ <if>
+ <available file="${project.build.directory}/../spring-roo-1.1.3.RELEASE.zip" />
+ <then>
+ <unzip src="${project.build.directory}/../spring-roo-1.1.3.RELEASE.zip" dest="${project.build.directory}"/>
+ </then>
+ </if>
+ </target>
+
+ <target name="process-update-site">
+ <path id="eclipse.classpath">
+ <fileset dir="${user.home}/.m2/repository/org/sonatype/tycho/tycho-p2-runtime">
+ <include name="*/eclipse/plugins/org.eclipse.equinox.launcher_*.jar" />
+ </fileset>
+ </path>
+
+ <path id="jarprocessor.classpath">
+ <fileset dir="${user.home}/.m2/repository/org/sonatype/tycho/tycho-p2-runtime">
+ <include name="*/eclipse/plugins/org.eclipse.equinox.p2.jarprocessor_*.jar" />
+ </fileset>
+ </path>
+
+ <if>
+ <equals arg1="${p2.sign}" arg2="true" />
+ <then>
+ <delete file="${project.build.directory}/site/content.jar" />
+ <delete file="${project.build.directory}/site/artifacts.jar" />
+
+ <!-- sign -->
+ <java jvm="${java.home}/bin/java" classname="org.eclipse.equinox.internal.p2.jarprocessor.Main"
+ fork="true" classpathref="jarprocessor.classpath" failonerror="true" maxmemory="256m"
+ dir="${project.build.directory}/site">
+ <jvmarg line="-Dorg.eclipse.update.jarprocessor.pack200=${pack200}" />
+ <arg
+ line="-verbose -processAll -repack -pack -sign ${scriptdir}/sign.sh -outputDir ${project.build.directory}/site ${project.build.directory}/site" />
+ </java>
+
+ <!-- generate metadata -->
+ <java jvm="${java.home}/bin/java" classname="org.eclipse.equinox.launcher.Main" fork="true"
+ classpathref="eclipse.classpath" failonerror="true" maxmemory="256m"
+ dir="${project.build.directory}/site">
+ <arg line="-application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher" />
+ <arg line="-source ${project.build.directory}/site" />
+ <arg line="-metadataRepository file://${project.build.directory}/site" />
+ <arg line="-artifactRepository file://${project.build.directory}/site" />
+ <arg line="-metadataRepositoryName '${p2.repository.name}'" />
+ <arg line="-artifactRepositoryName '${p2.repository.name}'" />
+ <arg line="-compress -reusePackedFiles -reusePack200Files -publishArtifacts" />
+ </java>
+
+ <!-- publish categories -->
+ <java jvm="${java.home}/bin/java" classname="org.eclipse.equinox.launcher.Main" fork="true"
+ classpathref="eclipse.classpath" failonerror="true" maxmemory="256m"
+ dir="${project.build.directory}/site">
+ <arg line="-application org.eclipse.equinox.p2.publisher.CategoryPublisher" />
+ <arg line="-metadataRepository file://${project.build.directory}/site" />
+ <arg line="-categoryDefinition file://${project.build.directory}/../site.xml" />
+ <arg line="-compress -categoryQualifier" />
+ </java>
+ </then>
+ </if>
+ </target>
+
+ <target name="deploy">
+ <taskdef resource="org/springframework/build/aws/ant/antlib.xml" />
+
+ <property name="site.target.dir" value="${project.build.directory}" />
+
+ <property name="dist.file.name" value="${dist.project}-${dist.full.version}-${dist.target}-updatesite.zip" />
+ <property name="dist.path" value="${dist.type}/${dist.key}/nightly/${dist.target}" />
+ <property name="dist.full.path" value="${site.target.dir}/site/${dist.file.name}" />
+
+ <delete file="${dist.full.path}" />
+ <zip zipfile="${dist.full.path}" filesonly="true">
+ <zipfileset dir="${site.target.dir}/site">
+ <exclude name="*.zip" />
+ <exclude name="**/*.gz" />
+ </zipfileset>
+ </zip>
+ <checksum file="${dist.full.path}" algorithm="SHA1" fileext=".sha1" />
+ <checksum file="${dist.full.path}" algorithm="MD5" fileext=".md5" />
+
+ <s3 accessKey="${dist.accessKey}" secretKey="${dist.secretKey}">
+ <!-- remove previous site -->
+ <delete bucketName="${dist.bucket}">
+ <fileset dir="${dist.path}">
+ <include name="site.xml" />
+ <include name="content.jar" />
+ <include name="artifacts.jar" />
+ <include name="plugins/**" />
+ <include name="features/**" />
+ </fileset>
+ </delete>
+
+ <!-- upload new site -->
+ <upload bucketName="${dist.bucket}" toDir="${dist.path}" publicRead="true">
+ <fileset dir="${site.target.dir}/site">
+ <include name="**/*" />
+ <include name="**" />
+ <exclude name="*.zip" />
+ </fileset>
+ </upload>
+
+ <upload bucketName="${dist.bucket}" file="${dist.full.path}" toFile="${dist.path}/${dist.file.name}"
+ publicRead="true">
+ <metadata name="project.name" value="${dist.name}" />
+ <metadata name="release.type" value="${dist.type}" />
+ <metadata name="bundle.version" value="${dist.full.version}" />
+ <metadata name="package.file.name" value="${dist.file.name}" />
+ </upload>
+ </s3>
+ </target>
+</project>
@@ -0,0 +1,7 @@
+#!/bin/bash
+if [ -e "$HOME/.keytool/springsource.jks" ]
+then
+ echo Signing $1
+ #jarsigner -tsa https://timestamp.geotrust.com/tsa -keystore ~/.keytool/springsource.jks -keypass $KEY_PASSWORD -storepass $STORE_PASSWORD $1 vmware
+ jarsigner -keystore ~/.keytool/springsource.jks -keypass $KEY_PASSWORD -storepass $STORE_PASSWORD $1 vmware
+fi
Oops, something went wrong.

0 comments on commit a91218d

Please sign in to comment.