mirror of https://github.com/apache/maven.git
o updating format of the @tags
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@162745 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b36d964715
commit
a9850685f4
|
@ -1,4 +1,4 @@
|
|||
package org.apache.maven.plugin;
|
||||
package org.apache.maven.plugin.clean;
|
||||
|
||||
/*
|
||||
* Copyright 2001-2004 The Apache Software Foundation.
|
||||
|
@ -16,19 +16,23 @@ package org.apache.maven.plugin;
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import org.apache.maven.plugin.AbstractPlugin;
|
||||
import org.apache.maven.plugin.PluginExecutionRequest;
|
||||
import org.apache.maven.plugin.PluginExecutionResponse;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* @maven.plugin.id clean
|
||||
* @maven.plugin.description A maven2 plugin which cleans the build
|
||||
*
|
||||
* @parameter failedOnError String true validator description
|
||||
* @parameter outputDirectory String true validator description
|
||||
*
|
||||
* @goal clean
|
||||
* @goal.description Goal which cleans the build
|
||||
* @goal.parameter failedOnError false
|
||||
* @goal.parameter outputDirectory #project.build.directory
|
||||
*
|
||||
* @description Goal which cleans the build
|
||||
*
|
||||
* @parameter
|
||||
* name="outputDirectory"
|
||||
* type="String"
|
||||
* required="true"
|
||||
* validator=""
|
||||
* expression="#project.build.directory"
|
||||
*
|
||||
* @author <a href="mailto:evenisse@maven.org">Emmanuel Venisse</a>
|
||||
* @version $Id$
|
||||
|
@ -40,15 +44,15 @@ public class CleanPlugin
|
|||
|
||||
private String outputDirectory;
|
||||
|
||||
private boolean failedOnError;
|
||||
private boolean failOnError;
|
||||
|
||||
public void execute( PluginExecutionRequest request, PluginExecutionResponse response )
|
||||
throws Exception
|
||||
{
|
||||
outputDirectory = (String) request.getParameter( "outputDirectory" );
|
||||
|
||||
failedOnError = Boolean.valueOf( (String) request.getParameter( "failedOnError" ) ).booleanValue();
|
||||
|
||||
failOnError = Boolean.valueOf( (String) request.getParameter( "failedOnError" ) ).booleanValue();
|
||||
|
||||
if ( outputDirectory != null )
|
||||
{
|
||||
File dir = new File( outputDirectory );
|
||||
|
@ -114,7 +118,7 @@ public class CleanPlugin
|
|||
{
|
||||
String message = "Unable to delete file "
|
||||
+ f.getAbsolutePath();
|
||||
if ( failedOnError )
|
||||
if ( failOnError )
|
||||
{
|
||||
throw new Exception( message );
|
||||
}
|
||||
|
@ -130,7 +134,7 @@ public class CleanPlugin
|
|||
{
|
||||
String message = "Unable to delete directory "
|
||||
+ d.getAbsolutePath();
|
||||
if ( failedOnError )
|
||||
if ( failOnError )
|
||||
{
|
||||
throw new Exception( message );
|
||||
}
|
|
@ -25,32 +25,23 @@ import java.io.File;
|
|||
|
||||
|
||||
/**
|
||||
* @goal install
|
||||
*
|
||||
* @description install a jar in local repository
|
||||
*
|
||||
* @prereq jar:jar
|
||||
*
|
||||
* @parameter name=jarName type=String required=true validator= expression=#maven.final.name
|
||||
* @parameter name=outputDirectory type=String required=true validator= expression=#project.build.directory
|
||||
* @parameter name=basedir type=String required=true validator= expression=#project.build.directory
|
||||
* @parameter name=groupId type=String required=true validator= expression=#project.groupId
|
||||
* @parameter name=artifactId type=String required=true validator= expression=#project.artifactId
|
||||
* @parameter name=version type=String required=true validator= expression=#project.version
|
||||
* @parameter name=localRepository type=String required=true validator= expression=#project.localRepository
|
||||
* @parameter name=pomFile type=java.io.File required=true validator= expression=#project.file
|
||||
*
|
||||
* @author <a href="michal.maczka@dimatics.com">Michal Maczka</a>
|
||||
* @version $Id$
|
||||
*
|
||||
* @maven.plugin.id jar
|
||||
* @maven.plugin.description Maven plugin to build jars
|
||||
*
|
||||
* @parameter jarName String true validator description
|
||||
* @parameter outputDirectory String true validator description
|
||||
* @parameter basedir String true validator description
|
||||
* @parameter groupId String true validator description
|
||||
* @parameter version String true validator description
|
||||
* @parameter localRepository String true validator description
|
||||
* @parameter pomFile java.io.File true validator description
|
||||
* *
|
||||
* @goal jar:install
|
||||
* @goal.description install a jar in local repository
|
||||
*
|
||||
* @goal.prereq jar
|
||||
* @goal.parameter jarName #maven.final.name
|
||||
* @goal.parameter outputDirectory #project.build.directory
|
||||
* @goal.parameter basedir #project.build.directory/classes
|
||||
* @goal.parameter pomFile #project.file
|
||||
* @goal.parameter groupId #project.groupId
|
||||
* @goal.parameter artifactId #project.artifactId
|
||||
* @goal.parameter version #project.version
|
||||
* @goal.parameter localRepository #project.localRepository
|
||||
*/
|
||||
public class JarInstallMojo
|
||||
extends AbstractPlugin
|
||||
|
|
|
@ -31,30 +31,37 @@ import java.util.jar.JarOutputStream;
|
|||
import java.util.jar.Manifest;
|
||||
|
||||
/**
|
||||
* @maven.plugin.id jar
|
||||
* @maven.plugin.description Maven plugin to build jars
|
||||
*
|
||||
* @parameter jarName String true validator description
|
||||
* @parameter outputDirectory String true validator description
|
||||
* @parameter basedir String true validator description
|
||||
*
|
||||
* @goal jar
|
||||
* @goal.description build a jar
|
||||
* @goal.prereq test
|
||||
* @goal.prereq resources
|
||||
* @goal.parameter jarName #maven.final.name
|
||||
* @goal.parameter outputDirectory #project.build.directory
|
||||
* @goal.parameter basedir #project.build.directory/classes
|
||||
*
|
||||
* @description build a jar
|
||||
*
|
||||
* @prereq surefire:test
|
||||
* @prereq resources:resources
|
||||
*
|
||||
* @parameter
|
||||
* name="jarName"
|
||||
* type="String"
|
||||
* required="true"
|
||||
* validator=""
|
||||
* expression="#maven.final.name"
|
||||
* description=""
|
||||
* @parameter
|
||||
* name="outputDirectory"
|
||||
* type="String"
|
||||
* required="true"
|
||||
* validator=""
|
||||
* expression="#project.build.directory"
|
||||
* description=""
|
||||
* @parameter
|
||||
* name="basedir"
|
||||
* type="String"
|
||||
* required="true"
|
||||
* validator=""
|
||||
* expression="#project.build.directory/classes"
|
||||
* description=""
|
||||
*
|
||||
* @author <a href="michal.maczka@dimatics.com">Michal Maczka</a>
|
||||
* @version $Id$
|
||||
*
|
||||
* maven.jar.manifest.extensions.add
|
||||
* maven.jar.includes
|
||||
* maven.jar.excludes
|
||||
* maven.jar.index
|
||||
* maven.jar.compress
|
||||
* maven.remote.group
|
||||
*/
|
||||
public class JarMojo
|
||||
extends AbstractPlugin
|
||||
|
|
|
@ -3,19 +3,32 @@ package org.apache.maven.plugin.plugin;
|
|||
import org.apache.maven.plugin.generator.PluginDescriptorGenerator;
|
||||
|
||||
/**
|
||||
* @maven.plugin.id plugin
|
||||
* @maven.plugin.description A maven2 mojo for generating a plugin descriptor.
|
||||
*
|
||||
* @parameter sourceDirectory String true validator description
|
||||
* @parameter outputDirectory String true validator description
|
||||
* @parameter pom String true validator description
|
||||
*
|
||||
* @goal descriptor
|
||||
* @goal.description Goal for generating a plugin descriptor.
|
||||
* @goal.parameter sourceDirectory #project.build.sourceDirectory
|
||||
* @goal.parameter outputDirectory #project.build.directory/classes/META-INF/maven
|
||||
* @goal.parameter pom #project.getFile().getPath()
|
||||
|
||||
*
|
||||
* @description Goal for generating a plugin descriptor.
|
||||
*
|
||||
* @parameter
|
||||
* name="sourceDirectory"
|
||||
* type="String"
|
||||
* required="true"
|
||||
* validator=""
|
||||
* expression="#project.build.sourceDirectory"
|
||||
* description=""
|
||||
* @parameter
|
||||
* name="outputDirectory"
|
||||
* type="String"
|
||||
* required="true"
|
||||
* validator="" *
|
||||
* expression="#project.build.directory/classes/META-INF/maven"
|
||||
* description=""
|
||||
* @parameter
|
||||
* name="pom"
|
||||
* type="String"
|
||||
* required="true"
|
||||
* validator=""
|
||||
* expression="#project.getFile().getPath()"
|
||||
* description=""
|
||||
*
|
||||
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
|
||||
* @version $Id$
|
||||
*/
|
||||
|
|
|
@ -33,16 +33,23 @@ import java.util.Iterator;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @maven.plugin.id resources
|
||||
* @maven.plugin.description Maven plugin to build jars
|
||||
*
|
||||
* @parameter outputDirectory String true validator description
|
||||
* @parameter resources List true validator description
|
||||
*
|
||||
* @goal resources
|
||||
* @goal.description copy application resources
|
||||
* @goal.parameter outputDirectory #project.build.directory/classes
|
||||
* @goal.parameter resources #project.build.resources
|
||||
*
|
||||
* @description copy application resources
|
||||
*
|
||||
* @parameter
|
||||
* name="outputDirectory"
|
||||
* type="String"
|
||||
* required="true"
|
||||
* validator=""
|
||||
* expression="#project.build.directory/classes"
|
||||
* description=""
|
||||
* @parameter
|
||||
* name="resources"
|
||||
* type="List"
|
||||
* required="true"
|
||||
* validator="#project.build.resources"
|
||||
* description=""
|
||||
*
|
||||
* @author <a href="michal.maczka@dimatics.com">Michal Maczka</a>
|
||||
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
|
||||
|
|
|
@ -17,6 +17,7 @@ package org.apache.maven.plugin.resources;
|
|||
* ====================================================================
|
||||
*/
|
||||
|
||||
|
||||
import org.apache.maven.model.Resource;
|
||||
import org.codehaus.plexus.util.FileUtils;
|
||||
|
||||
|
@ -29,16 +30,24 @@ import java.util.Iterator;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @maven.plugin.id resources
|
||||
* @maven.plugin.description Maven plugin to build jars
|
||||
*
|
||||
* @parameter outputDirectory String true validator description
|
||||
* @parameter resources List true validator description
|
||||
*
|
||||
* @goal test:resources
|
||||
* @goal.description copy test resources
|
||||
* @goal.parameter outputDirectory #project.build.directory/test-classes
|
||||
* @goal.parameter resources #project.build.unitTest.resources
|
||||
*
|
||||
* @description copy test resources
|
||||
*
|
||||
* @parameter
|
||||
* name="outputDirectory"
|
||||
* type="String"
|
||||
* required="true"
|
||||
* validator=""
|
||||
* expression="#project.build.unitTest.resources"
|
||||
* description=""
|
||||
* @parameter
|
||||
* name="resources"
|
||||
* type="List"
|
||||
* required="true"
|
||||
* validator=""
|
||||
* expression="#project.build.directory/test-classes"
|
||||
* description=""
|
||||
*
|
||||
* @author <a href="michal.maczka@dimatics.com">Michal Maczka</a>
|
||||
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
|
||||
|
|
|
@ -9,28 +9,49 @@ import java.io.File;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @maven.plugin.id surefire
|
||||
* @maven.plugin.description A maven2 plugin which uses surefire as a test runner
|
||||
*
|
||||
* @parameter mavenRepoLocal String required validator
|
||||
* @parameter basedir String required validator
|
||||
* @parameter includes String required validator
|
||||
* @parameter excludes String required validator
|
||||
* @parameter classpathElements String[] required validator
|
||||
*
|
||||
* @goal test
|
||||
* @goal.description Run tests using surefire
|
||||
*
|
||||
* @goal.prereq test:compile
|
||||
* @goal.prereq resources
|
||||
* @goal.prereq test:resources
|
||||
* @description Run tests using surefire
|
||||
*
|
||||
* @prereq compiler:test:compile
|
||||
* @prereq resources:resources
|
||||
* @prereq resources:test:resources
|
||||
*
|
||||
* @parameter
|
||||
* name="mavenRepoLocal"
|
||||
* type="String"
|
||||
* required="true"
|
||||
* validator="validator"
|
||||
* expression="#maven.repo.local"
|
||||
* @parameter
|
||||
* name="basedir"
|
||||
* type="String"
|
||||
* required="true"
|
||||
* validator="validator"
|
||||
* expression="#basedir"
|
||||
* description=""
|
||||
* @parameter
|
||||
* name="includes"
|
||||
* type="String"
|
||||
* required="true"
|
||||
* validator=""
|
||||
* expression="#project.build.unitTest.includes"
|
||||
* description=""
|
||||
* @parameter
|
||||
* name="excludes"
|
||||
* type="String"
|
||||
* required="true"
|
||||
* validator=""
|
||||
* expression="#project.build.unitTest.excludes"
|
||||
* description=""
|
||||
* @parameter
|
||||
* name="classpathElements"
|
||||
* type="String[]"
|
||||
* required="true"
|
||||
* validator=""
|
||||
* expression="#project.classpathElements"
|
||||
* description=""
|
||||
*
|
||||
* @goal.parameter mavenRepoLocal #maven.repo.local
|
||||
* @goal.parameter basedir #basedir
|
||||
* @goal.parameter includes #project.build.unitTest.includes
|
||||
* @goal.parameter excludes #project.build.unitTest.excludes
|
||||
* @goal.parameter classpathElements #project.classpathElements
|
||||
|
||||
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
|
||||
* @version $Id$
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue