mirror of https://github.com/apache/maven.git
Update archetype from sample with latest archetype plugin
git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@708937 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d91a0567f6
commit
0a35f55f0e
|
@ -1,50 +1,28 @@
|
|||
<?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 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-parent</artifactId>
|
||||
<version>9</version>
|
||||
</parent>
|
||||
|
||||
<groupId>org.apache.maven.its</groupId>
|
||||
<artifactId>maven-it-archetype</artifactId>
|
||||
<artifactId>maven-it-sample-archetype</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<packaging>maven-archetype</packaging>
|
||||
|
||||
<name>maven-it-sample-archetype</name>
|
||||
<build>
|
||||
<extensions>
|
||||
<extension>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-archetypeng-plugin</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<groupId>org.apache.maven.archetype</groupId>
|
||||
<artifactId>archetype-packaging</artifactId>
|
||||
<version>2.0-alpha-4</version>
|
||||
</extension>
|
||||
</extensions>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-archetypeng-plugin</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<artifactId>maven-archetype-plugin</artifactId>
|
||||
<version>2.0-alpha-4</version>
|
||||
<extensions>true</extensions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><archetype-descriptor id="maven-integration-test-sample-archetype">
|
||||
<?xml version="1.0" encoding="UTF-8"?><archetype-descriptor name="maven-it-sample">
|
||||
<fileSets>
|
||||
<fileSet filtered="true" packaged="true" encoding="UTF-8">
|
||||
<directory>src/test/java</directory>
|
||||
|
@ -14,13 +14,5 @@
|
|||
<include>**/*.xml</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
<fileSet filtered="true" encoding="UTF-8">
|
||||
<directory></directory>
|
||||
<includes>
|
||||
<include>.classpath</include>
|
||||
<include>.project</include>
|
||||
<include>out.txt</include>
|
||||
</includes>
|
||||
</fileSet>
|
||||
</fileSets>
|
||||
</archetype-descriptor>
|
|
@ -1,21 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<archetype>
|
||||
<id>maven-integration-test-sample-archetype</id>
|
||||
<?xml version="1.0" encoding="UTF-8"?><archetype>
|
||||
<id>maven-it-sample</id>
|
||||
<testSources>
|
||||
<source>src\test\java\org\apache\maven\it\MavenITmngXXXXDescriptionOfProblemTest.java</source>
|
||||
<source>src/test/java/MavenITmngXXXXDescriptionOfProblemTest.java</source>
|
||||
</testSources>
|
||||
<resources>
|
||||
<resource>.classpath</resource>
|
||||
<resource>.project</resource>
|
||||
<resource>out.txt</resource>
|
||||
</resources>
|
||||
<testResources>
|
||||
<resource>src\test\resources\mng-xxxx\checkstyle-assembly\pom.xml</resource>
|
||||
<resource>src\test\resources\mng-xxxx\checkstyle-assembly\src\main\resources\rule_set.xml</resource>
|
||||
<resource>src\test\resources\mng-xxxx\checkstyle-assembly\src\main\resources\stc_checks.xml</resource>
|
||||
<resource>src\test\resources\mng-xxxx\checkstyle-test\pom.xml</resource>
|
||||
<resource>src\test\resources\mng-xxxx\checkstyle-test\src\main\java\Class.java</resource>
|
||||
<resource>src\test\resources\mng-xxxx\pom.xml</resource>
|
||||
<resource>src\test\resources\mng-xxxx\readme.txt</resource>
|
||||
<resource>src/test/resources/mng-xxxx/checkstyle-assembly/pom.xml</resource>
|
||||
<resource>src/test/resources/mng-xxxx/checkstyle-assembly/src/main/resources/rule_set.xml</resource>
|
||||
<resource>src/test/resources/mng-xxxx/checkstyle-assembly/src/main/resources/stc_checks.xml</resource>
|
||||
<resource>src/test/resources/mng-xxxx/checkstyle-test/pom.xml</resource>
|
||||
<resource>src/test/resources/mng-xxxx/checkstyle-test/src/main/java/Class.java</resource>
|
||||
<resource>src/test/resources/mng-xxxx/pom.xml</resource>
|
||||
<resource>src/test/resources/mng-xxxx/readme.txt</resource>
|
||||
</testResources>
|
||||
</archetype>
|
||||
</archetype>
|
|
@ -1,5 +1,4 @@
|
|||
<?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
|
||||
|
@ -18,7 +17,6 @@ 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 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -26,13 +24,13 @@ under the License.
|
|||
<artifactId>${artifactId}</artifactId>
|
||||
<version>${version}</version>
|
||||
|
||||
<name>Maven Integration Tests</name>
|
||||
<name>Maven Integration Test Sample</name>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.shared</groupId>
|
||||
<artifactId>maven-verifier</artifactId>
|
||||
<version>1.0</version>
|
||||
<version>1.2-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.its</groupId>
|
||||
|
@ -56,7 +54,6 @@ under the License.
|
|||
<enabled>false</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
package ${package};
|
||||
|
||||
/*
|
||||
|
@ -23,9 +26,8 @@ import java.io.File;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.maven.it.AbstractMavenIntegrationTestCase;
|
||||
import org.apache.maven.it.Verifier;
|
||||
import org.apache.maven.it.util.ResourceExtractor;
|
||||
import ${package}.Verifier;
|
||||
import ${package}.util.ResourceExtractor;
|
||||
|
||||
/**
|
||||
* This is a sample integration test. The IT tests typically
|
||||
|
@ -38,7 +40,7 @@ import org.apache.maven.it.util.ResourceExtractor;
|
|||
* phases. See more information inline in the code.
|
||||
*
|
||||
* @author <a href="mailto:brianf@apache.org">Brian Fox</a>
|
||||
* @version $Id$
|
||||
* @version ${symbol_dollar}Id: MavenITmngXXXXDescriptionOfProblemTest.java 707999 2008-10-26 14:42:38Z bentmann ${symbol_dollar}
|
||||
*/
|
||||
public class MavenITmngXXXXDescriptionOfProblemTest
|
||||
extends AbstractMavenIntegrationTestCase
|
||||
|
@ -72,9 +74,9 @@ public class MavenITmngXXXXDescriptionOfProblemTest
|
|||
* makes it easy to do this.
|
||||
*/
|
||||
verifier = new Verifier( testDir.getAbsolutePath() );
|
||||
verifier.deleteArtifact( "org.apache.maven.its.itsample", "parent", "1.0", "pom" );
|
||||
verifier.deleteArtifact( "org.apache.maven.its.itsample", "checkstyle-test", "1.0", "jar" );
|
||||
verifier.deleteArtifact( "org.apache.maven.its.itsample", "checkstyle-assembly", "1.0", "jar" );
|
||||
verifier.deleteArtifact( "${package}s.itsample", "parent", "1.0", "pom" );
|
||||
verifier.deleteArtifact( "${package}s.itsample", "checkstyle-test", "1.0", "jar" );
|
||||
verifier.deleteArtifact( "${package}s.itsample", "checkstyle-assembly", "1.0", "jar" );
|
||||
|
||||
/*
|
||||
* The Command Line Options (CLI) are passed to the
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
|
@ -23,7 +26,7 @@ under the License.
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.apache.maven.its.itsample</groupId>
|
||||
<groupId>${package}s.itsample</groupId>
|
||||
<artifactId>parent</artifactId>
|
||||
<version>1</version>
|
||||
</parent>
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
<?xml version="1.0"?>
|
||||
<ruleset name="EPHS Custom ruleset"
|
||||
xmlns="http://pmd.sf.net/ruleset/1.0.0"
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE module PUBLIC
|
||||
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
|
||||
|
@ -78,8 +81,8 @@
|
|||
|
||||
|
||||
<module name="GenericIllegalRegexp">
|
||||
<!-- \s matches whitespace character, $ matches end of line. -->
|
||||
<property name="format" value="(?:\x66\x75\x63\x6B)|(?:\x73\x68\x69\x74)|(?:\x63\x75\x6E\x74)"/>
|
||||
<!-- ${symbol_escape}s matches whitespace character, ${symbol_dollar} matches end of line. -->
|
||||
<property name="format" value="(?:${symbol_escape}x66${symbol_escape}x75${symbol_escape}x63${symbol_escape}x6B)|(?:${symbol_escape}x73${symbol_escape}x68${symbol_escape}x69${symbol_escape}x74)|(?:${symbol_escape}x63${symbol_escape}x75${symbol_escape}x6E${symbol_escape}x74)"/>
|
||||
<property name="ignoreCase" value="true" />
|
||||
<property name="message" value="Code contains inappropriate language"/>
|
||||
|
||||
|
@ -99,7 +102,7 @@
|
|||
</module> -->
|
||||
|
||||
|
||||
<!-- http://checkstyle.sourceforge.net/config_coding.html#IllegalCatch-->
|
||||
<!-- http://checkstyle.sourceforge.net/config_coding.html${symbol_pound}IllegalCatch-->
|
||||
<!-- <module name="IllegalCatch">
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
|
@ -23,7 +26,7 @@ under the License.
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.apache.maven.its.itsample</groupId>
|
||||
<groupId>${package}s.itsample</groupId>
|
||||
<artifactId>parent</artifactId>
|
||||
<version>1</version>
|
||||
</parent>
|
||||
|
@ -37,7 +40,7 @@ under the License.
|
|||
<!--This extension is installed by the IT prior to invoking this build. See ../checkstyle-assembly-->
|
||||
<extensions>
|
||||
<extension>
|
||||
<groupId>org.apache.maven.its.itsample</groupId>
|
||||
<groupId>${package}s.itsample</groupId>
|
||||
<artifactId>checkstyle-assembly</artifactId>
|
||||
<version>1.0</version>
|
||||
</extension>
|
||||
|
@ -64,7 +67,7 @@ under the License.
|
|||
<configuration>
|
||||
<configLocation>stc_checks.xml</configLocation>
|
||||
<failsOnError>true</failsOnError>
|
||||
<cacheFile>${project.build.directory}/checkstyle-cachefile</cacheFile>
|
||||
<cacheFile>${symbol_dollar}{project.build.directory}/checkstyle-cachefile</cacheFile>
|
||||
<consoleOutput>true</consoleOutput>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
public class Class
|
||||
{
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
|
@ -22,7 +25,7 @@ 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 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>org.apache.maven.its.itsample</groupId>
|
||||
<groupId>${package}s.itsample</groupId>
|
||||
<artifactId>parent</artifactId>
|
||||
<version>1</version>
|
||||
<packaging>pom</packaging>
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
#set( $symbol_pound = '#' )
|
||||
#set( $symbol_dollar = '$' )
|
||||
#set( $symbol_escape = '\' )
|
||||
This is a sample IT based on a real one. This test first installs a jar containing some checkstyle rules. The second invocation uses that jar as an extension
|
||||
so that checkstyle finds the resources. If Maven behaves properly, the build succeeds, if not, the build fails. This is the simplest way to structure an IT when
|
||||
possible as it's cut and dry and is very easy to check with the verifier.
|
|
@ -42,6 +42,8 @@ under the License.
|
|||
<module>core-it-wagon</module>
|
||||
<module>core-it-support-artifacts</module>
|
||||
<module>maven-it-helper</module>
|
||||
<module>maven-it-archetype</module>
|
||||
<module>maven-it-sample</module>
|
||||
</modules>
|
||||
|
||||
<scm>
|
||||
|
|
Loading…
Reference in New Issue