maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From micha...@apache.org
Subject maven git commit: [MNG-6165] Deprecate and replace incorrectly spelled public API
Date Fri, 03 Feb 2017 23:21:57 GMT
Repository: maven
Updated Branches:
  refs/heads/MNG-6165 [created] 87c6346a0


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

Spelling fixes:

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

This closes #101


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/87c6346a
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/87c6346a
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/87c6346a

Branch: refs/heads/MNG-6165
Commit: 87c6346a0db61384db0e66b9482e0ed832823b07
Parents: 1740265
Author: Josh Soref <jsoref@apache.org>
Authored: Mon Jan 23 04:57:23 2017 +0000
Committer: Michael Osipov <michaelo@apache.org>
Committed: Sat Feb 4 00:20:48 2017 +0100

----------------------------------------------------------------------
 .../repository/MetadataResolutionRequest.java   | 20 +++++++++++++++++++-
 .../legacy/LegacyRepositorySystem.java          |  2 +-
 .../DelegatingLocalArtifactRepository.java      |  9 +++++++++
 .../LifecycleExecutionPlanCalculatorStub.java   | 13 ++++++++++++-
 .../AbstractModelInterpolatorTest.java          | 18 ++++++++++++++----
 5 files changed, 55 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/87c6346a/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionRequest.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionRequest.java
b/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionRequest.java
index c98dd05..4fb0e32 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionRequest.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionRequest.java
@@ -108,14 +108,32 @@ public class MetadataResolutionRequest
         return this;
     }
 
+    /**
+     * @deprecated instead use {@link #getRemoteRepositories()}
+     */
+    @Deprecated
     public List<ArtifactRepository> getRemoteRepostories()
     {
+        return getRemoteRepositories();
+    }
+
+    public List<ArtifactRepository> getRemoteRepositories()
+    {
         return remoteRepositories;
     }
 
+    /**
+     * @deprecated instead use {@link #setRemoteRepositories()}
+     */
+    @Deprecated
     public MetadataResolutionRequest setRemoteRepostories( List<ArtifactRepository>
remoteRepostories )
     {
-        this.remoteRepositories = remoteRepostories;
+        return setRemoteRepositories(remoteRepositories);
+    }
+
+    public MetadataResolutionRequest setRemoteRepositories( List<ArtifactRepository>
remoteRepositories )
+    {
+        this.remoteRepositories = remoteRepositories;
 
         return this;
     }

http://git-wip-us.apache.org/repos/asf/maven/blob/87c6346a/maven-compat/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java
b/maven-compat/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java
index bd5988a..8d4d407 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/legacy/LegacyRepositorySystem.java
@@ -329,7 +329,7 @@ public class LegacyRepositorySystem
                 DelegatingLocalArtifactRepository delegatingLocalRepository =
                     (DelegatingLocalArtifactRepository) request.getLocalRepository();
 
-                LocalArtifactRepository orig = delegatingLocalRepository.getIdeWorspace();
+                LocalArtifactRepository orig = delegatingLocalRepository.getIdeWorkspace();
 
                 delegatingLocalRepository.setIdeWorkspace( ideWorkspace );
 

http://git-wip-us.apache.org/repos/asf/maven/blob/87c6346a/maven-core/src/main/java/org/apache/maven/repository/DelegatingLocalArtifactRepository.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/repository/DelegatingLocalArtifactRepository.java
b/maven-core/src/main/java/org/apache/maven/repository/DelegatingLocalArtifactRepository.java
index 90c1fa9..1ae5ba2 100644
--- a/maven-core/src/main/java/org/apache/maven/repository/DelegatingLocalArtifactRepository.java
+++ b/maven-core/src/main/java/org/apache/maven/repository/DelegatingLocalArtifactRepository.java
@@ -61,8 +61,17 @@ public class DelegatingLocalArtifactRepository
         this.ideWorkspace = localRepository;
     }
 
+    /**
+     * @deprecated instead use {@link #getIdeWorkspace()}
+     */
+    @Deprecated
     public LocalArtifactRepository getIdeWorspace()
     {
+        return getIdeWorkspace();
+    }
+
+    public LocalArtifactRepository getIdeWorkspace()
+    {
         return ideWorkspace;
     }
 

http://git-wip-us.apache.org/repos/asf/maven/blob/87c6346a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/LifecycleExecutionPlanCalculatorStub.java
----------------------------------------------------------------------
diff --git a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/LifecycleExecutionPlanCalculatorStub.java
b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/LifecycleExecutionPlanCalculatorStub.java
index ad08549..e03ab1a 100644
--- a/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/LifecycleExecutionPlanCalculatorStub.java
+++ b/maven-core/src/test/java/org/apache/maven/lifecycle/internal/stub/LifecycleExecutionPlanCalculatorStub.java
@@ -87,12 +87,23 @@ 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,
         LifecyclePhaseNotFoundException, LifecycleNotFoundException
     {
+        return getNumberOfExecutions(projectBuildList);
+    }
+
+    public int getNumberOfExecutions( ProjectBuildList projectBuildList )
+        throws InvalidPluginDescriptorException, PluginVersionResolutionException, PluginDescriptorParsingException,
+        NoPluginFoundForPrefixException, MojoNotFoundException, PluginNotFoundException,
PluginResolutionException,
+        LifecyclePhaseNotFoundException, LifecycleNotFoundException
+    {
         int result = 0;
         for ( ProjectSegment projectBuild : projectBuildList )
         {

http://git-wip-us.apache.org/repos/asf/maven/blob/87c6346a/maven-model-builder/src/test/java/org/apache/maven/model/interpolation/AbstractModelInterpolatorTest.java
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/test/java/org/apache/maven/model/interpolation/AbstractModelInterpolatorTest.java
b/maven-model-builder/src/test/java/org/apache/maven/model/interpolation/AbstractModelInterpolatorTest.java
index b56bc15..8e88f5c 100644
--- a/maven-model-builder/src/test/java/org/apache/maven/model/interpolation/AbstractModelInterpolatorTest.java
+++ b/maven-model-builder/src/test/java/org/apache/maven/model/interpolation/AbstractModelInterpolatorTest.java
@@ -67,9 +67,19 @@ 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 )
     {
+        assertCollectorState(numFatals, numErrors, numWarnings, collector);
+    }
+
+    protected void assertCollectorState( int numFatals, int numErrors, int numWarnings,
+                                          SimpleProblemCollector collector )
+    {
         assertEquals( "Errors",  numErrors, collector.getErrors().size() );
         assertEquals( "Warnings", numWarnings, collector.getWarnings().size() );
         assertEquals( "Fatals", numFatals, collector.getFatals().size() );
@@ -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();


Mime
View raw message