renamed DependencyScope to ResolutionScope to better match the intent
git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@1338393 13f79535-47bb-0310-9956-ffa450edef68master
parent
30fe737999
commit
d56e6cba11
|
|
@ -40,9 +40,9 @@ public @interface Mojo
|
||||||
|
|
||||||
LifecyclePhase defaultPhase() default LifecyclePhase.NONE;
|
LifecyclePhase defaultPhase() default LifecyclePhase.NONE;
|
||||||
|
|
||||||
DependencyScope requiresDependencyResolution() default DependencyScope.RUNTIME;
|
ResolutionScope requiresDependencyResolution() default ResolutionScope.RUNTIME;
|
||||||
|
|
||||||
DependencyScope requiresDependencyCollection() default DependencyScope.RUNTIME;
|
ResolutionScope requiresDependencyCollection() default ResolutionScope.RUNTIME;
|
||||||
|
|
||||||
InstanciationStrategy instantiationStrategy() default InstanciationStrategy.PER_LOOKUP;
|
InstanciationStrategy instantiationStrategy() default InstanciationStrategy.PER_LOOKUP;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ import org.apache.maven.artifact.Artifact;
|
||||||
* @author Hervé Boutemy
|
* @author Hervé Boutemy
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
*/
|
*/
|
||||||
public enum DependencyScope
|
public enum ResolutionScope
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* <code>compile</code> resolution scope
|
* <code>compile</code> resolution scope
|
||||||
|
|
@ -59,7 +59,7 @@ public enum DependencyScope
|
||||||
|
|
||||||
private final String id;
|
private final String id;
|
||||||
|
|
||||||
DependencyScope( String id )
|
ResolutionScope( String id )
|
||||||
{
|
{
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
@ -21,7 +21,7 @@ package org.apache.maven.plugin.coreit;
|
||||||
|
|
||||||
import org.apache.maven.plugin.MojoExecutionException;
|
import org.apache.maven.plugin.MojoExecutionException;
|
||||||
import org.apache.maven.plugins.annotations.Component;
|
import org.apache.maven.plugins.annotations.Component;
|
||||||
import org.apache.maven.plugins.annotations.DependencyScope;
|
import org.apache.maven.plugins.annotations.ResolutionScope;
|
||||||
import org.apache.maven.plugins.annotations.Execute;
|
import org.apache.maven.plugins.annotations.Execute;
|
||||||
import org.apache.maven.plugins.annotations.LifecyclePhase;
|
import org.apache.maven.plugins.annotations.LifecyclePhase;
|
||||||
import org.apache.maven.plugins.annotations.Mojo;
|
import org.apache.maven.plugins.annotations.Mojo;
|
||||||
|
|
@ -34,7 +34,7 @@ import org.apache.maven.tools.plugin.annotations.FooMojo;
|
||||||
* @since 1.2
|
* @since 1.2
|
||||||
* @deprecated Don't use!
|
* @deprecated Don't use!
|
||||||
*/
|
*/
|
||||||
@Mojo( name = "first", requiresDependencyResolution = DependencyScope.TEST, defaultPhase = LifecyclePhase.INTEGRATION_TEST )
|
@Mojo( name = "first", requiresDependencyResolution = ResolutionScope.TEST, defaultPhase = LifecyclePhase.INTEGRATION_TEST )
|
||||||
public class FirstMojo
|
public class FirstMojo
|
||||||
extends FooMojo
|
extends FooMojo
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ package org.apache.maven.plugin.coreit;
|
||||||
|
|
||||||
import org.apache.maven.plugin.MojoExecutionException;
|
import org.apache.maven.plugin.MojoExecutionException;
|
||||||
import org.apache.maven.plugins.annotations.Component;
|
import org.apache.maven.plugins.annotations.Component;
|
||||||
import org.apache.maven.plugins.annotations.DependencyScope;
|
import org.apache.maven.plugins.annotations.ResolutionScope;
|
||||||
import org.apache.maven.plugins.annotations.Execute;
|
import org.apache.maven.plugins.annotations.Execute;
|
||||||
import org.apache.maven.plugins.annotations.LifecyclePhase;
|
import org.apache.maven.plugins.annotations.LifecyclePhase;
|
||||||
import org.apache.maven.plugins.annotations.Mojo;
|
import org.apache.maven.plugins.annotations.Mojo;
|
||||||
|
|
@ -34,7 +34,7 @@ import org.apache.maven.plugins.AbstractFirstMojo;
|
||||||
* @since 1.2
|
* @since 1.2
|
||||||
* @deprecated Don't use!
|
* @deprecated Don't use!
|
||||||
*/
|
*/
|
||||||
@Mojo( name = "first", requiresDependencyResolution = DependencyScope.TEST, defaultPhase = LifecyclePhase.INTEGRATION_TEST )
|
@Mojo( name = "first", requiresDependencyResolution = ResolutionScope.TEST, defaultPhase = LifecyclePhase.INTEGRATION_TEST )
|
||||||
@Execute( phase = LifecyclePhase.GENERATE_SOURCES, lifecycle = "cobertura" )
|
@Execute( phase = LifecyclePhase.GENERATE_SOURCES, lifecycle = "cobertura" )
|
||||||
public class FirstMojo
|
public class FirstMojo
|
||||||
extends AbstractFirstMojo
|
extends AbstractFirstMojo
|
||||||
|
|
|
||||||
|
|
@ -20,14 +20,14 @@ package org.apache.maven.plugin.coreit;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import org.apache.maven.plugin.AbstractMojo;
|
import org.apache.maven.plugin.AbstractMojo;
|
||||||
import org.apache.maven.plugins.annotations.DependencyScope;
|
import org.apache.maven.plugins.annotations.ResolutionScope;
|
||||||
import org.apache.maven.plugins.annotations.Mojo;
|
import org.apache.maven.plugins.annotations.Mojo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Does nothing special.
|
* Does nothing special.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Mojo( name = "second", requiresDependencyCollection = DependencyScope.COMPILE, threadSafe = true )
|
@Mojo( name = "second", requiresDependencyCollection = ResolutionScope.COMPILE, threadSafe = true )
|
||||||
public class SecondMojo
|
public class SecondMojo
|
||||||
extends AbstractMojo
|
extends AbstractMojo
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ package org.apache.maven.plugin.coreit;
|
||||||
import org.apache.maven.artifact.Artifact;
|
import org.apache.maven.artifact.Artifact;
|
||||||
import org.apache.maven.plugin.MojoExecutionException;
|
import org.apache.maven.plugin.MojoExecutionException;
|
||||||
import org.apache.maven.plugins.annotations.Component;
|
import org.apache.maven.plugins.annotations.Component;
|
||||||
import org.apache.maven.plugins.annotations.DependencyScope;
|
import org.apache.maven.plugins.annotations.ResolutionScope;
|
||||||
import org.apache.maven.plugins.annotations.Execute;
|
import org.apache.maven.plugins.annotations.Execute;
|
||||||
import org.apache.maven.plugins.annotations.LifecyclePhase;
|
import org.apache.maven.plugins.annotations.LifecyclePhase;
|
||||||
import org.apache.maven.plugins.annotations.Mojo;
|
import org.apache.maven.plugins.annotations.Mojo;
|
||||||
|
|
@ -36,7 +36,7 @@ import java.util.Set;
|
||||||
* @since 1.2
|
* @since 1.2
|
||||||
* @deprecated Don't use!
|
* @deprecated Don't use!
|
||||||
*/
|
*/
|
||||||
@Mojo( name = "first", requiresDependencyResolution = DependencyScope.COMPILE,
|
@Mojo( name = "first", requiresDependencyResolution = ResolutionScope.COMPILE,
|
||||||
defaultPhase = LifecyclePhase.INTEGRATION_TEST )
|
defaultPhase = LifecyclePhase.INTEGRATION_TEST )
|
||||||
@Execute( phase = LifecyclePhase.GENERATE_SOURCES, lifecycle = "cobertura" )
|
@Execute( phase = LifecyclePhase.GENERATE_SOURCES, lifecycle = "cobertura" )
|
||||||
public class FirstMojo
|
public class FirstMojo
|
||||||
|
|
|
||||||
|
|
@ -20,14 +20,14 @@ package org.apache.maven.plugin.coreit;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import org.apache.maven.plugin.AbstractMojo;
|
import org.apache.maven.plugin.AbstractMojo;
|
||||||
import org.apache.maven.plugins.annotations.DependencyScope;
|
import org.apache.maven.plugins.annotations.ResolutionScope;
|
||||||
import org.apache.maven.plugins.annotations.Mojo;
|
import org.apache.maven.plugins.annotations.Mojo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Does nothing special.
|
* Does nothing special.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Mojo( name = "second", requiresDependencyCollection = DependencyScope.COMPILE, threadSafe = true )
|
@Mojo( name = "second", requiresDependencyCollection = ResolutionScope.COMPILE, threadSafe = true )
|
||||||
public class SecondMojo
|
public class SecondMojo
|
||||||
extends AbstractMojo
|
extends AbstractMojo
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ package org.apache.maven.plugin.coreit;
|
||||||
import org.apache.maven.plugin.AbstractMojo;
|
import org.apache.maven.plugin.AbstractMojo;
|
||||||
import org.apache.maven.plugin.MojoExecutionException;
|
import org.apache.maven.plugin.MojoExecutionException;
|
||||||
import org.apache.maven.plugins.annotations.Component;
|
import org.apache.maven.plugins.annotations.Component;
|
||||||
import org.apache.maven.plugins.annotations.DependencyScope;
|
import org.apache.maven.plugins.annotations.ResolutionScope;
|
||||||
import org.apache.maven.plugins.annotations.Execute;
|
import org.apache.maven.plugins.annotations.Execute;
|
||||||
import org.apache.maven.plugins.annotations.LifecyclePhase;
|
import org.apache.maven.plugins.annotations.LifecyclePhase;
|
||||||
import org.apache.maven.plugins.annotations.Mojo;
|
import org.apache.maven.plugins.annotations.Mojo;
|
||||||
|
|
@ -36,7 +36,7 @@ import java.io.File;
|
||||||
* @since 1.2
|
* @since 1.2
|
||||||
* @deprecated Don't use!
|
* @deprecated Don't use!
|
||||||
*/
|
*/
|
||||||
@Mojo( name = "first", requiresDependencyResolution = DependencyScope.TEST, defaultPhase = LifecyclePhase.INTEGRATION_TEST )
|
@Mojo( name = "first", requiresDependencyResolution = ResolutionScope.TEST, defaultPhase = LifecyclePhase.INTEGRATION_TEST )
|
||||||
@Execute( phase = LifecyclePhase.GENERATE_SOURCES, lifecycle = "cobertura" )
|
@Execute( phase = LifecyclePhase.GENERATE_SOURCES, lifecycle = "cobertura" )
|
||||||
public class FirstMojo
|
public class FirstMojo
|
||||||
extends AbstractMojo
|
extends AbstractMojo
|
||||||
|
|
|
||||||
|
|
@ -20,14 +20,14 @@ package org.apache.maven.plugin.coreit;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import org.apache.maven.plugin.AbstractMojo;
|
import org.apache.maven.plugin.AbstractMojo;
|
||||||
import org.apache.maven.plugins.annotations.DependencyScope;
|
import org.apache.maven.plugins.annotations.ResolutionScope;
|
||||||
import org.apache.maven.plugins.annotations.Mojo;
|
import org.apache.maven.plugins.annotations.Mojo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Does nothing special.
|
* Does nothing special.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Mojo( name = "second", requiresDependencyCollection = DependencyScope.COMPILE, threadSafe = true )
|
@Mojo( name = "second", requiresDependencyCollection = ResolutionScope.COMPILE, threadSafe = true )
|
||||||
public class SecondMojo
|
public class SecondMojo
|
||||||
extends AbstractMojo
|
extends AbstractMojo
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ package org.apache.maven.tools.plugin.annotations.datamodel;
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import org.apache.maven.plugins.annotations.DependencyScope;
|
import org.apache.maven.plugins.annotations.ResolutionScope;
|
||||||
import org.apache.maven.plugins.annotations.InstanciationStrategy;
|
import org.apache.maven.plugins.annotations.InstanciationStrategy;
|
||||||
import org.apache.maven.plugins.annotations.LifecyclePhase;
|
import org.apache.maven.plugins.annotations.LifecyclePhase;
|
||||||
import org.apache.maven.plugins.annotations.Mojo;
|
import org.apache.maven.plugins.annotations.Mojo;
|
||||||
|
|
@ -38,9 +38,9 @@ public class MojoAnnotationContent
|
||||||
|
|
||||||
private LifecyclePhase defaultPhase = LifecyclePhase.NONE;
|
private LifecyclePhase defaultPhase = LifecyclePhase.NONE;
|
||||||
|
|
||||||
private DependencyScope requiresDependencyResolution = DependencyScope.RUNTIME;
|
private ResolutionScope requiresDependencyResolution = ResolutionScope.RUNTIME;
|
||||||
|
|
||||||
private DependencyScope requiresDependencyCollection = DependencyScope.RUNTIME;
|
private ResolutionScope requiresDependencyCollection = ResolutionScope.RUNTIME;
|
||||||
|
|
||||||
private InstanciationStrategy instantiationStrategy = InstanciationStrategy.PER_LOOKUP;
|
private InstanciationStrategy instantiationStrategy = InstanciationStrategy.PER_LOOKUP;
|
||||||
|
|
||||||
|
|
@ -77,24 +77,24 @@ public class MojoAnnotationContent
|
||||||
this.defaultPhase = LifecyclePhase.valueOf( phase );
|
this.defaultPhase = LifecyclePhase.valueOf( phase );
|
||||||
}
|
}
|
||||||
|
|
||||||
public DependencyScope requiresDependencyResolution()
|
public ResolutionScope requiresDependencyResolution()
|
||||||
{
|
{
|
||||||
return requiresDependencyResolution;
|
return requiresDependencyResolution;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void requiresDependencyResolution( String requiresDependencyResolution )
|
public void requiresDependencyResolution( String requiresDependencyResolution )
|
||||||
{
|
{
|
||||||
this.requiresDependencyResolution = DependencyScope.valueOf( requiresDependencyResolution );
|
this.requiresDependencyResolution = ResolutionScope.valueOf( requiresDependencyResolution );
|
||||||
}
|
}
|
||||||
|
|
||||||
public DependencyScope requiresDependencyCollection()
|
public ResolutionScope requiresDependencyCollection()
|
||||||
{
|
{
|
||||||
return requiresDependencyCollection;
|
return requiresDependencyCollection;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void requiresDependencyCollection( String requiresDependencyCollection )
|
public void requiresDependencyCollection( String requiresDependencyCollection )
|
||||||
{
|
{
|
||||||
this.requiresDependencyCollection = DependencyScope.valueOf( requiresDependencyCollection );
|
this.requiresDependencyCollection = ResolutionScope.valueOf( requiresDependencyCollection );
|
||||||
}
|
}
|
||||||
|
|
||||||
public InstanciationStrategy instantiationStrategy()
|
public InstanciationStrategy instantiationStrategy()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue