mirror of https://github.com/apache/maven.git
o start of an archetype that can be used with doco describing how best
to target different environments. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@307145 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0bc702b386
commit
1c02566be7
|
@ -0,0 +1,10 @@
|
||||||
|
<project>
|
||||||
|
<parent>
|
||||||
|
<artifactId>maven-archetypes</artifactId>
|
||||||
|
<groupId>org.apache.maven.archetypes</groupId>
|
||||||
|
<version>1.0-alpha-4-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<artifactId>maven-archetype-profiles</artifactId>
|
||||||
|
<version>1.0-alpha-4-SNAPSHOT</version>
|
||||||
|
</project>
|
|
@ -0,0 +1,9 @@
|
||||||
|
<archetype>
|
||||||
|
<id>profiles</id>
|
||||||
|
<sources>
|
||||||
|
<source>src/main/java/App.java</source>
|
||||||
|
</sources>
|
||||||
|
<testSources>
|
||||||
|
<source>src/test/java/AppTest.java</source>
|
||||||
|
</testSources>
|
||||||
|
</archetype>
|
|
@ -0,0 +1,18 @@
|
||||||
|
<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>${groupId}</groupId>
|
||||||
|
<artifactId>${artifactId}</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<version>${version}</version>
|
||||||
|
<name>Maven Quick Start Archetype</name>
|
||||||
|
<url>http://maven.apache.org</url>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>junit</groupId>
|
||||||
|
<artifactId>junit</artifactId>
|
||||||
|
<version>3.8.1</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
|
@ -0,0 +1 @@
|
||||||
|
environment=development
|
|
@ -0,0 +1 @@
|
||||||
|
environment=production
|
|
@ -0,0 +1 @@
|
||||||
|
environment=qa
|
|
@ -0,0 +1,13 @@
|
||||||
|
package $package;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hello world!
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class App
|
||||||
|
{
|
||||||
|
public static void main( String[] args )
|
||||||
|
{
|
||||||
|
System.out.println( "Hello World!" );
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,38 @@
|
||||||
|
package $package;
|
||||||
|
|
||||||
|
import junit.framework.Test;
|
||||||
|
import junit.framework.TestCase;
|
||||||
|
import junit.framework.TestSuite;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unit test for simple App.
|
||||||
|
*/
|
||||||
|
public class AppTest
|
||||||
|
extends TestCase
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Create the test case
|
||||||
|
*
|
||||||
|
* @param testName name of the test case
|
||||||
|
*/
|
||||||
|
public AppTest( String testName )
|
||||||
|
{
|
||||||
|
super( testName );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the suite of tests being tested
|
||||||
|
*/
|
||||||
|
public static Test suite()
|
||||||
|
{
|
||||||
|
return new TestSuite( AppTest.class );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Rigourous Test :-)
|
||||||
|
*/
|
||||||
|
public void testApp()
|
||||||
|
{
|
||||||
|
assertTrue( true );
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue