maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdca...@apache.org
Subject svn commit: r326372 - in /maven/components/trunk: maven-artifact-manager/src/main/java/org/apache/maven/artifact/manager/ maven-plugin-tools/maven-plugin-tools-ant/ maven-plugin-tools/maven-plugin-tools-ant/integration-tests/ maven-plugin-tools/maven-p...
Date Wed, 19 Oct 2005 04:14:39 GMT
Author: jdcasey
Date: Tue Oct 18 21:14:13 2005
New Revision: 326372

URL: http://svn.apache.org/viewcvs?rev=326372&view=rev
Log:
Ant support is working. I want to revisit the testing before I let it go, though.

o Added maven-script-ant to wrapper Ant-based Plexus components in a Mojo-compliant shell

o Added maven-plugin-tools-ant to extract plugin descriptor metadata from Ant-based plugin sources

o Revised the maven-plugin-tools-model, which can be used as a generic companion metadata file for things like Ant-based mojos. It now includes an analogy to @parameter default-value=""

o Added javadoc format for DefaultWagonManager, correcting the name of an exception thrown by the configureWagon() method.

o Changed the required version of maven-plugin-tools-api in the plugin-plugin to 2.0.1-SNAPSHOT, to accommodate changes in the script-based mojo descriptor extractor API. This allows companion metadata files for mojo scripts, as in the case of Ant.

o Removed maven-plugin-tools-beanshell from the plugin-plugin's dependencies. It can be included as a plugin-dependency in the plugin projects that need it, in similar fashion to Ant's extractors.


Added:
    maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/
    maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/basic/
    maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/basic/pom.xml   (with props)
    maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/basic/src/
    maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/basic/src/main/
    maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/basic/src/main/scripts/
    maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/basic/src/main/scripts/test.build.xml   (with props)
    maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/basic/src/main/scripts/test.mojos.xml   (with props)
    maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/
    maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/plugin/
    maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/plugin/pom.xml   (with props)
    maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/plugin/src/
    maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/plugin/src/main/
    maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/plugin/src/main/scripts/
    maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/plugin/src/main/scripts/test.build.xml   (with props)
    maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/plugin/src/main/scripts/test.mojos.xml   (with props)
    maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/pom.xml   (with props)
    maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/usage/
    maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/usage/pom.xml   (with props)
    maven/components/trunk/maven-script/maven-script-ant/
    maven/components/trunk/maven-script/maven-script-ant/pom.xml   (with props)
    maven/components/trunk/maven-script/maven-script-ant/src/
    maven/components/trunk/maven-script/maven-script-ant/src/main/
    maven/components/trunk/maven-script/maven-script-ant/src/main/java/
    maven/components/trunk/maven-script/maven-script-ant/src/main/java/org/
    maven/components/trunk/maven-script/maven-script-ant/src/main/java/org/apache/
    maven/components/trunk/maven-script/maven-script-ant/src/main/java/org/apache/maven/
    maven/components/trunk/maven-script/maven-script-ant/src/main/java/org/apache/maven/script/
    maven/components/trunk/maven-script/maven-script-ant/src/main/java/org/apache/maven/script/ant/
    maven/components/trunk/maven-script/maven-script-ant/src/main/java/org/apache/maven/script/ant/AntMojoComponentFactory.java   (with props)
    maven/components/trunk/maven-script/maven-script-ant/src/main/java/org/apache/maven/script/ant/AntMojoWrapper.java   (with props)
    maven/components/trunk/maven-script/maven-script-ant/src/main/resources/
    maven/components/trunk/maven-script/maven-script-ant/src/main/resources/META-INF/
    maven/components/trunk/maven-script/maven-script-ant/src/main/resources/META-INF/plexus/
    maven/components/trunk/maven-script/maven-script-ant/src/main/resources/META-INF/plexus/components.xml   (with props)
Modified:
    maven/components/trunk/maven-artifact-manager/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java
    maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/pom.xml
    maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/src/main/java/org/apache/maven/tools/plugin/extractor/ant/AntMojoDescriptorExtractor.java
    maven/components/trunk/maven-plugin-tools/maven-plugin-tools-api/pom.xml
    maven/components/trunk/maven-plugin-tools/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/extractor/AbstractScriptedMojoDescriptorExtractor.java
    maven/components/trunk/maven-plugin-tools/maven-plugin-tools-model/pom.xml
    maven/components/trunk/maven-plugin-tools/maven-plugin-tools-model/src/main/java/org/apache/maven/plugin/tools/model/PluginMetadataParser.java
    maven/components/trunk/maven-plugin-tools/maven-plugin-tools-model/src/main/mdo/plugin-metadata.mdo
    maven/components/trunk/maven-plugins/maven-plugin-plugin/pom.xml

Modified: maven/components/trunk/maven-artifact-manager/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-artifact-manager/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java?rev=326372&r1=326371&r2=326372&view=diff
==============================================================================
--- maven/components/trunk/maven-artifact-manager/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java (original)
+++ maven/components/trunk/maven-artifact-manager/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java Tue Oct 18 21:14:13 2005
@@ -697,7 +697,7 @@
      * 
      * @param wagon the wagon to configure
      * @param repository the repository that has the configuration
-     * @throws ConfigurationException if the wagon can't be configured
+     * @throws WagonConfigurationException wraps any error given during configuration of the wagon instance
      */
     private void configureWagon( Wagon wagon, ArtifactRepository repository )
         throws WagonConfigurationException

Added: maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/basic/pom.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/basic/pom.xml?rev=326372&view=auto
==============================================================================
--- maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/basic/pom.xml (added)
+++ maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/basic/pom.xml Tue Oct 18 21:14:13 2005
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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 ../../../../maven-site/target/site/maven-v4_0_0.xsd ">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.ant.it</groupId>
+  <artifactId>maven-ant-it-basic</artifactId>
+  <name>Basic Ant-Mojo Integration Test</name>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>maven-plugin</packaging>
+  <description>Tests the simplest case of using an Ant script to drive a mojo.</description>
+  
+  <dependencies>
+    <dependency>
+      <groupId>ant</groupId>
+      <artifactId>ant</artifactId>
+      <version>1.6.5</version>
+    </dependency>
+  </dependencies>
+  
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-plugin-plugin</artifactId>
+        <configuration>
+          <prefix>antBasic</prefix>
+        </configuration>
+        <dependencies>
+          <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-plugin-tools-ant</artifactId>
+            <version>2.0.1-SNAPSHOT</version>
+          </dependency>
+        </dependencies>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/basic/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/basic/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/basic/src/main/scripts/test.build.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/basic/src/main/scripts/test.build.xml?rev=326372&view=auto
==============================================================================
--- maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/basic/src/main/scripts/test.build.xml (added)
+++ maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/basic/src/main/scripts/test.build.xml Tue Oct 18 21:14:13 2005
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project>
+  <target name="test">
+    <echo>Hello, ${name}!</echo>
+  </target>
+</project>
\ No newline at end of file

Propchange: maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/basic/src/main/scripts/test.build.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/basic/src/main/scripts/test.build.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/basic/src/main/scripts/test.mojos.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/basic/src/main/scripts/test.mojos.xml?rev=326372&view=auto
==============================================================================
--- maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/basic/src/main/scripts/test.mojos.xml (added)
+++ maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/basic/src/main/scripts/test.mojos.xml Tue Oct 18 21:14:13 2005
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<pluginMetadata 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 ../../../../../../maven-plugin-tools-model/target/generated-site/xsd/plugin-metadata-1.0.0.xsd ">
+  <mojos>
+    <mojo>
+      <call>test</call>
+      <goal>test</goal>
+      <parameters>
+        <parameter>
+          <name>name</name>
+          <expression>${name}</expression>
+          <required>true</required>
+          <readonly>false</readonly>
+          <type>java.lang.String</type>
+        </parameter>
+      </parameters>
+    </mojo>
+  </mojos>
+</pluginMetadata>

Propchange: maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/basic/src/main/scripts/test.mojos.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/basic/src/main/scripts/test.mojos.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/plugin/pom.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/plugin/pom.xml?rev=326372&view=auto
==============================================================================
--- maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/plugin/pom.xml (added)
+++ maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/plugin/pom.xml Tue Oct 18 21:14:13 2005
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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 ../../../../maven-site/target/site/maven-v4_0_0.xsd ">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.maven.ant.it</groupId>
+    <artifactId>simpleUsage-root</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>simpleUsage-plugin</artifactId>
+  <name>Simple Ant-Mojo</name>
+  <packaging>maven-plugin</packaging>
+  <description>Tests the simplest case of using an Ant script to drive a mojo.</description>
+  
+  <dependencies>
+    <dependency>
+      <groupId>ant</groupId>
+      <artifactId>ant</artifactId>
+      <version>1.6.5</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-script-ant</artifactId>
+      <version>2.0.1-SNAPSHOT</version>
+    </dependency>
+  </dependencies>
+  
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-plugin-plugin</artifactId>
+        <configuration>
+          <prefix>antSimpleUsage</prefix>
+        </configuration>
+        <dependencies>
+          <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-plugin-tools-ant</artifactId>
+            <version>2.0.1-SNAPSHOT</version>
+          </dependency>
+        </dependencies>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/plugin/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/plugin/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/plugin/src/main/scripts/test.build.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/plugin/src/main/scripts/test.build.xml?rev=326372&view=auto
==============================================================================
--- maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/plugin/src/main/scripts/test.build.xml (added)
+++ maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/plugin/src/main/scripts/test.build.xml Tue Oct 18 21:14:13 2005
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project>
+  <target name="test">
+    <echo>Hello, ${name}!</echo>
+  </target>
+</project>
\ No newline at end of file

Propchange: maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/plugin/src/main/scripts/test.build.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/plugin/src/main/scripts/test.build.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/plugin/src/main/scripts/test.mojos.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/plugin/src/main/scripts/test.mojos.xml?rev=326372&view=auto
==============================================================================
--- maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/plugin/src/main/scripts/test.mojos.xml (added)
+++ maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/plugin/src/main/scripts/test.mojos.xml Tue Oct 18 21:14:13 2005
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<pluginMetadata 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 ../../../../../../maven-plugin-tools-model/target/generated-site/xsd/plugin-metadata-1.0.0.xsd ">
+  <mojos>
+    <mojo>
+      <call>test</call>
+      <goal>test</goal>
+      <parameters>
+        <parameter>
+          <name>name</name>
+          <expression>${name}</expression>
+          <required>true</required>
+          <readonly>false</readonly>
+          <type>java.lang.String</type>
+        </parameter>
+      </parameters>
+    </mojo>
+  </mojos>
+</pluginMetadata>

