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/11/22 14:11:36 UTC
svn commit: r1412540 - in /maven/archetypes/trunk/maven-archetype-plugin/src:
main/resources/META-INF/maven/ main/resources/archetype-resources/
main/resources/archetype-resources/src/it/
main/resources/archetype-resources/src/it/simple-it/ test/resour...
Author: olamy
Date: Thu Nov 22 13:11:35 2012
New Revision: 1412540
URL: http://svn.apache.org/viewvc?rev=1412540&view=rev
Log:
improve maven-archetype-plugin with invoker it setup
Added:
maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/archetype-resources/src/it/
maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/archetype-resources/src/it/settings.xml (with props)
maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/archetype-resources/src/it/simple-it/
maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/archetype-resources/src/it/simple-it/invoker.properties (with props)
maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/archetype-resources/src/it/simple-it/pom.xml (with props)
maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/archetype-resources/src/it/simple-it/verify.groovy (with props)
Modified:
maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/META-INF/maven/archetype-metadata.xml
maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/archetype-resources/pom.xml
maven/archetypes/trunk/maven-archetype-plugin/src/test/resources/projects/basic/goal.txt
Modified: maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/META-INF/maven/archetype-metadata.xml
URL: http://svn.apache.org/viewvc/maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/META-INF/maven/archetype-metadata.xml?rev=1412540&r1=1412539&r2=1412540&view=diff
==============================================================================
--- maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/META-INF/maven/archetype-metadata.xml (original)
+++ maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/META-INF/maven/archetype-metadata.xml Thu Nov 22 13:11:35 2012
@@ -25,5 +25,8 @@ under the License.
<fileSet filtered="true" packaged="true">
<directory>src/main/java</directory>
</fileSet>
+ <fileSet filtered="false" packaged="false">
+ <directory>src/it</directory>
+ </fileSet>
</fileSets>
</archetype-descriptor>
Modified: maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/archetype-resources/pom.xml
URL: http://svn.apache.org/viewvc/maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/archetype-resources/pom.xml?rev=1412540&r1=1412539&r2=1412540&view=diff
==============================================================================
--- maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/archetype-resources/pom.xml (original)
+++ maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/archetype-resources/pom.xml Thu Nov 22 13:11:35 2012
@@ -66,4 +66,45 @@
</plugin>
</plugins>
</build>
+ <profiles>
+ <profile>
+ <id>run-its</id>
+ <build>
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-invoker-plugin</artifactId>
+ <version>1.7</version>
+ <configuration>
+ <debug>true</debug>
+ <projectsDirectory>src/it</projectsDirectory>
+ <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
+ <pomIncludes>
+ <pomInclude>*/pom.xml</pomInclude>
+ </pomIncludes>
+ <postBuildHookScript>verify</postBuildHookScript>
+ <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
+ <settingsFile>src/it/settings.xml</settingsFile>
+ <goals>
+ <goal>clean</goal>
+ <goal>test-compile</goal>
+ </goals>
+ </configuration>
+ <executions>
+ <execution>
+ <id>integration-test</id>
+ <goals>
+ <goal>install</goal>
+ <goal>integration-test</goal>
+ <goal>verify</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+
+ </build>
+ </profile>
+ </profiles>
</project>
Added: maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/archetype-resources/src/it/settings.xml
URL: http://svn.apache.org/viewvc/maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/archetype-resources/src/it/settings.xml?rev=1412540&view=auto
==============================================================================
--- maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/archetype-resources/src/it/settings.xml (added)
+++ maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/archetype-resources/src/it/settings.xml Thu Nov 22 13:11:35 2012
@@ -0,0 +1,55 @@
+<?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>
+ </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/archetypes/trunk/maven-archetype-plugin/src/main/resources/archetype-resources/src/it/settings.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/archetype-resources/src/it/settings.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/archetype-resources/src/it/simple-it/invoker.properties
URL: http://svn.apache.org/viewvc/maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/archetype-resources/src/it/simple-it/invoker.properties?rev=1412540&view=auto
==============================================================================
--- maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/archetype-resources/src/it/simple-it/invoker.properties (added)
+++ maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/archetype-resources/src/it/simple-it/invoker.properties Thu Nov 22 13:11:35 2012
@@ -0,0 +1 @@
+invoker.goals = archetype.it:basic-plugin:0.1-SNAPSHOT:touch
\ No newline at end of file
Propchange: maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/archetype-resources/src/it/simple-it/invoker.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/archetype-resources/src/it/simple-it/invoker.properties
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/archetype-resources/src/it/simple-it/pom.xml
URL: http://svn.apache.org/viewvc/maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/archetype-resources/src/it/simple-it/pom.xml?rev=1412540&view=auto
==============================================================================
--- maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/archetype-resources/src/it/simple-it/pom.xml (added)
+++ maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/archetype-resources/src/it/simple-it/pom.xml Thu Nov 22 13:11:35 2012
@@ -0,0 +1,16 @@
+<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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.archetypes</groupId>
+ <artifactId>maven-plugin-archetype-it</artifactId>
+ <version>1.0-SNAPSHOT</version>
+
+ <name>${artifactId} Maven Plugin</name>
+ <url>http://maven.apache.org</url>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+
+</project>
Propchange: maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/archetype-resources/src/it/simple-it/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/archetype-resources/src/it/simple-it/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/archetype-resources/src/it/simple-it/verify.groovy
URL: http://svn.apache.org/viewvc/maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/archetype-resources/src/it/simple-it/verify.groovy?rev=1412540&view=auto
==============================================================================
--- maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/archetype-resources/src/it/simple-it/verify.groovy (added)
+++ maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/archetype-resources/src/it/simple-it/verify.groovy Thu Nov 22 13:11:35 2012
@@ -0,0 +1,3 @@
+File touchFile = new File( basedir, "target/touch.txt" );
+
+assert touchFile.isFile()
Propchange: maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/archetype-resources/src/it/simple-it/verify.groovy
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/archetypes/trunk/maven-archetype-plugin/src/main/resources/archetype-resources/src/it/simple-it/verify.groovy
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Modified: maven/archetypes/trunk/maven-archetype-plugin/src/test/resources/projects/basic/goal.txt
URL: http://svn.apache.org/viewvc/maven/archetypes/trunk/maven-archetype-plugin/src/test/resources/projects/basic/goal.txt?rev=1412540&r1=1412539&r2=1412540&view=diff
==============================================================================
--- maven/archetypes/trunk/maven-archetype-plugin/src/test/resources/projects/basic/goal.txt (original)
+++ maven/archetypes/trunk/maven-archetype-plugin/src/test/resources/projects/basic/goal.txt Thu Nov 22 13:11:35 2012
@@ -1 +1 @@
-verify
\ No newline at end of file
+verify -Prun-its
\ No newline at end of file