You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ca...@apache.org on 2005/12/31 19:14:41 UTC
svn commit: r360383 - in /maven/plugins/trunk/maven-antrun-plugin/src/it:
test1/ test2/ test3/ test4/ test5/ test5/src/ test5/src/main/
test5/src/main/java/
Author: carlos
Date: Sat Dec 31 10:13:48 2005
New Revision: 360383
URL: http://svn.apache.org/viewcvs?rev=360383&view=rev
Log:
Added integration tests
Added:
maven/plugins/trunk/maven-antrun-plugin/src/it/test3/
maven/plugins/trunk/maven-antrun-plugin/src/it/test3/build.xml (with props)
maven/plugins/trunk/maven-antrun-plugin/src/it/test3/pom.xml (with props)
maven/plugins/trunk/maven-antrun-plugin/src/it/test4/
maven/plugins/trunk/maven-antrun-plugin/src/it/test4/build.xml (with props)
maven/plugins/trunk/maven-antrun-plugin/src/it/test4/pom.xml (with props)
maven/plugins/trunk/maven-antrun-plugin/src/it/test5/
maven/plugins/trunk/maven-antrun-plugin/src/it/test5/build.xml (with props)
maven/plugins/trunk/maven-antrun-plugin/src/it/test5/pom.xml (with props)
maven/plugins/trunk/maven-antrun-plugin/src/it/test5/src/
maven/plugins/trunk/maven-antrun-plugin/src/it/test5/src/main/
maven/plugins/trunk/maven-antrun-plugin/src/it/test5/src/main/java/
maven/plugins/trunk/maven-antrun-plugin/src/it/test5/src/main/java/TestTask.java (with props)
Modified:
maven/plugins/trunk/maven-antrun-plugin/src/it/test1/pom.xml
maven/plugins/trunk/maven-antrun-plugin/src/it/test2/pom.xml
Modified: maven/plugins/trunk/maven-antrun-plugin/src/it/test1/pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-antrun-plugin/src/it/test1/pom.xml?rev=360383&r1=360382&r2=360383&view=diff
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/test1/pom.xml (original)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/test1/pom.xml Sat Dec 31 10:13:48 2005
@@ -7,6 +7,8 @@
<groupId>org.apache.maven.plugins.antrun</groupId>
<artifactId>test1</artifactId>
<version>1.0-SNAPSHOT</version>
+ <name>Test for compile and plugin classpath references</name>
+ <description>Ensure that maven.compile.classpath and maven.plugin.classpath referencies are set</description>
<dependencies>
</dependencies>
Modified: maven/plugins/trunk/maven-antrun-plugin/src/it/test2/pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-antrun-plugin/src/it/test2/pom.xml?rev=360383&r1=360382&r2=360383&view=diff
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/test2/pom.xml (original)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/test2/pom.xml Sat Dec 31 10:13:48 2005
@@ -7,6 +7,8 @@
<groupId>org.apache.maven.plugins.antrun</groupId>
<artifactId>test2</artifactId>
<version>1.0-SNAPSHOT</version>
+ <name>Test for MANTRUN-28</name>
+ <description>maven.test.classpath doesn't contain test scope dependancies</description>
<dependencies>
<dependency>
Added: maven/plugins/trunk/maven-antrun-plugin/src/it/test3/build.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-antrun-plugin/src/it/test3/build.xml?rev=360383&view=auto
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/test3/build.xml (added)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/test3/build.xml Sat Dec 31 10:13:48 2005
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<project name="test1">
+
+ <target name="test">
+
+ <echo>user.home = ${user.home}</echo>
+ <fail message="user.home is not set">
+ <condition>
+ <not>
+ <isset property="user.home"/>
+ </not>
+ </condition>
+ </fail>
+
+ </target>
+
+</project>
Propchange: maven/plugins/trunk/maven-antrun-plugin/src/it/test3/build.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-antrun-plugin/src/it/test3/build.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/plugins/trunk/maven-antrun-plugin/src/it/test3/pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-antrun-plugin/src/it/test3/pom.xml?rev=360383&view=auto
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/test3/pom.xml (added)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/test3/pom.xml Sat Dec 31 10:13:48 2005
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.plugins.antrun</groupId>
+ <artifactId>test3</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <name>Test for MANTRUN-32</name>
+ <description>ant tasks don't use correct environment in antrun plugin</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>test</phase>
+ <configuration>
+ <tasks>
+ <echo>user.home = ${user.home}</echo>
+ <fail message="user.home is not set">
+ <condition>
+ <not>
+ <isset property="user.home"/>
+ </not>
+ </condition>
+ </fail>
+ <ant antfile="${basedir}/build.xml" inheritAll="true" inheritRefs="true">
+ <target name="test"/>
+ </ant>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Propchange: maven/plugins/trunk/maven-antrun-plugin/src/it/test3/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-antrun-plugin/src/it/test3/pom.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/plugins/trunk/maven-antrun-plugin/src/it/test4/build.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-antrun-plugin/src/it/test4/build.xml?rev=360383&view=auto
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/test4/build.xml (added)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/test4/build.xml Sat Dec 31 10:13:48 2005
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<project name="test1">
+
+ <target name="test">
+
+ <property name="property1" value="value"/>
+ <property name="property2" value="${property1}"/>
+ <property name="property3" value="prefix ${property1}"/>
+ <echo>P1: ${property1}</echo>
+ <echo>P2: ${property2}</echo>
+ <echo>P3: ${property3}</echo>
+ <echo message="P1: ${property1}"/>
+ <echo message="P2: ${property2}"/>
+ <echo message="P3: ${property3}"/>
+ <echo message="${property1}"/>
+ <echo message="${property2}"/>
+ <echo message="${property3}"/>
+
+ <fail message="Some property contains null in build.xml">
+ <condition>
+ <or>
+ <contains string="${property1}" substring="null" casesensitive="no"/>
+ <contains string="${property2}" substring="null" casesensitive="no"/>
+ <contains string="${property3}" substring="null" casesensitive="no"/>
+ </or>
+ </condition>
+ </fail>
+
+ </target>
+
+</project>
Propchange: maven/plugins/trunk/maven-antrun-plugin/src/it/test4/build.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-antrun-plugin/src/it/test4/build.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/plugins/trunk/maven-antrun-plugin/src/it/test4/pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-antrun-plugin/src/it/test4/pom.xml?rev=360383&view=auto
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/test4/pom.xml (added)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/test4/pom.xml Sat Dec 31 10:13:48 2005
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.plugins.antrun</groupId>
+ <artifactId>test4</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <name>Test for MANTRUN-29</name>
+ <description>properties not resolved in attributes</description>
+
+ <dependencies>
+ </dependencies>
+
+ <properties>
+ <mavenProperty>xyz</mavenProperty>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>test</phase>
+ <configuration>
+ <tasks>
+
+ <ant antfile="${basedir}/build.xml" inheritAll="true" inheritRefs="true">
+ <target name="test"/>
+ </ant>
+
+ <echo/>
+ <echo>Embedded tasks:</echo>
+
+ <property name="property1" value="value"/>
+ <property name="property2" value="${property1}"/>
+ <property name="property3" value="prefix ${property1}"/>
+ <echo>P1: ${property1}</echo>
+ <echo>P2: ${property2}</echo>
+ <echo>P3: ${property3}</echo>
+ <echo>mavenProperty: ${mavenProperty}</echo>
+ <echo message="P1: ${property1}"/>
+ <echo message="P2: ${property2}"/>
+ <echo message="P3: ${property3}"/>
+ <echo message="mavenProperty: ${mavenProperty}"/>
+ <echo message="${property1}"/>
+ <echo message="${property2}"/>
+ <echo message="${property3}"/>
+ <echo message="${mavenProperty}"/>
+
+ <fail message="Some property contains null in embedded tasks">
+ <condition>
+ <or>
+ <contains string="${property1}" substring="null" casesensitive="no"/>
+ <contains string="${property2}" substring="null" casesensitive="no"/>
+ <contains string="${property3}" substring="null" casesensitive="no"/>
+ <contains string="${mavenProperty}" substring="null" casesensitive="no"/>
+ </or>
+ </condition>
+ </fail>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Propchange: maven/plugins/trunk/maven-antrun-plugin/src/it/test4/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-antrun-plugin/src/it/test4/pom.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/plugins/trunk/maven-antrun-plugin/src/it/test5/build.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-antrun-plugin/src/it/test5/build.xml?rev=360383&view=auto
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/test5/build.xml (added)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/test5/build.xml Sat Dec 31 10:13:48 2005
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<project name="test1">
+
+ <target name="test">
+
+ <property name="property1" value="value"/>
+ <property name="property2" value="${property1}"/>
+ <property name="property3" value="prefix ${property1}"/>
+ <echo>P1: ${property1}</echo>
+ <echo>P2: ${property2}</echo>
+ <echo>P3: ${property3}</echo>
+ <echo message="P1: ${property1}"/>
+ <echo message="P2: ${property2}"/>
+ <echo message="P3: ${property3}"/>
+ <echo message="${property1}"/>
+ <echo message="${property2}"/>
+ <echo message="${property3}"/>
+
+ <fail message="Some property contains null in build.xml">
+ <condition>
+ <or>
+ <contains string="${property1}" substring="null" casesensitive="no"/>
+ <contains string="${property2}" substring="null" casesensitive="no"/>
+ <contains string="${property3}" substring="null" casesensitive="no"/>
+ </or>
+ </condition>
+ </fail>
+
+ </target>
+
+</project>
Propchange: maven/plugins/trunk/maven-antrun-plugin/src/it/test5/build.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-antrun-plugin/src/it/test5/build.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/plugins/trunk/maven-antrun-plugin/src/it/test5/pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-antrun-plugin/src/it/test5/pom.xml?rev=360383&view=auto
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/test5/pom.xml (added)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/test5/pom.xml Sat Dec 31 10:13:48 2005
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.plugins.antrun</groupId>
+ <artifactId>test5</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <name>Test for MANTRUN-34</name>
+ <description>StringIndexOutOfBoundsException in custom ant task referencing 'basedir'</description>
+
+ <dependencies>
+ <dependency>
+ <artifactId>ant</artifactId>
+ <groupId>ant</groupId>
+ <version>1.6.5</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>test</phase>
+ <configuration>
+ <tasks>
+
+ <echo message="basedir:${basedir}" />
+ <echo message="sourceDirectory:${project.build.sourceDirectory}" />
+
+ <taskdef name="test" classname="TestTask">
+ <classpath refid="maven.compile.classpath"/>
+ </taskdef>
+ <test/>
+
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Propchange: maven/plugins/trunk/maven-antrun-plugin/src/it/test5/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-antrun-plugin/src/it/test5/pom.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/plugins/trunk/maven-antrun-plugin/src/it/test5/src/main/java/TestTask.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-antrun-plugin/src/it/test5/src/main/java/TestTask.java?rev=360383&view=auto
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/it/test5/src/main/java/TestTask.java (added)
+++ maven/plugins/trunk/maven-antrun-plugin/src/it/test5/src/main/java/TestTask.java Sat Dec 31 10:13:48 2005
@@ -0,0 +1,14 @@
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.Task;
+
+public class TestTask extends Task {
+
+ public void execute() throws BuildException {
+ Project p = this.getProject();
+ System.out.println("sourceDirectory:" + p.getProperty("project.build.sourceDirectory"));
+ System.out.println("project.cmdline:" + p.getProperty("project.cmdline"));
+ System.out.println("basedir:" + p.getProperty("basedir"));
+ }
+
+}
Propchange: maven/plugins/trunk/maven-antrun-plugin/src/it/test5/src/main/java/TestTask.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-antrun-plugin/src/it/test5/src/main/java/TestTask.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"