maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bentm...@apache.org
Subject svn commit: r698148 - in /maven/plugin-tools/trunk/maven-plugin-plugin: ./ src/it/ src/it/java-basic/ src/it/java-basic/src/ src/it/java-basic/src/main/ src/it/java-basic/src/main/java/ src/it/java-basic/src/main/java/org/ src/it/java-basic/src/main/ja...
Date Tue, 23 Sep 2008 12:00:55 GMT
Author: bentmann
Date: Tue Sep 23 05:00:54 2008
New Revision: 698148

URL: http://svn.apache.org/viewvc?rev=698148&view=rev
Log:
o Migrated core IT 0013 over to its corresponding plugin project

Added:
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/invoker.properties   (with
props)
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/pom.xml   (with props)
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/src/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/src/main/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/src/main/java/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/src/main/java/org/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/src/main/java/org/apache/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/src/main/java/org/apache/maven/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/src/main/java/org/apache/maven/plugin/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/src/main/java/org/apache/maven/plugin/coreit/
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/src/main/java/org/apache/maven/plugin/coreit/CoreIt0013Mojo.java
  (with props)
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/verify.bsh   (with props)
    maven/plugin-tools/trunk/maven-plugin-plugin/src/it/settings.xml   (with props)
Modified:
    maven/plugin-tools/trunk/maven-plugin-plugin/pom.xml

Modified: maven/plugin-tools/trunk/maven-plugin-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/pom.xml?rev=698148&r1=698147&r2=698148&view=diff
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/pom.xml (original)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/pom.xml Tue Sep 23 05:00:54 2008
@@ -263,5 +263,51 @@
         </plugins>
       </reporting>
     </profile>
+    <profile>
+      <id>run-its</id>
+      <!-- TODO: Remove once maven-invoker-plugin:1.3 has been released -->
+      <pluginRepositories>
+        <pluginRepository>
+          <id>apache.snapshots</id>
+          <name>Apache Snapshot Repository</name>
+          <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+          <releases>
+            <enabled>false</enabled>
+          </releases>
+        </pluginRepository>
+      </pluginRepositories>
+      <build>
+        <plugins>
+          <plugin>
+            <artifactId>maven-invoker-plugin</artifactId>
+            <version>1.3-SNAPSHOT</version>
+            <configuration>
+              <debug>true</debug>
+              <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
+              <pomExcludes>
+                <!-- TODO: Investigate whether this is a core IT or a plugin IT. In the
latter case, migrate it into the automated build -->
+                <pomExclude>plugin-report-failure-it/*</pomExclude>
+              </pomExcludes>
+              <preBuildHookScript>setup.bsh</preBuildHookScript>
+              <postBuildHookScript>verify.bsh</postBuildHookScript>
+              <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
+              <settingsFile>src/it/settings.xml</settingsFile>
+              <goals>
+                <goal>verify</goal>
+              </goals>
+            </configuration>
+            <executions>
+              <execution>
+                <id>integration-test</id>
+                <goals>
+                  <goal>install</goal>
+                  <goal>run</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
   </profiles>
 </project>

Added: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/invoker.properties
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/invoker.properties?rev=698148&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/invoker.properties (added)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/invoker.properties Tue
Sep 23 05:00:54 2008
@@ -0,0 +1,2 @@
+invoker.goals.1 = install
+invoker.goals.2 = org.apache.maven.its.it0013:maven-it-it0013:1.0:it0013

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

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

Added: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/pom.xml?rev=698148&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/pom.xml (added)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/pom.xml Tue Sep 23 05:00:54
2008
@@ -0,0 +1,54 @@
+<?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>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.it0013</groupId>
+  <artifactId>maven-it-it0013</artifactId>
+  <version>1.0</version>
+  <packaging>maven-plugin</packaging>
+
+  <name>Maven Integration Test :: it0013</name> 
+  <description>
+    Test plugin-plugin, which tests maven-plugin-tools-api and 
+    maven-plugin-tools-java. This will generate a plugin descriptor from 
+    java-based mojo sources, install the plugin, and then use it.
+  </description>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-api</artifactId>
+      <version>2.0</version>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-plugin-plugin</artifactId>
+        <version>@project.version@</version>
+      </plugin>
+    </plugins>
+  </build>
+</project>

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

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

Added: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/src/main/java/org/apache/maven/plugin/coreit/CoreIt0013Mojo.java
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/src/main/java/org/apache/maven/plugin/coreit/CoreIt0013Mojo.java?rev=698148&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/src/main/java/org/apache/maven/plugin/coreit/CoreIt0013Mojo.java
(added)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/src/main/java/org/apache/maven/plugin/coreit/CoreIt0013Mojo.java
Tue Sep 23 05:00:54 2008
@@ -0,0 +1,67 @@
+package org.apache.maven.plugin.coreit;
+
+/*
+ * 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.
+ */
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+
+import java.io.File;
+import java.io.IOException;
+
+/**
+ * Touches a test file.
+ * 
+ * @goal it0013
+ */
+public class CoreIt0013Mojo
+    extends AbstractMojo
+{
+    
+    /**
+     * @parameter expression="${project.build.directory}"
+     * @required
+     */
+    private String outputDirectory;
+
+    public void execute()
+        throws MojoExecutionException
+    {
+        getLog().info( "outputDirectory = " + outputDirectory );
+
+        File f = new File( outputDirectory );
+        
+        if ( !f.exists() )
+        {
+            f.mkdirs();
+        }
+        
+        File touch = new File( f, "touch.txt" );
+        
+        try
+        {
+            touch.createNewFile();
+        }
+        catch ( IOException e )
+        {
+            throw new MojoExecutionException( "Error writing verification file.", e );
+        }                
+    }
+
+}

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/src/main/java/org/apache/maven/plugin/coreit/CoreIt0013Mojo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/src/main/java/org/apache/maven/plugin/coreit/CoreIt0013Mojo.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/verify.bsh?rev=698148&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/verify.bsh (added)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/java-basic/verify.bsh Tue Sep 23 05:00:54
2008
@@ -0,0 +1,21 @@
+import java.io.*;
+import java.util.*;
+import java.util.regex.*;
+
+try
+{
+    File file = new File( basedir, "target/touch.txt" );
+    System.out.println( "Checking for existence of generated touch file: " + file );
+    if ( !file.isFile() )
+    {
+        System.out.println( "FAILED!" );
+        return false;
+    }
+}
+catch( Throwable t )
+{
+    t.printStackTrace();
+    return false;
+}
+
+return true;

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

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

Added: maven/plugin-tools/trunk/maven-plugin-plugin/src/it/settings.xml
URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/it/settings.xml?rev=698148&view=auto
==============================================================================
--- maven/plugin-tools/trunk/maven-plugin-plugin/src/it/settings.xml (added)
+++ maven/plugin-tools/trunk/maven-plugin-plugin/src/it/settings.xml Tue Sep 23 05:00:54 2008
@@ -0,0 +1,66 @@
+<?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.
+-->
+
+<settings>
+  <profiles>
+    <profile>
+      <id>it-repo</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+      <repositories>
+        <repository>
+          <id>local.central</id>
+          <url>@localRepositoryUrl@</url>
+          <releases>
+            <enabled>true</enabled>
+          </releases>
+          <snapshots>
+            <enabled>true</enabled>
+          </snapshots>
+        </repository>
+        <repository>
+          <id>apache.snapshots</id>
+          <name>Apache Snapshot Repository</name>
+          <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+          <releases>
+            <enabled>false</enabled>
+          </releases>
+          <snapshots>
+            <enabled>true</enabled>
+          </snapshots>
+        </repository>
+      </repositories>
+      <pluginRepositories>
+        <pluginRepository>
+          <id>local.central</id>
+          <url>@localRepositoryUrl@</url>
+          <releases>
+            <enabled>true</enabled>
+          </releases>
+          <snapshots>
+            <enabled>true</enabled>
+          </snapshots>
+        </pluginRepository>
+      </pluginRepositories>
+    </profile>
+  </profiles>
+</settings>

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

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



Mime
View raw message