Propchange: maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/plugin/src/main/scripts/test.mojos.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/plugin/src/main/scripts/test.mojos.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/pom.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/pom.xml?rev=326372&view=auto
==============================================================================
--- maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/pom.xml (added)
+++ maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/pom.xml Tue Oct 18 21:14:13 2005
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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 ../../../../maven-site/target/site/maven-v4_0_0.xsd ">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.ant.it</groupId>
+  <artifactId>simpleUsage-root</artifactId>
+  <name>Simple-Usage Ant-Mojo Integration Test - Root</name>
+  <version>1.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
+  <description>Tests the simplest case of using an Ant script to drive a mojo.</description>
+  
+  <dependencies>
+    <dependency>
+      <groupId>ant</groupId>
+      <artifactId>ant</artifactId>
+      <version>1.6.5</version>
+    </dependency>
+  </dependencies>
+  
+  <modules>
+    <module>plugin</module>
+    <module>usage</module>
+  </modules>
+
+</project>

Propchange: maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/usage/pom.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/usage/pom.xml?rev=326372&view=auto
==============================================================================
--- maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/usage/pom.xml (added)
+++ maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/usage/pom.xml Tue Oct 18 21:14:13 2005
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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 ../../../../maven-site/target/site/maven-v4_0_0.xsd ">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.maven.ant.it</groupId>
+    <artifactId>simpleUsage-root</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>simpleUsage-usage</artifactId>
+  <name>Simple Ant-Mojo Usage Case</name>
+  <description>Tests the simplest case of using an Ant script to drive a mojo.</description>
+  
+  <dependencies>
+    <dependency>
+      <groupId>ant</groupId>
+      <artifactId>ant</artifactId>
+      <version>1.6.5</version>
+    </dependency>
+  </dependencies>
+  
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.ant.it</groupId>
+        <artifactId>simpleUsage-plugin</artifactId>
+        <version>1.0-SNAPSHOT</version>
+        <dependencies>
+          <dependency>
+            <groupId>org.codehaus.plexus</groupId>
+            <artifactId>plexus-ant-factory</artifactId>
+            <version>1.0-alpha-1-SNAPSHOT</version>
+          </dependency>
+        </dependencies>
+
+        <!-- configuration>
+          <name>Hani</name>
+        </configuration -->
+
+        <executions>
+          <execution>
+            <id>test</id>
+            <phase>install</phase>
+            <goals>
+              <goal>test</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/usage/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/integration-tests/simpleUsage/usage/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/pom.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/pom.xml?rev=326372&r1=326371&r2=326372&view=diff
==============================================================================
--- maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/pom.xml (original)
+++ maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/pom.xml Tue Oct 18 21:14:13 2005
@@ -2,29 +2,29 @@
   <parent>
     <artifactId>maven-plugin-tools</artifactId>
     <groupId>org.apache.maven</groupId>
-    <version>2.0-beta-3-SNAPSHOT</version>
+    <version>2.0</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache.maven</groupId>
   <artifactId>maven-plugin-tools-ant</artifactId>
   <name>Maven Ant Plugin Tools</name>
-  <version>2.0-beta-3-SNAPSHOT</version>
+  <version>2.0.1-SNAPSHOT</version>
 
   <dependencies>
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-descriptor</artifactId>
-      <version>2.0-beta-3-SNAPSHOT</version>
+      <version>2.0</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-tools-api</artifactId>
-      <version>2.0-beta-3-SNAPSHOT</version>
+      <version>2.0.1-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-tools-model</artifactId>
-      <version>2.0-beta-3-SNAPSHOT</version>
+      <version>2.0.1-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>

Modified: maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/src/main/java/org/apache/maven/tools/plugin/extractor/ant/AntMojoDescriptorExtractor.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/src/main/java/org/apache/maven/tools/plugin/extractor/ant/AntMojoDescriptorExtractor.java?rev=326372&r1=326371&r2=326372&view=diff
==============================================================================
--- maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/src/main/java/org/apache/maven/tools/plugin/extractor/ant/AntMojoDescriptorExtractor.java (original)
+++ maven/components/trunk/maven-plugin-tools/maven-plugin-tools-ant/src/main/java/org/apache/maven/tools/plugin/extractor/ant/AntMojoDescriptorExtractor.java Tue Oct 18 21:14:13 2005
@@ -2,6 +2,7 @@
 
 import org.apache.maven.plugin.descriptor.InvalidPluginDescriptorException;
 import org.apache.maven.plugin.descriptor.MojoDescriptor;
+import org.apache.maven.plugin.descriptor.Parameter;
 import org.apache.maven.plugin.descriptor.PluginDescriptor;
 import org.apache.maven.plugin.tools.model.PluginMetadataParseException;
 import org.apache.maven.plugin.tools.model.PluginMetadataParser;
@@ -20,39 +21,41 @@
     extends AbstractScriptedMojoDescriptorExtractor
 {
 
-    private static final String METADATA_FILE_EXTENSION = ".plugin.xml";
-    private static final String SCRIPT_FILE_EXTENSION = ".xml";
+    private static final String METADATA_FILE_EXTENSION = ".mojos.xml";
 
-    protected List extractMojoDescriptors( Map scriptFilesKeyedByBasedir, PluginDescriptor pluginDescriptor )
+    private static final String SCRIPT_FILE_EXTENSION = ".build.xml";
+
+    protected List extractMojoDescriptorsFromMetadata( Map metadataFilesKeyedByBasedir, PluginDescriptor pluginDescriptor )
         throws ExtractionException, InvalidPluginDescriptorException
     {
         List descriptors = new ArrayList();
 
         PluginMetadataParser parser = new PluginMetadataParser();
-        
-        for ( Iterator mapIterator = scriptFilesKeyedByBasedir.entrySet().iterator(); mapIterator.hasNext(); )
+
+        for ( Iterator mapIterator = metadataFilesKeyedByBasedir.entrySet().iterator(); mapIterator.hasNext(); )
         {
             Map.Entry entry = (Map.Entry) mapIterator.next();
 
             String basedir = (String) entry.getKey();
-            Set scriptFiles = (Set) entry.getValue();
+            Set metadataFiles = (Set) entry.getValue();
 
-            for ( Iterator it = scriptFiles.iterator(); it.hasNext(); )
+            for ( Iterator it = metadataFiles.iterator(); it.hasNext(); )
             {
-                File scriptMetadataFile = (File) it.next();
-                
-                String basename = scriptMetadataFile.getName();
+                File metadataFile = (File) it.next();
+
+                String basename = metadataFile.getName();
                 basename = basename.substring( 0, basename.length() - METADATA_FILE_EXTENSION.length() );
-                
-                File scriptFile = new File( scriptMetadataFile.getParentFile(), basename + SCRIPT_FILE_EXTENSION );
-                
+
+                File scriptFile = new File( metadataFile.getParentFile(), basename + SCRIPT_FILE_EXTENSION );
+
                 if ( !scriptFile.exists() )
                 {
-                    throw new InvalidPluginDescriptorException( "Found orphaned plugin metadata file: " + scriptMetadataFile );
+                    throw new InvalidPluginDescriptorException( "Found orphaned plugin metadata file: "
+                        + metadataFile );
                 }
-                
+
                 String relativePath = null;
-                
+
                 if ( basedir.endsWith( "/" ) )
                 {
                     basedir = basedir.substring( 0, basedir.length() - 2 );
@@ -61,35 +64,71 @@
                 relativePath = scriptFile.getPath().substring( basedir.length() );
 
                 relativePath = relativePath.replace( '\\', '/' );
-                
+
                 try
                 {
-                    Set mojoDescriptors = parser.parseMojoDescriptors( scriptMetadataFile );
-                    
-                    for ( Iterator discoveredMojoIterator = mojoDescriptors.iterator(); discoveredMojoIterator.hasNext(); )
+                    Set mojoDescriptors = parser.parseMojoDescriptors( metadataFile );
+
+                    for ( Iterator discoveredMojoIterator = mojoDescriptors.iterator(); discoveredMojoIterator
+                        .hasNext(); )
                     {
                         MojoDescriptor descriptor = (MojoDescriptor) discoveredMojoIterator.next();
-                        
+
+                        Map paramMap = descriptor.getParameterMap();
+
+                        if ( !paramMap.containsKey( "basedir" ) )
+                        {
+                            Parameter param = new Parameter();
+                            param.setName( "basedir" );
+                            param.setAlias( "ant.basedir" );
+                            param.setExpression( "${antBasedir}" );
+                            param.setDefaultValue( "${basedir}" );
+                            param.setType( "java.io.File" );
+                            param.setDescription( "The base directory from which to execute the Ant script." );
+                            param.setEditable( true );
+                            param.setRequired( true );
+
+                            descriptor.addParameter( param );
+                        }
+
+                        if ( !paramMap.containsKey( "antMessageLevel" ) )
+                        {
+                            Parameter param = new Parameter();
+                            param.setName( "messageLevel" );
+                            param.setAlias( "ant.messageLevel" );
+                            param.setExpression( "${antMessageLevel}" );
+                            param.setDefaultValue( "info" );
+                            param.setType( "java.lang.String" );
+                            param.setDescription( "The message-level used to tune the verbosity of Ant logging." );
+                            param.setEditable( true );
+                            param.setRequired( false );
+
+                            descriptor.addParameter( param );
+                        }
 
                         String implementation = relativePath;
-                        
-                        if ( StringUtils.isNotEmpty( descriptor.getImplementation() ) )
+
+                        String dImpl = descriptor.getImplementation();
+                        if ( StringUtils.isNotEmpty( dImpl ) )
                         {
-                            implementation += ":" + descriptor.getImplementation();
+                            implementation = relativePath + dImpl.substring( PluginMetadataParser.IMPL_BASE_PLACEHOLDER.length() );
                         }
                         
                         descriptor.setImplementation( implementation );
 
-                        descriptor.setLanguage( "ant" );
+                        descriptor.setLanguage( "ant-mojo" );
                         descriptor.setComponentComposer( "map-oriented" );
                         descriptor.setComponentConfigurator( "map-oriented" );
-                        
+
+                        descriptor.setPluginDescriptor( pluginDescriptor );
+
                         descriptors.add( descriptor );
                     }
                 }
                 catch ( PluginMetadataParseException e )
                 {
-                    throw new ExtractionException( "Error extracting mojo descriptor from script: " + scriptMetadataFile, e );
+                    throw new ExtractionException( "Error extracting mojo descriptor from script: "
+                        + metadataFile, e );
                 }
             }
         }
@@ -99,7 +138,11 @@
 
     protected String getScriptFileExtension()
     {
+        return SCRIPT_FILE_EXTENSION;
+    }
+    
+    protected String getMetadataFileExtension()
+    {
         return METADATA_FILE_EXTENSION;
     }
-
 }

Modified: maven/components/trunk/maven-plugin-tools/maven-plugin-tools-api/pom.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugin-tools/maven-plugin-tools-api/pom.xml?rev=326372&r1=326371&r2=326372&view=diff
==============================================================================
--- maven/components/trunk/maven-plugin-tools/maven-plugin-tools-api/pom.xml (original)
+++ maven/components/trunk/maven-plugin-tools/maven-plugin-tools-api/pom.xml Tue Oct 18 21:14:13 2005
@@ -2,7 +2,7 @@
   <parent>
     <artifactId>maven-plugin-tools</artifactId>
     <groupId>org.apache.maven</groupId>
-    <version>2.0.1-SNAPSHOT</version>
+    <version>2.0</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>maven-plugin-tools-api</artifactId>
@@ -12,16 +12,16 @@
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-project</artifactId>
-      <version>2.0.1-SNAPSHOT</version>
+      <version>2.0</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-descriptor</artifactId>
-      <version>2.0.1-SNAPSHOT</version>
+      <version>2.0</version>
     </dependency>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-utils</artifactId>
     </dependency>
   </dependencies>
-</project>
\ No newline at end of file
+</project>

Modified: maven/components/trunk/maven-plugin-tools/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/extractor/AbstractScriptedMojoDescriptorExtractor.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugin-tools/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/extractor/AbstractScriptedMojoDescriptorExtractor.java?rev=326372&r1=326371&r2=326372&view=diff
==============================================================================
--- maven/components/trunk/maven-plugin-tools/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/extractor/AbstractScriptedMojoDescriptorExtractor.java (original)
+++ maven/components/trunk/maven-plugin-tools/maven-plugin-tools-api/src/main/java/org/apache/maven/tools/plugin/extractor/AbstractScriptedMojoDescriptorExtractor.java Tue Oct 18 21:14:13 2005
@@ -6,6 +6,7 @@
 import org.codehaus.plexus.logging.AbstractLogEnabled;
 import org.codehaus.plexus.util.DirectoryScanner;
 import org.codehaus.plexus.util.FileUtils;
+import org.codehaus.plexus.util.StringUtils;
 
 import java.io.File;
 import java.io.IOException;
@@ -26,17 +27,31 @@
     public List execute( MavenProject project, PluginDescriptor pluginDescriptor )
         throws ExtractionException, InvalidPluginDescriptorException
     {
+        String metadataExtension = getMetadataFileExtension();
+        String scriptExtension = getScriptFileExtension();
+        
         Map scriptFilesKeyedByBasedir =
-            gatherScriptSourcesByBasedir( project.getScriptSourceRoots(), getScriptFileExtension() );
+            gatherFilesByBasedir( project.getScriptSourceRoots(), scriptExtension );
 
-        List mojoDescriptors = extractMojoDescriptors( scriptFilesKeyedByBasedir, pluginDescriptor );
+        List mojoDescriptors;
+        if ( !StringUtils.isEmpty( metadataExtension ) )
+        {
+            Map metadataFilesKeyedByBasedir =
+                gatherFilesByBasedir( project.getScriptSourceRoots(), metadataExtension );
+            
+            mojoDescriptors = extractMojoDescriptorsFromMetadata( metadataFilesKeyedByBasedir, pluginDescriptor );
+        }
+        else
+        {
+            mojoDescriptors = extractMojoDescriptors( scriptFilesKeyedByBasedir, pluginDescriptor );
+        }
 
         copyScriptsToOutputDirectory( scriptFilesKeyedByBasedir, project.getBuild().getOutputDirectory() );
 
         return mojoDescriptors;
     }
 
-    private void copyScriptsToOutputDirectory( Map scriptFilesKeyedByBasedir, String outputDirectory )
+    protected void copyScriptsToOutputDirectory( Map scriptFilesKeyedByBasedir, String outputDirectory )
         throws ExtractionException
     {
         File outputDir = new File( outputDirectory );
@@ -85,12 +100,7 @@
         }
     }
 
-    protected abstract List extractMojoDescriptors( Map scriptFilesKeyedByBasedir, PluginDescriptor pluginDescriptor )
-        throws ExtractionException, InvalidPluginDescriptorException;
-
-    protected abstract String getScriptFileExtension();
-
-    protected Map gatherScriptSourcesByBasedir( List directories, String scriptFileExtension )
+    protected Map gatherFilesByBasedir( List directories, String scriptFileExtension )
     {
         Map sourcesByBasedir = new TreeMap();
 
@@ -130,5 +140,24 @@
 
         return sourcesByBasedir;
     }
+
+    protected List extractMojoDescriptorsFromMetadata( Map metadataFilesKeyedByBasedir, PluginDescriptor pluginDescriptor )
+        throws ExtractionException, InvalidPluginDescriptorException
+    {
+        return null;
+    }
+
+    protected String getMetadataFileExtension()
+    {
+        return null;
+    }
+
+    protected List extractMojoDescriptors( Map scriptFilesKeyedByBasedir, PluginDescriptor pluginDescriptor )
+        throws ExtractionException, InvalidPluginDescriptorException
+    {
+        return null;
+    }
+
+    protected abstract String getScriptFileExtension();
 
 }

Modified: maven/components/trunk/maven-plugin-tools/maven-plugin-tools-model/pom.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugin-tools/maven-plugin-tools-model/pom.xml?rev=326372&r1=326371&r2=326372&view=diff
==============================================================================
--- maven/components/trunk/maven-plugin-tools/maven-plugin-tools-model/pom.xml (original)
+++ maven/components/trunk/maven-plugin-tools/maven-plugin-tools-model/pom.xml Tue Oct 18 21:14:13 2005
@@ -2,13 +2,13 @@
   <parent>
     <artifactId>maven-plugin-tools</artifactId>
     <groupId>org.apache.maven</groupId>
-    <version>2.0-beta-3-SNAPSHOT</version>
+    <version>2.0</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache.maven</groupId>
   <artifactId>maven-plugin-tools-model</artifactId>
   <name>Maven Plugin Metadata Model</name>
-  <version>2.0-beta-3-SNAPSHOT</version>
+  <version>2.0.1-SNAPSHOT</version>
 
   <dependencies>
     <dependency>
@@ -18,7 +18,7 @@
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-descriptor</artifactId>
-      <version>2.0-beta-3-SNAPSHOT</version>
+      <version>2.0</version>
     </dependency>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
@@ -37,6 +37,7 @@
               <goal>java</goal>
               <goal>xpp3-reader</goal>
               <goal>xpp3-writer</goal>
