Add spring-build 2.5.2

spring-build was previously included via an svn:external. Adding
directly to the source tree under Git to avoid the need for a git
submodule.

In order to build from any earlier commit, it is recommended to
export spring-build or symlink an existing copy into the root
of the spring-framework project and then build normally.

    $ svn export https://src.springsource.org/svn/spring-build/tags/project-build-2.5.2 spring-build
This commit is contained in:
Chris Beams
2011-12-15 02:28:49 +01:00
parent fae32cea8e
commit 1765b6879f
85 changed files with 5173 additions and 1 deletions

View File

@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2010 SpringSource
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project name="artifact-war" xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:bundlor="antlib:com.springsource.bundlor.ant">
<import file="common.xml"/>
<import file="../common/artifact.xml"/>
<!-- Main targets -->
<target name="jar" depends="ivy.init, resolve.compile, compile.init, jar.init"
description="Creates a WAR file containing the output of a compilation of the source tree.">
<delete quiet="true" file="${ivy.output.file}"/>
<mkdir dir="${ivy.output.dir}"/>
<delete quiet="true" file="${war.output.file}"/>
<mkdir dir="${war.output.dir}"/>
<delete quiet="true" file="${source-jar.output.file}"/>
<mkdir dir="${source-jar.output.dir}"/>
<copy todir="${war.staging.dir}">
<fileset dir="${main.webapp.dir}" erroronmissingdir="false"/>
</copy>
<compile classpath.id="compile.classpath" input.dir="${main.java.dir}" output.dir="${war.classes.dir}"
resources.dir="${main.resources.dir}"/>
<ivy:retrieve resolveId="compile.classpath" conf="compile,runtime" type="jar"
pattern="${war.lib.dir}/[artifact]-[revision].[ext]" log="download-only"/>
<antcall target="bundlor"/>
<jar destfile="${war.output.file}" basedir="${war.staging.dir}" index="true" filesetmanifest="merge">
<manifest>
<attribute name="Bundle-Creator" value="${user.name}"/>
<attribute name="Implementation-Title" value="${implementation.title}"/>
<attribute name="Implementation-Version" value="${implementation.version}"/>
</manifest>
</jar>
<jar destfile="${source-jar.output.file}" basedir="${main.java.dir}" index="true"/>
<ivy:publish resolver="integration" pubdate="${timestamp}" status="${release.type}">
<artifacts pattern="${ivy.output.dir}/[artifact].[ext]"/>
<artifacts pattern="${war.output.dir}/[artifact].[ext]"/>
<artifacts pattern="${source-jar.output.dir}/[artifact].[ext]"/>
<artifacts pattern="${license.dir}/[artifact].[ext]"/>
</ivy:publish>
</target>
<!-- Other targets -->
<target name="compile.init" depends="ivy.init">
<ivy:cachepath resolveId="spring.ant.classpath" pathid="spring.ant.classpath"
organisation="org.springframework.build" module="org.springframework.build.ant"
revision="${org.springframework.build.ant.version}" conf="runtime" type="jar" inline="true"
log="download-only"/>
<ivy:cachepath resolveId="ecj.classpath" pathid="ecj.classpath" organisation="org.eclipse.jdt"
module="com.springsource.org.eclipse.jdt.core.compiler.batch" revision="${org.eclipse.jdt.core.compiler.batch.version}"
conf="runtime" type="jar" inline="true" log="download-only"/>
<taskdef resource="org/springframework/build/ant/antlib.xml" uri="antlib:org.springframework.build">
<classpath>
<path refid="spring.ant.classpath"/>
<path refid="ecj.classpath"/>
</classpath>
</taskdef>
</target>
<target name="bundlor" depends="bundlor.init" unless="disable.bundlor">
<bundlor:bundlor inputPath="${war.staging.dir}" outputPath="${war.staging.dir}"
bundleVersion="${bundle.version}" manifestTemplatePath="${manifest.template.file}"
failOnWarnings="${fail.on.warnings}">
<propertyset refid="bundlor.properties"/>
<propertyset>
<propertyref builtin="all"/>
</propertyset>
</bundlor:bundlor>
</target>
</project>

View File

@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2010 SpringSource
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project name="common-war" xmlns:s="antlib:org.springframework.build">
<import file="../common/common.xml"/>
<!-- Macros -->
<macrodef name="do-compile">
<attribute name="classpath.id"/>
<attribute name="input.dir"/>
<attribute name="output.dir"/>
<attribute name="resources.dir"/>
<sequential>
<s:javac destdir="@{output.dir}" source="${source.version}" target="${target.version}"
debug="${compile.debug}" debugLevel="${compile.debug.level}">
<compilerarg line="${compiler.args}"/>
<src path="@{input.dir}"/>
<include name="**/*.java"/>
<include name="*.java"/>
<classpath refid="@{classpath.id}"/>
</s:javac>
<copy todir="@{output.dir}">
<fileset dir="@{input.dir}" erroronmissingdir="false">
<exclude name="**/*.java"/>
<exclude name="*.java"/>
</fileset>
</copy>
<copy todir="@{output.dir}">
<fileset dir="@{resources.dir}" erroronmissingdir="false"/>
</copy>
</sequential>
</macrodef>
</project>

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2010 SpringSource
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project name="default-war">
<import file="common.xml"/>
<import file="artifact.xml"/>
<import file="quality.xml"/>
<import file="package.xml"/>
<import file="publish.xml"/>
</project>

View File

