You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by ke...@apache.org on 2005/08/10 15:40:43 UTC
svn commit: r231230 - in /maven/components/trunk/maven-plugins: ./
maven-antrun-plugin/ maven-antrun-plugin/src/ maven-antrun-plugin/src/main/
maven-antrun-plugin/src/main/java/ maven-antrun-plugin/src/main/java/org/
maven-antrun-plugin/src/main/java/o...
Author: kenney
Date: Wed Aug 10 06:38:21 2005
New Revision: 231230
URL: http://svn.apache.org/viewcvs?rev=231230&view=rev
Log:
Donating maven-antrun-plugin to the Maven2 project, as discussed with Brett.
Enjoy! :-)
TODO:
o make <echo>...</echo> output visible.
o devise a way to pass on maven2 properties to <ant/>-called build.xml files.
The ant code just copies all properties from the default PropertyHandler,
however with m2 that's not possible since they are resolved/evaluated at
runtime.
Added:
maven/components/trunk/maven-plugins/maven-antrun-plugin/
maven/components/trunk/maven-plugins/maven-antrun-plugin/pom.xml (with props)
maven/components/trunk/maven-plugins/maven-antrun-plugin/src/
maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/
maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/java/
maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/java/org/
maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/java/org/apache/
maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/java/org/apache/maven/
maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/
maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/
maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntPropertyHelper.java (with props)
maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java (with props)
maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/components/
maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/components/AntTargetConverter.java (with props)
maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/resources/
maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/resources/META-INF/
maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/resources/META-INF/plexus/
maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/resources/META-INF/plexus/components.xml (with props)
maven/components/trunk/maven-plugins/maven-antrun-plugin/src/site/
maven/components/trunk/maven-plugins/maven-antrun-plugin/src/site/site.xml (with props)
maven/components/trunk/maven-plugins/maven-antrun-plugin/src/site/xdoc/
maven/components/trunk/maven-plugins/maven-antrun-plugin/src/site/xdoc/introduction.xml (with props)
maven/components/trunk/maven-plugins/maven-antrun-plugin/src/site/xdoc/usage.xml (with props)
Modified:
maven/components/trunk/maven-plugins/pom.xml
Added: maven/components/trunk/maven-plugins/maven-antrun-plugin/pom.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-antrun-plugin/pom.xml?rev=231230&view=auto
==============================================================================
--- maven/components/trunk/maven-plugins/maven-antrun-plugin/pom.xml (added)
+++ maven/components/trunk/maven-plugins/maven-antrun-plugin/pom.xml Wed Aug 10 06:38:21 2005
@@ -0,0 +1,54 @@
+<model
+ 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>
+ <parent>
+ <artifactId>maven-plugin-parent</artifactId>
+ <groupId>org.apache.maven.plugins</groupId>
+ <version>2.0-beta-1-SNAPSHOT</version>
+ </parent>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <packaging>maven-plugin</packaging>
+ <version>1.0-alpha-1-SNAPSHOT</version>
+
+ <name>Maven AntRun Plugin</name>
+ <description>Runs ant scripts embedded in the POM</description>
+
+ <developers>
+ <developer>
+ <id>kenney</id>
+ <name>Kenney Westerhof</name>
+ <email>kenney@apache.org</email>
+ </developer>
+ </developers>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>plexus</groupId>
+ <artifactId>plexus-container-default</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant</artifactId>
+ <version>1.6.5</version>
+ </dependency>
+
+ <!-- needed for launching a build.xml file -->
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-launcher</artifactId>
+ <version>1.6.5</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ </dependencies>
+
+</model>
Propchange: maven/components/trunk/maven-plugins/maven-antrun-plugin/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/components/trunk/maven-plugins/maven-antrun-plugin/pom.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntPropertyHelper.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntPropertyHelper.java?rev=231230&view=auto
==============================================================================
--- maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntPropertyHelper.java (added)
+++ maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntPropertyHelper.java Wed Aug 10 06:38:21 2005
@@ -0,0 +1,77 @@
+package org.apache.maven.plugin.antrun;
+
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+import org.apache.maven.plugin.logging.Log;
+import org.apache.maven.project.MavenProject;
+import org.apache.tools.ant.PropertyHelper;
+import org.codehaus.plexus.util.introspection.ReflectionValueExtractor;
+
+/**
+ * Makes the ${expressions} used in Maven available to Ant as properties.
+ *
+ * @author <a href="mailto:kenney@apache.org">Kenney Westerhof</a>
+ */
+public class AntPropertyHelper
+ extends PropertyHelper
+{
+ private Log log;
+ private MavenProject mavenProject;
+
+ public AntPropertyHelper( MavenProject project, Log l )
+ {
+ mavenProject = project;
+ log = l;
+ }
+
+ public synchronized Object getPropertyHook( String ns, String name,
+ boolean user
+ )
+ {
+ log.debug( "getProperty(ns="+ns+", name="+name+", user="+user+")" );
+
+ try
+ {
+ if ( name.startsWith( "project." ) || name.equals( "basedir" ) )
+ {
+ Object val = ReflectionValueExtractor.evaluate(
+ name.substring( "project.".length() ),
+ mavenProject
+ );
+
+ if ( val != null )
+ {
+ return val;
+ }
+ }
+ }
+ catch ( Exception e )
+ {
+ log.warn( "Error evaluating expression '" + name + "'", e );
+ e.printStackTrace();
+ }
+
+ Object val = super.getPropertyHook( ns, name, user );
+
+ if ( val == null )
+ {
+ val = System.getProperty( name.toString() );
+ }
+
+ return val;
+ }
+}
Propchange: maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntPropertyHelper.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntPropertyHelper.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java?rev=231230&view=auto
==============================================================================
--- maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java (added)
+++ maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java Wed Aug 10 06:38:21 2005
@@ -0,0 +1,89 @@
+package org.apache.maven.plugin.antrun;
+
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.project.MavenProject;
+import org.apache.tools.ant.DefaultLogger;
+import org.apache.tools.ant.PropertyHelper;
+import org.apache.tools.ant.Target;
+
+/**
+ * Maven AntRun Mojo.
+ *
+ * This plugin provides the capability of calling ant tasks
+ * from a POM. It is encouraged to move the actual tasks to
+ * a separate build.xml file and call that file with an
+ * <ant/> task.
+ *
+ * @author <a href="mailto:kenney@apache.org">Kenney Westerhof</a>
+ *
+ * @configurator override
+ *
+ * @goal run
+ *
+ * @description Runs the nested ant tasks
+ *
+ */
+public class AntRunMojo
+ extends AbstractMojo
+{
+ /**
+ * @parameter expression="${project}"
+ * @required
+ * @readonly
+ */
+ private MavenProject project;
+
+ /**
+ * @parameter expression="${tasks}"
+ */
+ private Target tasks;
+
+ /**
+ */
+ public void execute()
+ throws MojoExecutionException
+ {
+ try
+ {
+ PropertyHelper propertyHelper = PropertyHelper.getPropertyHelper(
+ tasks.getProject()
+ );
+
+ propertyHelper.setNext(
+ new AntPropertyHelper( project, getLog() )
+ );
+
+ DefaultLogger antLogger = new DefaultLogger();
+ antLogger.setOutputPrintStream( System.out );
+ antLogger.setErrorPrintStream( System.err );
+ tasks.getProject().addBuildListener( antLogger );
+
+ getLog().info( "Executing tasks" );
+
+ tasks.execute();
+
+ getLog().info( "Executed tasks" );
+ }
+ catch ( Exception e )
+ {
+ throw new MojoExecutionException( "Error executing ant tasks", e );
+ }
+ }
+}
Propchange: maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/AntRunMojo.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/components/AntTargetConverter.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/components/AntTargetConverter.java?rev=231230&view=auto
==============================================================================
--- maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/components/AntTargetConverter.java (added)
+++ maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/components/AntTargetConverter.java Wed Aug 10 06:38:21 2005
@@ -0,0 +1,202 @@
+package org.apache.maven.plugin.antrun.components;
+
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed 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.
+ */
+
+import org.apache.tools.ant.ComponentHelper;
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant.RuntimeConfigurable;
+import org.apache.tools.ant.Target;
+import org.apache.tools.ant.UnknownElement;
+
+import org.codehaus.plexus.component.configurator.ComponentConfigurationException;
+import org.codehaus.plexus.component.configurator.converters.AbstractConfigurationConverter;
+import org.codehaus.plexus.component.configurator.converters.ConfigurationConverter;
+import org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup;
+import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluationException;
+import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator;
+import org.codehaus.plexus.configuration.PlexusConfiguration;
+import org.codehaus.plexus.configuration.PlexusConfigurationException;
+
+/**
+ * Plexus ConfigurationConverter to set up Ant Target component fields.
+ *
+ * @author <a href="mailto:kenney@apache.org">Kenney Westerhof</a>
+ */
+public class AntTargetConverter
+ extends AbstractConfigurationConverter
+{
+ public static final String ROLE = ConfigurationConverter.class.getName();
+
+ public boolean canConvert( Class type )
+ {
+ return Target.class.isAssignableFrom( type );
+ }
+
+ public Object fromConfiguration(
+ ConverterLookup converterLookup, PlexusConfiguration configuration,
+ Class type, Class baseType, ClassLoader classLoader,
+ ExpressionEvaluator expressionEvaluator
+ )
+ throws ComponentConfigurationException
+ {
+ Object retValue = fromExpression( configuration, expressionEvaluator, type );
+ if ( retValue != null )
+ {
+ return retValue;
+ }
+
+ Class implementation = getClassForImplementationHint( type, configuration, classLoader );
+
+ retValue = instantiateObject( implementation );
+
+ processConfiguration(
+ (Target) retValue, classLoader, configuration, expressionEvaluator
+ );
+
+ return retValue;
+ }
+
+
+ private void processConfiguration(
+ Target target, ClassLoader classLoader,
+ PlexusConfiguration configuration,
+ ExpressionEvaluator expressionEvaluator
+ )
+ throws ComponentConfigurationException
+ {
+ Project project = new Project();
+ project.setName( "DummyProject" );
+
+ target.setName( "" );
+ target.setProject( project );
+ project.addTarget( target );
+
+ initDefinitions( project, target );
+
+ processConfiguration(
+ null, project, target, configuration, expressionEvaluator
+ );
+ }
+
+
+ private void processConfiguration(
+ RuntimeConfigurable parentWrapper, Project project, Target target,
+ PlexusConfiguration configuration, ExpressionEvaluator expressionEvaluator
+ )
+ throws ComponentConfigurationException
+ {
+ int items = configuration.getChildCount();
+
+ Object parent = parentWrapper == null ? null : parentWrapper.getProxy();
+
+ for ( int i = 0; i < items; i++ )
+ {
+ PlexusConfiguration childConfiguration = configuration.getChild( i );
+ UnknownElement task = new UnknownElement(
+ childConfiguration.getName()
+ );
+ task.setProject( project );
+ task.setNamespace( "" );
+ task.setQName( childConfiguration.getName() );
+ task.setTaskType( childConfiguration.getName() );
+ task.setTaskName( childConfiguration.getName() );
+ task.setOwningTarget( target );
+
+ if ( parent != null )
+ {
+ ( (UnknownElement) parent ).addChild( task );
+ }
+ else
+ {
+ target.addTask( task );
+ }
+
+ RuntimeConfigurable wrapper = new RuntimeConfigurable(
+ task, task.getTaskName()
+ );
+
+ try
+ {
+ if ( childConfiguration.getValue() != null )
+ {
+ wrapper.addText( childConfiguration.getValue() );
+ }
+ }
+ catch ( PlexusConfigurationException e )
+ {
+ throw new ComponentConfigurationException(
+ "Error reading text value from element '" +
+ childConfiguration.getName() + "'", e
+ );
+ }
+
+ String [] attrNames = childConfiguration.getAttributeNames();
+
+ for ( int a = 0; a < attrNames.length; a++ )
+ {
+ try
+ {
+ String v = childConfiguration.getAttribute( attrNames[a] );
+
+ try
+ {
+ Object evaluatedExpr = expressionEvaluator.evaluate( v );
+ v = evaluatedExpr == null ? v : evaluatedExpr.toString();
+ }
+ catch ( ExpressionEvaluationException e )
+ {
+ throw new ComponentConfigurationException
+ (
+ "Error evaluating value '" + v + "' of attribute '" + attrNames[a] +
+ "' of tag '" + childConfiguration.getName() + "'", e
+ );
+ }
+
+ wrapper.setAttribute( attrNames[a], v );
+ }
+ catch ( PlexusConfigurationException e )
+ {
+ throw new ComponentConfigurationException(
+ "Error getting attribute '" + attrNames[a] +
+ "' of tag '" + childConfiguration.getName() + "'", e
+ );
+ }
+ }
+
+ if ( parentWrapper != null )
+ {
+ parentWrapper.addChild( wrapper );
+ }
+
+ processConfiguration(
+ wrapper, project, target,
+ childConfiguration, expressionEvaluator
+ );
+
+ }
+ }
+
+
+ protected void initDefinitions( Project project, Target target )
+ {
+ ComponentHelper componentHelper = ComponentHelper.getComponentHelper(
+ project
+ );
+
+ componentHelper.initDefaultDefinitions();
+ }
+}
Propchange: maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/components/AntTargetConverter.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/java/org/apache/maven/plugin/antrun/components/AntTargetConverter.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/resources/META-INF/plexus/components.xml?rev=231230&view=auto
==============================================================================
--- maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/resources/META-INF/plexus/components.xml (added)
+++ maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/resources/META-INF/plexus/components.xml Wed Aug 10 06:38:21 2005
@@ -0,0 +1,37 @@
+<plexus>
+
+ <components>
+
+ <component>
+ <role>org.codehaus.plexus.component.configurator.ComponentConfigurator</role>
+ <role-hint>override</role-hint>
+ <implementation>org.codehaus.plexus.component.configurator.BasicComponentConfigurator</implementation>
+ <requirements>
+ <requirement>
+ <role>org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup</role>
+ <role-hint>override</role-hint>
+ </requirement>
+ </requirements>
+ </component>
+
+ <component>
+ <role>org.codehaus.plexus.component.configurator.converters.lookup.ConverterLookup</role>
+ <role-hint>override</role-hint>
+ <implementation>org.codehaus.plexus.component.configurator.converters.lookup.DefaultConverterLookup</implementation>
+ <requirements>
+ <requirement>
+ <role>org.codehaus.plexus.component.configurator.converters.ConfigurationConverter</role>
+ <role-hint>AntTarget</role-hint>
+ <field-name>customConverters</field-name>
+ </requirement>
+ </requirements>
+ </component>
+
+ <component>
+ <role>org.codehaus.plexus.component.configurator.converters.ConfigurationConverter</role>
+ <role-hint>AntTarget</role-hint>
+ <implementation>org.apache.maven.plugin.antrun.components.AntTargetConverter</implementation>
+ </component>
+ </components>
+
+</plexus>
Propchange: maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/resources/META-INF/plexus/components.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/components/trunk/maven-plugins/maven-antrun-plugin/src/main/resources/META-INF/plexus/components.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/components/trunk/maven-plugins/maven-antrun-plugin/src/site/site.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-antrun-plugin/src/site/site.xml?rev=231230&view=auto
==============================================================================
--- maven/components/trunk/maven-plugins/maven-antrun-plugin/src/site/site.xml (added)
+++ maven/components/trunk/maven-plugins/maven-antrun-plugin/src/site/site.xml Wed Aug 10 06:38:21 2005
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+
+<!--
+ | Copyright 2001-2005 The Apache Software Foundation.
+ |
+ | Licensed 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 name="Maven AntRun Plugin">
+ <bannerLeft>
+ <name>Maven AntRun Plugin</name>
+ <src>http://maven.apache.org/images/apache-maven-project.png</src>
+ <href>http://maven.apache.org/maven2/</href>
+ </bannerLeft>
+ <bannerRight>
+ <src>http://maven.apache.org/images/maven-small.gif</src>
+ </bannerRight>
+ <body>
+ <links>
+ <item name="Maven 2" href="http://maven.apache.org/maven2/"/>
+ <item name="Ant" href="http://ant.apache.org/"/>
+ </links>
+
+ <menu name="Overview">
+ <item name="Introduction" href="introduction.html"/>
+ <item name="Usage" href="usage.html"/>
+ </menu>
+
+ ${reports}
+ </body>
+</project>
Propchange: maven/components/trunk/maven-plugins/maven-antrun-plugin/src/site/site.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/components/trunk/maven-plugins/maven-antrun-plugin/src/site/site.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/components/trunk/maven-plugins/maven-antrun-plugin/src/site/xdoc/introduction.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-antrun-plugin/src/site/xdoc/introduction.xml?rev=231230&view=auto
==============================================================================
--- maven/components/trunk/maven-plugins/maven-antrun-plugin/src/site/xdoc/introduction.xml (added)
+++ maven/components/trunk/maven-plugins/maven-antrun-plugin/src/site/xdoc/introduction.xml Wed Aug 10 06:38:21 2005
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+
+<document>
+ <properties>
+ <author email="kenney@apache.org">Kenney Westerhof</author>
+ <title>Introduction</title>
+ </properties>
+ <head/>
+ <body>
+ <section name="Introduction">
+ <p>
+ This plugin provides the ability to run Ant tasks from
+ within Maven2. You can even embed your ant scripts in the POM!
+ </p>
+
+ <p>
+ It is <emph>not</emph> the intention of this plugin to provide a means
+ of polluting the POM, so it's encouraged to move all your
+ Ant tasks to a build.xml file and just call it from the POM
+ using Ant's <a href="http://ant.apache.org/manual/CoreTasks/ant.html"><ant/> task</a>.
+ </p>
+
+ <p>
+ One of the main goals of this plugin is to ease the migration from
+ Ant based projects to Maven 2. A lot of projects are currently unable
+ to migrate simply because they depend on some custom build functionality
+ that Maven2 doesn't provide yet.
+ </p>
+
+ <p>
+ Even with plugins widely available there will always be simple, small
+ tasks that can be done using one or two lines of Ant script (like
+ deploying an EAR), until ofcourse a plugin comes available that does
+ the job.
+ </p>
+
+ </section>
+ </body>
+</document>
Propchange: maven/components/trunk/maven-plugins/maven-antrun-plugin/src/site/xdoc/introduction.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/components/trunk/maven-plugins/maven-antrun-plugin/src/site/xdoc/introduction.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/components/trunk/maven-plugins/maven-antrun-plugin/src/site/xdoc/usage.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-antrun-plugin/src/site/xdoc/usage.xml?rev=231230&view=auto
==============================================================================
--- maven/components/trunk/maven-plugins/maven-antrun-plugin/src/site/xdoc/usage.xml (added)
+++ maven/components/trunk/maven-plugins/maven-antrun-plugin/src/site/xdoc/usage.xml Wed Aug 10 06:38:21 2005
@@ -0,0 +1,65 @@
+<?xml version="1.0"?>
+
+<document>
+ <properties>
+ <author email="kenney@apache.org">Kenney Westerhof</author>
+ <title>Introduction</title>
+ </properties>
+ <head/>
+ <body>
+ <section name="Usage">
+ <p>
+ For those of you unfamiliar with configuring a plugin see the example
+ below:
+
+ <source>
+<![CDATA[
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>my-test-app</artifactId>
+ <groupId>my-test-group</groupId>
+ <version>1.0-SNAPSHOT</version>
+
+ <build>
+ <plugins>
+
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>generate-sources</phase>
+ <configuration>
+ <tasks>
+
+ <!--
+ Place any ant task here. You can add anything
+ you can add between <target> and </target> in a
+ build.xml.
+ -->
+
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ </plugins>
+ </build>
+</project>
+]]>
+ </source>
+ </p>
+
+ <p>
+ The example above illustrates how to bind an ant script to a
+ lifecycle phase. You can add a script to each lifecycle phase,
+ by duplicating the <![CDATA[<execution/>]]> section and specifying
+ a new phase.
+ </p>
+ </section>
+
+ </body>
+</document>
Propchange: maven/components/trunk/maven-plugins/maven-antrun-plugin/src/site/xdoc/usage.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/components/trunk/maven-plugins/maven-antrun-plugin/src/site/xdoc/usage.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Modified: maven/components/trunk/maven-plugins/pom.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/pom.xml?rev=231230&r1=231229&r2=231230&view=diff
==============================================================================
--- maven/components/trunk/maven-plugins/pom.xml (original)
+++ maven/components/trunk/maven-plugins/pom.xml Wed Aug 10 06:38:21 2005
@@ -52,6 +52,15 @@
<role>Java Developer</role>
</roles>
</developer>
+ <developer>
+ <id>kenney</id>
+ <name>Kenney Westerhof</name>
+ <email>kenney@apache.org</email>
+ <organization>Neonics</organization>
+ <roles>
+ <role>Java Developer</role>
+ </roles>
+ </developer>
</developers>
<dependencies>
<dependency>
@@ -109,6 +118,11 @@
<dependencyManagement>
<dependencies>
<dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>2.0-beta-1-SNAPSHOT</version>
+ </dependency>
+ <dependency>
<groupId>plexus</groupId>
<artifactId>plexus-container-default</artifactId>
<version>1.0-alpha-6-SNAPSHOT</version>
@@ -122,6 +136,7 @@
</dependencyManagement>
<modules>
<module>maven-ant-plugin</module>
+ <module>maven-antrun-plugin</module>
<module>maven-assembly-plugin</module>
<module>maven-checkstyle-plugin</module>
<module>maven-clean-plugin</module>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org