From 942fd941cc8a03632568cac99f170737f6e14c55 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Thu, 8 Jan 2026 07:39:01 -0500 Subject: [PATCH] Follow Oracle Javadoc conventions --- .../maven/api/plugin/testing/Basedir.java | 18 +- .../maven/api/plugin/testing/InjectMojo.java | 14 +- .../api/plugin/testing/MojoExtension.java | 35 ++- .../api/plugin/testing/MojoParameter.java | 13 +- .../api/plugin/testing/MojoParameters.java | 19 +- .../maven/api/plugin/testing/MojoTest.java | 28 +- .../plugin/testing/AbstractMojoTestCase.java | 34 +-- .../plugin/testing/ArtifactStubFactory.java | 39 ++- .../testing/ConfigurationException.java | 12 +- .../maven/plugin/testing/MojoLogWrapper.java | 2 - .../maven/plugin/testing/MojoParameters.java | 5 +- .../apache/maven/plugin/testing/MojoRule.java | 15 +- .../ResolverExpressionEvaluatorStub.java | 8 +- .../maven/plugin/testing/WithoutMojo.java | 4 +- .../testing/resources/TestResources.java | 5 +- .../plugin/testing/stubs/ArtifactStub.java | 94 +++--- .../stubs/DefaultArtifactHandlerStub.java | 44 ++- .../testing/stubs/MavenProjectStub.java | 270 +++++++++++++----- .../testing/stubs/StubArtifactRepository.java | 28 +- 19 files changed, 419 insertions(+), 268 deletions(-) diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/Basedir.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/Basedir.java index 803c5078..d9449933 100644 --- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/Basedir.java +++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/Basedir.java @@ -28,14 +28,18 @@ * Specifies the base directory for test resources in Maven plugin tests. * This annotation can be applied to test methods, or test class, to define where test resources are located. * - **

Example usage:

+ * *

Example usage:

*
- * {@code
+ * {@code.
+ *
+ * @see MojoTest
+ * @see MojoExtension
+ * @since 3.4.0
  * @MojoTest
  * class MyMojoTest {
- *     @Test
- *     @Basedir("src/test/resources/specific-test-case")
- *     @InjectMojo(goal = "compile")
+ * @Test
+ * @Basedir("src/test/resources/specific-test-case")
+ * @InjectMojo(goal = "compile")
  *     void testSpecificCase(MyMojo mojo) {
  *         // Test resources will be loaded from src/test/resources/specific-test-case
  *         mojo.execute();
@@ -43,10 +47,6 @@
  * }
  * }
  * 
- * - * @see MojoTest - * @see MojoExtension - * @since 3.4.0 */ @Retention(RetentionPolicy.RUNTIME) @Inherited diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/InjectMojo.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/InjectMojo.java index 7b0acf4d..61d9616d 100644 --- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/InjectMojo.java +++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/InjectMojo.java @@ -35,7 +35,12 @@ * *

Example usage on a test method:

*
- * {@code
+ * {@code.
+ *
+ * @see MojoTest
+ * @see MojoParameter
+ * @see MojoExtension
+ * @since 3.4.0
  * @Test
  * @InjectMojo(goal = "compile")
  * void testCompileMojo(CompileMojo mojo) {
@@ -44,7 +49,6 @@
  * }
  * }
  * 
- * *

Example usage with a custom POM:

*
  * {@code
@@ -59,7 +63,6 @@
  * }
  * }
  * 
- * *

The annotation can be used in conjunction with {@link MojoParameter} to provide * specific parameter values for the Mojo:

*
@@ -74,11 +77,6 @@
  * }
  * }
  * 
- * - * @see MojoTest - * @see MojoParameter - * @see MojoExtension - * @since 3.4.0 */ @Retention(RetentionPolicy.RUNTIME) @Inherited diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoExtension.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoExtension.java index 36726cba..7d373726 100644 --- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoExtension.java +++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoExtension.java @@ -123,12 +123,18 @@ * *

Example usage in a test class:

