mirror of https://github.com/apache/maven.git
update archetypes
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@170014 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5338e97680
commit
6557e2d4be
|
@ -2,12 +2,12 @@
|
|||
<parent>
|
||||
<artifactId>maven-archetype</artifactId>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<version>1.0-alpha-1-SNAPSHOT</version>
|
||||
<version>1.0-alpha-1</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>maven-archetype-core</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.0-alpha-1-SNAPSHOT</version>
|
||||
<version>1.0-alpha-1</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>plexus</groupId>
|
||||
|
@ -22,12 +22,12 @@
|
|||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-artifact</artifactId>
|
||||
<version>2.0-SNAPSHOT</version>
|
||||
<version>2.0-alpha-2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven.wagon</groupId>
|
||||
<artifactId>wagon-file</artifactId>
|
||||
<version>1.0-alpha-2</version>
|
||||
<version>1.0-alpha-3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
|
|
@ -2,20 +2,18 @@
|
|||
<parent>
|
||||
<artifactId>maven-plugin-parent</artifactId>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<version>2.0-SNAPSHOT</version>
|
||||
<version>2.0-alpha-2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>maven-archetype-plugin</artifactId>
|
||||
<packaging>maven-plugin</packaging>
|
||||
<name>Maven Archetype Plugin</name>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<version>1.0-alpha-1</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-archetype-core</artifactId>
|
||||
<version>1.0-alpha-1-SNAPSHOT</version>
|
||||
<type>jar</type>
|
||||
<scope>compile</scope>
|
||||
<version>1.0-alpha-1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</model>
|
||||
|
|
|
@ -65,19 +65,19 @@ public class MavenArchetypeMojo
|
|||
* @parameter expression="${archetypeVersion}"
|
||||
* @required
|
||||
*/
|
||||
private String archetypeVersion = "1.0-alpha-1-SNAPSHOT";
|
||||
private String archetypeVersion = "RELEASE";
|
||||
|
||||
/**
|
||||
* @parameter expression="${groupId}"
|
||||
* @required
|
||||
*/
|
||||
private String groupId = "org.apache.maven.archetypes";
|
||||
private String groupId;
|
||||
|
||||
/**
|
||||
* @parameter expression="${artifactId}"
|
||||
* @required
|
||||
*/
|
||||
private String artifactId = "maven-archetype-quickstart";
|
||||
private String artifactId;
|
||||
|
||||
/**
|
||||
* @parameter expression="${version}"
|
||||
|
@ -86,7 +86,7 @@ public class MavenArchetypeMojo
|
|||
private String version = "1.0-SNAPSHOT";
|
||||
|
||||
/**
|
||||
* @parameter expression="${packageName}"
|
||||
* @parameter expression="${packageName}" alias="package"
|
||||
* @required
|
||||
*/
|
||||
private String packageName = "com.mycompany.app";
|
||||
|
@ -101,7 +101,6 @@ public class MavenArchetypeMojo
|
|||
throws MojoExecutionException
|
||||
{
|
||||
// TODO: prompt for missing values
|
||||
// TODO: use new plugin type
|
||||
// TODO: configurable license
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
|
|
@ -2,10 +2,9 @@
|
|||
<parent>
|
||||
<artifactId>maven-archetypes</artifactId>
|
||||
<groupId>org.apache.maven.archetypes</groupId>
|
||||
<version>1.0-alpha-1-SNAPSHOT</version>
|
||||
<version>1.0-alpha-1</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>maven-archetype-marmalade-mojo</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.0-alpha-1-SNAPSHOT</version>
|
||||
<version>1.0-alpha-1</version>
|
||||
</model>
|
||||
|
|
|
@ -8,25 +8,25 @@
|
|||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-plugin-api</artifactId>
|
||||
<version>2.0-SNAPSHOT</version>
|
||||
<version>2.0-alpha-2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>marmalade</groupId>
|
||||
<artifactId>marmalade-core</artifactId>
|
||||
<version>1.0-alpha-2</version>
|
||||
<version>1.0-alpha-3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>marmalade</groupId>
|
||||
<artifactId>marmalade-el-commons</artifactId>
|
||||
<version>1.0-alpha-2</version>
|
||||
<version>1.0-alpha-3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>marmalade</groupId>
|
||||
<artifactId>marmalade-tags-io</artifactId>
|
||||
<version>1.0-alpha-2</version>
|
||||
<version>1.0-alpha-3</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
|
|
|
@ -2,13 +2,12 @@
|
|||
|
||||
<mojo xmlns="marmalade:mojo">
|
||||
<metadata>
|
||||
<id>myMojo</id>
|
||||
<goal>myMojo</goal>
|
||||
<description>Output a file with specified contents to [outputDirectory]/touch.txt</description>
|
||||
<parameters>
|
||||
<parameter>
|
||||
<name>outputDirectory</name>
|
||||
<expression>#project.build.directory</expression>
|
||||
<expression>${project.build.directory}</expression>
|
||||
<description>Output directory for files.</description>
|
||||
</parameter>
|
||||
</parameters>
|
||||
|
|
|
@ -2,10 +2,9 @@
|
|||
<parent>
|
||||
<artifactId>maven-archetypes</artifactId>
|
||||
<groupId>org.apache.maven.archetypes</groupId>
|
||||
<version>1.0-alpha-1-SNAPSHOT</version>
|
||||
<version>1.0-alpha-1</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>maven-archetype-mojo</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.0-alpha-1-SNAPSHOT</version>
|
||||
<version>1.0-alpha-1</version>
|
||||
</model>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<dependency>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<artifactId>maven-plugin-api</artifactId>
|
||||
<version>2.0-SNAPSHOT</version>
|
||||
<version>2.0-alpha-2</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
|
|
@ -16,37 +16,34 @@ package $package;
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import org.apache.maven.plugin.AbstractPlugin;
|
||||
import org.apache.maven.plugin.PluginExecutionException;
|
||||
import org.apache.maven.plugin.AbstractMojo;
|
||||
import org.apache.maven.plugin.MojoExecutionException;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Goal which touches a timestamp file.
|
||||
*
|
||||
* @goal touch
|
||||
*
|
||||
* @phase process-sources
|
||||
*
|
||||
* @description Goal which touches a timestamp file
|
||||
*
|
||||
* @parameter
|
||||
* name="outputDirectory"
|
||||
* type="java.io.File"
|
||||
* required="true"
|
||||
* validator=""
|
||||
* expression="#project.build.directory"
|
||||
* description=""
|
||||
*/
|
||||
public class MyMojo
|
||||
extends AbstractPlugin
|
||||
extends AbstractMojo
|
||||
{
|
||||
private String outputDirectory;
|
||||
/**
|
||||
* Location of the file.
|
||||
* @parameter expression="${project.build.directory}"
|
||||
* @required
|
||||
*/
|
||||
private File outputDirectory;
|
||||
|
||||
public void execute()
|
||||
throws PluginExecutionException
|
||||
throws MojoExecutionException
|
||||
{
|
||||
File f = new File( outputDirectory );
|
||||
File f = outputDirectory;
|
||||
|
||||
if ( !f.exists() )
|
||||
{
|
||||
|
@ -64,7 +61,7 @@ public class MyMojo
|
|||
}
|
||||
catch ( IOException e )
|
||||
{
|
||||
throw new PluginExecutionException( "Error creating file " + touch, e );
|
||||
throw new MojoExecutionException( "Error creating file " + touch, e );
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
|
|
@ -2,10 +2,9 @@
|
|||
<parent>
|
||||
<artifactId>maven-archetypes</artifactId>
|
||||
<groupId>org.apache.maven.archetypes</groupId>
|
||||
<version>1.0-alpha-1-SNAPSHOT</version>
|
||||
<version>1.0-alpha-1</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>maven-archetype-quickstart</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.0-alpha-1-SNAPSHOT</version>
|
||||
<version>1.0-alpha-1</version>
|
||||
</model>
|
||||
|
|
|
@ -2,10 +2,9 @@
|
|||
<parent>
|
||||
<artifactId>maven-archetypes</artifactId>
|
||||
<groupId>org.apache.maven.archetypes</groupId>
|
||||
<version>1.0-alpha-1-SNAPSHOT</version>
|
||||
<version>1.0-alpha-1</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>maven-archetype-webapp</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.0-alpha-1-SNAPSHOT</version>
|
||||
<version>1.0-alpha-1</version>
|
||||
</model>
|
||||
|
|
|
@ -13,14 +13,6 @@
|
|||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>1.0-alpha-1</version>
|
||||
<configuration>
|
||||
<warName>${artifactId}</warName>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<finalName>${artifactId}</finalName>
|
||||
</build>
|
||||
</model>
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
<parent>
|
||||
<artifactId>maven-archetype</artifactId>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<version>1.0-alpha-1-SNAPSHOT</version>
|
||||
<version>1.0-alpha-1</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.apache.maven.archetypes</groupId>
|
||||
<artifactId>maven-archetypes</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>1.0-alpha-1-SNAPSHOT</version>
|
||||
<version>1.0-alpha-1</version>
|
||||
<modules>
|
||||
<module>maven-archetype-marmalade-mojo</module>
|
||||
<module>maven-archetype-mojo</module>
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
<parent>
|
||||
<artifactId>maven</artifactId>
|
||||
<groupId>org.apache.maven</groupId>
|
||||
<version>2.0-SNAPSHOT</version>
|
||||
<version>2.0-alpha-2</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>maven-archetype</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>1.0-alpha-1-SNAPSHOT</version>
|
||||
<version>1.0-alpha-1</version>
|
||||
<modules>
|
||||
<module>maven-archetype-core</module>
|
||||
<module>maven-archetype-plugin</module>
|
||||
|
|
Loading…
Reference in New Issue