+              <goal>xsd</goal>
             </goals>
           </execution>
         </executions>

Modified: maven/components/trunk/maven-plugin-tools/maven-plugin-tools-model/src/main/java/org/apache/maven/plugin/tools/model/PluginMetadataParser.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugin-tools/maven-plugin-tools-model/src/main/java/org/apache/maven/plugin/tools/model/PluginMetadataParser.java?rev=326372&r1=326371&r2=326372&view=diff
==============================================================================
--- maven/components/trunk/maven-plugin-tools/maven-plugin-tools-model/src/main/java/org/apache/maven/plugin/tools/model/PluginMetadataParser.java (original)
+++ maven/components/trunk/maven-plugin-tools/maven-plugin-tools-model/src/main/java/org/apache/maven/plugin/tools/model/PluginMetadataParser.java Tue Oct 18 21:14:13 2005
@@ -20,6 +20,7 @@
 
 public class PluginMetadataParser
 {
+    public static final String IMPL_BASE_PLACEHOLDER = "<REPLACE-WITH-MOJO-PATH>";
     
     public Set parseMojoDescriptors( File metadataFile )
         throws PluginMetadataParseException
@@ -71,7 +72,7 @@
     {
         MojoDescriptor descriptor = new MojoDescriptor();
         
-        descriptor.setImplementation( mojo.getCall() );
+        descriptor.setImplementation( IMPL_BASE_PLACEHOLDER + ":" + mojo.getCall() );
         
         descriptor.setGoal( mojo.getGoal() );
         descriptor.setPhase( mojo.getPhase() );
@@ -106,6 +107,7 @@
                 dParam.setDescription( param.getDescription() );
                 dParam.setEditable( !param.isReadonly() );
                 dParam.setExpression( param.getExpression() );
+                dParam.setDefaultValue( param.getDefaultValue() );
                 
                 String property = param.getProperty();
                 if ( StringUtils.isNotEmpty( property ) )

Modified: maven/components/trunk/maven-plugin-tools/maven-plugin-tools-model/src/main/mdo/plugin-metadata.mdo
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugin-tools/maven-plugin-tools-model/src/main/mdo/plugin-metadata.mdo?rev=326372&r1=326371&r2=326372&view=diff
==============================================================================
--- maven/components/trunk/maven-plugin-tools/maven-plugin-tools-model/src/main/mdo/plugin-metadata.mdo (original)
+++ maven/components/trunk/maven-plugin-tools/maven-plugin-tools-model/src/main/mdo/plugin-metadata.mdo Tue Oct 18 21:14:13 2005
@@ -11,7 +11,7 @@
             requiresDirectInvocation="true"
             aggregator="true">
   
-        <execute phase="initialize" lifecycle="mine"/>
+        <execute phase="initialize" lifecycle="mine" goal="some:goal"/>
         <components>
           <component role="stuff" hint="more"/>
         </components>
@@ -20,7 +20,8 @@
                      property="prop" 
                      required="true" 
                      readonly="true" 
-                     expression="${project}" 
+                     expression="${my.property}" 
+                     defaultValue="${project.artifactId}"
                      type="org.apache.maven.project.MavenProject"
                      alias="otherProp">
             <description>Test parameter</description>
@@ -70,56 +71,56 @@
       <version>1.0.0</version>
       <description>Mojo descriptor definition.</description>
       <fields>
-        <field xml.attribute="true">
+        <field>
           <version>1.0.0</version>
           <name>goal</name>
           <type>String</type>
           <required>true</required>
           <description>The name of the goal used to invoke this mojo.</description>
         </field>
-        <field xml.attribute="true">
+        <field>
           <version>1.0.0</version>
           <name>phase</name>
           <type>String</type>
           <description>The phase to which this mojo should be bound by default.</description>
         </field>
-        <field xml.attribute="true">
+        <field>
           <version>1.0.0</version>
           <name>aggregator</name>
           <type>boolean</type>
           <description>Whether this mojo operates as an aggregator when the reactor is run. That is, only runs once.</description>
         </field>
-        <field xml.attribute="true">
+        <field>
           <version>1.0.0</version>
           <name>requiresDependencyResolution</name>
           <type>String</type>
           <description>The scope of dependencies that this mojo requires to have resolved.</description>
         </field>
-        <field xml.attribute="true">
+        <field>
           <version>1.0.0</version>
           <name>requiresProject</name>
           <type>boolean</type>
           <description>Whether this mojo requires a project instance in order to execute.</description>
         </field>
-        <field xml.attribute="true">
+        <field>
           <version>1.0.0</version>
           <name>requiresReports</name>
           <type>boolean</type>
           <description>Whether this mojo requires a reports section in the POM.</description>
         </field>
-        <field xml.attribute="true">
+        <field>
           <version>1.0.0</version>
           <name>requiresOnline</name>
           <type>boolean</type>
           <description>Whether this mojo requires online mode to operate normally.</description>
         </field>
-        <field xml.attribute="true">
+        <field>
           <version>1.0.0</version>
           <name>inheritByDefault</name>
           <type>boolean</type>
           <description>Whether this mojo's configuration should propagate down the POM inheritance chain by default.</description>
         </field>
-        <field xml.attribute="true">
+        <field>
           <version>1.0.0</version>
           <name>requiresDirectInvocation</name>
           <type>boolean</type>
@@ -163,7 +164,7 @@
           <description>A deprecation message for this mojo parameter.</description>
           <type>String</type>
         </field>
-        <field xml.attribute="true">
+        <field>
           <version>1.0.0</version>
           <name>call</name>
           <type>String</type>
@@ -178,18 +179,24 @@
       	A sub-process execution of a lifecycle to satisfy the needs of a mojo.
       ]]></description>
       <fields>
