maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slachiew...@apache.org
Subject [maven] 02/02: Remove unused code that triggers Error Prone (#245)
Date Sat, 20 Apr 2019 14:08:42 GMT
This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven.git

commit fdde73fcb418a9d476cec61ccfa140e870f169bb
Author: Joseph Walton <joe@kafsemo.org>
AuthorDate: Sat Apr 20 22:29:25 2019 +1000

    Remove unused code that triggers Error Prone (#245)
    
    Running Error Prone over Maven triggers an infinite recursion
    check in AbstractCoreMavenComponentTestCase.PluginBuilder
---
 .../maven/AbstractCoreMavenComponentTestCase.java  | 53 ----------------------
 .../org/apache/maven/plugin/PluginManagerTest.java | 22 ---------
 2 files changed, 75 deletions(-)

diff --git a/maven-core/src/test/java/org/apache/maven/AbstractCoreMavenComponentTestCase.java
b/maven-core/src/test/java/org/apache/maven/AbstractCoreMavenComponentTestCase.java
index 315e152..179b8f9 100644
--- a/maven-core/src/test/java/org/apache/maven/AbstractCoreMavenComponentTestCase.java
+++ b/maven-core/src/test/java/org/apache/maven/AbstractCoreMavenComponentTestCase.java
@@ -327,57 +327,4 @@ public abstract class AbstractCoreMavenComponentTestCase
             return project;
         }
     }
-
-    protected class PluginBuilder
-    {
-        private Plugin plugin;
-
-        public PluginBuilder( String groupId, String artifactId, String version )
-        {
-            plugin = new Plugin();
-            plugin.setGroupId( groupId );
-            plugin.setArtifactId( artifactId );
-            plugin.setVersion( version );
-        }
-
-        // Dependencies
-        //
-        public PluginBuilder addDependency( String groupId, String artifactId, String version,
String scope, Exclusion exclusion )
-        {
-            return addDependency( groupId, artifactId, version, scope, exclusion );
-        }
-
-        public PluginBuilder addDependency( String groupId, String artifactId, String version,
String scope, String systemPath )
-        {
-            return addDependency( groupId, artifactId, version, scope, systemPath, null );
-        }
-
-        public PluginBuilder addDependency( String groupId, String artifactId, String version,
String scope, String systemPath, Exclusion exclusion )
-        {
-            Dependency d = new Dependency();
-            d.setGroupId( groupId );
-            d.setArtifactId( artifactId );
-            d.setVersion( version );
-            d.setScope( scope );
-
-            if ( systemPath != null && scope.equals(  Artifact.SCOPE_SYSTEM ) )
-            {
-                d.setSystemPath( systemPath );
-            }
-
-            if ( exclusion != null )
-            {
-                d.addExclusion( exclusion );
-            }
-
-            plugin.getDependencies().add( d );
-
-            return this;
-        }
-
-        public Plugin get()
-        {
-            return plugin;
-        }
-    }
 }
diff --git a/maven-core/src/test/java/org/apache/maven/plugin/PluginManagerTest.java b/maven-core/src/test/java/org/apache/maven/plugin/PluginManagerTest.java
index ad9a192..3d8306e 100644
--- a/maven-core/src/test/java/org/apache/maven/plugin/PluginManagerTest.java
+++ b/maven-core/src/test/java/org/apache/maven/plugin/PluginManagerTest.java
@@ -214,28 +214,6 @@ public class PluginManagerTest
     public void testThatPluginDependencyThatHasSystemScopeIsResolved()
         throws Exception
     {
-        /*
-        File systemPath = new File( getBasedir(), "pom.xml" );
-
-        Plugin plugin = new PluginBuilder( "org.apache.maven", "project-test", "1.0" )
-            .addDependency( "org.apache.maven", "system-dependency", "1.0", Artifact.SCOPE_SYSTEM,
systemPath.getAbsolutePath() )
-            .get();
-
-        MavenProject pluginProject = new ProjectBuilder( "org.apache.maven", "project-test",
"1.0" )
-            .addPlugin( plugin )
-            .addDependency( "junit", "junit", "3.8.1", Artifact.SCOPE_COMPILE )
-            .get();
-
-        // i'm making this artifact which is assumed to come from a pom in the metadata processor,
then it tries to create a POM artifact
-        // and parse it for the dependencies and it blows up.
-        //
-        // we need to pass this through as is so it doesn't get parsed again.
-        Artifact pluginArtifact = new ProjectArtifact( pluginProject );
-
-        Set<Artifact> artifacts = pluginManager.getPluginArtifacts( pluginArtifact,
plugin, getLocalRepository(), getPluginArtifactRepositories() );
-        System.out.println( artifacts );
-        */
-
         MavenSession session = createMavenSession( getProject( "project-contributing-system-scope-plugin-dep"
) );
         MavenProject project = session.getCurrentProject();
         Plugin plugin = project.getPlugin( "org.apache.maven.its.plugins:maven-it-plugin"
);


Mime
View raw message