You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Christian Schulte <cs...@schulte.it> on 2017/02/04 01:59:18 UTC

Re: maven git commit: [MNG-6165] Deprecate and replace incorrectly spelled public API

Can we make the deprecated methods final, please? It's still binary
compatible when final. If someone has overridden such a deprecated
method, he will get a compile time error and will notice he needs to
override the new method instead.

Am 02/04/17 um 00:21 schrieb michaelo@apache.org:
> 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 <js...@apache.org>
> Authored: Mon Jan 23 04:57:23 2017 +0000
> Committer: Michael Osipov <mi...@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();
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: maven git commit: [MNG-6165] Deprecate and replace incorrectly spelled public API

Posted by Christian Schulte <cs...@schulte.it>.
Am 02/04/17 um 10:12 schrieb Stuart McCulloch:
> Note making a method final will break binary compatibility if someone has
> previously overridden that method - in such cases they'd get a verify error
> running with the new binary:
> 
> https://docs.oracle.com/javase/specs/jls/se7/html/jls-13.html#jls-13.4.17

Thanks. I really thought you'd just get a compile error.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: maven git commit: [MNG-6165] Deprecate and replace incorrectly spelled public API

Posted by Christian Schulte <cs...@schulte.it>.
Am 02/04/17 um 23:31 schrieb Michael Osipov:
> Am 2017-02-04 um 23:26 schrieb Christian Schulte:
>> Am 02/04/17 um 13:19 schrieb Michael Osipov:
>>> I will merge as-is without further modifiers.
>>
>> Please watch out for this:
>>
>> class A {
>>
>>   @Deprecated
>>   void methodWithTypo()
>>   {
>>     this.methodWithoutTypo();
>>   }
>>
>>   void methodWithoutType()
>>   {
>>     // do what the old method did
>>   }
>>
>> }
>>
>> External usage:
>>
>> class B extends A {
>>
>>   @Override
>>   void methodWithTypo()
>>   {
>>      // do something else
>>   }
>>
>> }
>>
>> We must not stop calling the deprecated methods because
>>
>> // do something else
>>
>> would no longer be called.
> 
> That is true, but your IDE should tell you that your method is 
> deprecated. When removed in 4.0, you will ultimately get either a 
> compile time or runtime issue. I think this is ok for a new major release.
> 
> I see no way how this can be else solved cleanly.

Just do it the other way around. See my other mail. Old method is kept
as is - new method just calls the old method. Needs a @SuppressWarnings
deprecation annotion.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: maven git commit: [MNG-6165] Deprecate and replace incorrectly spelled public API

Posted by Michael Osipov <mi...@apache.org>.
Am 2017-02-04 um 23:26 schrieb Christian Schulte:
> Am 02/04/17 um 13:19 schrieb Michael Osipov:
>> I will merge as-is without further modifiers.
>
> Please watch out for this:
>
> class A {
>
>   @Deprecated
>   void methodWithTypo()
>   {
>     this.methodWithoutTypo();
>   }
>
>   void methodWithoutType()
>   {
>     // do what the old method did
>   }
>
> }
>
> External usage:
>
> class B extends A {
>
>   @Override
>   void methodWithTypo()
>   {
>      // do something else
>   }
>
> }
>
> We must not stop calling the deprecated methods because
>
> // do something else
>
> would no longer be called.

That is true, but your IDE should tell you that your method is 
deprecated. When removed in 4.0, you will ultimately get either a 
compile time or runtime issue. I think this is ok for a new major release.

I see no way how this can be else solved cleanly.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: maven git commit: [MNG-6165] Deprecate and replace incorrectly spelled public API

Posted by Christian Schulte <cs...@schulte.it>.
Am 02/04/17 um 13:19 schrieb Michael Osipov:
> I will merge as-is without further modifiers.

Please watch out for this:

class A {

  @Deprecated
  void methodWithTypo()
  {
    this.methodWithoutTypo();
  }

  void methodWithoutType()
  {
    // do what the old method did
  }

}

External usage:

class B extends A {

  @Override
  void methodWithTypo()
  {
     // do something else
  }

}

We must not stop calling the deprecated methods because

// do something else

would no longer be called.

Regards,
-- 
Christian


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: maven git commit: [MNG-6165] Deprecate and replace incorrectly spelled public API

Posted by Michael Osipov <mi...@apache.org>.
I will merge as-is without further modifiers.