-        <field xml.attribute="true">
+        <field>
           <name>lifecycle</name>
           <version>1.0.0</version>
           <type>String</type>
           <description>The name of the overlay to apply to the sub-lifecycle before executing it. If specified, this lifecycle overlay definition will be bundled with the plugin.</description>
         </field>
-        <field xml.attribute="true">
+        <field>
           <name>phase</name>
           <version>1.0.0</version>
           <description>The phase in the sub-lifecycle.</description>
           <type>String</type>
         </field>
+        <field>
+          <name>goal</name>
+          <version>1.0.0</version>
+          <description>A goal, not attached to a lifecycle phase, which should be executed ahead of this mojo.</description>
+          <type>String</type>
+        </field>
       </fields>
     </class>
     <class>
@@ -199,14 +206,14 @@
       	A reference to a plexus component, assumed to be available to the plugin container.
       ]]></description>
       <fields>
-        <field xml.attribute="true">
+        <field>
           <name>role</name>
           <version>1.0.0</version>
           <description>The component role to lookup.</description>
           <required>true</required>
           <type>String</type>
         </field>
-        <field xml.attribute="true">
+        <field>
           <name>hint</name>
           <version>1.0.0</version>
           <type>String</type>
@@ -221,32 +228,32 @@
       	A parameter used by a mojo, and configurable from the command line or POM configuration sections.
       ]]></description>
       <fields>
-        <field xml.attribute="true">
+        <field>
           <name>name</name>
           <version>1.0.0</version>
           <description>The parameter name</description>
           <required>true</required>
           <type>String</type>
         </field>
-        <field xml.attribute="true">
+        <field>
           <name>alias</name>
           <version>1.0.0</version>
           <type>String</type>
           <description>An alternate name for the parameter.</description>
         </field>
-        <field xml.attribute="true">
+        <field>
           <name>property</name>
           <version>1.0.0</version>
           <type>String</type>
           <description>The JavaBeans property name to use to configure the mojo with this parameter.</description>
         </field>
-        <field xml.attribute="true">
+        <field>
           <name>required</name>
           <version>1.0.0</version>
           <type>boolean</type>
           <description>Whether this parameter is required.</description>
         </field>
-        <field xml.attribute="true">
+        <field>
           <name>readonly</name>
           <version>1.0.0</version>
           <type>boolean</type>
@@ -254,17 +261,25 @@
             Whether this parameter can be directly edited. If false, this param is either derived from another POM element, or refers to a runtime instance of the build system.
           ]]></description>
         </field>
-        <field xml.attribute="true">
+        <field>
           <name>expression</name>
           <version>1.0.0</version>
           <type>String</type>
           <description><![CDATA[
+            The command-line reference to this parameter.
+          ]]></description>
+        </field>
+        <field>
+          <name>defaultValue</name>
+          <version>1.0.0</version>
+          <type>String</type>
+          <description><![CDATA[
             An expression in the form ${instance.property} for extracting a value for this parameter, especially from
             a runtime instance within the build system. (eg. ${project.build.directory} references 
             project.getBuild().getDirectory())
           ]]></description>
         </field>
-        <field xml.attribute="true">
+        <field>
           <name>type</name>
           <version>1.0.0</version>
           <type>String</type>

Modified: maven/components/trunk/maven-plugins/maven-plugin-plugin/pom.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-plugin-plugin/pom.xml?rev=326372&r1=326371&r2=326372&view=diff
==============================================================================
--- maven/components/trunk/maven-plugins/maven-plugin-plugin/pom.xml (original)
+++ maven/components/trunk/maven-plugins/maven-plugin-plugin/pom.xml Tue Oct 18 21:14:13 2005
@@ -39,7 +39,7 @@
     <dependency>
       <groupId>org.apache.maven</groupId>
       <artifactId>maven-plugin-tools-api</artifactId>
-      <version>2.0</version>
+      <version>2.0.1-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
@@ -58,15 +58,9 @@
       <version>2.0</version>
     </dependency>
     <dependency>
-      <groupId>org.apache.maven</groupId>
-      <artifactId>maven-plugin-tools-beanshell</artifactId>
-      <version>2.0</version>
-      <scope>runtime</scope>
-    </dependency>
-    <dependency>
       <groupId>org.apache.maven.reporting</groupId>
       <artifactId>maven-reporting-impl</artifactId>
       <version>2.0</version>
     </dependency>
   </dependencies>
-</project>
\ No newline at end of file
+</project>

Added: maven/components/trunk/maven-script/maven-script-ant/pom.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-script/maven-script-ant/pom.xml?rev=326372&view=auto
==============================================================================
--- maven/components/trunk/maven-script/maven-script-ant/pom.xml (added)
+++ maven/components/trunk/maven-script/maven-script-ant/pom.xml Tue Oct 18 21:14:13 2005
@@ -0,0 +1,27 @@
+<project>
+  <parent>
+    <artifactId>maven-script</artifactId>
+    <groupId>org.apache.maven</groupId>
+    <version>2.0</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>maven-script-ant</artifactId>
+  <name>Maven Ant Mojo Support</name>
+  <version>2.0.1-SNAPSHOT</version>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-api</artifactId>
+      <version>2.0</version>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-container-default</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-ant-factory</artifactId>
+      <version>1.0-alpha-1-SNAPSHOT</version>
+    </dependency>
+  </dependencies>
+</project>
\ No newline at end of file

