Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

188 lines (164 sloc) 7.263 kB
<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>
Jump to Line
Something went wrong with that request. Please try again.