*
- * {@code
+ * {@code.
+ *
+ * @see MojoTest
+ * @see InjectMojo
+ * @see MojoParameter
+ * @see Basedir
+ * @since 3.4.0
  * @MojoTest
  * class MyMojoTest {
- *     @Test
- *     @InjectMojo(goal = "my-goal")
- *     @MojoParameter(name = "outputDirectory", value = "${project.build.directory}/generated")
+ * @Test
+ * @InjectMojo(goal = "my-goal")
+ * @MojoParameter(name = "outputDirectory", value = "${project.build.directory}/generated")
  *     void testMojoExecution(MyMojo mojo) throws Exception {
  *         mojo.execute();
  *         // verify execution results
@@ -136,18 +142,9 @@
  * }
  * }
  * 
- ** *

For custom POM configurations, you can specify a POM file using the {@link InjectMojo#pom()} * attribute. The extension will merge this configuration with default test project settings.

- * *

NOTE: only plugin configuration is taken from provided POM, all other tags are ignored.

- * - * - * @see MojoTest - * @see InjectMojo - * @see MojoParameter - * @see Basedir - * @since 3.4.0 */ public class MojoExtension extends PlexusExtension implements ParameterResolver { @@ -308,7 +305,7 @@ public void afterEach(ExtensionContext context) throws Exception { } /** - * Default MojoExecution mock + * Default MojoExecution mock. * * @return a MojoExecution mock */ @@ -317,7 +314,7 @@ private MojoExecution mockMojoExecution() { } /** - * Default MavenSession mock + * Default MavenSession mock. * * @return a MavenSession mock */ @@ -329,7 +326,7 @@ private MavenSession mockMavenSession() { } /** - * Default MavenProject mock + * Default MavenProject mock. * * @return a MavenProject mock */ @@ -444,7 +441,7 @@ protected String[] mojoCoordinates(String goal, PluginDescriptor pluginDescripto } /** - * lookup the mojo while we have all the relevent information + * Lookup the mojo while we have all the relevent information. */ protected Mojo lookupMojo( ExtensionContext extensionContext, @@ -536,7 +533,7 @@ private boolean isRealRepositorySessionNotRequired(ExtensionContext context) { } /** - * Create a MavenExecutionRequest if not already present in the MavenSession + * Create a MavenExecutionRequest if not already present in the MavenSession. */ private void createMavenExecutionRequest(ExtensionContext context) throws ComponentLookupException { PlexusContainer container = getContainer(context); @@ -738,7 +735,7 @@ public static String getTestPath(String path) { } /** - * Convenience method to set values to variables in objects that don't have setters + * Convenience method to set values to variables in objects that don't have setters. */ public static void setVariableValueToObject(Object object, String variable, Object value) throws IllegalAccessException { diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoParameter.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoParameter.java index 780e32f9..f094fa31 100644 --- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoParameter.java +++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoParameter.java @@ -37,7 +37,12 @@ * *

Example usage with a single parameter:

*
- * {@code
+ * {@code.
+ *
+ * @see MojoParameters
+ * @see InjectMojo
+ * @see MojoTest
+ * @since 3.4.0
  * @Test
  * @InjectMojo(goal = "compile")
  * @MojoParameter(name = "source", value = "1.8")
@@ -46,7 +51,6 @@
  * }
  * }
  * 
- * *

Example usage with multiple parameters:

*
  * {@code
@@ -60,11 +64,6 @@
  * }
  * }
  * 
- * - * @see MojoParameters - * @see InjectMojo - * @see MojoTest - * @since 3.4.0 */ @Retention(RetentionPolicy.RUNTIME) @Repeatable(MojoParameters.class) diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoParameters.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoParameters.java index 55652819..03f14182 100644 --- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoParameters.java +++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoParameters.java @@ -35,20 +35,24 @@ * *

Example of direct usage:

*
- * {@code
+ * {@code.
+ *
+ * @see MojoParameter
+ * @see InjectMojo
+ * @see MojoTest
+ * @since 3.4.0
  * @Test
  * @InjectMojo(goal = "compile")
  * @MojoParameters({
- *     @MojoParameter(name = "source", value = "1.8"),
- *     @MojoParameter(name = "target", value = "1.8"),
- *     @MojoParameter(name = "debug", value = "true")
+ * @MojoParameter(name = "source", value = "1.8"),
+ * @MojoParameter(name = "target", value = "1.8"),
+ * @MojoParameter(name = "debug", value = "true")
  * })
  * void testCompilation(CompileMojo mojo) {
  *     mojo.execute();
  * }
  * }
  * 
- * *

Equivalent usage with repeatable annotation:

*
  * {@code
@@ -62,11 +66,6 @@
  * }
  * }
  * 
- * - * @see MojoParameter - * @see InjectMojo - * @see MojoTest - * @since 3.4.0 */ @Retention(RetentionPolicy.RUNTIME) @Inherited diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoTest.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoTest.java index 063c1fa3..9404217a 100644 --- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoTest.java +++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/api/plugin/testing/MojoTest.java @@ -39,30 +39,33 @@ * *

Example usage:

*
- * {@code
+ * {@code.
+ *
+ * @see MojoExtension
+ * @see InjectMojo
+ * @see MojoParameter
+ * @see Provides
+ * @since 4.0.0
  * @MojoTest
  * class MyMojoTest {
- *     @Inject
+ * @Inject
  *     private SomeComponent component;
- *
- *     @Test
- *     @InjectMojo(goal = "my-goal")
- *     @MojoParameter(name = "parameter", value = "value")
+ * @Test
+ * @InjectMojo(goal = "my-goal")
+ * @MojoParameter(name = "parameter", value = "value")
  *     void testMojoExecution(MyMojo mojo) {
  *         // mojo is instantiated with the specified parameters
  *         // component is automatically injected
  *         mojo.execute();
  *         // verify execution results
  *     }
- *
- *     @Provides
+ * @Provides
  *     SomeComponent provideMockedComponent() {
  *         return mock(SomeComponent.class);
  *     }
  * }
  * }
  * 
- * *

The annotation supports:

* - * - * - * @see MojoExtension - * @see InjectMojo - * @see MojoParameter - * @see Provides - * @since 4.0.0 */ @Retention(RetentionPolicy.RUNTIME) @ExtendWith(MojoExtension.class) diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/AbstractMojoTestCase.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/AbstractMojoTestCase.java index 27082108..cce94179 100644 --- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/AbstractMojoTestCase.java +++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/AbstractMojoTestCase.java @@ -80,11 +80,10 @@ import org.codehaus.plexus.util.xml.Xpp3DomBuilder; /** + * @author jesse * @deprecated As of version 3.4.0, it is advised to work with JUnit5 tests which do not * use this class but {@link MojoTest} * instead. - * - * @author jesse */ @Deprecated public abstract class AbstractMojoTestCase extends PlexusTestCase { @@ -253,7 +252,7 @@ protected PlexusContainer getContainer() { } /** - * Lookup the mojo leveraging the subproject pom + * Lookup the mojo leveraging the subproject pom. * * @param goal * @param pluginPom @@ -265,7 +264,7 @@ protected T lookupMojo(String goal, String pluginPom) throws Ex } /** - * Lookup an empty mojo + * Lookup an empty mojo. * * @param goal * @param pluginPom @@ -277,7 +276,7 @@ protected T lookupEmptyMojo(String goal, String pluginPom) thro } /** - * Lookup the mojo leveraging the actual subprojects pom + * Lookup the mojo leveraging the actual subprojects pom. * * @param goal * @param pom @@ -301,7 +300,7 @@ protected T lookupMojo(String goal, File pom) throws Exception } /** - * Lookup the mojo leveraging the actual subprojects pom + * Lookup the mojo leveraging the actual subprojects pom. * * @param goal * @param pom @@ -332,7 +331,7 @@ protected Mojo lookupMojo( String groupId, String artifactId, String version, St } */ /** - * lookup the mojo while we have all of the relavent information + * Lookup the mojo while we have all of the relavent information. * * @param groupId * @param artifactId @@ -366,10 +365,8 @@ protected T lookupMojo( } /** - * * @param project * @param goal - * @return * @throws Exception * @since 2.0 */ @@ -378,12 +375,10 @@ protected T lookupConfiguredMojo(MavenProject project, String g } /** - * * @param session * @param execution - * @return - * @throws Exception * @throws ComponentConfigurationException + * @throws Exception * @since 2.0 */ protected T lookupConfiguredMojo(MavenSession session, MojoExecution execution) @@ -419,9 +414,7 @@ protected T lookupConfiguredMojo(MavenSession session, MojoExec } /** - * * @param project - * @return * @since 2.0 */ protected MavenSession newMavenSession(MavenProject project) { @@ -435,9 +428,7 @@ protected MavenSession newMavenSession(MavenProject project) { } /** - * * @param goal - * @return * @since 2.0 */ protected MojoExecution newMojoExecution(String goal) { @@ -546,7 +537,7 @@ protected PlexusConfiguration extractPluginConfiguration(String artifactId, Xpp3 } /** - * Configure the mojo + * Configure the mojo. * * @param mojo * @param artifactId @@ -568,7 +559,7 @@ protected T configureMojo(T mojo, String artifactId, File pom) } /** - * Configure the mojo with the given plexus configuration + * Configure the mojo with the given plexus configuration. * * @param mojo * @param pluginConfiguration @@ -647,7 +638,7 @@ protected Map getVariablesAndValuesFromObject(Class clazz, Ob } /** - * Convenience method to set values to variables in objects that don't have setters + * Convenience method to set values to variables in objects that don't have setters. * * @param object * @param variable @@ -663,13 +654,12 @@ protected void setVariableValueToObject(Object object, String variable, T va } /** - * sometimes the parent element might contain the correct value so generalize that access + * Sometimes the parent element might contain the correct value so generalize that access * - * TODO find out where this is probably done elsewhere + * TODO find out where this is probably done elsewhere. * * @param pluginPomDom * @param element - * @return * @throws Exception */ private String resolveFromRootThenParent(Xpp3Dom pluginPomDom, String element) throws Exception { diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/ArtifactStubFactory.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/ArtifactStubFactory.java index d5103145..785b5b9d 100644 --- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/ArtifactStubFactory.java +++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/ArtifactStubFactory.java @@ -59,7 +59,7 @@ public class ArtifactStubFactory { private ArchiverManager archiverManager; /** - * Default constructor. This should be used only if real files aren't needed...just the artifact objects + * Default constructor. This should be used only if real files aren't needed...just the artifact objects. */ public ArtifactStubFactory() { this.workingDir = null; @@ -67,7 +67,7 @@ public ArtifactStubFactory() { } /** - * This constructor is to be used if files are needed and to set a working dir + * This constructor is to be used if files are needed and to set a working dir. * * @param workingDir * @param createFiles @@ -168,7 +168,7 @@ public Artifact createArtifact( /** * Creates a new empty file and attaches it to the artifact. * - * @param artifact to attach the file to. + * @param artifact to attach the file to * @param workingDir where to locate the new file * @throws IOException */ @@ -181,8 +181,8 @@ public void setArtifactFile(Artifact artifact, File workingDir) throws IOExcepti * will be created. * * @param artifact to attach - * @param workingDir where to copy the srcFile. - * @param srcFile file to be attached. + * @param workingDir where to copy the srcFile + * @param srcFile file to be attached * @throws IOException */ public void setArtifactFile(Artifact artifact, File workingDir, File srcFile) throws IOException { @@ -193,7 +193,7 @@ public void setArtifactFile(Artifact artifact, File workingDir, File srcFile) th * Creates an unpackable file (zip,jar etc) containing an empty file. * * @param artifact to attach - * @param workingDir where to create the file. + * @param workingDir where to create the file * @throws IOException */ public void setUnpackableArtifactFile(Artifact artifact, File workingDir) throws IOException { @@ -205,7 +205,7 @@ public void setUnpackableArtifactFile(Artifact artifact, File workingDir) throws * created. * * @param artifact to attach - * @param workingDir where to create the file. + * @param workingDir where to create the file * @param srcFile * @throws IOException if any */ @@ -214,7 +214,7 @@ public void setUnpackableArtifactFile(Artifact artifact, File workingDir, File s } /** - * Creates a file that can be copied or unpacked based on the passed in artifact + * Creates a file that can be copied or unpacked based on the passed in artifact. * * @param artifact * @param workingDir @@ -252,7 +252,6 @@ private void setArtifactFile(Artifact artifact, File workingDir, File srcFile, b /** * @param artifact - * @return */ public static String getUnpackableFileName(Artifact artifact) { return "" + artifact.getGroupId() + "-" + artifact.getArtifactId() + "-" + artifact.getVersion() + "-" @@ -262,9 +261,9 @@ public static String getUnpackableFileName(Artifact artifact) { /** * @param artifact * @param destFile - * @throws NoSuchArchiverException * @throws ArchiverException if any * @throws IOException if any + * @throws NoSuchArchiverException */ public void createUnpackableFile(Artifact artifact, File destFile) throws NoSuchArchiverException, ArchiverException, IOException { @@ -413,49 +412,49 @@ public Set getMixedArtifacts() throws IOException { } /** - * @return Returns the createFiles. + * @return the createFiles */ public boolean isCreateFiles() { return this.createFiles; } /** - * @param createFiles The createFiles to set. + * @param createFiles the createFiles to set */ public void setCreateFiles(boolean createFiles) { this.createFiles = createFiles; } /** - * @return Returns the workingDir. + * @return the workingDir */ public File getWorkingDir() { return this.workingDir; } /** - * @param workingDir The workingDir to set. + * @param workingDir the workingDir to set */ public void setWorkingDir(File workingDir) { this.workingDir = workingDir; } /** - * @return Returns the srcFile. + * @return the srcFile */ public File getSrcFile() { return this.srcFile; } /** - * @param srcFile The srcFile to set. + * @param srcFile the srcFile to set */ public void setSrcFile(File srcFile) { this.srcFile = srcFile; } /** - * Convenience method to set values to variables in objects that don't have setters + * Convenience method to set values to variables in objects that don't have setters. * * @param object * @param variable @@ -475,9 +474,9 @@ public static void setVariableValueToObject(Object object, String variable, Obje * Builds the file name. If removeVersion is set, then the file name must be reconstructed from the artifactId, * Classifier (if used) and Type. Otherwise, this method returns the artifact file name. * - * @param artifact File to be formatted. - * @param removeVersion Specifies if the version should be removed from the file name. - * @return Formatted file name in the format artifactId-[version]-[classifier].[type] + * @param artifact file to be formatted + * @param removeVersion specifies if the version should be removed from the file name + * @return formatted file name in the format artifactId-[version]-[classifier].[type] */ public static String getFormattedFileName(Artifact artifact, boolean removeVersion) { String destFileName = null; diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/ConfigurationException.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/ConfigurationException.java index 9b8150cf..094e42be 100644 --- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/ConfigurationException.java +++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/ConfigurationException.java @@ -19,31 +19,31 @@ package org.apache.maven.plugin.testing; /** - * ConfigurationException + * ConfigurationException. * * @author jesse */ public class ConfigurationException extends Exception { - /** serialVersionUID */ + /** SerialVersionUID. */ static final long serialVersionUID = -6180939638742159065L; /** - * @param message The detailed message. + * @param message the detailed message */ public ConfigurationException(String message) { super(message); } /** - * @param cause The detailed cause. + * @param cause the detailed cause */ public ConfigurationException(Throwable cause) { super(cause); } /** - * @param message The detailed message. - * @param cause The detailed cause. + * @param message the detailed message + * @param cause the detailed cause */ public ConfigurationException(String message, Throwable cause) { super(message, cause); diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/MojoLogWrapper.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/MojoLogWrapper.java index 382bad8f..669e27a2 100644 --- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/MojoLogWrapper.java +++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/MojoLogWrapper.java @@ -25,11 +25,9 @@ /** * @author jdcasey - * * @deprecated As of version 3.4.0, it is advised to work with JUnit5 tests which do not * use this class but {@link javax.inject.Inject} to inject a Log instance * instead. - * */ @Deprecated public class MojoLogWrapper implements Log { diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/MojoParameters.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/MojoParameters.java index aa8f9406..415f3e77 100644 --- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/MojoParameters.java +++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/MojoParameters.java @@ -21,13 +21,12 @@ import org.codehaus.plexus.util.xml.Xpp3Dom; /** - * Static helpers to create and manipulate mojo execution configuration parameters + * Static helpers to create and manipulate mojo execution configuration parameters. * + * @since 3.2.0 * @deprecated As of version 3.4.0, it is advised to work with JUnit5 tests which do not * use this class but {@link org.apache.maven.api.plugin.testing.MojoParameters} * instead. - * - * @since 3.2.0 */ @Deprecated public class MojoParameters { diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/MojoRule.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/MojoRule.java index da5642ad..c8833a07 100644 --- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/MojoRule.java +++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/MojoRule.java @@ -53,12 +53,11 @@ * exhibited as {@code public} in the rule. You may annotate single tests methods with * {@link WithoutMojo} to prevent the rule from firing. * + * @author Mirko Friedenhagen + * @since 2.2 * @deprecated As of version 3.4.0, it is advised to work with JUnit5 tests which do not * use rules but extensions {@link MojoExtension} * instead. - * - * @author Mirko Friedenhagen - * @since 2.2 */ @Deprecated public class MojoRule implements TestRule { @@ -110,7 +109,7 @@ public PlexusContainer getContainer() { } /** - * Lookup the mojo leveraging the subproject pom + * Lookup the mojo leveraging the subproject pom. * * @param goal * @param pluginPom @@ -122,7 +121,7 @@ public T lookupMojo(String goal, String pluginPom) throws Excep } /** - * Lookup an empty mojo + * Lookup an empty mojo. * * @param goal * @param pluginPom @@ -134,7 +133,7 @@ public T lookupEmptyMojo(String goal, String pluginPom) throws } /** - * Lookup the mojo leveraging the actual subprojects pom + * Lookup the mojo leveraging the actual subprojects pom. * * @param goal * @param pom @@ -146,7 +145,7 @@ public T lookupMojo(String goal, File pom) throws Exception { } /** - * Lookup the mojo leveraging the actual subprojects pom + * Lookup the mojo leveraging the actual subprojects pom. * * @param goal * @param pom @@ -237,7 +236,7 @@ public Map getVariablesAndValuesFromObject(Class clazz, Objec } /** - * Convenience method to set values to variables in objects that don't have setters + * Convenience method to set values to variables in objects that don't have setters. * * @param object * @param variable diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/ResolverExpressionEvaluatorStub.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/ResolverExpressionEvaluatorStub.java index 76f1b45a..9aae50d8 100644 --- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/ResolverExpressionEvaluatorStub.java +++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/ResolverExpressionEvaluatorStub.java @@ -34,7 +34,9 @@ */ @Deprecated public class ResolverExpressionEvaluatorStub implements ExpressionEvaluator { - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Object evaluate(String expr) throws ExpressionEvaluationException { @@ -102,7 +104,9 @@ private String stripTokens(String expr) { return expr; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public File alignToBaseDirectory(File file) { if (file.getAbsolutePath().startsWith(PlexusTestCase.getBasedir())) { diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/WithoutMojo.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/WithoutMojo.java index 222d92df..43b205e4 100644 --- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/WithoutMojo.java +++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/WithoutMojo.java @@ -28,14 +28,12 @@ import static java.lang.annotation.RetentionPolicy.RUNTIME; /** - * * An annotation for test methods that do not require the {@link MojoRule} to create and tear down the instance. * + * @author Mirko Friedenhagen * @deprecated As of version 3.4.0, it is advised to work with JUnit5 tests which do not * use rules but extensions {@link MojoExtension} * instead. - * - * @author Mirko Friedenhagen */ @Deprecated @Retention(RUNTIME) diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/resources/TestResources.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/resources/TestResources.java index d6b8673f..34cf1bf4 100644 --- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/resources/TestResources.java +++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/resources/TestResources.java @@ -35,11 +35,10 @@ /** * Junit4 test {@link Rule} to extract and assert test resources. * + * @since 3.1.0 * @deprecated As of version 3.4.0, it is advised to work with JUnit5 tests which do not * use rules but extensions {@link MojoExtension} * instead. - * - * @since 3.1.0 */ @Deprecated public class TestResources extends TestWatcher { @@ -73,7 +72,7 @@ protected void starting(Description d) { * and test project name, which allows the same test project can be used by multiple tests and by different * instances of the same parametrized tests. *

- * TODO Provide alternative working directory naming for Windows, which still limits path names to ~250 charecters + * TODO Provide alternative working directory naming for Windows, which still limits path names to ~250 charecters. */ public File getBasedir(String project) throws IOException { if (name == null) { diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/ArtifactStub.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/ArtifactStub.java index edbaa9e3..9e1a657e 100644 --- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/ArtifactStub.java +++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/ArtifactStub.java @@ -63,44 +63,56 @@ public int compareTo(Artifact artifact) { return 0; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public String getGroupId() { return groupId; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public String getArtifactId() { return artifactId; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public String getVersion() { return version; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setVersion(String version) { this.version = version; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public String getScope() { return scope; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public String getType() { return type; } /** - * Set a new type + * Set a new type. * * @param type */ @@ -108,32 +120,40 @@ public void setType(String type) { this.type = type; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public String getClassifier() { return classifier; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public boolean hasClassifier() { return classifier != null; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public File getFile() { return file; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setFile(File file) { this.file = file; } /** - * @return null. + * @return null * @see org.apache.maven.artifact.Artifact#getBaseVersion() */ @Override @@ -152,7 +172,7 @@ public void setBaseVersion(String string) { } /** - * @return null. + * @return null * @see org.apache.maven.artifact.Artifact#getId() */ @Override @@ -161,7 +181,7 @@ public String getId() { } /** - * @return groupId:artifactId:type:classifier. + * @return groupId:artifactId:type:classifier * @see org.apache.maven.artifact.Artifact#getDependencyConflictId() */ @Override @@ -187,7 +207,7 @@ public void addMetadata(ArtifactMetadata artifactMetadata) { } /** - * @return null. + * @return null * @see org.apache.maven.artifact.Artifact#getMetadataList() */ @Override @@ -195,13 +215,17 @@ public Collection getMetadataList() { return null; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setRepository(ArtifactRepository artifactRepository) { this.artifactRepository = artifactRepository; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ArtifactRepository getRepository() { return artifactRepository; @@ -218,7 +242,7 @@ public void updateVersion(String string, ArtifactRepository artifactRepository) } /** - * @return null. + * @return null * @see org.apache.maven.artifact.Artifact#getDownloadUrl() */ @Override @@ -237,7 +261,7 @@ public void setDownloadUrl(String string) { } /** - * @return null. + * @return null * @see org.apache.maven.artifact.Artifact#getDependencyFilter() */ @Override @@ -256,7 +280,7 @@ public void setDependencyFilter(ArtifactFilter artifactFilter) { } /** - * @return null. + * @return null * @see org.apache.maven.artifact.Artifact#getArtifactHandler() */ @Override @@ -265,7 +289,7 @@ public ArtifactHandler getArtifactHandler() { } /** - * @return null. + * @return null * @see org.apache.maven.artifact.Artifact#getDependencyTrail() */ @Override @@ -283,14 +307,16 @@ public void setDependencyTrail(List list) { // nop } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setScope(String scope) { this.scope = scope; } /** - * @return null. + * @return null * @see org.apache.maven.artifact.Artifact#getVersionRange() */ @Override @@ -318,20 +344,24 @@ public void selectVersion(String string) { // nop } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setGroupId(String groupId) { this.groupId = groupId; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setArtifactId(String artifactId) { this.artifactId = artifactId; } /** - * @return false. + * @return false * @see org.apache.maven.artifact.Artifact#isSnapshot() */ @Override @@ -351,7 +381,7 @@ public void setResolved(boolean b) { } /** - * @return false. + * @return false * @see org.apache.maven.artifact.Artifact#isResolved() */ @Override @@ -380,7 +410,7 @@ public void setArtifactHandler(ArtifactHandler artifactHandler) { } /** - * @return false. + * @return false * @see org.apache.maven.artifact.Artifact#isRelease() */ @Override @@ -399,7 +429,7 @@ public void setRelease(boolean b) { } /** - * @return null. + * @return null * @see org.apache.maven.artifact.Artifact#getAvailableVersions() */ @Override @@ -418,7 +448,7 @@ public void setAvailableVersions(List list) { } /** - * @return false. + * @return false * @see org.apache.maven.artifact.Artifact#isOptional() */ @Override @@ -437,7 +467,7 @@ public void setOptional(boolean b) { } /** - * @return null. + * @return null * @see org.apache.maven.artifact.Artifact#getSelectedVersion() */ @Override @@ -446,7 +476,7 @@ public ArtifactVersion getSelectedVersion() throws OverConstrainedVersionExcepti } /** - * @return false. + * @return false * @see org.apache.maven.artifact.Artifact#isSelectedVersionKnown() */ @Override diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/DefaultArtifactHandlerStub.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/DefaultArtifactHandlerStub.java index 5c5fe7a0..64927ae5 100644 --- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/DefaultArtifactHandlerStub.java +++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/DefaultArtifactHandlerStub.java @@ -61,7 +61,9 @@ public DefaultArtifactHandlerStub(String type) { this.type = type; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public String getExtension() { if (extension == null) { @@ -77,13 +79,17 @@ public String getType() { return type; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public String getClassifier() { return classifier; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public String getDirectory() { if (directory == null) { @@ -92,7 +98,9 @@ public String getDirectory() { return directory; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public String getPackaging() { if (packaging == null) { @@ -101,13 +109,17 @@ public String getPackaging() { return packaging; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public boolean isIncludesDependencies() { return includesDependencies; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public String getLanguage() { if (language == null) { @@ -117,63 +129,65 @@ public String getLanguage() { return language; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public boolean isAddedToClasspath() { return addedToClasspath; } /** - * @param theAddedToClasspath The addedToClasspath to set. + * @param theAddedToClasspath the addedToClasspath to set */ public void setAddedToClasspath(boolean theAddedToClasspath) { this.addedToClasspath = theAddedToClasspath; } /** - * @param theClassifier The classifier to set. + * @param theClassifier the classifier to set */ public void setClassifier(String theClassifier) { this.classifier = theClassifier; } /** - * @param theDirectory The directory to set. + * @param theDirectory the directory to set */ public void setDirectory(String theDirectory) { this.directory = theDirectory; } /** - * @param theExtension The extension to set. + * @param theExtension the extension to set */ public void setExtension(String theExtension) { this.extension = theExtension; } /** - * @param theIncludesDependencies The includesDependencies to set. + * @param theIncludesDependencies the includesDependencies to set */ public void setIncludesDependencies(boolean theIncludesDependencies) { this.includesDependencies = theIncludesDependencies; } /** - * @param theLanguage The language to set. + * @param theLanguage the language to set */ public void setLanguage(String theLanguage) { this.language = theLanguage; } /** - * @param thePackaging The packaging to set. + * @param thePackaging the packaging to set */ public void setPackaging(String thePackaging) { this.packaging = thePackaging; } /** - * @param theType The type to set. + * @param theType the type to set */ public void setType(String theType) { this.type = theType; diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/MavenProjectStub.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/MavenProjectStub.java index dd4fa747..8778e0af 100644 --- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/MavenProjectStub.java +++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/MavenProjectStub.java @@ -160,7 +160,7 @@ public class MavenProjectStub extends MavenProject { private Build build; /** - * Default constructor + * Default constructor. */ public MavenProjectStub() { this(new Model()); @@ -178,7 +178,7 @@ public MavenProjectStub(Model model) { * Loads the model for this stub from the specified POM. For convenience, any checked exception caused by I/O or * parser errors will be wrapped into an unchecked exception. * - * @param pomFile The path to the POM file to load, must not be null. If this path is relative, it + * @param pomFile the path to the POM file to load, must not be null. If this path is relative, it * is resolved against the return value of {@link #getBasedir()}. */ protected void readModel(File pomFile) { @@ -195,7 +195,7 @@ protected void readModel(File pomFile) { } /** - * No project model is associated + * No project model is associated. * * @param project the given project */ @@ -213,31 +213,41 @@ public String getModulePathAdjustment(MavenProject mavenProject) throws IOExcept return ""; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Artifact getArtifact() { return artifact; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setArtifact(Artifact artifact) { this.artifact = artifact; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Model getModel() { return model; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public MavenProject getParent() { return parent; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setParent(MavenProject mavenProject) { this.parent = mavenProject; @@ -263,7 +273,9 @@ public List getRemoteArtifactRepositories() { return Collections.emptyList(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public boolean hasParent() { if (parent != null) { @@ -273,19 +285,25 @@ public boolean hasParent() { return false; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public File getFile() { return file; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setFile(File file) { this.file = file; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public File getBasedir() { return new File(PlexusExtension.getBasedir()); @@ -321,7 +339,9 @@ public DependencyManagement getDependencyManagement() { return null; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void addCompileSourceRoot(String string) { if (compileSourceRoots == null) { @@ -331,7 +351,9 @@ public void addCompileSourceRoot(String string) { } } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void addScriptSourceRoot(String string) { if (scriptSourceRoots == null) { @@ -341,7 +363,9 @@ public void addScriptSourceRoot(String string) { } } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void addTestCompileSourceRoot(String string) { if (testCompileSourceRoots == null) { @@ -351,25 +375,33 @@ public void addTestCompileSourceRoot(String string) { } } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List getCompileSourceRoots() { return compileSourceRoots; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List getScriptSourceRoots() { return scriptSourceRoots; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List getTestCompileSourceRoots() { return testCompileSourceRoots; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List getCompileClasspathElements() throws DependencyResolutionRequiredException { return compileSourceRoots; @@ -382,61 +414,81 @@ public void setCompileArtifacts(List compileArtifacts) { this.compileArtifacts = compileArtifacts; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List getCompileArtifacts() { return compileArtifacts; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List getCompileDependencies() { return compileDependencies; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List getTestClasspathElements() throws DependencyResolutionRequiredException { return testClasspathElements; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List getTestArtifacts() { return testArtifacts; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List getTestDependencies() { return testDependencies; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List getRuntimeClasspathElements() throws DependencyResolutionRequiredException { return runtimeClasspathElements; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List getRuntimeArtifacts() { return runtimeArtifacts; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List getRuntimeDependencies() { return runtimeDependencies; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List getSystemClasspathElements() throws DependencyResolutionRequiredException { return systemClasspathElements; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List getSystemArtifacts() { return systemArtifacts; @@ -594,19 +646,25 @@ public void setModel(Model model) { this.model = model; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List getSystemDependencies() { return systemDependencies; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setModelVersion(String string) { this.modelVersion = string; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public String getModelVersion() { return modelVersion; @@ -622,85 +680,113 @@ public String getId() { return ""; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setGroupId(String string) { this.groupId = string; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public String getGroupId() { return groupId; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setArtifactId(String string) { this.artifactId = string; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public String getArtifactId() { return artifactId; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setName(String string) { this.name = string; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public String getName() { return name; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setVersion(String string) { this.version = string; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public String getVersion() { return version; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public String getPackaging() { return packaging; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setPackaging(String string) { this.packaging = string; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setInceptionYear(String string) { this.inceptionYear = string; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public String getInceptionYear() { return inceptionYear; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setUrl(String string) { this.url = string; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public String getUrl() { return url; @@ -776,13 +862,17 @@ public DistributionManagement getDistributionManagement() { return null; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setDescription(String string) { this.description = string; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public String getDescription() { return description; @@ -918,13 +1008,17 @@ public void addContributor(Contributor contributor) { // nop } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setBuild(Build build) { this.build = build; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Build getBuild() { return build; @@ -990,13 +1084,17 @@ public Reporting getReporting() { return null; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setLicenses(List licenses) { this.licenses = licenses; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List getLicenses() { return licenses; @@ -1218,25 +1316,33 @@ public void injectPluginManagementInfo(Plugin plugin) { // nop } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List getCollectedProjects() { return collectedProjects; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setCollectedProjects(List list) { this.collectedProjects = list; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setPluginArtifactRepositories(List list) { this.pluginArtifactRepositories = list; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List getPluginArtifactRepositories() { return pluginArtifactRepositories; @@ -1262,19 +1368,25 @@ public List getPluginRepositories() { return Collections.emptyList(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setActiveProfiles(List list) { activeProfiles = list; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List getActiveProfiles() { return activeProfiles; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void addAttachedArtifact(Artifact artifact) { if (attachedArtifacts == null) { @@ -1284,7 +1396,9 @@ public void addAttachedArtifact(Artifact artifact) { } } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List getAttachedArtifacts() { return attachedArtifacts; @@ -1350,37 +1464,49 @@ public void writeOriginalModel(Writer writer) throws IOException { // nop } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Set getDependencyArtifacts() { return dependencyArtifacts; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setDependencyArtifacts(Set set) { this.dependencyArtifacts = set; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setReleaseArtifactRepository(ArtifactRepository artifactRepository) { this.releaseArtifactRepository = artifactRepository; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setSnapshotArtifactRepository(ArtifactRepository artifactRepository) { this.snapshotArtifactRepository = artifactRepository; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setOriginalModel(Model model) { this.originalModel = model; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Model getOriginalModel() { return originalModel; @@ -1457,19 +1583,25 @@ public Map getProjectReferences() { return Collections.emptyMap(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public boolean isExecutionRoot() { return executionRoot; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setExecutionRoot(boolean b) { this.executionRoot = b; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public String getDefaultGoal() { return defaultGoal; diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactRepository.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactRepository.java index f680709a..62af0b87 100644 --- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactRepository.java +++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactRepository.java @@ -37,7 +37,7 @@ public class StubArtifactRepository implements ArtifactRepository { private String baseDir = null; /** - * Default constructor + * Default constructor. * * @param dir the basedir */ @@ -46,7 +46,7 @@ public StubArtifactRepository(String dir) { } /** - * @return the artifactId. + * @return the artifactId * @see org.apache.maven.artifact.repository.ArtifactRepository#pathOf(org.apache.maven.artifact.Artifact) */ @Override @@ -55,7 +55,7 @@ public String pathOf(Artifact artifact) { } /** - * @return null. + * @return null * @see org.apache.maven.artifact.repository.ArtifactRepository#pathOfRemoteRepositoryMetadata(org.apache.maven.artifact.metadata.ArtifactMetadata) */ @Override @@ -64,7 +64,7 @@ public String pathOfRemoteRepositoryMetadata(ArtifactMetadata artifactMetadata) } /** - * @return the filename of this metadata on the local repository. + * @return the filename of this metadata on the local repository * @see org.apache.maven.artifact.repository.ArtifactRepository#pathOfLocalRepositoryMetadata(org.apache.maven.artifact.metadata.ArtifactMetadata, org.apache.maven.artifact.repository.ArtifactRepository) */ @Override @@ -73,7 +73,7 @@ public String pathOfLocalRepositoryMetadata(ArtifactMetadata metadata, ArtifactR } /** - * @return null. + * @return null * @see org.apache.maven.artifact.repository.ArtifactRepository#getUrl() */ @Override @@ -82,7 +82,7 @@ public String getUrl() { } /** - * @return basedir. + * @return basedir * @see org.apache.maven.artifact.repository.ArtifactRepository#getBasedir() */ @Override @@ -91,7 +91,7 @@ public String getBasedir() { } /** - * @return null. + * @return null * @see org.apache.maven.artifact.repository.ArtifactRepository#getProtocol() */ @Override @@ -100,7 +100,7 @@ public String getProtocol() { } /** - * @return null. + * @return null * @see org.apache.maven.artifact.repository.ArtifactRepository#getId() */ @Override @@ -109,7 +109,7 @@ public String getId() { } /** - * @return null. + * @return null * @see org.apache.maven.artifact.repository.ArtifactRepository#getSnapshots() */ @Override @@ -118,7 +118,7 @@ public ArtifactRepositoryPolicy getSnapshots() { } /** - * @return null. + * @return null * @see org.apache.maven.artifact.repository.ArtifactRepository#getReleases() */ @Override @@ -127,7 +127,7 @@ public ArtifactRepositoryPolicy getReleases() { } /** - * @return null. + * @return null * @see org.apache.maven.artifact.repository.ArtifactRepository#getLayout() */ @Override @@ -136,7 +136,7 @@ public ArtifactRepositoryLayout getLayout() { } /** - * @return null. + * @return null * @see org.apache.maven.artifact.repository.ArtifactRepository#getKey() */ @Override @@ -145,7 +145,7 @@ public String getKey() { } /** - * @return false. + * @return false * @see org.apache.maven.artifact.repository.ArtifactRepository#isUniqueVersion() */ @Override @@ -164,7 +164,7 @@ public void setBlacklisted(boolean blackListed) { } /** - * @return false. + * @return false * @see org.apache.maven.artifact.repository.ArtifactRepository#isBlacklisted() */ @Override