You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@creadur.apache.org by jo...@apache.org on 2008/05/11 23:29:08 UTC
svn commit: r655377 - in /incubator/rat/main/trunk/rat: build.xml pom.xml
src/test/antunit/build.xml target-eclipse/ target-eclipse/classes/
target-eclipse/test-classes/
Author: jochen
Date: Sun May 11 14:29:07 2008
New Revision: 655377
URL: http://svn.apache.org/viewvc?rev=655377&view=rev
Log:
Integrated the antunit tests into the Maven 2 build.
Added:
incubator/rat/main/trunk/rat/src/test/antunit/build.xml (with props)
incubator/rat/main/trunk/rat/target-eclipse/
incubator/rat/main/trunk/rat/target-eclipse/classes/
incubator/rat/main/trunk/rat/target-eclipse/test-classes/
Modified:
incubator/rat/main/trunk/rat/build.xml
incubator/rat/main/trunk/rat/pom.xml
Modified: incubator/rat/main/trunk/rat/build.xml
URL: http://svn.apache.org/viewvc/incubator/rat/main/trunk/rat/build.xml?rev=655377&r1=655376&r2=655377&view=diff
==============================================================================
--- incubator/rat/main/trunk/rat/build.xml (original)
+++ incubator/rat/main/trunk/rat/build.xml Sun May 11 14:29:07 2008
@@ -52,6 +52,8 @@
<property name='ant.url' value='http://repo1.maven.org/maven2/org/apache/ant/ant/1.7.0/ant-1.7.0.jar'/>
<property name='ant.launcher.jar' value='ant-launcher-1.7.0.jar'/>
<property name='ant.launcher.url' value='http://repo1.maven.org/maven2/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.jar'/>
+ <property name='antunit.jar' value='ant-antunit-1.0.jar'/>
+ <property name='antunit.url' value='http://repo1.maven.org/maven2/org/apache/ant/ant-antunit/1.0/ant-antunit-1.0.jar'/>
<available property='commons.lang.available' file='${build.lib}/${commons.lang.jar}'/>
<available property='commons.collections.available' file='${build.lib}/${commons.collections.jar}'/>
@@ -61,11 +63,8 @@
<available file='${build.lib}/${ant.jar}'/>
<available file='${build.lib}/${ant.launcher.jar}'/>
</and>
- </condition>
-
- <condition property="running.windows">
- <os family="windows"/>
- </condition>
+ </condition>
+ <available property='antunit.available' file="${build.lib}/${antunit.jar}"/>
<zipfileset id="src.files" prefix="${src.dist.prefix}" dir="${basedir}">
<include name="LICENSE.txt"/>
@@ -109,7 +108,11 @@
<download jar='${ant.launcher.jar}' url='${ant.launcher.url}'/>
</target>
- <target name='prerequisites' depends='setup.proxy,commons.lang.download,commons.collections.download,junit.download,ant.download'/>
+ <target name='antunit.download' unless='antunit.available'>
+ <download jar='${antunit.jar}' url='${antunit.url}'/>
+ </target>
+
+ <target name='prerequisites' depends='setup.proxy,commons.lang.download,commons.collections.download,junit.download,ant.download,antunit.download'/>
<target name='clean'>
<delete dir='${build.base}'/>
@@ -175,41 +178,14 @@
</junit>
</target>
- <target name="runAntWin" if="running.windows">
- <macrodef name="runAnt">
- <attribute name="buildfile"/>
- <sequential>
- <exec executable="cmd">
- <arg value="/c"/>
- <arg file="${ant.home}/bin/ant.bat"/>
- <arg value="-buildfile"/>
- <arg value="@{buildfile}"/>
- <arg value="-lib"/>
- <arg value="${jar.name}"/>
- </exec>
- </sequential>
- </macrodef>
- </target>
-
- <target name="runAntNonWin" unless="running.windows">
- <macrodef name="runAnt">
- <attribute name="buildfile"/>
- <sequential>
- <exec executable="ant">
- <arg value="-buildfile"/>
- <arg value="@{buildfile}"/>
- <arg value="-lib"/>
- <arg value="${jar.name}"/>
- </exec>
- </sequential>
- </macrodef>
- </target>
-
- <target name='run-task-tests' depends='build,runAntWin,runAntNonWin'
+ <target name='run-task-tests' depends='build'
if='Ant-1.7.0-or-later'
- description='Runs Ant task tests'>
- <runAnt buildfile="${src.tests}/antunit/report-bad-configurations.xml"/>
- <runAnt buildfile="${src.tests}/antunit/report-normal-operation.xml"/>
+ description='Runs Ant task tests'>
+ <ant dir="${src.tests}/antunit" inheritall="false" inheritrefs="false">
+ <property name="jar.name" location="${jar.name}"/>
+ <property name="base.dir" location="${basedir}"/>
+ <property name="antunit.jar.name" location="${build.lib}/${antunit.jar}"/>
+ </ant>
</target>
<target name='run-tests' depends='run-unit-tests, run-task-tests'>
Modified: incubator/rat/main/trunk/rat/pom.xml
URL: http://svn.apache.org/viewvc/incubator/rat/main/trunk/rat/pom.xml?rev=655377&r1=655376&r2=655377&view=diff
==============================================================================
--- incubator/rat/main/trunk/rat/pom.xml (original)
+++ incubator/rat/main/trunk/rat/pom.xml Sun May 11 14:29:07 2008
@@ -74,7 +74,13 @@
<artifactId>ant</artifactId>
<version>1.7.0</version>
<scope>provided</scope>
- </dependency>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-antunit</artifactId>
+ <version>1.0</version>
+ <scope>test</scope>
+ </dependency>
<dependency>
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-impl</artifactId>
@@ -169,6 +175,42 @@
</archive>
</configuration>
</plugin>
+ <plugin>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>generate-test-resources</phase>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <configuration>
+ <stripVersion>true</stripVersion>
+ <includeArtifactIds>ant-antunit</includeArtifactIds>
+ <outputDirectory>${project.build.directory}/dependencies</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>test</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <ant antfile="src/test/antunit/build.xml" inheritAll="false" inheritRefs="false">
+ <property name="jar.name" location="${project.build.outputDirectory}"/>
+ <property name="base.dir" location="${basedir}"/>
+ <property name="antunit.jar.name" location="${project.build.directory}/dependencies/ant-antunit.jar"/>
+ </ant>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
Added: incubator/rat/main/trunk/rat/src/test/antunit/build.xml
URL: http://svn.apache.org/viewvc/incubator/rat/main/trunk/rat/src/test/antunit/build.xml?rev=655377&view=auto
==============================================================================
--- incubator/rat/main/trunk/rat/src/test/antunit/build.xml (added)
+++ incubator/rat/main/trunk/rat/src/test/antunit/build.xml Sun May 11 14:29:07 2008
@@ -0,0 +1,48 @@
+<project name="antunit" default="all">
+ <condition property="running.windows">
+ <os family="windows"/>
+ </condition>
+
+ <target name="runAntWin" if="running.windows">
+ <macrodef name="runAnt">
+ <attribute name="buildfile"/>
+ <sequential>
+ <exec executable="cmd">
+ <arg value="/c"/>
+ <arg file="${ant.home}/bin/ant.bat"/>
+ <arg value="-buildfile"/>
+ <arg value="@{buildfile}"/>
+ <arg value="-lib"/>
+ <arg value="${jar.name}"/>
+ <arg value="-lib"/>
+ <arg value="${antunit.jar.name}"/>
+ <arg value="-Dbasedir"/>
+ <arg value="${base.dir}"/>
+ </exec>
+ </sequential>
+ </macrodef>
+ </target>
+
+ <target name="runAntNonWin" unless="running.windows">
+ <macrodef name="runAnt">
+ <attribute name="buildfile"/>
+ <sequential>
+ <exec executable="ant">
+ <arg value="-buildfile"/>
+ <arg value="@{buildfile}"/>
+ <arg value="-lib"/>
+ <arg value="${jar.name}"/>
+ <arg value="-Dbasedir"/>
+ <arg value="${base.dir}"/>
+ <arg value="-lib"/>
+ <arg value="${antunit.jar.name}"/>
+ </exec>
+ </sequential>
+ </macrodef>
+ </target>
+
+ <target name="all" depends="runAntWin,runAntNonWin">
+ <runAnt buildfile="report-bad-configurations.xml"/>
+ <runAnt buildfile="report-normal-operation.xml"/>
+ </target>
+</project>
Propchange: incubator/rat/main/trunk/rat/src/test/antunit/build.xml
------------------------------------------------------------------------------
svn:mime-type = text/plain