Am 2017-02-04 um 11:33 schrieb Stephen Connolly:
> Yep I don't think it is a good idea to make them final
>
> We could add some tooling to the Maven-plugin-plugin to scan for annotated
> method (would need a new annotation) so that plugins using or overriding
> would get a hard error (similar to @Restricted(NoExternalUse) in Jenkins
>
> That would allow to retain binary compatibility for existing compiler usage
> but force code fixes when building new plugin releases
>
> On Sat 4 Feb 2017 at 09:12, Stuart McCulloch <mc...@gmail.com> wrote:
>
>> Note making a method final will break binary compatibility if someone has
>> previously overridden that method - in such cases they'd get a verify error
>> running with the new binary:
>>
>> https://docs.oracle.com/javase/specs/jls/se7/html/jls-13.html#jls-13.4.17
>>
>>
>> On 4 Feb 2017 01:59, "Christian Schulte" <cs...@schulte.it> wrote:
>>
>> Can we make the deprecated methods final, please? It's still binary
>> compatible when final. If someone has overridden such a deprecated
>> method, he will get a compile time error and will notice he needs to
>> override the new method instead.
>>
>> Am 02/04/17 um 00:21 schrieb michaelo@apache.org:
>>> 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 <js...@apache.org>
>>> Authored: Mon Jan 23 04:57:23 2017 +0000
>>> Committer: Michael Osipov <mi...@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();
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: maven git commit: [MNG-6165] Deprecate and replace incorrectly spelled public API

Posted by Christian Schulte <cs...@schulte.it>.
Am 02/04/17 um 11:33 schrieb Stephen Connolly:
> Yep I don't think it is a good idea to make them final
> 
> We could add some tooling to the Maven-plugin-plugin to scan for annotated
> method (would need a new annotation) so that plugins using or overriding
> would get a hard error (similar to @Restricted(NoExternalUse) in Jenkins
> 
> That would allow to retain binary compatibility for existing compiler usage
> but force code fixes when building new plugin releases

My point is that if someone has overridden the old method, that method
may no longer get called as soon as everything gets updated to no longer
call the deprecated methods but the new ones. So if we do this, we
should not update anything to call the new methods and should instead
keep everything calling the old/deprecated methods due to this.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: maven git commit: [MNG-6165] Deprecate and replace incorrectly spelled public API

Posted by Stephen Connolly <st...@gmail.com>.
Yep I don't think it is a good idea to make them final

We could add some tooling to the Maven-plugin-plugin to scan for annotated
method (would need a new annotation) so that plugins using or overriding
would get a hard error (similar to @Restricted(NoExternalUse) in Jenkins

That would allow to retain binary compatibility for existing compiler usage
but force code fixes when building new plugin releases

On Sat 4 Feb 2017 at 09:12, Stuart McCulloch <mc...@gmail.com> wrote:

> Note making a method final will break binary compatibility if someone has
> previously overridden that method - in such cases they'd get a verify error
> running with the new binary:
>
> https://docs.oracle.com/javase/specs/jls/se7/html/jls-13.html#jls-13.4.17
>
>
> On 4 Feb 2017 01:59, "Christian Schulte" <cs...@schulte.it> wrote:
>
> Can we make the deprecated methods final, please? It's still binary
> compatible when final. If someone has overridden such a deprecated
> method, he will get a compile time error and will notice he needs to
> override the new method instead.
>
> Am 02/04/17 um 00:21 schrieb michaelo@apache.org:
> > 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 <js...@apache.org>
> > Authored: Mon Jan 23 04:57:23 2017 +0000
> > Committer: Michael Osipov <mi...@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();
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
-- 
Sent from my phone

Re: maven git commit: [MNG-6165] Deprecate and replace incorrectly spelled public API

Posted by Stuart McCulloch <mc...@gmail.com>.
Note making a method final will break binary compatibility if someone has
previously overridden that method - in such cases they'd get a verify error
running with the new binary:

https://docs.oracle.com/javase/specs/jls/se7/html/jls-13.html#jls-13.4.17


On 4 Feb 2017 01:59, "Christian Schulte" <cs...@schulte.it> wrote:

Can we make the deprecated methods final, please? It's still binary
compatible when final. If someone has overridden such a deprecated
method, he will get a compile time error and will notice he needs to
override the new method instead.

Am 02/04/17 um 00:21 schrieb michaelo@apache.org:
> 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 <js...@apache.org>
> Authored: Mon Jan 23 04:57:23 2017 +0000
> Committer: Michael Osipov <mi...@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();
>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org