@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2010 SpringSource
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project name="package-war">
<import file="common.xml"/>
<import file="../common/package.xml"/>
<!-- Macros -->
<macrodef name="dist-jar">
<attribute name="output.dir" default="${package.dist.dir}"/>
<sequential>
<mkdir dir="@{output.dir}"/>
<copy file="${war.output.file}" tofile="@{output.dir}/${package.war.output.file}"/>
</sequential>
</macrodef>
</project>

View File

@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2010 SpringSource
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project name="publish-war" xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:maven="antlib:org.apache.maven.artifact.ant">
<import file="common.xml"/>
<import file="../common/publish.xml"/>
<target name="publish-ivy" depends="ivy.init, resolve">
<delete quiet="true" file="${ivy.output.file}"/>
<mkdir dir="${ivy.output.dir}" />
<ivy:publish resolver="${publication.resolver.prefix}-bundle-publish" pubdate="${timestamp}"
status="${release.type}">
<artifacts pattern="${war.output.dir}/[artifact].[ext]"/>
<artifacts pattern="${source-jar.output.dir}/[artifact].[ext]"/>
<artifacts pattern="${ivy.output.dir}/[artifact].[ext]"/>
<artifacts pattern="${license.dir}/[artifact].[ext]"/>
</ivy:publish>
</target>
<target name="publish-maven" depends="create.pom, snapshot.pom, maven.init" unless="local.build">
<maven:deploy file="${war.output.file}">
<remoteRepository url="s3://${publish.bucket}/maven/bundles/${adjusted.release.type}">
<authentication username="${accessKey}" passphrase="${secretKey}"/>
</remoteRepository>
<pom file="${pom.output.file}"/>
<attach file="${source-jar.output.file}" classifier="sources"/>
</maven:deploy>
</target>
<target name="publish-maven-central" depends="maven.init">
<property name="maven.central.repository" value="s3://maven.springframework.org/${adjusted.release.type}"/>
<maven:deploy file="${war.output.file}">
<remoteRepository url="${maven.central.repository}">
<authentication username="${accessKey}" passphrase="${secretKey}"/>
</remoteRepository>
<pom file="${local.pom.output.file}"/>
<attach file="${source-jar.output.file}" classifier="sources"/>
</maven:deploy>
</target>
<target name="install-maven" depends="create.pom, snapshot.pom, maven.init">
<maven:install file="${war.output.file}">
<pom file="${pom.output.file}"/>
<attach file="${source-jar.output.file}" classifier="sources"/>
</maven:install>
</target>
<target name="install-maven-central" depends="maven.init">
<maven:install file="${war.output.file}">
<pom file="${local.pom.output.file}"/>
<attach file="${source-jar.output.file}" classifier="sources"/>
</maven:install>
</target>
</project>

View File

@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2010 SpringSource
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project name="quality-war" xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:osgi="antlib:org.springframework.build.osgi">
<import file="common.xml"/>
<import file="../common/quality.xml"/>
<target name="osgi-validate" depends="ivy.init, osgi.init"
description="Validates that a bundle can resolve against it's dependencies.">
<ivy:cachepath resolveId="osgi.optional.classpath" pathid="osgi.optional.classpath"
conf="compile,optional,provided,dm-server-provided" type="jar" log="download-only"/>
<osgi:validate bundlePath="${war.output.file}">
<equinoxPath refid="equinox.classpath"/>
<supportingBundlesPath refid="osgi.optional.classpath"/>
</osgi:validate>
<ivy:cachepath resolveId="osgi.compile.classpath" pathid="osgi.compile.classpath"
conf="compile,provided,dm-server-provided" type="jar" log="download-only"/>
<osgi:validate bundlePath="${war.output.file}">
<equinoxPath refid="equinox.classpath"/>
<supportingBundlesPath refid="osgi.compile.classpath"/>
</osgi:validate>
</target>
<!-- Other targets -->
<target name="test.do" depends="ivy.init, resolve.test, compile.init, test.init" if="test.exists">
<path id="test.compile.classpath">
<pathelement location="${war.classes.dir}"/>
<path refid="compile.classpath"/>
<path refid="test.classpath"/>
</path>
<test-compile classpath.id="test.compile.classpath" input.dir="${test.java.dir}" output.dir="${test.output.dir}"
resources.dir="${test.resources.dir}"/>
<path id="test.run.classpath">
<pathelement location="${war.classes.dir}"/>
<pathelement location="${test.output.dir}"/>
<path refid="compile.classpath"/>
<path refid="test.classpath"/>
<path refid="runtime.classpath"/>
</path>
<test-run classpath.id="test.run.classpath"/>
</target>
<target name="findbugs.do" depends="ivy.init, resolve.compile, compile.init, findbugs.init, src.init" if="src.exists">
<findbugs home="${findbugs.dir}" output="xml" outputFile="${findbugs.output.file}"
excludeFilter="${findbugs.exclude.file}" jvmargs="-Xmx1024M" errorProperty="findbugs.errors" warningsProperty="findbugs.warnings">
<class location="${war.classes.dir}"/>
<auxClasspath refid="compile.classpath"/>
<sourcepath location="${main.java.dir}"/>
</findbugs>
<antcall target="findbugs.post"/>
</target>
<target name="findbugs.post" if="findbugs.enforce">
<fail if="findbugs.errors" message="FindBugs errors found"/>
<fail if="findbugs.warnings" message="FindBugs warnings found"/>
</target>
</project>