You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ol...@apache.org on 2012/05/13 00:52:34 UTC

svn commit: r1337714 - in /maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic: ./ invoker.properties pom.xml src/ src/main/ src/main/scripts/ src/main/scripts/touch.build.xml src/main/scripts/touch.mojos.xml verify.groovy

Author: olamy
Date: Sat May 12 22:52:34 2012
New Revision: 1337714

URL: http://svn.apache.org/viewvc?rev=1337714&view=rev
Log:
add a simple it test with ant mojo

Added:
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/invoker.properties   (with props)
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/pom.xml   (with props)
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/src/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/src/main/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/src/main/scripts/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/src/main/scripts/touch.build.xml   (with props)
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/src/main/scripts/touch.mojos.xml   (with props)
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/verify.groovy   (with props)

Added: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/invoker.properties?rev=1337714&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/invoker.properties (added)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/invoker.properties Sat May 12 22:52:34 2012
@@ -0,0 +1,3 @@
+invoker.goals.1 = clean install -DskipTests
+invoker.goals.2 = org.apache.maven.ant.it:maven-ant-it-basic:1.0-SNAPSHOT:touch -Dname=touch.txt
+

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/invoker.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/invoker.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/pom.xml?rev=1337714&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/pom.xml (added)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/pom.xml Sat May 12 22:52:34 2012
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you 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 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.ant.it</groupId>
+  <artifactId>maven-ant-it-basic</artifactId>
+  <name>Basic Ant-Mojo Integration Test</name>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>maven-plugin</packaging>
+  <description>Tests the simplest case of using an Ant script to drive a mojo.</description>
+
+  <properties>
+    <pluginPluginVersion>@project.version@</pluginPluginVersion><!--  -->
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>ant</groupId>
+      <artifactId>ant</artifactId>
+      <version>1.6.5</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-script-ant</artifactId>
+      <version>2.2.1</version>
+    </dependency>
+  </dependencies>
+  
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-plugin-plugin</artifactId>
+        <version>${pluginPluginVersion}</version>
+        <configuration>
+          <prefix>antBasic</prefix>
+        </configuration>
+        <dependencies>
+          <dependency>
+            <groupId>org.apache.maven.plugin-tools</groupId>
+            <artifactId>maven-plugin-tools-ant</artifactId>
+            <version>${pluginPluginVersion}</version>
+          </dependency>
+        </dependencies>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/src/main/scripts/touch.build.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/src/main/scripts/touch.build.xml?rev=1337714&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/src/main/scripts/touch.build.xml (added)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/src/main/scripts/touch.build.xml Sat May 12 22:52:34 2012
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you 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>
+  <target name="touch">
+    <touch mkdirs="true" file="target/${name}"/>
+  </target>
+</project>
\ No newline at end of file

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/src/main/scripts/touch.build.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/src/main/scripts/touch.build.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/src/main/scripts/touch.mojos.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/src/main/scripts/touch.mojos.xml?rev=1337714&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/src/main/scripts/touch.mojos.xml (added)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/src/main/scripts/touch.mojos.xml Sat May 12 22:52:34 2012
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you 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.
+  -->
+
+<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>touch</call>
+      <goal>touch</goal>
+      <parameters>
+        <parameter>
+          <name>name</name>
+          <expression>${name}</expression>
+          <required>true</required>
+          <readonly>false</readonly>
+          <type>java.lang.String</type>
+        </parameter>
+      </parameters>
+    </mojo>
+  </mojos>
+</pluginMetadata>

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/src/main/scripts/touch.mojos.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/src/main/scripts/touch.mojos.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/verify.groovy
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/verify.groovy?rev=1337714&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/verify.groovy (added)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/verify.groovy Sat May 12 22:52:34 2012
@@ -0,0 +1,11 @@
+File touchFile = new File( basedir, "target/touch.txt" )
+assert touchFile.isFile()
+
+File descriptorFile = new File( basedir, "target/classes/META-INF/maven/plugin.xml" );
+assert descriptorFile.isFile()
+
+File oldHelpClass = new File( basedir, "target/classes/HelpMojo.class" );
+assert !oldHelpClass.exists()
+
+
+return true;

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/verify.groovy
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/ant-basic/verify.groovy
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision