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:
Brett Leslie Porter 2005-05-13 12:49:01 +00:00
parent 5338e97680
commit 6557e2d4be
14 changed files with 44 additions and 63 deletions

View File

@ -2,12 +2,12 @@
<parent> <parent>
<artifactId>maven-archetype</artifactId> <artifactId>maven-archetype</artifactId>
<groupId>org.apache.maven</groupId> <groupId>org.apache.maven</groupId>
<version>1.0-alpha-1-SNAPSHOT</version> <version>1.0-alpha-1</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>maven-archetype-core</artifactId> <artifactId>maven-archetype-core</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<version>1.0-alpha-1-SNAPSHOT</version> <version>1.0-alpha-1</version>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>plexus</groupId> <groupId>plexus</groupId>
@ -22,12 +22,12 @@
<dependency> <dependency>
<groupId>org.apache.maven</groupId> <groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId> <artifactId>maven-artifact</artifactId>
<version>2.0-SNAPSHOT</version> <version>2.0-alpha-2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.maven.wagon</groupId> <groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-file</artifactId> <artifactId>wagon-file</artifactId>
<version>1.0-alpha-2</version> <version>1.0-alpha-3</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -2,20 +2,18 @@
<parent> <parent>
<artifactId>maven-plugin-parent</artifactId> <artifactId>maven-plugin-parent</artifactId>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<version>2.0-SNAPSHOT</version> <version>2.0-alpha-2</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>maven-archetype-plugin</artifactId> <artifactId>maven-archetype-plugin</artifactId>
<packaging>maven-plugin</packaging> <packaging>maven-plugin</packaging>
<name>Maven Archetype Plugin</name> <name>Maven Archetype Plugin</name>
<version>1.0-SNAPSHOT</version> <version>1.0-alpha-1</version>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.apache.maven</groupId> <groupId>org.apache.maven</groupId>
<artifactId>maven-archetype-core</artifactId> <artifactId>maven-archetype-core</artifactId>
<version>1.0-alpha-1-SNAPSHOT</version> <version>1.0-alpha-1</version>
<type>jar</type>
<scope>compile</scope>
</dependency> </dependency>
</dependencies> </dependencies>
</model> </model>

View File

@ -65,19 +65,19 @@ public class MavenArchetypeMojo
* @parameter expression="${archetypeVersion}" * @parameter expression="${archetypeVersion}"
* @required * @required
*/ */
private String archetypeVersion = "1.0-alpha-1-SNAPSHOT"; private String archetypeVersion = "RELEASE";
/** /**
* @parameter expression="${groupId}" * @parameter expression="${groupId}"
* @required * @required
*/ */
private String groupId = "org.apache.maven.archetypes"; private String groupId;
/** /**
* @parameter expression="${artifactId}" * @parameter expression="${artifactId}"
* @required * @required
*/ */
private String artifactId = "maven-archetype-quickstart"; private String artifactId;
/** /**
* @parameter expression="${version}" * @parameter expression="${version}"
@ -86,7 +86,7 @@ public class MavenArchetypeMojo
private String version = "1.0-SNAPSHOT"; private String version = "1.0-SNAPSHOT";
/** /**
* @parameter expression="${packageName}" * @parameter expression="${packageName}" alias="package"
* @required * @required
*/ */
private String packageName = "com.mycompany.app"; private String packageName = "com.mycompany.app";
@ -101,7 +101,6 @@ public class MavenArchetypeMojo
throws MojoExecutionException throws MojoExecutionException
{ {
// TODO: prompt for missing values // TODO: prompt for missing values
// TODO: use new plugin type
// TODO: configurable license // TODO: configurable license
// ---------------------------------------------------------------------- // ----------------------------------------------------------------------

View File

@ -2,10 +2,9 @@
<parent> <parent>
<artifactId>maven-archetypes</artifactId> <artifactId>maven-archetypes</artifactId>
<groupId>org.apache.maven.archetypes</groupId> <groupId>org.apache.maven.archetypes</groupId>
<version>1.0-alpha-1-SNAPSHOT</version> <version>1.0-alpha-1</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>maven-archetype-marmalade-mojo</artifactId> <artifactId>maven-archetype-marmalade-mojo</artifactId>
<packaging>jar</packaging> <version>1.0-alpha-1</version>
<version>1.0-alpha-1-SNAPSHOT</version>
</model> </model>

View File

@ -8,25 +8,25 @@
<dependency> <dependency>
<groupId>org.apache.maven</groupId> <groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId> <artifactId>maven-plugin-api</artifactId>
<version>2.0-SNAPSHOT</version> <version>2.0-alpha-2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>marmalade</groupId> <groupId>marmalade</groupId>
<artifactId>marmalade-core</artifactId> <artifactId>marmalade-core</artifactId>
<version>1.0-alpha-2</version> <version>1.0-alpha-3</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>marmalade</groupId> <groupId>marmalade</groupId>
<artifactId>marmalade-el-commons</artifactId> <artifactId>marmalade-el-commons</artifactId>
<version>1.0-alpha-2</version> <version>1.0-alpha-3</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>marmalade</groupId> <groupId>marmalade</groupId>
<artifactId>marmalade-tags-io</artifactId> <artifactId>marmalade-tags-io</artifactId>
<version>1.0-alpha-2</version> <version>1.0-alpha-3</version>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>

View File

@ -2,13 +2,12 @@
<mojo xmlns="marmalade:mojo"> <mojo xmlns="marmalade:mojo">
<metadata> <metadata>
<id>myMojo</id>
<goal>myMojo</goal> <goal>myMojo</goal>
<description>Output a file with specified contents to [outputDirectory]/touch.txt</description> <description>Output a file with specified contents to [outputDirectory]/touch.txt</description>
<parameters> <parameters>
<parameter> <parameter>
<name>outputDirectory</name> <name>outputDirectory</name>
<expression>#project.build.directory</expression> <expression>${project.build.directory}</expression>
<description>Output directory for files.</description> <description>Output directory for files.</description>
</parameter> </parameter>
</parameters> </parameters>

View File

@ -2,10 +2,9 @@
<parent> <parent>
<artifactId>maven-archetypes</artifactId> <artifactId>maven-archetypes</artifactId>
<groupId>org.apache.maven.archetypes</groupId> <groupId>org.apache.maven.archetypes</groupId>
<version>1.0-alpha-1-SNAPSHOT</version> <version>1.0-alpha-1</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>maven-archetype-mojo</artifactId> <artifactId>maven-archetype-mojo</artifactId>
<packaging>jar</packaging> <version>1.0-alpha-1</version>
<version>1.0-alpha-1-SNAPSHOT</version>
</model> </model>

View File

@ -8,7 +8,7 @@
<dependency> <dependency>
<groupId>org.apache.maven</groupId> <groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId> <artifactId>maven-plugin-api</artifactId>
<version>2.0-SNAPSHOT</version> <version>2.0-alpha-2</version>
</dependency> </dependency>
<dependency> <dependency>

View File

@ -16,37 +16,34 @@ package $package;
* limitations under the License. * limitations under the License.
*/ */
import org.apache.maven.plugin.AbstractPlugin; import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.PluginExecutionException; import org.apache.maven.plugin.MojoExecutionException;
import java.io.File; import java.io.File;
import java.io.FileWriter; import java.io.FileWriter;
import java.io.IOException; import java.io.IOException;
/** /**
* Goal which touches a timestamp file.
*
* @goal touch * @goal touch
* *
* @phase process-sources * @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 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() public void execute()
throws PluginExecutionException throws MojoExecutionException
{ {
File f = new File( outputDirectory ); File f = outputDirectory;
if ( !f.exists() ) if ( !f.exists() )
{ {
@ -64,7 +61,7 @@ public class MyMojo
} }
catch ( IOException e ) catch ( IOException e )
{ {
throw new PluginExecutionException( "Error creating file " + touch, e ); throw new MojoExecutionException( "Error creating file " + touch, e );
} }
finally finally
{ {

View File

@ -2,10 +2,9 @@
<parent> <parent>
<artifactId>maven-archetypes</artifactId> <artifactId>maven-archetypes</artifactId>
<groupId>org.apache.maven.archetypes</groupId> <groupId>org.apache.maven.archetypes</groupId>
<version>1.0-alpha-1-SNAPSHOT</version> <version>1.0-alpha-1</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>maven-archetype-quickstart</artifactId> <artifactId>maven-archetype-quickstart</artifactId>
<packaging>jar</packaging> <version>1.0-alpha-1</version>
<version>1.0-alpha-1-SNAPSHOT</version>
</model> </model>

View File

@ -2,10 +2,9 @@
<parent> <parent>
<artifactId>maven-archetypes</artifactId> <artifactId>maven-archetypes</artifactId>
<groupId>org.apache.maven.archetypes</groupId> <groupId>org.apache.maven.archetypes</groupId>
<version>1.0-alpha-1-SNAPSHOT</version> <version>1.0-alpha-1</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>maven-archetype-webapp</artifactId> <artifactId>maven-archetype-webapp</artifactId>
<packaging>jar</packaging> <version>1.0-alpha-1</version>
<version>1.0-alpha-1-SNAPSHOT</version>
</model> </model>

View File

@ -13,14 +13,6 @@
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <finalName>${artifactId}</finalName>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>1.0-alpha-1</version>
<configuration>
<warName>${artifactId}</warName>
</configuration>
</plugin>
</plugins>
</build> </build>
</model> </model>

View File

@ -2,13 +2,13 @@
<parent> <parent>
<artifactId>maven-archetype</artifactId> <artifactId>maven-archetype</artifactId>
<groupId>org.apache.maven</groupId> <groupId>org.apache.maven</groupId>
<version>1.0-alpha-1-SNAPSHOT</version> <version>1.0-alpha-1</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven.archetypes</groupId> <groupId>org.apache.maven.archetypes</groupId>
<artifactId>maven-archetypes</artifactId> <artifactId>maven-archetypes</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>1.0-alpha-1-SNAPSHOT</version> <version>1.0-alpha-1</version>
<modules> <modules>
<module>maven-archetype-marmalade-mojo</module> <module>maven-archetype-marmalade-mojo</module>
<module>maven-archetype-mojo</module> <module>maven-archetype-mojo</module>

View File

@ -2,12 +2,12 @@
<parent> <parent>
<artifactId>maven</artifactId> <artifactId>maven</artifactId>
<groupId>org.apache.maven</groupId> <groupId>org.apache.maven</groupId>
<version>2.0-SNAPSHOT</version> <version>2.0-alpha-2</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>maven-archetype</artifactId> <artifactId>maven-archetype</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>1.0-alpha-1-SNAPSHOT</version> <version>1.0-alpha-1</version>
<modules> <modules>
<module>maven-archetype-core</module> <module>maven-archetype-core</module>
<module>maven-archetype-plugin</module> <module>maven-archetype-plugin</module>