[MPLUGIN-233] removed InstanciationStrategy enum from annotations
git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@1406929 13f79535-47bb-0310-9956-ffa450edef68master
parent
215037c7e5
commit
40397727da
|
|
@ -1,47 +0,0 @@
|
|||
package org.apache.maven.plugins.annotations;
|
||||
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Component instantiation strategy.
|
||||
*
|
||||
* @author Hervé Boutemy
|
||||
* @since 3.0
|
||||
*/
|
||||
@Deprecated
|
||||
public enum InstanciationStrategy
|
||||
{
|
||||
PER_LOOKUP( "per-lookup" ),
|
||||
SINGLETON( "singleton" ),
|
||||
KEEP_ALIVE( "keep-alive" ),
|
||||
POOLABLE( "poolable" );
|
||||
|
||||
private final String id;
|
||||
|
||||
InstanciationStrategy( String id )
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String id()
|
||||
{
|
||||
return this.id;
|
||||
}
|
||||
}
|
||||
|
|
@ -68,14 +68,6 @@ public @interface Mojo
|
|||
*/
|
||||
InstantiationStrategy instantiationStrategy() default InstantiationStrategy.PER_LOOKUP;
|
||||
|
||||
/**
|
||||
* The original spelling of the instantiationStrategy attribute.
|
||||
* @see #instantiationStrategy()
|
||||
* @return the instantiation strategy
|
||||
*/
|
||||
@Deprecated
|
||||
InstanciationStrategy instanciationStrategy() default InstanciationStrategy.PER_LOOKUP;
|
||||
|
||||
/**
|
||||
* execution strategy: <code>once-per-session</code> or <code>always</code>.
|
||||
* @return <code>once-per-session</code> or <code>always</code>
|
||||
|
|
|
|||
|
|
@ -504,13 +504,7 @@ public class JavaAnnotationsMojoDescriptorExtractor
|
|||
|
||||
mojoDescriptor.setInheritedByDefault( mojo.inheritByDefault() );
|
||||
|
||||
String instantiationStrategy = mojo.instantiationStrategy().id();
|
||||
if ( instantiationStrategy == null )
|
||||
{
|
||||
/* Perhaps the original spelling is there. */
|
||||
instantiationStrategy = mojo.instanciationStrategy().id();
|
||||
}
|
||||
mojoDescriptor.setInstantiationStrategy( instantiationStrategy );
|
||||
mojoDescriptor.setInstantiationStrategy( mojo.instantiationStrategy().id() );
|
||||
|
||||
mojoDescriptor.setAggregator( mojo.aggregator() );
|
||||
mojoDescriptor.setDependencyResolutionRequired( mojo.requiresDependencyResolution().id() );
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ package org.apache.maven.tools.plugin.annotations.datamodel;
|
|||
*/
|
||||
|
||||
import org.apache.maven.plugins.annotations.InstantiationStrategy;
|
||||
import org.apache.maven.plugins.annotations.InstanciationStrategy;
|
||||
import org.apache.maven.plugins.annotations.LifecyclePhase;
|
||||
import org.apache.maven.plugins.annotations.Mojo;
|
||||
import org.apache.maven.plugins.annotations.ResolutionScope;
|
||||
|
|
@ -103,24 +102,6 @@ public class MojoAnnotationContent
|
|||
return instantiationStrategy;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original spelling of the instantiationStrategy attribute.
|
||||
* This returns the value under the correct name, there's no separate
|
||||
* field.
|
||||
*
|
||||
* @return the instantiation strategy
|
||||
* @see #instantiationStrategy()
|
||||
*/
|
||||
@SuppressWarnings( "deprecation" )
|
||||
public InstanciationStrategy instanciationStrategy()
|
||||
{
|
||||
if ( instantiationStrategy == null )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return InstanciationStrategy.valueOf( instanciationStrategy().name() );
|
||||
}
|
||||
|
||||
public void instantiationStrategy( String instantiationStrategy )
|
||||
{
|
||||
this.instantiationStrategy = InstantiationStrategy.valueOf( instantiationStrategy );
|
||||
|
|
|
|||
Loading…
Reference in New Issue