mirror of https://github.com/apache/maven.git
Merging in integration test for Ant mojos.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@379182 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5395710ce0
commit
1724b0e94d
|
@ -0,0 +1,41 @@
|
|||
<?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 ../../../../maven-site/target/site/maven-v4_0_0.xsd ">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-ant-it-referenceParameter</artifactId>
|
||||
<name>Ant-Mojo Integration Test with non-String parameter</name>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<packaging>maven-plugin</packaging>
|
||||
<description>Tests using an Ant script to drive a mojo where a parameter is not a String type.</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-script-ant</artifactId>
|
||||
<version>2.0.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ant</groupId>
|
||||
<artifactId>ant</artifactId>
|
||||
<version>1.6.5</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-plugin-plugin</artifactId>
|
||||
<configuration>
|
||||
<goalPrefix>antWithRefs</goalPrefix>
|
||||
</configuration>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-plugin-tools-ant</artifactId>
|
||||
<version>2.0.2</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -0,0 +1,16 @@
|
|||
package org.apache.maven.plugins.antWithRefs;
|
||||
|
||||
import org.apache.tools.ant.BuildException;
|
||||
import org.apache.tools.ant.Task;
|
||||
|
||||
public class ArtifactsTask
|
||||
extends Task
|
||||
{
|
||||
|
||||
public void execute()
|
||||
throws BuildException
|
||||
{
|
||||
log( String.valueOf( getProject().getReference( "artifacts" ) ) );
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0"?>
|
||||
<antlib>
|
||||
<!-- Tasks -->
|
||||
<taskdef name="artifacts" classname="org.apache.maven.plugins.antWithRefs.ArtifactsTask"/>
|
||||
</antlib>
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<project xmlns:test="urn:maven-antWithRefs">
|
||||
<target name="test">
|
||||
<typedef resource="org/apache/maven/plugins/antWithRefs/antlib.xml" uri="urn:maven-antWithRefs"/>
|
||||
|
||||
<echo>Project artifacts:</echo>
|
||||
<test:artifacts/>
|
||||
</target>
|
||||
</project>
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<pluginMetadata 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 ../../../../../../maven-plugin-tools-model/target/generated-site/xsd/plugin-metadata-1.0.0.xsd ">
|
||||
<mojos>
|
||||
<mojo>
|
||||
<call>test</call>
|
||||
<goal>test</goal>
|
||||
<requiresDependencyResolution>compile</requiresDependencyResolution>
|
||||
<parameters>
|
||||
<parameter>
|
||||
<name>artifacts</name>
|
||||
<expression>${project.artifacts}</expression>
|
||||
<required>true</required>
|
||||
<readonly>true</readonly>
|
||||
<type>java.util.List</type>
|
||||
</parameter>
|
||||
</parameters>
|
||||
</mojo>
|
||||
</mojos>
|
||||
</pluginMetadata>
|
Loading…
Reference in New Issue