From b12905ce02ec0e58b475bbc1d920a6801224c02f Mon Sep 17 00:00:00 2001 From: Stephen Connolly Date: Sat, 18 Mar 2017 12:04:38 +0000 Subject: [PATCH] [MNG-6176] Fix javadoc *errors* in maven-compat --- maven-compat/pom.xml | 22 ------------------- .../maven/artifact/ArtifactScopeEnum.java | 2 +- .../ResolutionListenerForDepMgmt.java | 4 ++-- .../org/apache/maven/project/ModelUtils.java | 15 +++++++------ .../AbstractStringBasedModelInterpolator.java | 8 ++----- .../ModelInterpolationException.java | 4 +--- .../interpolation/ModelInterpolator.java | 2 -- .../repository/MetadataResolutionResult.java | 2 +- .../repository/metadata/MetadataGraph.java | 4 ++-- .../apache/maven/project/ModelUtilsTest.java | 18 +++++++++------ .../t09/ProjectInheritanceTest.java | 8 +++---- .../LegacyRepositorySystemTest.java | 1 + .../FarthestConflictResolverTest.java | 4 ++-- .../conflict/NearestConflictResolverTest.java | 4 ++-- .../conflict/NewestConflictResolverTest.java | 4 ++-- .../conflict/OldestConflictResolverTest.java | 4 ++-- pom.xml | 4 ---- 17 files changed, 41 insertions(+), 69 deletions(-) diff --git a/maven-compat/pom.xml b/maven-compat/pom.xml index 7af138d2d3..bfd2b474b0 100644 --- a/maven-compat/pom.xml +++ b/maven-compat/pom.xml @@ -132,26 +132,4 @@ under the License. - - - javadoc8 - - !1.7 - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - - - -Xdoclint:none - - - - - - - diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/ArtifactScopeEnum.java b/maven-compat/src/main/java/org/apache/maven/artifact/ArtifactScopeEnum.java index 4460a07c3e..83edd2b706 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/ArtifactScopeEnum.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/ArtifactScopeEnum.java @@ -20,7 +20,7 @@ package org.apache.maven.artifact; */ /** - * Type safe reincarnation of Artifact scope. Also supplies the DEFAULT_SCOPE as well + * Type safe reincarnation of Artifact scope. Also supplies the {@code DEFAULT_SCOPE} as well * as convenience method to deal with scope relationships. * * @author Oleg Gusakov diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ResolutionListenerForDepMgmt.java b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ResolutionListenerForDepMgmt.java index 6ca4fe7221..6cf06b16f9 100644 --- a/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ResolutionListenerForDepMgmt.java +++ b/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ResolutionListenerForDepMgmt.java @@ -23,7 +23,7 @@ import org.apache.maven.artifact.Artifact; /** * Do not use! - *

+ *

* Should only be implemented by DebugResolutionListener. Remove this * when the ResolutionListener interface deprecation of the manageArtifact * method (and the [yet to be done] addition of these methods to that @@ -40,4 +40,4 @@ public interface ResolutionListenerForDepMgmt void manageArtifactSystemPath( Artifact artifact, Artifact replacement ); -} \ No newline at end of file +} diff --git a/maven-compat/src/main/java/org/apache/maven/project/ModelUtils.java b/maven-compat/src/main/java/org/apache/maven/project/ModelUtils.java index faf224bd6b..fb99593c90 100644 --- a/maven-compat/src/main/java/org/apache/maven/project/ModelUtils.java +++ b/maven-compat/src/main/java/org/apache/maven/project/ModelUtils.java @@ -40,15 +40,16 @@ public final class ModelUtils /** * This should be the resulting ordering of plugins after merging: - *

+ *

* Given: - *

- * parent: X -> A -> B -> D -> E - * child: Y -> A -> C -> D -> F - *

+ *

+     * parent: X -> A -> B -> D -> E
+     * child: Y -> A -> C -> D -> F
+     * 
* Result: - *

- * X -> Y -> A -> B -> C -> D -> E -> F + *

+     * X -> Y -> A -> B -> C -> D -> E -> F
+     * 
*/ public static void mergePluginLists( PluginContainer childContainer, PluginContainer parentContainer, boolean handleAsInheritance ) diff --git a/maven-compat/src/main/java/org/apache/maven/project/interpolation/AbstractStringBasedModelInterpolator.java b/maven-compat/src/main/java/org/apache/maven/project/interpolation/AbstractStringBasedModelInterpolator.java index b3e94fcaba..913e2dd849 100644 --- a/maven-compat/src/main/java/org/apache/maven/project/interpolation/AbstractStringBasedModelInterpolator.java +++ b/maven-compat/src/main/java/org/apache/maven/project/interpolation/AbstractStringBasedModelInterpolator.java @@ -103,10 +103,6 @@ public abstract class AbstractStringBasedModelInterpolator this.pathTranslator = pathTranslator; } - /** - * TODO Remove the throws clause. - * @throws IOException This exception is not thrown any more, and needs to be removed. - */ protected AbstractStringBasedModelInterpolator() { } @@ -120,7 +116,7 @@ public abstract class AbstractStringBasedModelInterpolator /** * Serialize the inbound Model instance to a StringWriter, perform the regex replacement to resolve * POM expressions, then re-parse into the resolved Model instance. - *
+ *

* NOTE: This will result in a different instance of Model being returned!!! * * @param model The inbound Model instance, to serialize and reference for expression resolution @@ -189,7 +185,7 @@ public abstract class AbstractStringBasedModelInterpolator *

  • If the value is null, but the context contains the expression, don't replace the expression string * with the value, and continue to find other expressions.
  • *
  • If the value is null, get it from the model properties.
  • - *
  • + * */ public String interpolate( String src, Model model, diff --git a/maven-compat/src/main/java/org/apache/maven/project/interpolation/ModelInterpolationException.java b/maven-compat/src/main/java/org/apache/maven/project/interpolation/ModelInterpolationException.java index 5b02880b38..ea60f16299 100644 --- a/maven-compat/src/main/java/org/apache/maven/project/interpolation/ModelInterpolationException.java +++ b/maven-compat/src/main/java/org/apache/maven/project/interpolation/ModelInterpolationException.java @@ -21,8 +21,6 @@ package org.apache.maven.project.interpolation; /** * @author jdcasey - *

    - * Created on Feb 2, 2005 */ @SuppressWarnings( "serial" ) @Deprecated @@ -69,4 +67,4 @@ public class ModelInterpolationException return originalMessage; } -} \ No newline at end of file +} diff --git a/maven-compat/src/main/java/org/apache/maven/project/interpolation/ModelInterpolator.java b/maven-compat/src/main/java/org/apache/maven/project/interpolation/ModelInterpolator.java index e1556eaf74..036e7f0481 100644 --- a/maven-compat/src/main/java/org/apache/maven/project/interpolation/ModelInterpolator.java +++ b/maven-compat/src/main/java/org/apache/maven/project/interpolation/ModelInterpolator.java @@ -27,8 +27,6 @@ import java.util.Map; /** * @author jdcasey - *

    - * Created on Feb 2, 2005 */ @Deprecated public interface ModelInterpolator diff --git a/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java b/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java index 0071ea44e5..28fb723e06 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java @@ -163,7 +163,7 @@ public class MetadataResolutionResult /** * TODO this needs to accept a {@link OverConstrainedVersionException} as returned by * {@link #getVersionRangeViolation(int)} but it's not used like that in - * {@link DefaultLegacyArtifactCollector} + * {@link org.apache.maven.repository.legacy.resolver.DefaultLegacyArtifactCollector} */ public MetadataResolutionResult addVersionRangeViolation( Exception e ) { diff --git a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraph.java b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraph.java index 532cd3c8fc..1ae008addb 100644 --- a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraph.java +++ b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraph.java @@ -103,9 +103,9 @@ public class MetadataGraph * construct graph from a "dirty" tree * * @param tree "dirty" tree root - * @param versionedVertices true if graph nodes should be versioned (different versions -> different nodes) + * @param versionedVertices true if graph nodes should be versioned (different versions -> different nodes) * @param scopedVertices true if graph nodes should be versioned and scoped - * (different versions and/or scopes -> different nodes) + * (different versions and/or scopes -> different nodes) * */ public MetadataGraph( MetadataTreeNode tree, boolean versionedVertices, boolean scopedVertices ) diff --git a/maven-compat/src/test/java/org/apache/maven/project/ModelUtilsTest.java b/maven-compat/src/test/java/org/apache/maven/project/ModelUtilsTest.java index b2750b9d92..402ae74b91 100644 --- a/maven-compat/src/test/java/org/apache/maven/project/ModelUtilsTest.java +++ b/maven-compat/src/test/java/org/apache/maven/project/ModelUtilsTest.java @@ -94,15 +94,19 @@ public class ModelUtilsTest /** * Test that this is the resulting ordering of plugins after merging: - * + *

    * Given: - * - * parent: X -> A -> B -> D -> E - * child: Y -> A -> C -> D -> F - * + *

    + *
    +     *   parent: X -> A -> B -> D -> E
    +     *   child: Y -> A -> C -> D -> F
    +     * 
    + *

    * Result: - * - * X -> Y -> A -> B -> C -> D -> E -> F + *

    + *
    +     *   X -> Y -> A -> B -> C -> D -> E -> F
    +     * 
    */ public void testShouldPreserveChildOrderingOfPluginsAfterParentMerge() { diff --git a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t09/ProjectInheritanceTest.java b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t09/ProjectInheritanceTest.java index 0dc4ccff52..aa492e4d67 100644 --- a/maven-compat/src/test/java/org/apache/maven/project/inheritance/t09/ProjectInheritanceTest.java +++ b/maven-compat/src/test/java/org/apache/maven/project/inheritance/t09/ProjectInheritanceTest.java @@ -47,14 +47,14 @@ public class ProjectInheritanceTest /** * How the test project is set up: * - * 1. dependencyManagement lists dependencies on a & b, + * 1. dependencyManagement lists dependencies on a & b, * with an exclusion on c in b. * 2. the child project lists a dependency on project a only * 3. a depends on b (which is transitive to the child project), * and b depends on c. * * We should see that the resulting size of collected artifacts is two: - * a & b only. + * a & b only. */ public void testDependencyManagementExclusionsExcludeTransitively() throws Exception @@ -87,7 +87,7 @@ public class ProjectInheritanceTest * now depends upon d, which has a transitive dependency on c. Even though * we did list an exclusion on c, it was only from within the context of * project b. We will pick up project c in this case because no - * restrictions were placed on d. This demonstrates that a, b, c, & d will + * restrictions were placed on d. This demonstrates that a, b, c, & d will * all be collected. * * @throws Exception @@ -116,4 +116,4 @@ public class ProjectInheritanceTest assertTrue( "maven-test:t09-c is not in the project", map.containsKey( "maven-test:t09-c" ) ); assertTrue( "maven-test:t09-d is not in the project", map.containsKey( "maven-test:t09-d" ) ); } -} \ No newline at end of file +} diff --git a/maven-compat/src/test/java/org/apache/maven/repository/LegacyRepositorySystemTest.java b/maven-compat/src/test/java/org/apache/maven/repository/LegacyRepositorySystemTest.java index 96af590c7a..17dfcfcc7b 100644 --- a/maven-compat/src/test/java/org/apache/maven/repository/LegacyRepositorySystemTest.java +++ b/maven-compat/src/test/java/org/apache/maven/repository/LegacyRepositorySystemTest.java @@ -32,6 +32,7 @@ import org.apache.maven.model.Repository; import org.apache.maven.model.RepositoryPolicy; import org.apache.maven.plugin.LegacySupport; import org.apache.maven.repository.RepositorySystem; +import org.apache.maven.repository.legacy.LegacyRepositorySystem; import org.codehaus.plexus.ContainerConfiguration; import org.codehaus.plexus.PlexusConstants; import org.codehaus.plexus.PlexusTestCase; diff --git a/maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/conflict/FarthestConflictResolverTest.java b/maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/conflict/FarthestConflictResolverTest.java index 5ca3a47cc7..363c7a2481 100644 --- a/maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/conflict/FarthestConflictResolverTest.java +++ b/maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/conflict/FarthestConflictResolverTest.java @@ -44,7 +44,7 @@ public class FarthestConflictResolverTest * Tests that a:2.0 wins in the scenario: *
          * a:1.0
    -     * b:1.0 -> a:2.0
    +     * b:1.0 -> a:2.0
          * 
    */ public void testDepth() @@ -59,7 +59,7 @@ public class FarthestConflictResolverTest /** * Tests that a:2.0 wins in the scenario: *
    -     * b:1.0 -> a:2.0
    +     * b:1.0 -> a:2.0
          * a:1.0
          * 
    */ diff --git a/maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/conflict/NearestConflictResolverTest.java b/maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/conflict/NearestConflictResolverTest.java index 69d93d2fb0..23683d56df 100644 --- a/maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/conflict/NearestConflictResolverTest.java +++ b/maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/conflict/NearestConflictResolverTest.java @@ -44,7 +44,7 @@ public class NearestConflictResolverTest * Tests that a:1.0 wins in the scenario: *
          * a:1.0
    -     * b:1.0 -> a:2.0
    +     * b:1.0 -> a:2.0
          * 
    */ public void testDepth() @@ -59,7 +59,7 @@ public class NearestConflictResolverTest /** * Tests that a:1.0 wins in the scenario: *
    -     * b:1.0 -> a:2.0
    +     * b:1.0 -> a:2.0
          * a:1.0
          * 
    */ diff --git a/maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/conflict/NewestConflictResolverTest.java b/maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/conflict/NewestConflictResolverTest.java index c98f1e1918..4cfffc67e1 100644 --- a/maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/conflict/NewestConflictResolverTest.java +++ b/maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/conflict/NewestConflictResolverTest.java @@ -44,7 +44,7 @@ public class NewestConflictResolverTest * Tests that a:2.0 wins in the scenario: *
          * a:1.0
    -     * b:1.0 -> a:2.0
    +     * b:1.0 -> a:2.0
          * 
    */ public void testDepth() @@ -59,7 +59,7 @@ public class NewestConflictResolverTest /** * Tests that a:2.0 wins in the scenario: *
    -     * b:1.0 -> a:2.0
    +     * b:1.0 -> a:2.0
          * a:1.0
          * 
    */ diff --git a/maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/conflict/OldestConflictResolverTest.java b/maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/conflict/OldestConflictResolverTest.java index cef78f9b64..8744de2b05 100644 --- a/maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/conflict/OldestConflictResolverTest.java +++ b/maven-compat/src/test/java/org/apache/maven/repository/legacy/resolver/conflict/OldestConflictResolverTest.java @@ -44,7 +44,7 @@ public class OldestConflictResolverTest * Tests that a:1.0 wins in the scenario: *
          * a:1.0
    -     * b:1.0 -> a:2.0
    +     * b:1.0 -> a:2.0
          * 
    */ public void testDepth() @@ -60,7 +60,7 @@ public class OldestConflictResolverTest /** * Tests that a:1.0 wins in the scenario: *
    -     * b:1.0 -> a:2.0
    +     * b:1.0 -> a:2.0
          * a:1.0
          * 
    */ diff --git a/pom.xml b/pom.xml index 4ce8a79deb..8a64baeef9 100644 --- a/pom.xml +++ b/pom.xml @@ -650,10 +650,6 @@ under the License. aggregate - - - -Xdoclint:none -