[MNG-6165] Deprecate and replace incorrectly spelled public API

Spelling fixes:

* spelling: collector
* spelling: executions
* spelling: repositories
* spelling: workspace

This closes #101
This commit is contained in:
Josh Soref 2017-01-23 04:57:23 +00:00 committed by Michael Osipov
parent 23ceca36e7
commit 1be7ea893e
5 changed files with 54 additions and 6 deletions

View File

@ -108,11 +108,24 @@ public class MetadataResolutionRequest
return this;
}
/**
* @deprecated instead use {@link #getRemoteRepositories()}
*/
@Deprecated
public List<ArtifactRepository> getRemoteRepostories()
{
return remoteRepositories;
}
public List<ArtifactRepository> getRemoteRepositories()
{
return getRemoteRepostories();
}
/**
* @deprecated instead use {@link #setRemoteRepositories()}
*/
@Deprecated
public MetadataResolutionRequest setRemoteRepostories( List<ArtifactRepository> remoteRepostories )
{
this.remoteRepositories = remoteRepostories;
@ -120,6 +133,11 @@ public class MetadataResolutionRequest
return this;
}
public MetadataResolutionRequest setRemoteRepositories( List<ArtifactRepository> remoteRepositories )
{
return setRemoteRepostories( remoteRepositories );
}
public Map getManagedVersionMap()
{
return managedVersionMap;

View File

@ -329,7 +329,7 @@ public class LegacyRepositorySystem
DelegatingLocalArtifactRepository delegatingLocalRepository =
(DelegatingLocalArtifactRepository) request.getLocalRepository();
LocalArtifactRepository orig = delegatingLocalRepository.getIdeWorspace();
LocalArtifactRepository orig = delegatingLocalRepository.getIdeWorkspace();
delegatingLocalRepository.setIdeWorkspace( ideWorkspace );

View File

@ -61,11 +61,20 @@ public class DelegatingLocalArtifactRepository
this.ideWorkspace = localRepository;
}
/**
* @deprecated instead use {@link #getIdeWorkspace()}
*/
@Deprecated
public LocalArtifactRepository getIdeWorspace()
{
return ideWorkspace;
}
public LocalArtifactRepository getIdeWorkspace()
{
return getIdeWorspace();
}
@Override
public Artifact find( Artifact artifact )
{

View File

@ -87,7 +87,10 @@ public class LifecycleExecutionPlanCalculatorStub
public final static MojoDescriptor SITE_DEPLOY = createMojoDescriptor( "site-deploy" );
/**
* @deprecated instead use {@link #getNumberOfExecutions()}
*/
@Deprecated
public int getNumberOfExceutions( ProjectBuildList projectBuildList )
throws InvalidPluginDescriptorException, PluginVersionResolutionException, PluginDescriptorParsingException,
NoPluginFoundForPrefixException, MojoNotFoundException, PluginNotFoundException, PluginResolutionException,
@ -103,6 +106,14 @@ public class LifecycleExecutionPlanCalculatorStub
return result;
}
public int getNumberOfExecutions( ProjectBuildList projectBuildList )
throws InvalidPluginDescriptorException, PluginVersionResolutionException, PluginDescriptorParsingException,
NoPluginFoundForPrefixException, MojoNotFoundException, PluginNotFoundException, PluginResolutionException,
LifecyclePhaseNotFoundException, LifecycleNotFoundException
{
return getNumberOfExceutions( projectBuildList );
}
public void calculateForkedExecutions( MojoExecution mojoExecution, MavenSession session )
throws MojoNotFoundException, PluginNotFoundException, PluginResolutionException,
PluginDescriptorParsingException, NoPluginFoundForPrefixException, InvalidPluginDescriptorException,

View File

@ -67,6 +67,10 @@ public abstract class AbstractModelInterpolatorTest
assertEquals( "Expected no fatals", 0, collector.getFatals().size() );
}
/**
* @deprecated instead use {@link #assertCollectorState()}
*/
@Deprecated
protected void assertColllectorState( int numFatals, int numErrors, int numWarnings,
SimpleProblemCollector collector )
{
@ -75,6 +79,12 @@ public abstract class AbstractModelInterpolatorTest
assertEquals( "Fatals", numFatals, collector.getFatals().size() );
}
protected void assertCollectorState( int numFatals, int numErrors, int numWarnings,
SimpleProblemCollector collector )
{
assertColllectorState(numFatals, numErrors, numWarnings, collector);
}
private ModelBuildingRequest createModelBuildingRequest( Properties p )
{
ModelBuildingRequest config = new DefaultModelBuildingRequest();
@ -178,7 +188,7 @@ public abstract class AbstractModelInterpolatorTest
final SimpleProblemCollector collector = new SimpleProblemCollector();
interpolator.interpolateModel( model, null, createModelBuildingRequest( context ), collector );
assertColllectorState( 0, 1, 0, collector );
assertCollectorState( 0, 1, 0, collector );
}
catch ( Exception e )
{
@ -247,7 +257,7 @@ public abstract class AbstractModelInterpolatorTest
final SimpleProblemCollector collector = new SimpleProblemCollector();
Model out =
interpolator.interpolateModel( model, new File( "." ), createModelBuildingRequest( context ), collector );
assertColllectorState(0, 0, 1, collector );
assertCollectorState(0, 0, 1, collector );
assertEquals( "3.8.1", ( out.getDependencies().get( 0 ) ).getVersion() );
}
@ -305,7 +315,7 @@ public abstract class AbstractModelInterpolatorTest
final SimpleProblemCollector collector = new SimpleProblemCollector();
Model out =
interpolator.interpolateModel( model, new File( "." ), createModelBuildingRequest( context ), collector );
assertColllectorState( 0, 0, 2, collector );
assertCollectorState( 0, 0, 2, collector );
assertEquals( "foo-3.8.1", ( out.getDependencies().get( 0 ) ).getVersion() );
}
@ -450,7 +460,7 @@ public abstract class AbstractModelInterpolatorTest
final SimpleProblemCollector collector = new SimpleProblemCollector();
Model out = interpolator.interpolateModel( model, null, createModelBuildingRequest( context ), collector );
assertColllectorState( 0, 0, 2, collector );
assertCollectorState( 0, 0, 2, collector );
List<Resource> outResources = out.getBuild().getResources();