Propchange: maven/components/trunk/maven-script/maven-script-ant/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-script/maven-script-ant/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/components/trunk/maven-script/maven-script-ant/src/main/java/org/apache/maven/script/ant/AntMojoComponentFactory.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-script/maven-script-ant/src/main/java/org/apache/maven/script/ant/AntMojoComponentFactory.java?rev=326372&view=auto
==============================================================================
--- maven/components/trunk/maven-script/maven-script-ant/src/main/java/org/apache/maven/script/ant/AntMojoComponentFactory.java (added)
+++ maven/components/trunk/maven-script/maven-script-ant/src/main/java/org/apache/maven/script/ant/AntMojoComponentFactory.java Tue Oct 18 21:14:13 2005
@@ -0,0 +1,20 @@
+package org.apache.maven.script.ant;
+
+import org.codehaus.classworlds.ClassRealm;
+import org.codehaus.plexus.PlexusContainer;
+import org.codehaus.plexus.component.factory.ComponentInstantiationException;
+import org.codehaus.plexus.component.factory.ant.AntComponentFactory;
+import org.codehaus.plexus.component.factory.ant.AntScriptInvoker;
+import org.codehaus.plexus.component.repository.ComponentDescriptor;
+
+public class AntMojoComponentFactory
+    extends AntComponentFactory
+{
+
+    public Object newInstance( ComponentDescriptor descriptor, ClassRealm realm, PlexusContainer container )
+        throws ComponentInstantiationException
+    {
+        return new AntMojoWrapper( (AntScriptInvoker) super.newInstance( descriptor, realm, container ) );
+    }
+
+}

Propchange: maven/components/trunk/maven-script/maven-script-ant/src/main/java/org/apache/maven/script/ant/AntMojoComponentFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-script/maven-script-ant/src/main/java/org/apache/maven/script/ant/AntMojoComponentFactory.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/components/trunk/maven-script/maven-script-ant/src/main/java/org/apache/maven/script/ant/AntMojoWrapper.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-script/maven-script-ant/src/main/java/org/apache/maven/script/ant/AntMojoWrapper.java?rev=326372&view=auto
==============================================================================
--- maven/components/trunk/maven-script/maven-script-ant/src/main/java/org/apache/maven/script/ant/AntMojoWrapper.java (added)
+++ maven/components/trunk/maven-script/maven-script-ant/src/main/java/org/apache/maven/script/ant/AntMojoWrapper.java Tue Oct 18 21:14:13 2005
@@ -0,0 +1,63 @@
+package org.apache.maven.script.ant;
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.ContextEnabled;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.codehaus.plexus.component.MapOrientedComponent;
+import org.codehaus.plexus.component.configurator.ComponentConfigurationException;
+import org.codehaus.plexus.component.factory.ant.AntComponentExecutionException;
+import org.codehaus.plexus.component.factory.ant.AntScriptInvoker;
+import org.codehaus.plexus.component.repository.ComponentRequirement;
+
+import java.util.Map;
+
+
+public class AntMojoWrapper
+    extends AbstractMojo
+    implements ContextEnabled, MapOrientedComponent
+{
+
+    private Map pluginContext;
+    private final AntScriptInvoker scriptInvoker;
+
+    public AntMojoWrapper( AntScriptInvoker scriptInvoker )
+    {
+        this.scriptInvoker = scriptInvoker;
+    }
+
+    public void execute()
+        throws MojoExecutionException
+    {
+        try
+        {
+            scriptInvoker.invoke();
+        }
+        catch ( AntComponentExecutionException e )
+        {
+            throw new MojoExecutionException( "Failed to execute: " + e.getMessage(), e );
+        }
+    }
+
+    public void setPluginContext( Map pluginContext )
+    {
+        this.pluginContext = pluginContext;
+    }
+
+    public Map getPluginContext()
+    {
+        return pluginContext;
+    }
+
+    public void addComponentRequirement( ComponentRequirement requirementDescriptor, Object requirementValue )
+        throws ComponentConfigurationException
+    {
+        scriptInvoker.addComponentRequirement( requirementDescriptor, requirementValue );
+    }
+
+    public void setComponentConfiguration( Map componentConfiguration )
+        throws ComponentConfigurationException
+    {
+        scriptInvoker.setComponentConfiguration( componentConfiguration );
+    }
+
+}

Propchange: maven/components/trunk/maven-script/maven-script-ant/src/main/java/org/apache/maven/script/ant/AntMojoWrapper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-script/maven-script-ant/src/main/java/org/apache/maven/script/ant/AntMojoWrapper.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/components/trunk/maven-script/maven-script-ant/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-script/maven-script-ant/src/main/resources/META-INF/plexus/components.xml?rev=326372&view=auto
==============================================================================
--- maven/components/trunk/maven-script/maven-script-ant/src/main/resources/META-INF/plexus/components.xml (added)
+++ maven/components/trunk/maven-script/maven-script-ant/src/main/resources/META-INF/plexus/components.xml Tue Oct 18 21:14:13 2005
@@ -0,0 +1,9 @@
+<component-set>
+  <components>
+    <component>
+      <role>org.codehaus.plexus.component.factory.ComponentFactory</role>
+      <implementation>org.apache.maven.script.ant.AntMojoComponentFactory</implementation>
+      <role-hint>ant-mojo</role-hint>
+    </component>
+  </components>
+</component-set>

Propchange: maven/components/trunk/maven-script/maven-script-ant/src/main/resources/META-INF/plexus/components.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-script/maven-script-ant/src/main/resources/META-INF/plexus/components.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"



Mime
View raw message