This is an automated email from the ASF dual-hosted git repository. elharo pushed a commit to branch jd in repository https://gitbox.apache.org/repos/asf/maven-plugin-testing.git
commit 942fd941cc8a03632568cac99f170737f6e14c55 Author: Elliotte Rusty Harold <[email protected]> AuthorDate: Thu Jan 8 07:39:01 2026 -0500 Follow Oracle Javadoc conventions --- .../apache/maven/api/plugin/testing/Basedir.java | 18 +- .../maven/api/plugin/testing/InjectMojo.java | 14 +- .../maven/api/plugin/testing/MojoExtension.java | 35 ++- .../maven/api/plugin/testing/MojoParameter.java | 13 +- .../maven/api/plugin/testing/MojoParameters.java | 19 +- .../apache/maven/api/plugin/testing/MojoTest.java | 28 +-- .../maven/plugin/testing/AbstractMojoTestCase.java | 34 +-- .../maven/plugin/testing/ArtifactStubFactory.java | 39 ++- .../plugin/testing/ConfigurationException.java | 12 +- .../maven/plugin/testing/MojoLogWrapper.java | 2 - .../maven/plugin/testing/MojoParameters.java | 5 +- .../org/apache/maven/plugin/testing/MojoRule.java | 15 +- .../testing/ResolverExpressionEvaluatorStub.java | 8 +- .../apache/maven/plugin/testing/WithoutMojo.java | 4 +- .../plugin/testing/resources/TestResources.java | 5 +- .../maven/plugin/testing/stubs/ArtifactStub.java | 94 ++++--- .../testing/stubs/DefaultArtifactHandlerStub.java | 44 ++-- .../plugin/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 803c507..d944993 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 @@ import java.lang.annotation.Target; * 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. * - ** <p>Example usage:</p> + * * <p>Example usage:</p> * <pre> - * {@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 @@ import java.lang.annotation.Target; * } * } * </pre> - * - * @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 7b0acf4..61d9616 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 @@ import java.lang.annotation.Target; * * <p>Example usage on a test method:</p> * <pre> - * {@code + * {@code. + * + * @see MojoTest + * @see MojoParameter + * @see MojoExtension + * @since 3.4.0 * @Test * @InjectMojo(goal = "compile") * void testCompileMojo(CompileMojo mojo) { @@ -44,7 +49,6 @@ import java.lang.annotation.Target; * } * } * </pre> - * * <p>Example usage with a custom POM:</p> * <pre> * {@code @@ -59,7 +63,6 @@ import java.lang.annotation.Target; * } * } * </pre> - * * <p>The annotation can be used in conjunction with {@link MojoParameter} to provide * specific parameter values for the Mojo:</p> * <pre> @@ -74,11 +77,6 @@ import java.lang.annotation.Target; * } * } * </pre> - * - * @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 36726cb..7d37372 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 @@ import static org.mockito.Mockito.spy; * * <p>Example usage in a test class:</p> * <pre> - * {@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 @@ import static org.mockito.Mockito.spy; * } * } * </pre> - ** * <p>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.</p> - * * <p><b>NOTE:</b> only plugin configuration is taken from provided POM, all other tags are ignored.</p> - * - * - * @see MojoTest - * @see InjectMojo - * @see MojoParameter - * @see Basedir - * @since 3.4.0 */ public class MojoExtension extends PlexusExtension implements ParameterResolver { @@ -308,7 +305,7 @@ public class MojoExtension extends PlexusExtension implements ParameterResolver } /** - * Default MojoExecution mock + * Default MojoExecution mock. * * @return a MojoExecution mock */ @@ -317,7 +314,7 @@ public class MojoExtension extends PlexusExtension implements ParameterResolver } /** - * Default MavenSession mock + * Default MavenSession mock. * * @return a MavenSession mock */ @@ -329,7 +326,7 @@ public class MojoExtension extends PlexusExtension implements ParameterResolver } /** - * Default MavenProject mock + * Default MavenProject mock. * * @return a MavenProject mock */ @@ -444,7 +441,7 @@ public class MojoExtension extends PlexusExtension implements ParameterResolver } /** - * 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 @@ public class MojoExtension extends PlexusExtension implements ParameterResolver } /** - * 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 class MojoExtension extends PlexusExtension implements ParameterResolver } /** - * 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 780e32f..f094fa3 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 @@ import java.lang.annotation.Target; * * <p>Example usage with a single parameter:</p> * <pre> - * {@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 @@ import java.lang.annotation.Target; * } * } * </pre> - * * <p>Example usage with multiple parameters:</p> * <pre> * {@code @@ -60,11 +64,6 @@ import java.lang.annotation.Target; * } * } * </pre> - * - * @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 5565281..03f1418 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 @@ import java.lang.annotation.Target; * * <p>Example of direct usage:</p> * <pre> - * {@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(); * } * } * </pre> - * * <p>Equivalent usage with repeatable annotation:</p> * <pre> * {@code @@ -62,11 +66,6 @@ import java.lang.annotation.Target; * } * } * </pre> - * - * @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 063c1fa..9404217 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 @@ import org.junit.jupiter.api.extension.ExtendWith; * * <p>Example usage:</p> * <pre> - * {@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); * } * } * } * </pre> - * * <p>The annotation supports:</p> * <ul> * <li>Automatic Mojo instantiation and configuration</li> @@ -72,13 +75,6 @@ import org.junit.jupiter.api.extension.ExtendWith; * <li>Custom POM configuration via {@link InjectMojo#pom()}</li> * <li>Base directory configuration for test resources via {@link Basedir}</li> * </ul> - * - * - * @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 2708210..cce9417 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.Xpp3Dom; 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 @@ public abstract class AbstractMojoTestCase extends PlexusTestCase { } /** - * Lookup the mojo leveraging the subproject pom + * Lookup the mojo leveraging the subproject pom. * * @param goal * @param pluginPom @@ -265,7 +264,7 @@ public abstract class AbstractMojoTestCase extends PlexusTestCase { } /** - * Lookup an empty mojo + * Lookup an empty mojo. * * @param goal * @param pluginPom @@ -277,7 +276,7 @@ public abstract class AbstractMojoTestCase extends PlexusTestCase { } /** - * Lookup the mojo leveraging the actual subprojects pom + * Lookup the mojo leveraging the actual subprojects pom. * * @param goal * @param pom @@ -301,7 +300,7 @@ public abstract class AbstractMojoTestCase extends PlexusTestCase { } /** - * Lookup the mojo leveraging the actual subprojects pom + * Lookup the mojo leveraging the actual subprojects pom. * * @param goal * @param pom @@ -332,7 +331,7 @@ public abstract class AbstractMojoTestCase extends PlexusTestCase { } */ /** - * 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 @@ public abstract class AbstractMojoTestCase extends PlexusTestCase { } /** - * * @param project * @param goal - * @return * @throws Exception * @since 2.0 */ @@ -378,12 +375,10 @@ public abstract class AbstractMojoTestCase extends PlexusTestCase { } /** - * * @param session * @param execution - * @return - * @throws Exception * @throws ComponentConfigurationException + * @throws Exception * @since 2.0 */ protected <T extends Mojo> T lookupConfiguredMojo(MavenSession session, MojoExecution execution) @@ -419,9 +414,7 @@ public abstract class AbstractMojoTestCase extends PlexusTestCase { } /** - * * @param project - * @return * @since 2.0 */ protected MavenSession newMavenSession(MavenProject project) { @@ -435,9 +428,7 @@ public abstract class AbstractMojoTestCase extends PlexusTestCase { } /** - * * @param goal - * @return * @since 2.0 */ protected MojoExecution newMojoExecution(String goal) { @@ -546,7 +537,7 @@ public abstract class AbstractMojoTestCase extends PlexusTestCase { } /** - * Configure the mojo + * Configure the mojo. * * @param mojo * @param artifactId @@ -568,7 +559,7 @@ public abstract class AbstractMojoTestCase extends PlexusTestCase { } /** - * Configure the mojo with the given plexus configuration + * Configure the mojo with the given plexus configuration. * * @param mojo * @param pluginConfiguration @@ -647,7 +638,7 @@ public abstract class AbstractMojoTestCase extends PlexusTestCase { } /** - * 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 @@ public abstract class AbstractMojoTestCase extends PlexusTestCase { } /** - * 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 d510314..785b5b9 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 class 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 class ArtifactStubFactory { /** * 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 class ArtifactStubFactory { * 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 class ArtifactStubFactory { * 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 class ArtifactStubFactory { * 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 class ArtifactStubFactory { } /** - * 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 @@ public class ArtifactStubFactory { /** * @param artifact - * @return */ public static String getUnpackableFileName(Artifact artifact) { return "" + artifact.getGroupId() + "-" + artifact.getArtifactId() + "-" + artifact.getVersion() + "-" @@ -262,9 +261,9 @@ public class ArtifactStubFactory { /** * @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 class ArtifactStubFactory { } /** - * @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 class ArtifactStubFactory { * 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 9b8150c..094e42b 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 382bad8..669e27a 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 @@ import static java.util.Objects.requireNonNull; /** * @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 aa8f940..415f3e7 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 @@ package org.apache.maven.plugin.testing; 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 da5642a..c8833a0 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 @@ import org.junit.runners.model.Statement; * 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 class MojoRule implements TestRule { } /** - * Lookup the mojo leveraging the subproject pom + * Lookup the mojo leveraging the subproject pom. * * @param goal * @param pluginPom @@ -122,7 +121,7 @@ public class MojoRule implements TestRule { } /** - * Lookup an empty mojo + * Lookup an empty mojo. * * @param goal * @param pluginPom @@ -134,7 +133,7 @@ public class MojoRule implements TestRule { } /** - * 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 class MojoRule implements TestRule { } /** - * 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 class MojoRule implements TestRule { } /** - * 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 76f1b45..9aae50d 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 @@ import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator */ @Deprecated public class ResolverExpressionEvaluatorStub implements ExpressionEvaluator { - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Object evaluate(String expr) throws ExpressionEvaluationException { @@ -102,7 +104,9 @@ public class ResolverExpressionEvaluatorStub implements ExpressionEvaluator { 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 222d92d..43b205e 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.ElementType.METHOD; 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 d6b8673..34cf1bf 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 @@ import org.junit.runner.Description; /** * 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 @@ public class TestResources extends TestWatcher { * 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. * <p> - * 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 edbaa9e..9e1a657 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 class ArtifactStub implements 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 class ArtifactStub implements Artifact { 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 <code>null</code>. + * @return <code>null</code> * @see org.apache.maven.artifact.Artifact#getBaseVersion() */ @Override @@ -152,7 +172,7 @@ public class ArtifactStub implements Artifact { } /** - * @return <code>null</code>. + * @return <code>null</code> * @see org.apache.maven.artifact.Artifact#getId() */ @Override @@ -161,7 +181,7 @@ public class ArtifactStub implements Artifact { } /** - * @return <code>groupId:artifactId:type:classifier</code>. + * @return <code>groupId:artifactId:type:classifier</code> * @see org.apache.maven.artifact.Artifact#getDependencyConflictId() */ @Override @@ -187,7 +207,7 @@ public class ArtifactStub implements Artifact { } /** - * @return <code>null</code>. + * @return <code>null</code> * @see org.apache.maven.artifact.Artifact#getMetadataList() */ @Override @@ -195,13 +215,17 @@ public class ArtifactStub implements Artifact { 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 class ArtifactStub implements Artifact { } /** - * @return <code>null</code>. + * @return <code>null</code> * @see org.apache.maven.artifact.Artifact#getDownloadUrl() */ @Override @@ -237,7 +261,7 @@ public class ArtifactStub implements Artifact { } /** - * @return <code>null</code>. + * @return <code>null</code> * @see org.apache.maven.artifact.Artifact#getDependencyFilter() */ @Override @@ -256,7 +280,7 @@ public class ArtifactStub implements Artifact { } /** - * @return <code>null</code>. + * @return <code>null</code> * @see org.apache.maven.artifact.Artifact#getArtifactHandler() */ @Override @@ -265,7 +289,7 @@ public class ArtifactStub implements Artifact { } /** - * @return <code>null</code>. + * @return <code>null</code> * @see org.apache.maven.artifact.Artifact#getDependencyTrail() */ @Override @@ -283,14 +307,16 @@ public class ArtifactStub implements Artifact { // nop } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setScope(String scope) { this.scope = scope; } /** - * @return <code>null</code>. + * @return <code>null</code> * @see org.apache.maven.artifact.Artifact#getVersionRange() */ @Override @@ -318,20 +344,24 @@ public class ArtifactStub implements Artifact { // nop } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setGroupId(String groupId) { this.groupId = groupId; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setArtifactId(String artifactId) { this.artifactId = artifactId; } /** - * @return <code>false</code>. + * @return <code>false</code> * @see org.apache.maven.artifact.Artifact#isSnapshot() */ @Override @@ -351,7 +381,7 @@ public class ArtifactStub implements Artifact { } /** - * @return <code>false</code>. + * @return <code>false</code> * @see org.apache.maven.artifact.Artifact#isResolved() */ @Override @@ -380,7 +410,7 @@ public class ArtifactStub implements Artifact { } /** - * @return <code>false</code>. + * @return <code>false</code> * @see org.apache.maven.artifact.Artifact#isRelease() */ @Override @@ -399,7 +429,7 @@ public class ArtifactStub implements Artifact { } /** - * @return <code>null</code>. + * @return <code>null</code> * @see org.apache.maven.artifact.Artifact#getAvailableVersions() */ @Override @@ -418,7 +448,7 @@ public class ArtifactStub implements Artifact { } /** - * @return <code>false</code>. + * @return <code>false</code> * @see org.apache.maven.artifact.Artifact#isOptional() */ @Override @@ -437,7 +467,7 @@ public class ArtifactStub implements Artifact { } /** - * @return <code>null</code>. + * @return <code>null</code> * @see org.apache.maven.artifact.Artifact#getSelectedVersion() */ @Override @@ -446,7 +476,7 @@ public class ArtifactStub implements Artifact { } /** - * @return <code>false</code>. + * @return <code>false</code> * @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 5c5fe7a..64927ae 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 class DefaultArtifactHandlerStub implements ArtifactHandler { this.type = type; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public String getExtension() { if (extension == null) { @@ -77,13 +79,17 @@ public class DefaultArtifactHandlerStub implements ArtifactHandler { return type; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public String getClassifier() { return classifier; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public String getDirectory() { if (directory == null) { @@ -92,7 +98,9 @@ public class DefaultArtifactHandlerStub implements ArtifactHandler { return directory; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public String getPackaging() { if (packaging == null) { @@ -101,13 +109,17 @@ public class DefaultArtifactHandlerStub implements ArtifactHandler { return packaging; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public boolean isIncludesDependencies() { return includesDependencies; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public String getLanguage() { if (language == null) { @@ -117,63 +129,65 @@ public class DefaultArtifactHandlerStub implements ArtifactHandler { 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 dd4fa74..8778e0a 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 class MavenProjectStub extends MavenProject { * 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 <code>null</code>. If this path is relative, it + * @param pomFile the path to the POM file to load, must not be <code>null</code>. If this path is relative, it * is resolved against the return value of {@link #getBasedir()}. */ protected void readModel(File pomFile) { @@ -195,7 +195,7 @@ public class MavenProjectStub extends MavenProject { } /** - * No project model is associated + * No project model is associated. * * @param project the given project */ @@ -213,31 +213,41 @@ public class MavenProjectStub extends MavenProject { 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 class MavenProjectStub extends MavenProject { return Collections.<ArtifactRepository>emptyList(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public boolean hasParent() { if (parent != null) { @@ -273,19 +285,25 @@ public class MavenProjectStub extends MavenProject { 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 class MavenProjectStub extends MavenProject { return null; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void addCompileSourceRoot(String string) { if (compileSourceRoots == null) { @@ -331,7 +351,9 @@ public class MavenProjectStub extends MavenProject { } } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void addScriptSourceRoot(String string) { if (scriptSourceRoots == null) { @@ -341,7 +363,9 @@ public class MavenProjectStub extends MavenProject { } } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void addTestCompileSourceRoot(String string) { if (testCompileSourceRoots == null) { @@ -351,25 +375,33 @@ public class MavenProjectStub extends MavenProject { } } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List<String> getCompileSourceRoots() { return compileSourceRoots; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List<String> getScriptSourceRoots() { return scriptSourceRoots; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List<String> getTestCompileSourceRoots() { return testCompileSourceRoots; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List<String> getCompileClasspathElements() throws DependencyResolutionRequiredException { return compileSourceRoots; @@ -382,61 +414,81 @@ public class MavenProjectStub extends MavenProject { this.compileArtifacts = compileArtifacts; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List<Artifact> getCompileArtifacts() { return compileArtifacts; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List<Dependency> getCompileDependencies() { return compileDependencies; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List<String> getTestClasspathElements() throws DependencyResolutionRequiredException { return testClasspathElements; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List<Artifact> getTestArtifacts() { return testArtifacts; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List<Dependency> getTestDependencies() { return testDependencies; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List<String> getRuntimeClasspathElements() throws DependencyResolutionRequiredException { return runtimeClasspathElements; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List<Artifact> getRuntimeArtifacts() { return runtimeArtifacts; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List<Dependency> getRuntimeDependencies() { return runtimeDependencies; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List<String> getSystemClasspathElements() throws DependencyResolutionRequiredException { return systemClasspathElements; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List<Artifact> getSystemArtifacts() { return systemArtifacts; @@ -594,19 +646,25 @@ public class MavenProjectStub extends MavenProject { this.model = model; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List<Dependency> 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 class MavenProjectStub extends MavenProject { 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 class MavenProjectStub extends MavenProject { 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 class MavenProjectStub extends MavenProject { // 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 class MavenProjectStub extends MavenProject { return null; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setLicenses(List<License> licenses) { this.licenses = licenses; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List<License> getLicenses() { return licenses; @@ -1218,25 +1316,33 @@ public class MavenProjectStub extends MavenProject { // nop } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List<MavenProject> getCollectedProjects() { return collectedProjects; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setCollectedProjects(List<MavenProject> list) { this.collectedProjects = list; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setPluginArtifactRepositories(List<ArtifactRepository> list) { this.pluginArtifactRepositories = list; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List<ArtifactRepository> getPluginArtifactRepositories() { return pluginArtifactRepositories; @@ -1262,19 +1368,25 @@ public class MavenProjectStub extends MavenProject { return Collections.<Repository>emptyList(); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setActiveProfiles(List<Profile> list) { activeProfiles = list; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List<Profile> getActiveProfiles() { return activeProfiles; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void addAttachedArtifact(Artifact artifact) { if (attachedArtifacts == null) { @@ -1284,7 +1396,9 @@ public class MavenProjectStub extends MavenProject { } } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public List<Artifact> getAttachedArtifacts() { return attachedArtifacts; @@ -1350,37 +1464,49 @@ public class MavenProjectStub extends MavenProject { // nop } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Set<Artifact> getDependencyArtifacts() { return dependencyArtifacts; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public void setDependencyArtifacts(Set<Artifact> 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 class MavenProjectStub extends MavenProject { return Collections.<String, MavenProject>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 f680709..62af0b8 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 class StubArtifactRepository implements ArtifactRepository { } /** - * @return the <code>artifactId</code>. + * @return the <code>artifactId</code> * @see org.apache.maven.artifact.repository.ArtifactRepository#pathOf(org.apache.maven.artifact.Artifact) */ @Override @@ -55,7 +55,7 @@ public class StubArtifactRepository implements ArtifactRepository { } /** - * @return <code>null</code>. + * @return <code>null</code> * @see org.apache.maven.artifact.repository.ArtifactRepository#pathOfRemoteRepositoryMetadata(org.apache.maven.artifact.metadata.ArtifactMetadata) */ @Override @@ -64,7 +64,7 @@ public class StubArtifactRepository implements ArtifactRepository { } /** - * @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 class StubArtifactRepository implements ArtifactRepository { } /** - * @return <code>null</code>. + * @return <code>null</code> * @see org.apache.maven.artifact.repository.ArtifactRepository#getUrl() */ @Override @@ -82,7 +82,7 @@ public class StubArtifactRepository implements ArtifactRepository { } /** - * @return <code>basedir</code>. + * @return <code>basedir</code> * @see org.apache.maven.artifact.repository.ArtifactRepository#getBasedir() */ @Override @@ -91,7 +91,7 @@ public class StubArtifactRepository implements ArtifactRepository { } /** - * @return <code>null</code>. + * @return <code>null</code> * @see org.apache.maven.artifact.repository.ArtifactRepository#getProtocol() */ @Override @@ -100,7 +100,7 @@ public class StubArtifactRepository implements ArtifactRepository { } /** - * @return <code>null</code>. + * @return <code>null</code> * @see org.apache.maven.artifact.repository.ArtifactRepository#getId() */ @Override @@ -109,7 +109,7 @@ public class StubArtifactRepository implements ArtifactRepository { } /** - * @return <code>null</code>. + * @return <code>null</code> * @see org.apache.maven.artifact.repository.ArtifactRepository#getSnapshots() */ @Override @@ -118,7 +118,7 @@ public class StubArtifactRepository implements ArtifactRepository { } /** - * @return <code>null</code>. + * @return <code>null</code> * @see org.apache.maven.artifact.repository.ArtifactRepository#getReleases() */ @Override @@ -127,7 +127,7 @@ public class StubArtifactRepository implements ArtifactRepository { } /** - * @return <code>null</code>. + * @return <code>null</code> * @see org.apache.maven.artifact.repository.ArtifactRepository#getLayout() */ @Override @@ -136,7 +136,7 @@ public class StubArtifactRepository implements ArtifactRepository { } /** - * @return <code>null</code>. + * @return <code>null</code> * @see org.apache.maven.artifact.repository.ArtifactRepository#getKey() */ @Override @@ -145,7 +145,7 @@ public class StubArtifactRepository implements ArtifactRepository { } /** - * @return <code>false</code>. + * @return <code>false</code> * @see org.apache.maven.artifact.repository.ArtifactRepository#isUniqueVersion() */ @Override @@ -164,7 +164,7 @@ public class StubArtifactRepository implements ArtifactRepository { } /** - * @return <code>false</code>. + * @return <code>false</code> * @see org.apache.maven.artifact.repository.ArtifactRepository#isBlacklisted() */ @Override
