You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2022/04/18 13:57:48 UTC
[maven-plugin-testing] 01/01: [MPLUGINTESTING-71] Require Java 8
This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a commit to branch MPLUGINTESTING-71
in repository https://gitbox.apache.org/repos/asf/maven-plugin-testing.git
commit 672020047dd10379dac28ba1f5f432837e857e01
Author: Sylwester Lachiewicz <sl...@apache.org>
AuthorDate: Mon Apr 18 15:56:22 2022 +0200
[MPLUGINTESTING-71] Require Java 8
---
README.md | 31 +-
maven-plugin-testing-harness/pom.xml | 131 +++----
.../maven/plugin/testing/AbstractMojoTestCase.java | 135 ++++---
.../maven/plugin/testing/ArtifactStubFactory.java | 78 ++--
.../plugin/testing/ConfigurationException.java | 8 +-
.../maven/plugin/testing/MojoParameters.java | 2 +-
.../org/apache/maven/plugin/testing/MojoRule.java | 80 ++--
.../testing/ResolverExpressionEvaluatorStub.java | 20 +-
.../org/apache/maven/plugin/testing/SilentLog.java | 4 +-
.../apache/maven/plugin/testing/WithoutMojo.java | 7 +-
.../plugin/testing/resources/TestResources.java | 18 +-
.../maven/plugin/testing/stubs/ArtifactStub.java | 73 +++-
.../testing/stubs/DefaultArtifactHandlerStub.java | 30 +-
.../plugin/testing/stubs/MavenProjectStub.java | 300 ++++++++++-----
.../testing/stubs/StubArtifactCollector.java | 4 +-
.../testing/stubs/StubArtifactRepository.java | 13 +-
.../plugin/testing/stubs/StubArtifactResolver.java | 59 ++-
maven-plugin-testing-harness/src/site/site.xml | 34 +-
.../plugin/testing/ArtifactStubFactoryTest.java | 12 +-
.../plugin/testing/ExpressionEvaluatorMojo.java | 8 +-
.../plugin/testing/ExpressionEvaluatorTest.java | 16 +-
.../apache/maven/plugin/testing/MojoRuleTest.java | 79 ++--
.../maven/plugin/testing/MojoTestCaseTest.java | 62 +--
.../maven/plugin/testing/ParametersMojo.java | 4 +-
.../maven/plugin/testing/ParametersMojoTest.java | 12 +-
.../plugin/testing/PluginArtifactFileTest.java | 6 +-
.../apache/maven/plugin/testing/SimpleMojo.java | 4 +-
.../apache/maven/plugin/testing/TestSilentLog.java | 3 +-
.../testing/resources/TestResourcesTest.java | 2 +-
.../src/test/projects/default/pom.xml | 46 +--
.../src/test/projects/explicit/pom.xml | 58 +--
.../src/test/resources/META-INF/maven/plugin.xml | 121 +++---
pom.xml | 423 +++++++++++----------
src/site/site.xml | 28 +-
src/site/xdoc/download.xml.vm | 231 ++++++-----
35 files changed, 1193 insertions(+), 949 deletions(-)
diff --git a/README.md b/README.md
index 9a9c0e0..f77162c 100644
--- a/README.md
+++ b/README.md
@@ -23,7 +23,6 @@ Contributing to [Apache Maven Plugin Testing](https://maven.apache.org/plugin-te
[![Jenkins Status](https://img.shields.io/jenkins/s/https/ci-maven.apache.org/job/Maven/job/maven-box/job/maven-plugin-testing/job/master.svg)][build]
[![Jenkins tests](https://img.shields.io/jenkins/t/https/ci-maven.apache.org/job/Maven/job/maven-box/job/maven-plugin-testing/job/master.svg)][test-results]
-
You have found a bug or you have an idea for a cool new feature? Contributing
code is a great way to give something back to the open source community. Before
you dig right into the code, there are a few guidelines that we need
@@ -35,13 +34,13 @@ Getting Started
+ Make sure you have a [JIRA account](https://issues.apache.org/jira/).
+ Make sure you have a [GitHub account](https://github.com/signup/free).
-+ If you're planning to implement a new feature, it makes sense to discuss your changes
- on the [dev list][ml-list] first.
- This way you can make sure you're not wasting your time on something that isn't
++ If you're planning to implement a new feature, it makes sense to discuss your changes
+ on the [dev list][ml-list] first.
+ This way you can make sure you're not wasting your time on something that isn't
considered to be in Apache Maven's scope.
+ Submit a ticket for your issue, assuming one does not already exist.
- + Clearly describe the issue, including steps to reproduce when it is a bug.
- + Make sure you fill in the earliest version that you know has the issue.
+ + Clearly describe the issue, including steps to reproduce when it is a bug.
+ + Make sure you fill in the earliest version that you know has the issue.
+ Fork the repository on GitHub.
Making and Submitting Changes
@@ -50,20 +49,23 @@ Making and Submitting Changes
We accept Pull Requests via GitHub. The [developer mailing list][ml-list] is the
main channel of communication for contributors.
There are some guidelines which will make applying PRs easier for us:
+
+ Create a topic branch from where you want to base your work (this is usually the master branch).
Push your changes to a topic branch in your fork of the repository.
+ Make commits of logical units.
+ Respect the original code style: by using the same [codestyle][code-style],
patches should only highlight the actual difference, not being disturbed by any formatting issues:
- + Only use spaces for indentation.
- + Create minimal diffs - disable on save actions like reformat source code or organize imports.
- If you feel the source code should be reformatted, create a separate PR for this change.
- + Check for unnecessary whitespace with `git diff --check` before committing.
+ + Only use spaces for indentation.
+ + Create minimal diffs - disable on save actions like reformat source code or organize imports.
+ If you feel the source code should be reformatted, create a separate PR for this change.
+ + Check for unnecessary whitespace with `git diff --check` before committing.
+ Make sure your commit messages are in the proper format. Your commit message should contain the key of the JIRA issue.
+
```
[MPLUGINTESTING-XXX] - Subject of the JIRA Ticket
Optional supplemental description.
```
+
+ Make sure you have added the necessary tests (JUnit/IT) for your changes.
+ Run all the tests with `mvn -Prun-its verify` to assure nothing else was accidentally broken.
+ Submit a pull request to the repository in the Apache organization.
@@ -75,7 +77,7 @@ Making Trivial Changes
----------------------
For changes of a trivial nature to comments and documentation, it is not always
-necessary to create a new ticket in JIRA. In this case, it is appropriate to
+necessary to create a new ticket in JIRA. In this case, it is appropriate to
start the first line of a commit with '(doc)' instead of a ticket number.
Additional Resources
@@ -90,10 +92,17 @@ Additional Resources
+ #Maven IRC channel on freenode.org
[jira]: https://issues.apache.org/jira/projects/MPLUGINTESTING/
+
[license]: https://www.apache.org/licenses/LICENSE-2.0
+
[ml-list]: https://maven.apache.org/mailing-lists.html
+
[code-style]: https://maven.apache.org/developers/conventions/code.html
+
[cla]: https://www.apache.org/licenses/#clas
+
[maven-wiki]: https://cwiki.apache.org/confluence/display/MAVEN/Index
+
[test-results]: https://ci-maven.apache.org/job/Maven/job/maven-box/job/maven-plugin-testing/job/master/lastCompletedBuild/testReport/
+
[build]: https://ci-maven.apache.org/job/Maven/job/maven-box/job/maven-plugin-testing/job/master/
diff --git a/maven-plugin-testing-harness/pom.xml b/maven-plugin-testing-harness/pom.xml
index 83a190c..2a46ef6 100644
--- a/maven-plugin-testing-harness/pom.xml
+++ b/maven-plugin-testing-harness/pom.xml
@@ -19,74 +19,75 @@ specific language governing permissions and limitations
under the License.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.maven.plugin-testing</groupId>
- <artifactId>maven-plugin-testing</artifactId>
- <version>3.4.0-SNAPSHOT</version>
- </parent>
+ <parent>
+ <groupId>org.apache.maven.plugin-testing</groupId>
+ <artifactId>maven-plugin-testing</artifactId>
+ <version>3.4.0-SNAPSHOT</version>
+ </parent>
- <artifactId>maven-plugin-testing-harness</artifactId>
- <name>Maven Plugin Testing Mechanism</name>
- <description>The Maven Plugin Testing Harness provides mechanisms to manage tests on Mojo.</description>
+ <artifactId>maven-plugin-testing-harness</artifactId>
+ <name>Maven Plugin Testing Mechanism</name>
+ <description>The Maven Plugin Testing Harness provides mechanisms to manage tests on Mojo.</description>
- <dependencies>
- <!-- maven -->
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-compat</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-model</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-plugin-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-aether-provider</artifactId>
- </dependency>
+ <dependencies>
+ <!-- maven -->
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-compat</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-model</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-aether-provider</artifactId>
+ </dependency>
- <!-- plexus -->
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-utils</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- <version>2.6</version>
- </dependency>
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-archiver</artifactId>
- <version>4.2.5</version>
- </dependency>
- </dependencies>
+ <!-- plexus -->
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>2.6</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-archiver</artifactId>
+ <version>4.2.5</version>
+ </dependency>
+ </dependencies>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-source-plugin</artifactId>
- <configuration>
- <attach>true</attach>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>jar-no-fork</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-source-plugin</artifactId>
+ <configuration>
+ <attach>true</attach>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>jar-no-fork</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</project>
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 7296c01..2d4e63d 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
@@ -21,7 +21,6 @@ package org.apache.maven.plugin.testing;
import java.io.BufferedReader;
import java.io.File;
-import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
@@ -29,6 +28,7 @@ import java.lang.reflect.AccessibleObject;
import java.lang.reflect.Field;
import java.net.MalformedURLException;
import java.net.URL;
+import java.nio.file.Files;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
@@ -36,6 +36,7 @@ import java.util.List;
import java.util.Map;
import java.util.Properties;
+import com.google.inject.Module;
import org.apache.commons.io.input.XmlStreamReader;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
@@ -81,8 +82,6 @@ import org.codehaus.plexus.util.StringUtils;
import org.codehaus.plexus.util.xml.Xpp3Dom;
import org.codehaus.plexus.util.xml.Xpp3DomBuilder;
-import com.google.inject.Module;
-
/**
* TODO: add a way to use the plugin POM for the lookup so that the user doesn't have to provide the a:g:v:goal
* as the role hint for the mojo lookup.
@@ -96,7 +95,7 @@ import com.google.inject.Module;
* @author jesse
*/
public abstract class AbstractMojoTestCase
- extends PlexusTestCase
+ extends PlexusTestCase
{
private static final DefaultArtifactVersion MAVEN_VERSION;
@@ -104,7 +103,7 @@ public abstract class AbstractMojoTestCase
{
DefaultArtifactVersion version = null;
String path = "/META-INF/maven/org.apache.maven/maven-core/pom.properties";
-
+
try ( InputStream is = AbstractMojoTestCase.class.getResourceAsStream( path ) )
{
Properties properties = new Properties();
@@ -130,7 +129,7 @@ public abstract class AbstractMojoTestCase
private PlexusContainer container;
private Map<String, MojoDescriptor> mojoDescriptors;
-
+
/*
* for the harness I think we have decided against going the route of using the maven project builder.
* instead I think we are going to try and make an instance of the localrespository and assign that
@@ -139,36 +138,36 @@ public abstract class AbstractMojoTestCase
//private MavenProjectBuilder projectBuilder;
@Override
protected void setUp()
- throws Exception
+ throws Exception
{
assertTrue( "Maven 3.2.4 or better is required",
- MAVEN_VERSION == null || new DefaultArtifactVersion( "3.2.3" ).compareTo( MAVEN_VERSION ) < 0 );
+ MAVEN_VERSION == null || new DefaultArtifactVersion( "3.2.3" ).compareTo( MAVEN_VERSION ) < 0 );
configurator = getContainer().lookup( ComponentConfigurator.class, "basic" );
Context context = container.getContext();
Map<Object, Object> map = context.getContextData();
try ( InputStream is = getClass().getResourceAsStream( "/" + getPluginDescriptorLocation() );
- Reader reader = new BufferedReader( new XmlStreamReader( is ) );
+ Reader reader = new BufferedReader( new XmlStreamReader( is ) );
InterpolationFilterReader interpolationReader = new InterpolationFilterReader( reader, map, "${", "}" ) )
{
-
+
PluginDescriptor pluginDescriptor = new PluginDescriptorBuilder().build( interpolationReader );
-
+
Artifact artifact =
- lookup( RepositorySystem.class ).createArtifact( pluginDescriptor.getGroupId(),
- pluginDescriptor.getArtifactId(),
- pluginDescriptor.getVersion(), ".jar" );
-
+ lookup( RepositorySystem.class ).createArtifact( pluginDescriptor.getGroupId(),
+ pluginDescriptor.getArtifactId(),
+ pluginDescriptor.getVersion(), ".jar" );
+
artifact.setFile( getPluginArtifactFile() );
pluginDescriptor.setPluginArtifact( artifact );
pluginDescriptor.setArtifacts( Arrays.asList( artifact ) );
-
+
for ( ComponentDescriptor<?> desc : pluginDescriptor.getComponents() )
{
getContainer().addComponentDescriptor( desc );
}
-
+
mojoDescriptors = new HashMap<>();
for ( MojoDescriptor mojoDescriptor : pluginDescriptor.getMojos() )
{
@@ -184,7 +183,7 @@ public abstract class AbstractMojoTestCase
* parent directory cannot be determined, falls back to test basedir.
*/
private File getPluginArtifactFile()
- throws IOException
+ throws IOException
{
final String pluginDescriptorLocation = getPluginDescriptorLocation();
final URL resource = getClass().getResource( "/" + pluginDescriptorLocation );
@@ -214,7 +213,8 @@ public abstract class AbstractMojoTestCase
if ( path.endsWith( pluginDescriptorLocation ) )
{
file =
- new File( path.substring( 0, path.length() - pluginDescriptorLocation.length() - 2 ) );
+ new File( path.substring( 0,
+ path.length() - pluginDescriptorLocation.length() - 2 ) );
}
}
}
@@ -226,7 +226,7 @@ public abstract class AbstractMojoTestCase
}
// fallback to test project basedir if couldn't resolve relative to META-INF/maven/plugin.xml
- if ( file == null || ! file.exists() )
+ if ( file == null || !file.exists() )
{
file = new File( getBasedir() );
}
@@ -235,9 +235,9 @@ public abstract class AbstractMojoTestCase
}
protected InputStream getPublicDescriptorStream()
- throws Exception
+ throws Exception
{
- return new FileInputStream( new File( getPluginDescriptorPath() ) );
+ return Files.newInputStream( new File( getPluginDescriptorPath() ).toPath() );
}
protected String getPluginDescriptorPath()
@@ -258,13 +258,13 @@ public abstract class AbstractMojoTestCase
{
List<Module> modules = new ArrayList<>();
addGuiceModules( modules );
- container = new DefaultPlexusContainer( cc, modules.toArray( new Module[modules.size()] ) );
+ container = new DefaultPlexusContainer( cc, modules.toArray( new Module[0] ) );
}
catch ( PlexusContainerException e )
{
e.printStackTrace();
fail( "Failed to create plexus container." );
- }
+ }
}
/**
@@ -279,15 +279,13 @@ public abstract class AbstractMojoTestCase
{
ClassWorld classWorld = new ClassWorld( "plexus.core", Thread.currentThread().getContextClassLoader() );
- ContainerConfiguration cc = new DefaultContainerConfiguration()
- .setClassWorld( classWorld )
- .setClassPathScanning( PlexusConstants.SCANNING_INDEX )
- .setAutoWiring( true )
- .setName( "maven" );
-
- return cc;
+ return new DefaultContainerConfiguration()
+ .setClassWorld( classWorld )
+ .setClassPathScanning( PlexusConstants.SCANNING_INDEX )
+ .setAutoWiring( true )
+ .setName( "maven" );
}
-
+
@Override
protected PlexusContainer getContainer()
{
@@ -297,8 +295,8 @@ public abstract class AbstractMojoTestCase
}
return container;
- }
-
+ }
+
/**
* Lookup the mojo leveraging the subproject pom
*
@@ -308,7 +306,7 @@ public abstract class AbstractMojoTestCase
* @throws Exception
*/
protected Mojo lookupMojo( String goal, String pluginPom )
- throws Exception
+ throws Exception
{
return lookupMojo( goal, new File( pluginPom ) );
}
@@ -322,7 +320,7 @@ public abstract class AbstractMojoTestCase
* @throws Exception
*/
protected Mojo lookupEmptyMojo( String goal, String pluginPom )
- throws Exception
+ throws Exception
{
return lookupEmptyMojo( goal, new File( pluginPom ) );
}
@@ -336,7 +334,7 @@ public abstract class AbstractMojoTestCase
* @throws Exception
*/
protected Mojo lookupMojo( String goal, File pom )
- throws Exception
+ throws Exception
{
File pluginPom = new File( getBasedir(), "pom.xml" );
@@ -362,7 +360,7 @@ public abstract class AbstractMojoTestCase
* @throws Exception
*/
protected Mojo lookupEmptyMojo( String goal, File pom )
- throws Exception
+ throws Exception
{
File pluginPom = new File( getBasedir(), "pom.xml" );
@@ -386,6 +384,7 @@ public abstract class AbstractMojoTestCase
return lookupMojo( groupId, artifactId, version, goal, pluginConfiguration );
}
*/
+
/**
* lookup the mojo while we have all of the relavent information
*
@@ -399,7 +398,7 @@ public abstract class AbstractMojoTestCase
*/
protected Mojo lookupMojo( String groupId, String artifactId, String version, String goal,
PlexusConfiguration pluginConfiguration )
- throws Exception
+ throws Exception
{
validateContainerStatus();
@@ -408,7 +407,7 @@ public abstract class AbstractMojoTestCase
Mojo mojo = lookup( Mojo.class, groupId + ":" + artifactId + ":" + version + ":" + goal );
LoggerManager loggerManager = getContainer().lookup( LoggerManager.class );
-
+
Log mojoLogger = new DefaultLog( loggerManager.getLoggerForComponent( Mojo.ROLE ) );
mojo.setLog( mojoLogger );
@@ -428,7 +427,6 @@ public abstract class AbstractMojoTestCase
}
/**
- *
* @param project
* @param goal
* @return
@@ -436,13 +434,12 @@ public abstract class AbstractMojoTestCase
* @since 2.0
*/
protected Mojo lookupConfiguredMojo( MavenProject project, String goal )
- throws Exception
+ throws Exception
{
return lookupConfiguredMojo( newMavenSession( project ), newMojoExecution( goal ) );
}
/**
- *
* @param session
* @param execution
* @return
@@ -451,7 +448,7 @@ public abstract class AbstractMojoTestCase
* @since 2.0
*/
protected Mojo lookupConfiguredMojo( MavenSession session, MojoExecution execution )
- throws Exception, ComponentConfigurationException
+ throws Exception, ComponentConfigurationException
{
MavenProject project = session.getCurrentProject();
MojoDescriptor mojoDescriptor = execution.getMojoDescriptor();
@@ -477,16 +474,15 @@ public abstract class AbstractMojoTestCase
if ( mojoDescriptor.getComponentConfigurator() != null )
{
configurator =
- getContainer().lookup( ComponentConfigurator.class, mojoDescriptor.getComponentConfigurator() );
- }
-
+ getContainer().lookup( ComponentConfigurator.class, mojoDescriptor.getComponentConfigurator() );
+ }
+
configurator.configureComponent( mojo, pluginConfiguration, evaluator, getContainer().getContainerRealm() );
return mojo;
}
/**
- *
* @param project
* @return
* @since 2.0
@@ -503,7 +499,6 @@ public abstract class AbstractMojoTestCase
}
/**
- *
* @param goal
* @return
* @since 2.0
@@ -546,14 +541,14 @@ public abstract class AbstractMojoTestCase
Xpp3Dom parameterDefaults = defaultConfiguration.getChild( parameter.getName() );
parameterConfiguration =
- Xpp3Dom.mergeXpp3Dom( parameterConfiguration, parameterDefaults, Boolean.TRUE );
+ Xpp3Dom.mergeXpp3Dom( parameterConfiguration, parameterDefaults, Boolean.TRUE );
if ( parameterConfiguration != null )
{
parameterConfiguration = new Xpp3Dom( parameterConfiguration, parameter.getName() );
if ( StringUtils.isEmpty( parameterConfiguration.getAttribute( "implementation" ) )
- && StringUtils.isNotEmpty( parameter.getImplementation() ) )
+ && StringUtils.isNotEmpty( parameter.getImplementation() ) )
{
parameterConfiguration.setAttribute( "implementation", parameter.getImplementation() );
}
@@ -573,9 +568,9 @@ public abstract class AbstractMojoTestCase
* @throws Exception
*/
protected PlexusConfiguration extractPluginConfiguration( String artifactId, File pom )
- throws Exception
+ throws Exception
{
-
+
try ( Reader reader = ReaderFactory.newXmlReader( pom ) )
{
Xpp3Dom pomDom = Xpp3DomBuilder.build( reader );
@@ -590,7 +585,7 @@ public abstract class AbstractMojoTestCase
* @throws Exception
*/
protected PlexusConfiguration extractPluginConfiguration( String artifactId, Xpp3Dom pomDom )
- throws Exception
+ throws Exception
{
Xpp3Dom pluginConfigurationElement = null;
@@ -618,7 +613,7 @@ public abstract class AbstractMojoTestCase
if ( pluginConfigurationElement == null )
{
throw new ConfigurationException( "Cannot find a configuration element for a plugin with an "
- + "artifactId of " + artifactId + "." );
+ + "artifactId of " + artifactId + "." );
}
}
}
@@ -626,7 +621,7 @@ public abstract class AbstractMojoTestCase
if ( pluginConfigurationElement == null )
{
throw new ConfigurationException( "Cannot find a configuration element for a plugin with an artifactId of "
- + artifactId + "." );
+ + artifactId + "." );
}
return new XmlPlexusConfiguration( pluginConfigurationElement );
@@ -642,7 +637,7 @@ public abstract class AbstractMojoTestCase
* @throws Exception
*/
protected Mojo configureMojo( Mojo mojo, String artifactId, File pom )
- throws Exception
+ throws Exception
{
validateContainerStatus();
@@ -664,7 +659,7 @@ public abstract class AbstractMojoTestCase
* @throws Exception
*/
protected Mojo configureMojo( Mojo mojo, PlexusConfiguration pluginConfiguration )
- throws Exception
+ throws Exception
{
validateContainerStatus();
@@ -677,7 +672,7 @@ public abstract class AbstractMojoTestCase
/**
* Convenience method to obtain the value of a variable on a mojo that might not have a getter.
- *
+ * <p>
* NOTE: the caller is responsible for casting to to what the desired type is.
*
* @param object
@@ -686,7 +681,7 @@ public abstract class AbstractMojoTestCase
* @throws IllegalArgumentException
*/
protected Object getVariableValueFromObject( Object object, String variable )
- throws IllegalAccessException
+ throws IllegalAccessException
{
Field field = ReflectionUtils.getFieldByNameIncludingSuperclasses( variable, object.getClass() );
@@ -697,21 +692,21 @@ public abstract class AbstractMojoTestCase
/**
* Convenience method to obtain all variables and values from the mojo (including its superclasses)
- *
+ * <p>
* Note: the values in the map are of type Object so the caller is responsible for casting to desired types.
*
* @param object
* @return map of variable names and values
*/
protected Map<String, Object> getVariablesAndValuesFromObject( Object object )
- throws IllegalAccessException
+ throws IllegalAccessException
{
return getVariablesAndValuesFromObject( object.getClass(), object );
}
/**
* Convenience method to obtain all variables and values from the mojo (including its superclasses)
- *
+ * <p>
* Note: the values in the map are of type Object so the caller is responsible for casting to desired types.
*
* @param clazz
@@ -719,7 +714,7 @@ public abstract class AbstractMojoTestCase
* @return map of variable names and values
*/
protected Map<String, Object> getVariablesAndValuesFromObject( Class<?> clazz, Object object )
- throws IllegalAccessException
+ throws IllegalAccessException
{
Map<String, Object> map = new HashMap<>();
@@ -751,7 +746,7 @@ public abstract class AbstractMojoTestCase
* @throws IllegalAccessException
*/
protected void setVariableValueToObject( Object object, String variable, Object value )
- throws IllegalAccessException
+ throws IllegalAccessException
{
Field field = ReflectionUtils.getFieldByNameIncludingSuperclasses( variable, object.getClass() );
@@ -762,7 +757,7 @@ public abstract class AbstractMojoTestCase
/**
* sometimes the parent element might contain the correct value so generalize that access
- *
+ * <p>
* TODO find out where this is probably done elsewhere
*
* @param pluginPomDom
@@ -771,7 +766,7 @@ public abstract class AbstractMojoTestCase
* @throws Exception
*/
private String resolveFromRootThenParent( Xpp3Dom pluginPomDom, String element )
- throws Exception
+ throws Exception
{
Xpp3Dom elementDom = pluginPomDom.getChild( element );
@@ -801,13 +796,13 @@ public abstract class AbstractMojoTestCase
/**
* We should make sure this is called in each method that makes use of the container,
* otherwise we throw ugly NPE's
- *
+ * <p>
* crops up when the subclassing code defines the setUp method but doesn't call super.setUp()
*
* @throws Exception
*/
private void validateContainerStatus()
- throws Exception
+ throws Exception
{
if ( getContainer() != null )
{
@@ -815,5 +810,5 @@ public abstract class AbstractMojoTestCase
}
throw new Exception( "container is null, make sure super.setUp() is called" );
- }
+ }
}
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 73bc8ee..b51e8f4 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
@@ -102,7 +102,7 @@ public class ArtifactStubFactory
* @see #createArtifact(String, String, String, String, String, String)
*/
public Artifact createArtifact( String groupId, String artifactId, String version )
- throws IOException
+ throws IOException
{
return createArtifact( groupId, artifactId, version, Artifact.SCOPE_COMPILE, "jar", "" );
}
@@ -117,7 +117,7 @@ public class ArtifactStubFactory
* @see #createArtifact(String, String, String, String, String, String)
*/
public Artifact createArtifact( String groupId, String artifactId, String version, String scope )
- throws IOException
+ throws IOException
{
return createArtifact( groupId, artifactId, version, scope, "jar", "" );
}
@@ -135,31 +135,31 @@ public class ArtifactStubFactory
*/
public Artifact createArtifact( String groupId, String artifactId, String version, String scope, String type,
String classifier )
- throws IOException
+ throws IOException
{
VersionRange vr = VersionRange.createFromVersion( version );
return createArtifact( groupId, artifactId, vr, scope, type, classifier, false );
}
/**
- * @param groupId not null
- * @param artifactId not null
+ * @param groupId not null
+ * @param artifactId not null
* @param versionRange not null
- * @param scope not null
- * @param type not null
+ * @param scope not null
+ * @param type not null
* @param classifier
- * @param optional not null
+ * @param optional not null
* @return a <code>DefaultArtifact</code> instance
* @throws IOException if any
*/
public Artifact createArtifact( String groupId, String artifactId, VersionRange versionRange, String scope,
String type, String classifier, boolean optional )
- throws IOException
+ throws IOException
{
ArtifactHandler ah = new DefaultArtifactHandlerStub( type, classifier );
Artifact artifact =
- new DefaultArtifact( groupId, artifactId, versionRange, scope, type, classifier, ah, optional );
+ new DefaultArtifact( groupId, artifactId, versionRange, scope, type, classifier, ah, optional );
// i have no idea why this needs to be done manually when isSnapshot is able to figure it out.
artifact.setRelease( !artifact.isSnapshot() );
@@ -174,12 +174,12 @@ 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
*/
public void setArtifactFile( Artifact artifact, File workingDir )
- throws IOException
+ throws IOException
{
setArtifactFile( artifact, workingDir, null, false );
}
@@ -188,13 +188,13 @@ public class ArtifactStubFactory
* Copyies the srcFile to the workingDir and then attaches it to the artifact. If srcFile is null, a new empty file
* will be created.
*
- * @param artifact to attach
+ * @param artifact to attach
* @param workingDir where to copy the srcFile.
- * @param srcFile file to be attached.
+ * @param srcFile file to be attached.
* @throws IOException
*/
public void setArtifactFile( Artifact artifact, File workingDir, File srcFile )
- throws IOException
+ throws IOException
{
setArtifactFile( artifact, workingDir, srcFile, false );
}
@@ -202,12 +202,12 @@ public class ArtifactStubFactory
/**
* Creates an unpackable file (zip,jar etc) containing an empty file.
*
- * @param artifact to attach
+ * @param artifact to attach
* @param workingDir where to create the file.
* @throws IOException
*/
public void setUnpackableArtifactFile( Artifact artifact, File workingDir )
- throws IOException
+ throws IOException
{
setArtifactFile( artifact, workingDir, null, true );
}
@@ -216,13 +216,13 @@ public class ArtifactStubFactory
* Creates an unpackable file (zip,jar etc) containing the srcFile. If srcFile is null, a new empty file will be
* created.
*
- * @param artifact to attach
+ * @param artifact to attach
* @param workingDir where to create the file.
* @param srcFile
* @throws IOException if any
*/
public void setUnpackableArtifactFile( Artifact artifact, File workingDir, File srcFile )
- throws IOException
+ throws IOException
{
setArtifactFile( artifact, workingDir, srcFile, true );
}
@@ -237,12 +237,12 @@ public class ArtifactStubFactory
* @throws IOException if any
*/
private void setArtifactFile( Artifact artifact, File workingDir, File srcFile, boolean createUnpackableFile )
- throws IOException
+ throws IOException
{
if ( workingDir == null )
{
throw new IllegalArgumentException(
- "The workingDir must be set." );
+ "The workingDir must be set." );
}
String fileName = getFormattedFileName( artifact, false );
@@ -284,18 +284,18 @@ public class ArtifactStubFactory
public static String getUnpackableFileName( Artifact artifact )
{
return "" + artifact.getGroupId() + "-" + artifact.getArtifactId() + "-" + artifact.getVersion() + "-"
- + artifact.getClassifier() + "-" + artifact.getType() + ".txt";
+ + artifact.getClassifier() + "-" + artifact.getType() + ".txt";
}
/**
* @param artifact
* @param destFile
* @throws NoSuchArchiverException
- * @throws ArchiverException if any
- * @throws IOException if any
+ * @throws ArchiverException if any
+ * @throws IOException if any
*/
public void createUnpackableFile( Artifact artifact, File destFile )
- throws NoSuchArchiverException, ArchiverException, IOException
+ throws NoSuchArchiverException, ArchiverException, IOException
{
Archiver archiver = archiverManager.getArchiver( destFile );
@@ -316,7 +316,7 @@ public class ArtifactStubFactory
WarArchiver war = (WarArchiver) archiver;
// the use of this is counter-intuitive:
// http://jira.codehaus.org/browse/PLX-286
- war.setIgnoreWebxml( false );
+ war.setExpectWebXml( false );
}
archiver.createArchive();
}
@@ -326,7 +326,7 @@ public class ArtifactStubFactory
* @throws IOException if any
*/
public Artifact getReleaseArtifact()
- throws IOException
+ throws IOException
{
return createArtifact( "testGroupId", "release", "1.0" );
}
@@ -336,7 +336,7 @@ public class ArtifactStubFactory
* @throws IOException if any
*/
public Artifact getSnapshotArtifact()
- throws IOException
+ throws IOException
{
return createArtifact( "testGroupId", "snapshot", "2.0-SNAPSHOT" );
}
@@ -349,7 +349,7 @@ public class ArtifactStubFactory
* @see #getSnapshotArtifact()
*/
public Set<Artifact> getReleaseAndSnapshotArtifacts()
- throws IOException
+ throws IOException
{
Set<Artifact> set = new HashSet<>();
set.add( getReleaseArtifact() );
@@ -363,7 +363,7 @@ public class ArtifactStubFactory
* @throws IOException if any
*/
public Set<Artifact> getScopedArtifacts()
- throws IOException
+ throws IOException
{
Set<Artifact> set = new HashSet<>();
set.add( createArtifact( "g", "compile", "1.0", Artifact.SCOPE_COMPILE ) );
@@ -380,7 +380,7 @@ public class ArtifactStubFactory
* @throws IOException if any
*/
public Set<Artifact> getTypedArtifacts()
- throws IOException
+ throws IOException
{
Set<Artifact> set = new HashSet<>();
set.add( createArtifact( "g", "a", "1.0", Artifact.SCOPE_COMPILE, "war", null ) );
@@ -397,7 +397,7 @@ public class ArtifactStubFactory
* @throws IOException if any
*/
public Set<Artifact> getClassifiedArtifacts()
- throws IOException
+ throws IOException
{
Set<Artifact> set = new HashSet<>();
set.add( createArtifact( "g", "a", "1.0", Artifact.SCOPE_COMPILE, "jar", "one" ) );
@@ -413,7 +413,7 @@ public class ArtifactStubFactory
* @throws IOException if any
*/
public Set<Artifact> getTypedArchiveArtifacts()
- throws IOException
+ throws IOException
{
Set<Artifact> set = new HashSet<>();
set.add( createArtifact( "g", "a", "1.0", Artifact.SCOPE_COMPILE, "war", null ) );
@@ -429,7 +429,7 @@ public class ArtifactStubFactory
* @throws IOException if any
*/
public Set<Artifact> getArtifactArtifacts()
- throws IOException
+ throws IOException
{
Set<Artifact> set = new HashSet<>();
set.add( createArtifact( "g", "one", "1.0", Artifact.SCOPE_COMPILE, "jar", "a" ) );
@@ -446,7 +446,7 @@ public class ArtifactStubFactory
* @throws IOException if any
*/
public Set<Artifact> getGroupIdArtifacts()
- throws IOException
+ throws IOException
{
Set<Artifact> set = new HashSet<>();
set.add( createArtifact( "one", "group-one", "1.0", Artifact.SCOPE_COMPILE, "jar", "a" ) );
@@ -464,7 +464,7 @@ public class ArtifactStubFactory
* @see #getReleaseAndSnapshotArtifacts()
*/
public Set<Artifact> getMixedArtifacts()
- throws IOException
+ throws IOException
{
Set<Artifact> set = new HashSet<>();
set.addAll( getTypedArtifacts() );
@@ -530,7 +530,7 @@ public class ArtifactStubFactory
* @throws IllegalAccessException
*/
public static void setVariableValueToObject( Object object, String variable, Object value )
- throws IllegalAccessException
+ throws IllegalAccessException
{
Field field = ReflectionUtils.getFieldByNameIncludingSuperclasses( variable, object.getClass() );
@@ -543,7 +543,7 @@ 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 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]
*/
@@ -578,7 +578,7 @@ public class ArtifactStubFactory
}
destFileName = artifact.getArtifactId() + versionString + classifierString + "."
- + artifact.getArtifactHandler().getExtension();
+ + artifact.getArtifactHandler().getExtension();
}
return destFileName;
}
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 6b9c11f..da9dec8 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
@@ -25,9 +25,11 @@ package org.apache.maven.plugin.testing;
* @author jesse
*/
public class ConfigurationException
- extends Exception
+ extends Exception
{
- /** serialVersionUID */
+ /**
+ * serialVersionUID
+ */
static final long serialVersionUID = -6180939638742159065L;
/**
@@ -48,7 +50,7 @@ public class ConfigurationException
/**
* @param message The detailed message.
- * @param cause The detailed cause.
+ * @param cause The detailed cause.
*/
public ConfigurationException( String message, Throwable cause )
{
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 2ac2e14..4b268da 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
@@ -23,7 +23,7 @@ import org.codehaus.plexus.util.xml.Xpp3Dom;
/**
* Static helpers to create and manipulate mojo execution configuration parameters
- *
+ *
* @since 3.2.0
*/
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 c54ba97..10caf40 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
@@ -48,7 +48,7 @@ import org.junit.runner.Description;
import org.junit.runners.model.Statement;
/**
- * {@link TestRule} for usage with Junit-4.10ff. This is just a wrapper for an embedded
+ * {@link TestRule} for usage with Junit-4.10ff. This is just a wrapper for an embedded
* {@link AbstractMojoTestCase}, so all <code>protected</code> methods of the TestCase are
* exhibited as <code>public</code> in the rule. You may annotate single tests methods with
* {@link WithoutMojo} to prevent the rule from firing.
@@ -57,11 +57,11 @@ import org.junit.runners.model.Statement;
* @since 2.2
*/
public class MojoRule
- implements TestRule
+ implements TestRule
{
private final AbstractMojoTestCase testCase;
-
- public MojoRule()
+
+ public MojoRule()
{
this( new AbstractMojoTestCase()
{
@@ -74,26 +74,26 @@ public class MojoRule
}
/**
- * May be overridden in the implementation to do stuff <em>after</em> the embedded test case
+ * May be overridden in the implementation to do stuff <em>after</em> the embedded test case
* is set up but <em>before</em> the current test is actually run.
*
* @throws Throwable
*/
protected void before() throws Throwable
{
-
+
}
-
+
/**
* May be overridden in the implementation to do stuff after the current test was run.
*/
- protected void after()
+ protected void after()
{
-
+
}
public InputStream getPublicDescriptorStream()
- throws Exception
+ throws Exception
{
return testCase.getPublicDescriptorStream();
}
@@ -117,12 +117,12 @@ public class MojoRule
{
return testCase.setupContainerConfiguration();
}
-
+
public PlexusContainer getContainer()
{
return testCase.getContainer();
- }
-
+ }
+
/**
* Lookup the mojo leveraging the subproject pom
*
@@ -132,7 +132,7 @@ public class MojoRule
* @throws Exception
*/
public Mojo lookupMojo( String goal, String pluginPom )
- throws Exception
+ throws Exception
{
return testCase.lookupMojo( goal, pluginPom );
}
@@ -146,7 +146,7 @@ public class MojoRule
* @throws Exception
*/
public Mojo lookupEmptyMojo( String goal, String pluginPom )
- throws Exception
+ throws Exception
{
return testCase.lookupEmptyMojo( goal, new File( pluginPom ) );
}
@@ -160,7 +160,7 @@ public class MojoRule
* @throws Exception
*/
public Mojo lookupMojo( String goal, File pom )
- throws Exception
+ throws Exception
{
return testCase.lookupMojo( goal, pom );
}
@@ -174,26 +174,26 @@ public class MojoRule
* @throws Exception
*/
public Mojo lookupEmptyMojo( String goal, File pom )
- throws Exception
+ throws Exception
{
return testCase.lookupEmptyMojo( goal, pom );
}
public Mojo lookupMojo( String groupId, String artifactId, String version, String goal,
- PlexusConfiguration pluginConfiguration )
- throws Exception
+ PlexusConfiguration pluginConfiguration )
+ throws Exception
{
return testCase.lookupMojo( groupId, artifactId, version, goal, pluginConfiguration );
}
public Mojo lookupConfiguredMojo( MavenProject project, String goal )
- throws Exception
+ throws Exception
{
return testCase.lookupConfiguredMojo( project, goal );
}
public Mojo lookupConfiguredMojo( MavenSession session, MojoExecution execution )
- throws Exception, ComponentConfigurationException
+ throws Exception, ComponentConfigurationException
{
return testCase.lookupConfiguredMojo( session, execution );
}
@@ -209,32 +209,32 @@ public class MojoRule
}
public PlexusConfiguration extractPluginConfiguration( String artifactId, File pom )
- throws Exception
+ throws Exception
{
return testCase.extractPluginConfiguration( artifactId, pom );
}
public PlexusConfiguration extractPluginConfiguration( String artifactId, Xpp3Dom pomDom )
- throws Exception
+ throws Exception
{
return testCase.extractPluginConfiguration( artifactId, pomDom );
}
public Mojo configureMojo( Mojo mojo, String artifactId, File pom )
- throws Exception
+ throws Exception
{
return testCase.configureMojo( mojo, artifactId, pom );
}
public Mojo configureMojo( Mojo mojo, PlexusConfiguration pluginConfiguration )
- throws Exception
+ throws Exception
{
return testCase.configureMojo( mojo, pluginConfiguration );
}
/**
* Convenience method to obtain the value of a variable on a mojo that might not have a getter.
- *
+ * <p>
* NOTE: the caller is responsible for casting to to what the desired type is.
*
* @param object
@@ -243,28 +243,28 @@ public class MojoRule
* @throws IllegalArgumentException
*/
public Object getVariableValueFromObject( Object object, String variable )
- throws IllegalAccessException
+ throws IllegalAccessException
{
return testCase.getVariableValueFromObject( object, variable );
}
/**
* Convenience method to obtain all variables and values from the mojo (including its superclasses)
- *
+ * <p>
* Note: the values in the map are of type Object so the caller is responsible for casting to desired types.
*
* @param object
* @return map of variable names and values
*/
public Map<String, Object> getVariablesAndValuesFromObject( Object object )
- throws IllegalAccessException
+ throws IllegalAccessException
{
return testCase.getVariablesAndValuesFromObject( object );
}
/**
* Convenience method to obtain all variables and values from the mojo (including its superclasses)
- *
+ * <p>
* Note: the values in the map are of type Object so the caller is responsible for casting to desired types.
*
* @param clazz
@@ -272,7 +272,7 @@ public class MojoRule
* @return map of variable names and values
*/
public Map<String, Object> getVariablesAndValuesFromObject( Class<?> clazz, Object object )
- throws IllegalAccessException
+ throws IllegalAccessException
{
return testCase.getVariablesAndValuesFromObject( clazz, object );
}
@@ -286,7 +286,7 @@ public class MojoRule
* @throws IllegalAccessException
*/
public void setVariableValueToObject( Object object, String variable, Object value )
- throws IllegalAccessException
+ throws IllegalAccessException
{
testCase.setVariableValueToObject( object, variable, value );
}
@@ -302,7 +302,7 @@ public class MojoRule
{
@Override
public void evaluate()
- throws Throwable
+ throws Throwable
{
testCase.setUp();
before();
@@ -322,7 +322,7 @@ public class MojoRule
* @since 3.1.0
*/
public MavenProject readMavenProject( File basedir )
- throws Exception
+ throws Exception
{
File pom = new File( basedir, "pom.xml" );
MavenExecutionRequest request = new DefaultMavenExecutionRequest();
@@ -338,7 +338,7 @@ public class MojoRule
* @since 3.1.0
*/
public void executeMojo( File basedir, String goal )
- throws Exception
+ throws Exception
{
MavenProject project = readMavenProject( basedir );
MavenSession session = newMavenSession( project );
@@ -350,7 +350,7 @@ public class MojoRule
* @since 3.1.0
*/
public Mojo lookupConfiguredMojo( File basedir, String goal )
- throws Exception, ComponentConfigurationException
+ throws Exception, ComponentConfigurationException
{
MavenProject project = readMavenProject( basedir );
MavenSession session = newMavenSession( project );
@@ -362,7 +362,7 @@ public class MojoRule
* @since 3.1.0
*/
public final <T> T lookup( final Class<T> role )
- throws ComponentLookupException
+ throws ComponentLookupException
{
return getContainer().lookup( role );
}
@@ -371,7 +371,7 @@ public class MojoRule
* @since 3.2.0
*/
public void executeMojo( MavenProject project, String goal, Xpp3Dom... parameters )
- throws Exception
+ throws Exception
{
MavenSession session = newMavenSession( project );
executeMojo( session, project, goal, parameters );
@@ -381,7 +381,7 @@ public class MojoRule
* @since 3.2.0
*/
public void executeMojo( MavenSession session, MavenProject project, String goal, Xpp3Dom... parameters )
- throws Exception
+ throws Exception
{
MojoExecution execution = newMojoExecution( goal );
if ( parameters != null )
@@ -399,7 +399,7 @@ public class MojoRule
* @since 3.2.0
*/
public void executeMojo( MavenSession session, MavenProject project, MojoExecution execution )
- throws Exception
+ throws Exception
{
SessionScope sessionScope = lookup( SessionScope.class );
try
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 5192d4b..fb6fca9 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
@@ -21,11 +21,11 @@ package org.apache.maven.plugin.testing;
import java.io.File;
+import org.apache.maven.artifact.repository.DefaultArtifactRepository;
+import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
import org.codehaus.plexus.PlexusTestCase;
import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluationException;
import org.codehaus.plexus.component.configurator.expression.ExpressionEvaluator;
-import org.apache.maven.artifact.repository.DefaultArtifactRepository;
-import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
/**
* Stub for {@link ExpressionEvaluator}
@@ -33,12 +33,14 @@ import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
* @author jesse
*/
public class ResolverExpressionEvaluatorStub
- implements ExpressionEvaluator
+ implements ExpressionEvaluator
{
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
@Override
public Object evaluate( String expr )
- throws ExpressionEvaluationException
+ throws ExpressionEvaluationException
{
Object value = null;
@@ -75,7 +77,7 @@ public class ResolverExpressionEvaluatorStub
}
// Was not an expression
- if ( expression.indexOf( "$$" ) > -1 )
+ if ( expression.contains( "$$" ) )
{
return expression.replaceAll( "\\$\\$", "\\$" );
}
@@ -103,7 +105,7 @@ public class ResolverExpressionEvaluatorStub
{
File localRepo = new File( PlexusTestCase.getBasedir(), "target/local-repo" );
return new DefaultArtifactRepository( "localRepository", "file://" + localRepo.getAbsolutePath(),
- new DefaultRepositoryLayout() );
+ new DefaultRepositoryLayout() );
}
else
{
@@ -121,7 +123,9 @@ public class ResolverExpressionEvaluatorStub
return expr;
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
@Override
public File alignToBaseDirectory( File file )
{
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/SilentLog.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/SilentLog.java
index a44120a..b0702cf 100644
--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/SilentLog.java
+++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/SilentLog.java
@@ -29,7 +29,7 @@ import org.codehaus.plexus.logging.Logger;
* @author <a href="mailto:brianf@apache.org">Brian Fox</a>
*/
public class SilentLog
- implements Log, Logger
+ implements Log, Logger
{
/**
* @return <code>false</code>
@@ -359,6 +359,6 @@ public class SilentLog
public void setThreshold( int threshold )
{
// TODO Auto-generated method stub
-
+
}
}
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 afd0f34..39b47d0 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
@@ -19,15 +19,14 @@ package org.apache.maven.plugin.testing;
* under the License.
*/
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
+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
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 d28591e..03b975e 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
@@ -34,11 +34,11 @@ import org.junit.runner.Description;
/**
* Junit4 test {@link Rule} to extract and assert test resources.
- *
+ *
* @since 3.1.0
*/
public class TestResources
- extends TestWatcher
+ extends TestWatcher
{
private final String projectsDir;
@@ -76,12 +76,12 @@ public class TestResources
* TODO Provide alternative working directory naming for Windows, which still limits path names to ~250 charecters
*/
public File getBasedir( String project )
- throws IOException
+ throws IOException
{
if ( name == null )
{
throw new IllegalStateException( getClass().getSimpleName()
- + " must be a test class field annotated with org.junit.Rule" );
+ + " must be a test class field annotated with org.junit.Rule" );
}
File src = new File( projectsDir, project ).getCanonicalFile();
Assert.assertTrue( "Test project directory does not exist: " + src.getPath(), src.isDirectory() );
@@ -95,14 +95,14 @@ public class TestResources
// static helpers
public static void cp( File basedir, String from, String to )
- throws IOException
+ throws IOException
{
// TODO ensure destination lastModified timestamp changes
FileUtils.copyFile( new File( basedir, from ), new File( basedir, to ) );
}
public static void assertFileContents( File basedir, String expectedPath, String actualPath )
- throws IOException
+ throws IOException
{
String expected = FileUtils.fileRead( new File( basedir, expectedPath ) );
String actual = FileUtils.fileRead( new File( basedir, actualPath ) );
@@ -153,13 +153,13 @@ public class TestResources
}
public static void touch( File basedir, String path )
- throws InterruptedException
+ throws InterruptedException
{
touch( new File( basedir, path ) );
}
public static void touch( File file )
- throws InterruptedException
+ throws InterruptedException
{
if ( !file.isFile() )
{
@@ -185,7 +185,7 @@ public class TestResources
* @since 3.2.0
*/
public static void create( File basedir, String... paths )
- throws IOException
+ throws IOException
{
if ( paths == null || paths.length == 0 )
{
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 63f15c5..67aa1d7 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
@@ -38,7 +38,7 @@ import org.apache.maven.artifact.versioning.VersionRange;
* @author jesse
*/
public class ArtifactStub
- implements Artifact
+ implements Artifact
{
private String groupId;
@@ -67,42 +67,54 @@ public class ArtifactStub
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()
{
@@ -119,28 +131,36 @@ public class ArtifactStub
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 )
{
@@ -185,7 +205,7 @@ public class ArtifactStub
@Override
public String getDependencyConflictId()
{
- StringBuffer buffer = new StringBuffer();
+ StringBuilder buffer = new StringBuilder();
buffer.append( getGroupId() );
buffer.append( ":" ).append( getArtifactId() );
@@ -216,14 +236,18 @@ public class ArtifactStub
return null;
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
@Override
public void setRepository( ArtifactRepository artifactRepository )
{
this.artifactRepository = artifactRepository;
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
@Override
public ArtifactRepository getRepository()
{
@@ -233,7 +257,8 @@ public class ArtifactStub
/**
* By default, do nothing.
*
- * @see org.apache.maven.artifact.Artifact#updateVersion(java.lang.String, org.apache.maven.artifact.repository.ArtifactRepository)
+ * @see org.apache.maven.artifact.Artifact#updateVersion(java.lang.String,
+ * org.apache.maven.artifact.repository.ArtifactRepository)
*/
@Override
public void updateVersion( String string, ArtifactRepository artifactRepository )
@@ -314,7 +339,9 @@ public class ArtifactStub
// nop
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
@Override
public void setScope( String scope )
{
@@ -353,14 +380,18 @@ public class ArtifactStub
// nop
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
@Override
public void setGroupId( String groupId )
{
this.groupId = groupId;
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
@Override
public void setArtifactId( String artifactId )
{
@@ -375,7 +406,7 @@ public class ArtifactStub
public boolean isSnapshot()
{
return Artifact.VERSION_FILE_PATTERN.matcher( getVersion() ).matches()
- || getVersion().endsWith( Artifact.SNAPSHOT_VERSION );
+ || getVersion().endsWith( Artifact.SNAPSHOT_VERSION );
}
/**
@@ -490,7 +521,7 @@ public class ArtifactStub
*/
@Override
public ArtifactVersion getSelectedVersion()
- throws OverConstrainedVersionException
+ throws OverConstrainedVersionException
{
return null;
}
@@ -501,7 +532,7 @@ public class ArtifactStub
*/
@Override
public boolean isSelectedVersionKnown()
- throws OverConstrainedVersionException
+ throws OverConstrainedVersionException
{
return false;
}
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 926a9be..b15a90b 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
@@ -27,7 +27,7 @@ import org.apache.maven.artifact.handler.ArtifactHandler;
* @author <a href="mailto:brianf@apache.org">Brian Fox</a>
*/
public class DefaultArtifactHandlerStub
- implements ArtifactHandler
+ implements ArtifactHandler
{
private String extension;
@@ -68,7 +68,9 @@ public class DefaultArtifactHandlerStub
this.type = type;
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
@Override
public String getExtension()
{
@@ -87,14 +89,18 @@ public class DefaultArtifactHandlerStub
return type;
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
@Override
public String getClassifier()
{
return classifier;
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
@Override
public String getDirectory()
{
@@ -105,7 +111,9 @@ public class DefaultArtifactHandlerStub
return directory;
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
@Override
public String getPackaging()
{
@@ -116,14 +124,18 @@ public class DefaultArtifactHandlerStub
return packaging;
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
@Override
public boolean isIncludesDependencies()
{
return includesDependencies;
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
@Override
public String getLanguage()
{
@@ -135,7 +147,9 @@ public class DefaultArtifactHandlerStub
return language;
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
@Override
public boolean isAddedToClasspath()
{
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 aacb6e7..439e4f6 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
@@ -70,7 +70,7 @@ import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
* @author jesse
*/
public class MavenProjectStub
- extends MavenProject
+ extends MavenProject
{
private String groupId;
@@ -182,9 +182,9 @@ public class MavenProjectStub
/**
* 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
- * is resolved against the return value of {@link #getBasedir()}.
+ * is resolved against the return value of {@link #getBasedir()}.
*/
protected void readModel( File pomFile )
{
@@ -223,40 +223,50 @@ public class MavenProjectStub
*/
@Override
public String getModulePathAdjustment( MavenProject mavenProject )
- throws IOException
+ throws IOException
{
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 )
{
@@ -285,33 +295,36 @@ public class MavenProjectStub
return Collections.<ArtifactRepository>emptyList();
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
@Override
public boolean hasParent()
{
- if ( parent != null )
- {
- return true;
- }
-
- return false;
+ return parent != null;
}
- /** {@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()
{
@@ -351,7 +364,9 @@ public class MavenProjectStub
return null;
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
@Override
public void addCompileSourceRoot( String string )
{
@@ -365,7 +380,9 @@ public class MavenProjectStub
}
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
@Override
public void addScriptSourceRoot( String string )
{
@@ -379,7 +396,9 @@ public class MavenProjectStub
}
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
@Override
public void addTestCompileSourceRoot( String string )
{
@@ -393,31 +412,39 @@ public class MavenProjectStub
}
}
- /** {@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
+ throws DependencyResolutionRequiredException
{
return compileSourceRoots;
}
@@ -430,73 +457,93 @@ public class MavenProjectStub
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
+ 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
+ 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
+ throws DependencyResolutionRequiredException
{
return systemClasspathElements;
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
@Override
public List<Artifact> getSystemArtifacts()
{
@@ -676,21 +723,27 @@ public class MavenProjectStub
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()
{
@@ -708,98 +761,126 @@ public class MavenProjectStub
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()
{
@@ -883,14 +964,18 @@ public class MavenProjectStub
return null;
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
@Override
public void setDescription( String string )
{
this.description = string;
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
@Override
public String getDescription()
{
@@ -1040,14 +1125,18 @@ public class MavenProjectStub
// nop
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
@Override
public void setBuild( Build build )
{
this.build = build;
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
@Override
public Build getBuild()
{
@@ -1120,14 +1209,18 @@ public class MavenProjectStub
return null;
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
@Override
public void setLicenses( List<License> licenses )
{
this.licenses = licenses;
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
@Override
public List<License> getLicenses()
{
@@ -1372,28 +1465,36 @@ public class MavenProjectStub
// 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()
{
@@ -1422,21 +1523,27 @@ public class MavenProjectStub
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 )
{
@@ -1450,7 +1557,9 @@ public class MavenProjectStub
}
}
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
@Override
public List<Artifact> getAttachedArtifacts()
{
@@ -1460,7 +1569,8 @@ public class MavenProjectStub
/**
* By default, return <code>null</code>.
*
- * @see org.apache.maven.project.MavenProject#getGoalConfiguration(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
+ * @see org.apache.maven.project.MavenProject#getGoalConfiguration(java.lang.String, java.lang.String,
+ * java.lang.String, java.lang.String)
*/
@Override
public Xpp3Dom getGoalConfiguration( String string, String string1, String string2, String string3 )
@@ -1471,7 +1581,8 @@ public class MavenProjectStub
/**
* By default, return <code>null</code>.
*
- * @see org.apache.maven.project.MavenProject#getReportConfiguration(java.lang.String, java.lang.String, java.lang.String)
+ * @see org.apache.maven.project.MavenProject#getReportConfiguration(java.lang.String, java.lang.String,
+ * java.lang.String)
*/
@Override
public Xpp3Dom getReportConfiguration( String string, String string1, String string2 )
@@ -1508,7 +1619,7 @@ public class MavenProjectStub
*/
@Override
public void writeModel( Writer writer )
- throws IOException
+ throws IOException
{
// nop
}
@@ -1520,47 +1631,59 @@ public class MavenProjectStub
*/
@Override
public void writeOriginalModel( Writer writer )
- throws IOException
+ throws IOException
{
// 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()
{
@@ -1581,7 +1704,8 @@ public class MavenProjectStub
/**
* By default, return <code>Collections.EMPTY_SET</code>.
*
- * @see org.apache.maven.project.MavenProject#createArtifacts(org.apache.maven.artifact.factory.ArtifactFactory, java.lang.String, org.apache.maven.artifact.resolver.filter.ArtifactFilter)
+ * @see org.apache.maven.project.MavenProject#createArtifacts(org.apache.maven.artifact.factory.ArtifactFactory,
+ * java.lang.String, org.apache.maven.artifact.resolver.filter.ArtifactFilter)
*/
@Override
public Set<Artifact> createArtifacts( ArtifactFactory artifactFactory, String string,
@@ -1645,21 +1769,27 @@ public class MavenProjectStub
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()
{
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactCollector.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactCollector.java
index c8e7cbe..a5e32bd 100644
--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactCollector.java
+++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactCollector.java
@@ -38,7 +38,7 @@ import org.apache.maven.repository.legacy.resolver.conflict.ConflictResolver;
* @author <a href="mailto:brianf@apache.org">Brian Fox</a>
*/
public class StubArtifactCollector
- implements ArtifactCollector
+ implements ArtifactCollector
{
/**
* Default constructor
@@ -85,7 +85,7 @@ public class StubArtifactCollector
List<ArtifactRepository> remoteRepositories,
ArtifactMetadataSource source, ArtifactFilter filter,
List<ResolutionListener> listeners )
- throws ArtifactResolutionException
+ throws ArtifactResolutionException
{
return new ArtifactResolutionResult();
}
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 0d63904..57a8850 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
@@ -19,6 +19,10 @@ package org.apache.maven.plugin.testing.stubs;
* under the License.
*/
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.metadata.ArtifactMetadata;
import org.apache.maven.artifact.repository.ArtifactRepository;
@@ -27,15 +31,11 @@ import org.apache.maven.artifact.repository.Authentication;
import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
import org.apache.maven.repository.Proxy;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
/**
* @author <a href="mailto:brianf@apache.org">Brian Fox</a>
*/
public class StubArtifactRepository
- implements ArtifactRepository
+ implements ArtifactRepository
{
private String baseDir = null;
@@ -71,7 +71,8 @@ public class StubArtifactRepository
/**
* @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)
+ * @see org.apache.maven.artifact.repository.ArtifactRepository#pathOfLocalRepositoryMetadata(org.apache.maven.artifact.metadata.ArtifactMetadata,
+ * org.apache.maven.artifact.repository.ArtifactRepository)
*/
@Override
public String pathOfLocalRepositoryMetadata( ArtifactMetadata metadata, ArtifactRepository repository )
diff --git a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactResolver.java b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactResolver.java
index b9ea73a..7130613 100644
--- a/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactResolver.java
+++ b/maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/stubs/StubArtifactResolver.java
@@ -43,7 +43,7 @@ import org.apache.maven.wagon.events.TransferListener;
* @author <a href="mailto:brianf@apache.org">Brian Fox</a>
*/
public class StubArtifactResolver
- implements ArtifactResolver
+ implements ArtifactResolver
{
private boolean throwArtifactResolutionException;
@@ -59,7 +59,7 @@ public class StubArtifactResolver
* @param throwArtifactNotFoundException
*/
public StubArtifactResolver( ArtifactStubFactory factory, boolean throwArtifactResolutionException,
- boolean throwArtifactNotFoundException )
+ boolean throwArtifactNotFoundException )
{
this.throwArtifactNotFoundException = throwArtifactNotFoundException;
this.throwArtifactResolutionException = throwArtifactResolutionException;
@@ -69,12 +69,13 @@ public class StubArtifactResolver
/**
* Creates dummy file and sets it in the artifact to simulate resolution
*
- * @see org.apache.maven.artifact.resolver.ArtifactResolver#resolve(org.apache.maven.artifact.Artifact, java.util.List, org.apache.maven.artifact.repository.ArtifactRepository)
+ * @see org.apache.maven.artifact.resolver.ArtifactResolver#resolve(org.apache.maven.artifact.Artifact,
+ * java.util.List, org.apache.maven.artifact.repository.ArtifactRepository)
*/
@Override
public void resolve( Artifact artifact, List<ArtifactRepository> remoteRepositories,
ArtifactRepository localRepository )
- throws ArtifactResolutionException, ArtifactNotFoundException
+ throws ArtifactResolutionException, ArtifactNotFoundException
{
if ( !this.throwArtifactNotFoundException && !this.throwArtifactResolutionException )
{
@@ -103,21 +104,25 @@ public class StubArtifactResolver
/**
* @return <code>null</code>.
- * @see org.apache.maven.artifact.resolver.ArtifactResolver#resolveTransitively(java.util.Set, org.apache.maven.artifact.Artifact, java.util.List, org.apache.maven.artifact.repository.ArtifactRepository, org.apache.maven.artifact.metadata.ArtifactMetadataSource)
+ * @see org.apache.maven.artifact.resolver.ArtifactResolver#resolveTransitively(java.util.Set,
+ * org.apache.maven.artifact.Artifact, java.util.List, org.apache.maven.artifact.repository.ArtifactRepository,
+ * org.apache.maven.artifact.metadata.ArtifactMetadataSource)
*/
@Override
public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact,
List<ArtifactRepository> remoteRepositories,
ArtifactRepository localRepository,
ArtifactMetadataSource source )
- throws ArtifactResolutionException, ArtifactNotFoundException
+ throws ArtifactResolutionException, ArtifactNotFoundException
{
return null;
}
/**
* @return <code>null</code>.
- * @see org.apache.maven.artifact.resolver.ArtifactResolver#resolveTransitively(java.util.Set, org.apache.maven.artifact.Artifact, java.util.List, org.apache.maven.artifact.repository.ArtifactRepository, org.apache.maven.artifact.metadata.ArtifactMetadataSource, java.util.List)
+ * @see org.apache.maven.artifact.resolver.ArtifactResolver#resolveTransitively(java.util.Set,
+ * org.apache.maven.artifact.Artifact, java.util.List, org.apache.maven.artifact.repository.ArtifactRepository,
+ * org.apache.maven.artifact.metadata.ArtifactMetadataSource, java.util.List)
*/
@Override
public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact,
@@ -125,56 +130,67 @@ public class StubArtifactResolver
ArtifactRepository localRepository,
ArtifactMetadataSource source,
List<ResolutionListener> listeners )
- throws ArtifactResolutionException, ArtifactNotFoundException
+ throws ArtifactResolutionException, ArtifactNotFoundException
{
return null;
}
/**
* @return <code>null</code>.
- * @see org.apache.maven.artifact.resolver.ArtifactResolver#resolveTransitively(java.util.Set, org.apache.maven.artifact.Artifact, org.apache.maven.artifact.repository.ArtifactRepository, java.util.List, org.apache.maven.artifact.metadata.ArtifactMetadataSource, org.apache.maven.artifact.resolver.filter.ArtifactFilter)
+ * @see org.apache.maven.artifact.resolver.ArtifactResolver#resolveTransitively(java.util.Set,
+ * org.apache.maven.artifact.Artifact, org.apache.maven.artifact.repository.ArtifactRepository, java.util.List,
+ * org.apache.maven.artifact.metadata.ArtifactMetadataSource,
+ * org.apache.maven.artifact.resolver.filter.ArtifactFilter)
*/
@Override
public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact,
ArtifactRepository localRepository,
List<ArtifactRepository> remoteRepositories,
ArtifactMetadataSource source, ArtifactFilter filter )
- throws ArtifactResolutionException, ArtifactNotFoundException
+ throws ArtifactResolutionException, ArtifactNotFoundException
{
return null;
}
/**
* @return <code>null</code>.
- * @see org.apache.maven.artifact.resolver.ArtifactResolver#resolveTransitively(java.util.Set, org.apache.maven.artifact.Artifact, java.util.Map, org.apache.maven.artifact.repository.ArtifactRepository, java.util.List, org.apache.maven.artifact.metadata.ArtifactMetadataSource)
+ * @see org.apache.maven.artifact.resolver.ArtifactResolver#resolveTransitively(java.util.Set,
+ * org.apache.maven.artifact.Artifact, java.util.Map, org.apache.maven.artifact.repository.ArtifactRepository,
+ * java.util.List, org.apache.maven.artifact.metadata.ArtifactMetadataSource)
*/
@Override
public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact,
Map managedVersions, ArtifactRepository localRepository,
List<ArtifactRepository> remoteRepositories,
ArtifactMetadataSource source )
- throws ArtifactResolutionException, ArtifactNotFoundException
+ throws ArtifactResolutionException, ArtifactNotFoundException
{
return null;
}
/**
* @return <code>null</code>.
- * @see org.apache.maven.artifact.resolver.ArtifactResolver#resolveTransitively(java.util.Set, org.apache.maven.artifact.Artifact, java.util.Map, org.apache.maven.artifact.repository.ArtifactRepository, java.util.List, org.apache.maven.artifact.metadata.ArtifactMetadataSource, org.apache.maven.artifact.resolver.filter.ArtifactFilter)
+ * @see org.apache.maven.artifact.resolver.ArtifactResolver#resolveTransitively(java.util.Set,
+ * org.apache.maven.artifact.Artifact, java.util.Map, org.apache.maven.artifact.repository.ArtifactRepository,
+ * java.util.List, org.apache.maven.artifact.metadata.ArtifactMetadataSource,
+ * org.apache.maven.artifact.resolver.filter.ArtifactFilter)
*/
@Override
public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact,
Map managedVersions, ArtifactRepository localRepository,
List<ArtifactRepository> remoteRepositories,
ArtifactMetadataSource source, ArtifactFilter filter )
- throws ArtifactResolutionException, ArtifactNotFoundException
+ throws ArtifactResolutionException, ArtifactNotFoundException
{
return null;
}
/**
* @return <code>null</code>.
- * @see org.apache.maven.artifact.resolver.ArtifactResolver#resolveTransitively(java.util.Set, org.apache.maven.artifact.Artifact, java.util.Map, org.apache.maven.artifact.repository.ArtifactRepository, java.util.List, org.apache.maven.artifact.metadata.ArtifactMetadataSource, org.apache.maven.artifact.resolver.filter.ArtifactFilter, java.util.List)
+ * @see org.apache.maven.artifact.resolver.ArtifactResolver#resolveTransitively(java.util.Set,
+ * org.apache.maven.artifact.Artifact, java.util.Map, org.apache.maven.artifact.repository.ArtifactRepository,
+ * java.util.List, org.apache.maven.artifact.metadata.ArtifactMetadataSource,
+ * org.apache.maven.artifact.resolver.filter.ArtifactFilter, java.util.List)
*/
@Override
public ArtifactResolutionResult resolveTransitively( Set<Artifact> artifacts, Artifact originatingArtifact,
@@ -182,7 +198,7 @@ public class StubArtifactResolver
List<ArtifactRepository> remoteRepositories,
ArtifactMetadataSource source, ArtifactFilter filter,
List<ResolutionListener> listeners )
- throws ArtifactResolutionException, ArtifactNotFoundException
+ throws ArtifactResolutionException, ArtifactNotFoundException
{
return null;
}
@@ -190,12 +206,13 @@ public class StubArtifactResolver
/**
* By default, do nothing.
*
- * @see org.apache.maven.artifact.resolver.ArtifactResolver#resolveAlways(org.apache.maven.artifact.Artifact, java.util.List, org.apache.maven.artifact.repository.ArtifactRepository)
+ * @see org.apache.maven.artifact.resolver.ArtifactResolver#resolveAlways(org.apache.maven.artifact.Artifact,
+ * java.util.List, org.apache.maven.artifact.repository.ArtifactRepository)
*/
@Override
public void resolveAlways( Artifact artifact, List<ArtifactRepository> remoteRepositories,
ArtifactRepository localRepository )
- throws ArtifactResolutionException, ArtifactNotFoundException
+ throws ArtifactResolutionException, ArtifactNotFoundException
{
// nop
}
@@ -203,12 +220,12 @@ public class StubArtifactResolver
@Override
public void resolve( Artifact artifact, List<ArtifactRepository> remoteRepositories,
ArtifactRepository localRepository, TransferListener downloadMonitor )
- throws ArtifactResolutionException, ArtifactNotFoundException
+ throws ArtifactResolutionException, ArtifactNotFoundException
{
// TODO Auto-generated method stub
-
+
}
-
+
public ArtifactResolutionResult collect( ArtifactResolutionRequest request )
{
return null;
diff --git a/maven-plugin-testing-harness/src/site/site.xml b/maven-plugin-testing-harness/src/site/site.xml
index 479f0ce..2f5e0ee 100644
--- a/maven-plugin-testing-harness/src/site/site.xml
+++ b/maven-plugin-testing-harness/src/site/site.xml
@@ -20,22 +20,22 @@ under the License.
-->
<project xmlns="http://maven.apache.org/DECORATION/1.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 http://maven.apache.org/xsd/decoration-1.0.0.xsd">
- <body>
- <menu name="Overview">
- <item name="Introduction" href="index.html"/>
- <item name="Getting Started" href="/getting-started/index.html"/>
- <item name="JavaDocs" href="apidocs/index.html"/>
- <item name="Source Xref" href="xref/index.html"/>
- <item name="FAQ" href="/faq.html"/>
- </menu>
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 http://maven.apache.org/xsd/decoration-1.0.0.xsd">
+ <body>
+ <menu name="Overview">
+ <item name="Introduction" href="index.html"/>
+ <item name="Getting Started" href="/getting-started/index.html"/>
+ <item name="JavaDocs" href="apidocs/index.html"/>
+ <item name="Source Xref" href="xref/index.html"/>
+ <item name="FAQ" href="/faq.html"/>
+ </menu>
- <menu name="Examples">
- <item name="Testing Complex Mojo Parameters" href="/examples/complex-mojo-parameters.html"/>
- <item name="Testing Multiproject" href="/examples/multiproject.html"/>
- <item name="Testing Repositories" href="/examples/repositories.html"/>
- <item name="Testing Project Artifact" href="/examples/artifact.html"/>
- </menu>
- </body>
+ <menu name="Examples">
+ <item name="Testing Complex Mojo Parameters" href="/examples/complex-mojo-parameters.html"/>
+ <item name="Testing Multiproject" href="/examples/multiproject.html"/>
+ <item name="Testing Repositories" href="/examples/repositories.html"/>
+ <item name="Testing Project Artifact" href="/examples/artifact.html"/>
+ </menu>
+ </body>
</project>
diff --git a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ArtifactStubFactoryTest.java b/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ArtifactStubFactoryTest.java
index 75d7836..fdce15b 100644
--- a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ArtifactStubFactoryTest.java
+++ b/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ArtifactStubFactoryTest.java
@@ -24,20 +24,20 @@ import java.io.IOException;
import junit.framework.TestCase;
public class ArtifactStubFactoryTest
- extends TestCase
+ extends TestCase
{
public void testVersionChecks() throws IOException
{
ArtifactStubFactory factory = new ArtifactStubFactory();
- assertTrue(factory.getReleaseArtifact().isRelease());
- assertFalse(factory.getReleaseArtifact().isSnapshot());
- assertTrue(factory.getSnapshotArtifact().isSnapshot());
- assertFalse(factory.getSnapshotArtifact().isRelease());
+ assertTrue( factory.getReleaseArtifact().isRelease() );
+ assertFalse( factory.getReleaseArtifact().isSnapshot() );
+ assertTrue( factory.getSnapshotArtifact().isSnapshot() );
+ assertFalse( factory.getSnapshotArtifact().isRelease() );
}
public void testCreateFiles() throws IOException
{
ArtifactStubFactory factory = new ArtifactStubFactory();
- assertFalse(factory.isCreateFiles());
+ assertFalse( factory.isCreateFiles() );
}
}
diff --git a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ExpressionEvaluatorMojo.java b/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ExpressionEvaluatorMojo.java
index 2d4faa0..563dd34 100644
--- a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ExpressionEvaluatorMojo.java
+++ b/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ExpressionEvaluatorMojo.java
@@ -29,7 +29,7 @@ import org.codehaus.plexus.util.StringUtils;
* @author Edwin Punzalan
*/
public class ExpressionEvaluatorMojo
- extends AbstractMojo
+ extends AbstractMojo
{
private String basedir;
@@ -37,10 +37,12 @@ public class ExpressionEvaluatorMojo
private String workdir;
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
@Override
public void execute()
- throws MojoExecutionException, MojoFailureException
+ throws MojoExecutionException, MojoFailureException
{
if ( StringUtils.isEmpty( basedir ) )
{
diff --git a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ExpressionEvaluatorTest.java b/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ExpressionEvaluatorTest.java
index 3939bd2..bf97d72 100644
--- a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ExpressionEvaluatorTest.java
+++ b/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ExpressionEvaluatorTest.java
@@ -19,31 +19,33 @@ package org.apache.maven.plugin.testing;
* under the License.
*/
+import java.io.StringReader;
+
import org.apache.maven.plugin.MojoExecutionException;
import org.codehaus.plexus.configuration.PlexusConfiguration;
import org.codehaus.plexus.util.xml.Xpp3Dom;
import org.codehaus.plexus.util.xml.Xpp3DomBuilder;
-import java.io.StringReader;
-
/**
* @author Edwin Punzalan
*/
public class ExpressionEvaluatorTest
- extends AbstractMojoTestCase
+ extends AbstractMojoTestCase
{
private Xpp3Dom pomDom;
private PlexusConfiguration pluginConfiguration;
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
@Override
protected void setUp()
- throws Exception
+ throws Exception
{
super.setUp();
- StringBuffer pom = new StringBuffer();
+ StringBuilder pom = new StringBuilder();
pom.append( "<project>" ).append( "\n" );
pom.append( " <build>" ).append( "\n" );
@@ -69,7 +71,7 @@ public class ExpressionEvaluatorTest
* @throws Exception if any
*/
public void testInjection()
- throws Exception
+ throws Exception
{
ExpressionEvaluatorMojo mojo = new ExpressionEvaluatorMojo();
diff --git a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/MojoRuleTest.java b/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/MojoRuleTest.java
index d5f3075..509c078 100644
--- a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/MojoRuleTest.java
+++ b/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/MojoRuleTest.java
@@ -19,62 +19,67 @@ package org.apache.maven.plugin.testing;
* under the License.
*/
-import org.codehaus.plexus.configuration.PlexusConfiguration;
-import org.codehaus.plexus.util.xml.Xpp3Dom;
-import org.codehaus.plexus.util.xml.Xpp3DomBuilder;
-
import java.io.StringReader;
import java.util.Map;
-import org.junit.Rule;
-import static org.junit.Assert.*;
+import org.codehaus.plexus.configuration.PlexusConfiguration;
+import org.codehaus.plexus.util.xml.Xpp3Dom;
+import org.codehaus.plexus.util.xml.Xpp3DomBuilder;
import org.junit.Before;
+import org.junit.Rule;
import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
/**
* @author Mirko Friedenhagen
*/
public class MojoRuleTest
-
+
{
private boolean beforeWasCalled = false;
@Rule
- public MojoRule rule = new MojoRule() {
+ public MojoRule rule = new MojoRule()
+ {
@Override
- protected void before() throws Throwable
+ protected void before() throws Throwable
{
beforeWasCalled = true;
- }
+ }
};
-
+
private String pom;
private Xpp3Dom pomDom;
private PlexusConfiguration pluginConfiguration;
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
@Before
public void setUp()
- throws Exception
+ throws Exception
{
pom =
- "<project>" +
- "<build>" +
- "<plugins>" +
- "<plugin>" +
- "<artifactId>maven-simple-plugin</artifactId>" +
- "<configuration>" +
- "<keyOne>valueOne</keyOne>" +
- "<keyTwo>valueTwo</keyTwo>" +
- "</configuration>" +
- "</plugin>" +
- "</plugins>" +
- "</build>" +
- "</project>";
+ "<project>" +
+ "<build>" +
+ "<plugins>" +
+ "<plugin>" +
+ "<artifactId>maven-simple-plugin</artifactId>" +
+ "<configuration>" +
+ "<keyOne>valueOne</keyOne>" +
+ "<keyTwo>valueTwo</keyTwo>" +
+ "</configuration>" +
+ "</plugin>" +
+ "</plugins>" +
+ "</build>" +
+ "</project>";
pomDom = Xpp3DomBuilder.build( new StringReader( pom ) );
@@ -86,7 +91,7 @@ public class MojoRuleTest
*/
@Test
public void testPluginConfigurationExtraction()
- throws Exception
+ throws Exception
{
assertEquals( "valueOne", pluginConfiguration.getChild( "keyOne" ).getValue() );
@@ -98,7 +103,7 @@ public class MojoRuleTest
*/
@Test
public void testMojoConfiguration()
- throws Exception
+ throws Exception
{
SimpleMojo mojo = new SimpleMojo();
@@ -114,7 +119,7 @@ public class MojoRuleTest
*/
@Test
public void testVariableAccessWithoutGetter()
- throws Exception
+ throws Exception
{
SimpleMojo mojo = new SimpleMojo();
@@ -128,10 +133,10 @@ public class MojoRuleTest
/**
* @throws Exception if any
*/
- @Test
- public void testVariableAccessWithoutGetter2()
- throws Exception
- {
+ @Test
+ public void testVariableAccessWithoutGetter2()
+ throws Exception
+ {
SimpleMojo mojo = new SimpleMojo();
mojo = (SimpleMojo) rule.configureMojo( mojo, pluginConfiguration );
@@ -148,7 +153,7 @@ public class MojoRuleTest
*/
@Test
public void testSettingMojoVariables()
- throws Exception
+ throws Exception
{
SimpleMojo mojo = new SimpleMojo();
@@ -163,14 +168,14 @@ public class MojoRuleTest
@Test
@WithoutMojo
public void testNoRuleWrapper()
- throws Exception
+ throws Exception
{
assertFalse( "before executed although WithMojo annotation was added", beforeWasCalled );
}
- @Test
+ @Test
public void testWithRuleWrapper()
- throws Exception
+ throws Exception
{
assertTrue( "before executed because WithMojo annotation was not added", beforeWasCalled );
}
diff --git a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/MojoTestCaseTest.java b/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/MojoTestCaseTest.java
index c0364f3..c947f26 100644
--- a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/MojoTestCaseTest.java
+++ b/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/MojoTestCaseTest.java
@@ -19,18 +19,18 @@ package org.apache.maven.plugin.testing;
* under the License.
*/
+import java.io.StringReader;
+import java.util.Map;
+
import org.codehaus.plexus.configuration.PlexusConfiguration;
import org.codehaus.plexus.util.xml.Xpp3Dom;
import org.codehaus.plexus.util.xml.Xpp3DomBuilder;
-import java.io.StringReader;
-import java.util.Map;
-
/**
* @author Jason van Zyl
*/
public class MojoTestCaseTest
- extends AbstractMojoTestCase
+ extends AbstractMojoTestCase
{
private String pom;
@@ -38,27 +38,29 @@ public class MojoTestCaseTest
private PlexusConfiguration pluginConfiguration;
- /** {@inheritDoc} */
+ /**
+ * {@inheritDoc}
+ */
@Override
protected void setUp()
- throws Exception
+ throws Exception
{
super.setUp();
pom =
- "<project>" +
- "<build>" +
- "<plugins>" +
- "<plugin>" +
- "<artifactId>maven-simple-plugin</artifactId>" +
- "<configuration>" +
- "<keyOne>valueOne</keyOne>" +
- "<keyTwo>valueTwo</keyTwo>" +
- "</configuration>" +
- "</plugin>" +
- "</plugins>" +
- "</build>" +
- "</project>";
+ "<project>" +
+ "<build>" +
+ "<plugins>" +
+ "<plugin>" +
+ "<artifactId>maven-simple-plugin</artifactId>" +
+ "<configuration>" +
+ "<keyOne>valueOne</keyOne>" +
+ "<keyTwo>valueTwo</keyTwo>" +
+ "</configuration>" +
+ "</plugin>" +
+ "</plugins>" +
+ "</build>" +
+ "</project>";
pomDom = Xpp3DomBuilder.build( new StringReader( pom ) );
@@ -69,7 +71,7 @@ public class MojoTestCaseTest
* @throws Exception if any
*/
public void testPluginConfigurationExtraction()
- throws Exception
+ throws Exception
{
assertEquals( "valueOne", pluginConfiguration.getChild( "keyOne" ).getValue() );
@@ -80,7 +82,7 @@ public class MojoTestCaseTest
* @throws Exception if any
*/
public void testMojoConfiguration()
- throws Exception
+ throws Exception
{
SimpleMojo mojo = new SimpleMojo();
@@ -95,22 +97,22 @@ public class MojoTestCaseTest
* @throws Exception if any
*/
public void testVariableAccessWithoutGetter()
- throws Exception
+ throws Exception
{
SimpleMojo mojo = new SimpleMojo();
mojo = (SimpleMojo) configureMojo( mojo, pluginConfiguration );
- assertEquals( "valueOne", (String)getVariableValueFromObject( mojo, "keyOne" ) );
+ assertEquals( "valueOne", (String) getVariableValueFromObject( mojo, "keyOne" ) );
- assertEquals( "valueTwo", (String)getVariableValueFromObject( mojo, "keyTwo" ) );
+ assertEquals( "valueTwo", (String) getVariableValueFromObject( mojo, "keyTwo" ) );
}
/**
* @throws Exception if any
*/
- public void testVariableAccessWithoutGetter2()
- throws Exception
+ public void testVariableAccessWithoutGetter2()
+ throws Exception
{
SimpleMojo mojo = new SimpleMojo();
@@ -118,16 +120,16 @@ public class MojoTestCaseTest
Map<String, Object> map = getVariablesAndValuesFromObject( mojo );
- assertEquals( "valueOne", (String)map.get( "keyOne" ) );
+ assertEquals( "valueOne", (String) map.get( "keyOne" ) );
- assertEquals( "valueTwo", (String)map.get( "keyTwo" ) );
+ assertEquals( "valueTwo", (String) map.get( "keyTwo" ) );
}
/**
* @throws Exception if any
*/
public void testSettingMojoVariables()
- throws Exception
+ throws Exception
{
SimpleMojo mojo = new SimpleMojo();
@@ -135,7 +137,7 @@ public class MojoTestCaseTest
setVariableValueToObject( mojo, "keyOne", "myValueOne" );
- assertEquals( "myValueOne", (String)getVariableValueFromObject( mojo, "keyOne" ) );
+ assertEquals( "myValueOne", (String) getVariableValueFromObject( mojo, "keyOne" ) );
}
diff --git a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ParametersMojo.java b/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ParametersMojo.java
index 13d3029..0042b2d 100644
--- a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ParametersMojo.java
+++ b/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ParametersMojo.java
@@ -24,7 +24,7 @@ import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
public class ParametersMojo
- extends AbstractMojo
+ extends AbstractMojo
{
public String plain;
@@ -36,7 +36,7 @@ public class ParametersMojo
@Override
public void execute()
- throws MojoExecutionException, MojoFailureException
+ throws MojoExecutionException, MojoFailureException
{
}
}
diff --git a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ParametersMojoTest.java b/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ParametersMojoTest.java
index c009a5b..6981b7b 100644
--- a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ParametersMojoTest.java
+++ b/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/ParametersMojoTest.java
@@ -32,10 +32,10 @@ import org.apache.maven.project.ProjectBuildingRequest;
import org.eclipse.aether.DefaultRepositorySystemSession;
public class ParametersMojoTest
- extends AbstractMojoTestCase
+ extends AbstractMojoTestCase
{
public void testDefault()
- throws Exception
+ throws Exception
{
MavenProject project = readMavenProject( new File( "src/test/projects/default" ) );
@@ -48,7 +48,7 @@ public class ParametersMojoTest
}
public void testExplicit()
- throws Exception
+ throws Exception
{
MavenProject project = readMavenProject( new File( "src/test/projects/explicit" ) );
@@ -61,7 +61,7 @@ public class ParametersMojoTest
}
public void testDefaultWithProperty()
- throws Exception
+ throws Exception
{
MavenProject project = readMavenProject( new File( "src/test/projects/default" ) );
MavenSession session = newMavenSession( project );
@@ -77,7 +77,7 @@ public class ParametersMojoTest
}
public void testExplicitWithProperty()
- throws Exception
+ throws Exception
{
MavenProject project = readMavenProject( new File( "src/test/projects/explicit" ) );
MavenSession session = newMavenSession( project );
@@ -93,7 +93,7 @@ public class ParametersMojoTest
}
protected MavenProject readMavenProject( File basedir )
- throws ProjectBuildingException, Exception
+ throws ProjectBuildingException, Exception
{
File pom = new File( basedir, "pom.xml" );
MavenExecutionRequest request = new DefaultMavenExecutionRequest();
diff --git a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/PluginArtifactFileTest.java b/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/PluginArtifactFileTest.java
index c4f32be..a44a980 100644
--- a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/PluginArtifactFileTest.java
+++ b/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/PluginArtifactFileTest.java
@@ -25,12 +25,12 @@ import org.apache.maven.artifact.Artifact;
import org.apache.maven.plugin.MojoExecution;
public class PluginArtifactFileTest
- extends AbstractMojoTestCase
+ extends AbstractMojoTestCase
{
private static final String FS = System.getProperty( "file.separator" );
-
+
public void testArtifact()
- throws Exception
+ throws Exception
{
MojoExecution execution = newMojoExecution( "parameters" ); // TODO dedicated test mojo
diff --git a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/SimpleMojo.java b/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/SimpleMojo.java
index 85ea293..b2752e9 100644
--- a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/SimpleMojo.java
+++ b/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/SimpleMojo.java
@@ -26,7 +26,7 @@ import org.apache.maven.plugin.MojoExecutionException;
* @author Jason van Zyl
*/
public class SimpleMojo
- extends AbstractMojo
+ extends AbstractMojo
{
private String keyOne;
@@ -44,7 +44,7 @@ public class SimpleMojo
@Override
public void execute()
- throws MojoExecutionException
+ throws MojoExecutionException
{
}
}
diff --git a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/TestSilentLog.java b/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/TestSilentLog.java
index 4d782df..6dc6d44 100644
--- a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/TestSilentLog.java
+++ b/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/TestSilentLog.java
@@ -20,12 +20,11 @@ package org.apache.maven.plugin.testing;
*/
import junit.framework.TestCase;
-
import org.apache.maven.plugin.logging.Log;
import org.codehaus.plexus.logging.Logger;
public class TestSilentLog
- extends TestCase
+ extends TestCase
{
public void testLog()
diff --git a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/resources/TestResourcesTest.java b/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/resources/TestResourcesTest.java
index c7a78e3..c314abb 100644
--- a/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/resources/TestResourcesTest.java
+++ b/maven-plugin-testing-harness/src/test/java/org/apache/maven/plugin/testing/resources/TestResourcesTest.java
@@ -27,7 +27,7 @@ public class TestResourcesTest
@Test( expected = IllegalStateException.class )
public void testNoRuleAnnotation()
- throws Exception
+ throws Exception
{
resources.getBasedir( "dummy" );
}
diff --git a/maven-plugin-testing-harness/src/test/projects/default/pom.xml b/maven-plugin-testing-harness/src/test/projects/default/pom.xml
index e0dc4b3..dcfcd6c 100644
--- a/maven-plugin-testing-harness/src/test/projects/default/pom.xml
+++ b/maven-plugin-testing-harness/src/test/projects/default/pom.xml
@@ -20,29 +20,29 @@ under the License.
-->
<project>
- <modelVersion>4.0.0</modelVersion>
+ <modelVersion>4.0.0</modelVersion>
- <groupId>test</groupId>
- <artifactId>test-test</artifactId>
- <version>1.0-SNAPSHOT</version>
- <packaging>jar</packaging>
+ <groupId>test</groupId>
+ <artifactId>test-test</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>jar</packaging>
- <build>
- <plugins>
- <plugin>
- <groupId>test</groupId>
- <artifactId>test-plugin</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <executions>
- <execution>
- <id>test</id>
- <goals>
- <goal>test</goal>
- </goals>
- <phase>compile</phase>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>test</groupId>
+ <artifactId>test-plugin</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <id>test</id>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <phase>compile</phase>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</project>
diff --git a/maven-plugin-testing-harness/src/test/projects/explicit/pom.xml b/maven-plugin-testing-harness/src/test/projects/explicit/pom.xml
index 06628e9..ac2c839 100644
--- a/maven-plugin-testing-harness/src/test/projects/explicit/pom.xml
+++ b/maven-plugin-testing-harness/src/test/projects/explicit/pom.xml
@@ -20,35 +20,35 @@ under the License.
-->
<project>
- <modelVersion>4.0.0</modelVersion>
+ <modelVersion>4.0.0</modelVersion>
- <groupId>test</groupId>
- <artifactId>test-test</artifactId>
- <version>1.0-SNAPSHOT</version>
- <packaging>jar</packaging>
+ <groupId>test</groupId>
+ <artifactId>test-test</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>jar</packaging>
- <build>
- <plugins>
- <plugin>
- <groupId>test</groupId>
- <artifactId>test-plugin</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <executions>
- <execution>
- <id>test</id>
- <goals>
- <goal>test</goal>
- </goals>
- <phase>compile</phase>
- </execution>
- </executions>
- <configuration>
- <plain>explicitValue</plain>
- <withProperty>explicitWithPropertyValue</withProperty>
- <withDefault>explicitWithDefaultValue</withDefault>
- <withPropertyAndDefault>explicitWithPropertyAndDefaultValue</withPropertyAndDefault>
- </configuration>
- </plugin>
- </plugins>
- </build>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>test</groupId>
+ <artifactId>test-plugin</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <id>test</id>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <phase>compile</phase>
+ </execution>
+ </executions>
+ <configuration>
+ <plain>explicitValue</plain>
+ <withProperty>explicitWithPropertyValue</withProperty>
+ <withDefault>explicitWithDefaultValue</withDefault>
+ <withPropertyAndDefault>explicitWithPropertyAndDefaultValue</withPropertyAndDefault>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
diff --git a/maven-plugin-testing-harness/src/test/resources/META-INF/maven/plugin.xml b/maven-plugin-testing-harness/src/test/resources/META-INF/maven/plugin.xml
index d442272..2e1c2a1 100644
--- a/maven-plugin-testing-harness/src/test/resources/META-INF/maven/plugin.xml
+++ b/maven-plugin-testing-harness/src/test/resources/META-INF/maven/plugin.xml
@@ -21,64 +21,65 @@ under the License.
-->
<plugin>
- <name>test-plugin</name>
- <description></description>
- <groupId>test</groupId>
- <artifactId>test-plugin</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <goalPrefix>test</goalPrefix>
- <isolatedRealm>false</isolatedRealm>
- <inheritedByDefault>true</inheritedByDefault>
- <mojos>
- <mojo>
- <goal>parameters</goal>
- <requiresDirectInvocation>false</requiresDirectInvocation>
- <requiresProject>true</requiresProject>
- <requiresReports>false</requiresReports>
- <aggregator>false</aggregator>
- <requiresOnline>false</requiresOnline>
- <inheritedByDefault>true</inheritedByDefault>
- <implementation>org.apache.maven.plugin.testing.ParametersMojo</implementation>
- <language>java</language>
- <instantiationStrategy>per-lookup</instantiationStrategy>
- <executionStrategy>once-per-session</executionStrategy>
- <threadSafe>false</threadSafe>
- <parameters>
- <parameter>
- <name>plain</name>
- <type>java.lang.String</type>
- <required>false</required>
- <editable>true</editable>
- <description></description>
- </parameter>
- <parameter>
- <name>withDefault</name>
- <type>java.lang.String</type>
- <required>false</required>
- <editable>true</editable>
- <description></description>
- </parameter>
- <parameter>
- <name>withProperty</name>
- <type>java.lang.String</type>
- <required>false</required>
- <editable>true</editable>
- <description></description>
- </parameter>
- <parameter>
- <name>withPropertyAndDefault</name>
- <type>java.lang.String</type>
- <required>false</required>
- <editable>true</editable>
- <description></description>
- </parameter>
- </parameters>
- <configuration>
- <withDefault implementation="java.lang.String" default-value="default"/>
- <withProperty implementation="java.lang.String">${property}</withProperty>
- <withPropertyAndDefault implementation="java.lang.String" default-value="default">${property}</withPropertyAndDefault>
- </configuration>
- </mojo>
- </mojos>
- <dependencies/>
+ <name>test-plugin</name>
+ <description></description>
+ <groupId>test</groupId>
+ <artifactId>test-plugin</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <goalPrefix>test</goalPrefix>
+ <isolatedRealm>false</isolatedRealm>
+ <inheritedByDefault>true</inheritedByDefault>
+ <mojos>
+ <mojo>
+ <goal>parameters</goal>
+ <requiresDirectInvocation>false</requiresDirectInvocation>
+ <requiresProject>true</requiresProject>
+ <requiresReports>false</requiresReports>
+ <aggregator>false</aggregator>
+ <requiresOnline>false</requiresOnline>
+ <inheritedByDefault>true</inheritedByDefault>
+ <implementation>org.apache.maven.plugin.testing.ParametersMojo</implementation>
+ <language>java</language>
+ <instantiationStrategy>per-lookup</instantiationStrategy>
+ <executionStrategy>once-per-session</executionStrategy>
+ <threadSafe>false</threadSafe>
+ <parameters>
+ <parameter>
+ <name>plain</name>
+ <type>java.lang.String</type>
+ <required>false</required>
+ <editable>true</editable>
+ <description></description>
+ </parameter>
+ <parameter>
+ <name>withDefault</name>
+ <type>java.lang.String</type>
+ <required>false</required>
+ <editable>true</editable>
+ <description></description>
+ </parameter>
+ <parameter>
+ <name>withProperty</name>
+ <type>java.lang.String</type>
+ <required>false</required>
+ <editable>true</editable>
+ <description></description>
+ </parameter>
+ <parameter>
+ <name>withPropertyAndDefault</name>
+ <type>java.lang.String</type>
+ <required>false</required>
+ <editable>true</editable>
+ <description></description>
+ </parameter>
+ </parameters>
+ <configuration>
+ <withDefault implementation="java.lang.String" default-value="default"/>
+ <withProperty implementation="java.lang.String">${property}</withProperty>
+ <withPropertyAndDefault implementation="java.lang.String" default-value="default">${property}
+ </withPropertyAndDefault>
+ </configuration>
+ </mojo>
+ </mojos>
+ <dependencies/>
</plugin>
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index e2fa417..6b2ad94 100644
--- a/pom.xml
+++ b/pom.xml
@@ -19,216 +19,219 @@ specific language governing permissions and limitations
under the License.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <artifactId>maven-parent</artifactId>
- <groupId>org.apache.maven</groupId>
- <version>34</version>
- <relativePath/>
- </parent>
-
- <groupId>org.apache.maven.plugin-testing</groupId>
- <artifactId>maven-plugin-testing</artifactId>
- <version>3.4.0-SNAPSHOT</version>
- <packaging>pom</packaging>
-
- <name>Maven Plugin Testing</name>
- <description>The Maven Plugin Testing contains the necessary modules to be able to test Maven Plugins.</description>
- <url>https://maven.apache.org/plugin-testing/</url>
- <inceptionYear>2008</inceptionYear>
-
- <mailingLists>
- <mailingList>
- <name>Maven User List</name>
- <subscribe>users-subscribe@maven.apache.org</subscribe>
- <unsubscribe>users-unsubscribe@maven.apache.org</unsubscribe>
- <post>users@maven.apache.org</post>
- <archive>https://mail-archives.apache.org/mod_mbox/maven-users</archive>
- <otherArchives>
- <otherArchive>https://www.mail-archive.com/users@maven.apache.org/</otherArchive>
- </otherArchives>
- </mailingList>
- <mailingList>
- <name>Maven Developer List</name>
- <subscribe>dev-subscribe@maven.apache.org</subscribe>
- <unsubscribe>dev-unsubscribe@maven.apache.org</unsubscribe>
- <post>dev@maven.apache.org</post>
- <archive>https://mail-archives.apache.org/mod_mbox/maven-dev</archive>
- <otherArchives>
- <otherArchive>https://www.mail-archive.com/dev@maven.apache.org/</otherArchive>
- </otherArchives>
- </mailingList>
- <mailingList>
- <name>Maven Issues List</name>
- <subscribe>issues-subscribe@maven.apache.org</subscribe>
- <unsubscribe>issues-unsubscribe@maven.apache.org</unsubscribe>
- <archive>https://mail-archives.apache.org/mod_mbox/maven-issues/</archive>
- <otherArchives>
- <otherArchive>https://www.mail-archive.com/issues@maven.apache.org</otherArchive>
- </otherArchives>
- </mailingList>
- <mailingList>
- <name>Maven Commits List</name>
- <subscribe>commits-subscribe@maven.apache.org</subscribe>
- <unsubscribe>commits-unsubscribe@maven.apache.org</unsubscribe>
- <archive>https://mail-archives.apache.org/mod_mbox/maven-commits</archive>
- <otherArchives>
- <otherArchive>https://www.mail-archive.com/commits@maven.apache.org</otherArchive>
- </otherArchives>
- </mailingList>
-
- <!-- duplication from parent pom - temporary until they inherit properly -->
- <mailingList>
- <name>Maven Announcements List</name>
- <post>announce@maven.apache.org</post>
- <subscribe>announce-subscribe@maven.apache.org</subscribe>
- <unsubscribe>announce-unsubscribe@maven.apache.org</unsubscribe>
- <archive>https://mail-archives.apache.org/mod_mbox/maven-announce/</archive>
- <otherArchives>
- <otherArchive>https://www.mail-archive.com/announce@maven.apache.org</otherArchive>
- </otherArchives>
- </mailingList>
- <mailingList>
- <name>Maven Notifications List</name>
- <subscribe>notifications-subscribe@maven.apache.org</subscribe>
- <unsubscribe>notifications-unsubscribe@maven.apache.org</unsubscribe>
- <archive>https://mail-archives.apache.org/mod_mbox/maven-notifications/</archive>
- <otherArchives>
- <otherArchive>https://www.mail-archive.com/notifications@maven.apache.org</otherArchive>
- </otherArchives>
- </mailingList>
- </mailingLists>
-
- <!-- this project used to be a multimodule project. For easy of history comparison structure is kept -->
- <modules>
- <module>maven-plugin-testing-harness</module>
- </modules>
-
- <scm>
- <connection>scm:git:https://gitbox.apache.org/repos/asf/maven-plugin-testing.git</connection>
- <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/maven-plugin-testing.git</developerConnection>
- <url>https://github.com/apache/maven-plugin-testing/tree/${project.scm.tag}</url>
- <tag>master</tag>
- </scm>
- <issueManagement>
- <system>jira</system>
- <url>https://issues.apache.org/jira/browse/MPLUGINTESTING</url>
- </issueManagement>
- <ciManagement>
- <system>Jenkins</system>
- <url>https://ci-builds.apache.org/job/Maven/job/maven-box/job/maven-plugin-testing/</url>
- </ciManagement>
- <distributionManagement>
- <site>
- <id>apache.website</id>
- <url>scm:svn:https://svn.apache.org/repos/asf/maven/website/components/${maven.site.path}</url>
- </site>
- </distributionManagement>
-
- <properties>
- <surefire.version>2.22.2</surefire.version>
- <mavenVersion>3.2.5</mavenVersion>
- <maven.site.path>plugin-testing-archives/LATEST</maven.site.path>
- <javaVersion>7</javaVersion>
- <project.build.outputTimestamp>2020-04-07T21:04:00Z</project.build.outputTimestamp>
- </properties>
-
- <dependencyManagement>
- <dependencies>
-
- <!-- maven -->
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-core</artifactId>
- <version>${mavenVersion}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-compat</artifactId>
- <version>${mavenVersion}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-model</artifactId>
- <version>${mavenVersion}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-plugin-api</artifactId>
- <version>${mavenVersion}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>maven-parent</artifactId>
<groupId>org.apache.maven</groupId>
- <artifactId>maven-aether-provider</artifactId>
- <version>${mavenVersion}</version>
- <scope>provided</scope>
- </dependency>
-
- <dependency>
- <groupId>org.codehaus.plexus</groupId>
- <artifactId>plexus-utils</artifactId>
- <version>3.3.0</version> <!-- 3.4.x is Java8 -->
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.13.2</version>
- <scope>provided</scope>
- </dependency>
+ <version>34</version>
+ <relativePath/>
+ </parent>
+
+ <groupId>org.apache.maven.plugin-testing</groupId>
+ <artifactId>maven-plugin-testing</artifactId>
+ <version>3.4.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <name>Maven Plugin Testing</name>
+ <description>The Maven Plugin Testing contains the necessary modules to be able to test Maven Plugins.</description>
+ <url>https://maven.apache.org/plugin-testing/</url>
+ <inceptionYear>2008</inceptionYear>
+
+ <mailingLists>
+ <mailingList>
+ <name>Maven User List</name>
+ <subscribe>users-subscribe@maven.apache.org</subscribe>
+ <unsubscribe>users-unsubscribe@maven.apache.org</unsubscribe>
+ <post>users@maven.apache.org</post>
+ <archive>https://mail-archives.apache.org/mod_mbox/maven-users</archive>
+ <otherArchives>
+ <otherArchive>https://www.mail-archive.com/users@maven.apache.org/</otherArchive>
+ </otherArchives>
+ </mailingList>
+ <mailingList>
+ <name>Maven Developer List</name>
+ <subscribe>dev-subscribe@maven.apache.org</subscribe>
+ <unsubscribe>dev-unsubscribe@maven.apache.org</unsubscribe>
+ <post>dev@maven.apache.org</post>
+ <archive>https://mail-archives.apache.org/mod_mbox/maven-dev</archive>
+ <otherArchives>
+ <otherArchive>https://www.mail-archive.com/dev@maven.apache.org/</otherArchive>
+ </otherArchives>
+ </mailingList>
+ <mailingList>
+ <name>Maven Issues List</name>
+ <subscribe>issues-subscribe@maven.apache.org</subscribe>
+ <unsubscribe>issues-unsubscribe@maven.apache.org</unsubscribe>
+ <archive>https://mail-archives.apache.org/mod_mbox/maven-issues/</archive>
+ <otherArchives>
+ <otherArchive>https://www.mail-archive.com/issues@maven.apache.org</otherArchive>
+ </otherArchives>
+ </mailingList>
+ <mailingList>
+ <name>Maven Commits List</name>
+ <subscribe>commits-subscribe@maven.apache.org</subscribe>
+ <unsubscribe>commits-unsubscribe@maven.apache.org</unsubscribe>
+ <archive>https://mail-archives.apache.org/mod_mbox/maven-commits</archive>
+ <otherArchives>
+ <otherArchive>https://www.mail-archive.com/commits@maven.apache.org</otherArchive>
+ </otherArchives>
+ </mailingList>
+
+ <!-- duplication from parent pom - temporary until they inherit properly -->
+ <mailingList>
+ <name>Maven Announcements List</name>
+ <post>announce@maven.apache.org</post>
+ <subscribe>announce-subscribe@maven.apache.org</subscribe>
+ <unsubscribe>announce-unsubscribe@maven.apache.org</unsubscribe>
+ <archive>https://mail-archives.apache.org/mod_mbox/maven-announce/</archive>
+ <otherArchives>
+ <otherArchive>https://www.mail-archive.com/announce@maven.apache.org</otherArchive>
+ </otherArchives>
+ </mailingList>
+ <mailingList>
+ <name>Maven Notifications List</name>
+ <subscribe>notifications-subscribe@maven.apache.org</subscribe>
+ <unsubscribe>notifications-unsubscribe@maven.apache.org</unsubscribe>
+ <archive>https://mail-archives.apache.org/mod_mbox/maven-notifications/</archive>
+ <otherArchives>
+ <otherArchive>https://www.mail-archive.com/notifications@maven.apache.org</otherArchive>
+ </otherArchives>
+ </mailingList>
+ </mailingLists>
+
+ <!-- this project used to be a multimodule project. For easy of history comparison structure is kept -->
+ <modules>
+ <module>maven-plugin-testing-harness</module>
+ </modules>
+
+ <scm>
+ <connection>scm:git:https://gitbox.apache.org/repos/asf/maven-plugin-testing.git</connection>
+ <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/maven-plugin-testing.git</developerConnection>
+ <url>https://github.com/apache/maven-plugin-testing/tree/${project.scm.tag}</url>
+ <tag>master</tag>
+ </scm>
+ <issueManagement>
+ <system>jira</system>
+ <url>https://issues.apache.org/jira/browse/MPLUGINTESTING</url>
+ </issueManagement>
+ <ciManagement>
+ <system>Jenkins</system>
+ <url>https://ci-builds.apache.org/job/Maven/job/maven-box/job/maven-plugin-testing/</url>
+ </ciManagement>
+ <distributionManagement>
+ <site>
+ <id>apache.website</id>
+ <url>scm:svn:https://svn.apache.org/repos/asf/maven/website/components/${maven.site.path}</url>
+ </site>
+ </distributionManagement>
+
+ <properties>
+ <surefire.version>2.22.2</surefire.version>
+ <mavenVersion>3.2.5</mavenVersion>
+ <maven.site.path>plugin-testing-archives/LATEST</maven.site.path>
+ <javaVersion>8</javaVersion>
+ <project.build.outputTimestamp>2020-04-07T21:04:00Z</project.build.outputTimestamp>
+ </properties>
+
+ <dependencyManagement>
+ <dependencies>
+
+ <!-- maven -->
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>${mavenVersion}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-compat</artifactId>
+ <version>${mavenVersion}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-model</artifactId>
+ <version>${mavenVersion}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>${mavenVersion}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-aether-provider</artifactId>
+ <version>${mavenVersion}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.3.0</version> <!-- 3.4.x is Java8 -->
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.13.2</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
</dependencies>
- </dependencyManagement>
-
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </dependency>
- </dependencies>
-
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <systemProperties>
- <property>
- <name>java.io.tmpdir</name>
- <value>${java.io.tmpdir}</value>
- </property>
- </systemProperties>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-site-plugin</artifactId>
- <configuration>
- <topSiteURL>scm:svn:https://svn.apache.org/repos/asf/maven/website/components/${maven.site.path}</topSiteURL>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- <plugins>
- <plugin>
- <artifactId>maven-site-plugin</artifactId>
- <inherited>false</inherited>
- <executions>
- <execution>
- <id>attach-descriptor</id>
- <goals>
- <goal>attach-descriptor</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <systemProperties>
+ <property>
+ <name>java.io.tmpdir</name>
+ <value>${java.io.tmpdir}</value>
+ </property>
+ </systemProperties>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <configuration>
+ <topSiteURL>
+ scm:svn:https://svn.apache.org/repos/asf/maven/website/components/${maven.site.path}
+ </topSiteURL>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-site-plugin</artifactId>
+ <inherited>false</inherited>
+ <executions>
+ <execution>
+ <id>attach-descriptor</id>
+ <goals>
+ <goal>attach-descriptor</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</project>
diff --git a/src/site/site.xml b/src/site/site.xml
index 8f1e543..34dfe65 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -20,20 +20,20 @@ under the License.
-->
<project>
- <body>
- <breadcrumbs>
- <!-- TODO: This breadcrumb should be removed when it has been solved in the parent -->
- <item name="Maven" href="http://maven.apache.org/index.html" />
- <item name="Plugin Testing" href="http://maven.apache.org/plugin-testing/index.html" />
- </breadcrumbs>
+ <body>
+ <breadcrumbs>
+ <!-- TODO: This breadcrumb should be removed when it has been solved in the parent -->
+ <item name="Maven" href="http://maven.apache.org/index.html"/>
+ <item name="Plugin Testing" href="http://maven.apache.org/plugin-testing/index.html"/>
+ </breadcrumbs>
- <menu name="Overview">
- <item name="Introduction" href="index.html"/>
- <!-- According to http://jira.codehaus.org/browse/MNGSITE-152 -->
- <item name="License" href="http://www.apache.org/licenses/"/>
- <item name="Download" href="download.html"/>
- </menu>
+ <menu name="Overview">
+ <item name="Introduction" href="index.html"/>
+ <!-- According to http://jira.codehaus.org/browse/MNGSITE-152 -->
+ <item name="License" href="http://www.apache.org/licenses/"/>
+ <item name="Download" href="download.html"/>
+ </menu>
- <menu ref="modules" />
- </body>
+ <menu ref="modules"/>
+ </body>
</project>
diff --git a/src/site/xdoc/download.xml.vm b/src/site/xdoc/download.xml.vm
index fa3af9e..9aae25d 100644
--- a/src/site/xdoc/download.xml.vm
+++ b/src/site/xdoc/download.xml.vm
@@ -20,107 +20,134 @@ under the License.
-->
<document>
- <properties>
- <title>Download ${project.name} Source</title>
- </properties>
- <body>
- <section name="Download ${project.name} ${project.version} Source">
-
- <p>${project.name} ${project.version} is distributed in source format. Use a source archive if you intend to build
- ${project.name} yourself. Otherwise, simply use the ready-made binary artifacts from central repository.</p>
-
- <p>You will be prompted for a mirror - if the file is not found on yours, please be patient, as it may take 24
- hours to reach all mirrors.<p/>
-
- <p>In order to guard against corrupted downloads/installations, it is highly recommended to
- <a href="http://www.apache.org/dev/release-signing#verifying-signature">verify the signature</a>
- of the release bundles against the public <a href="https://www.apache.org/dist/maven/KEYS">KEYS</a> used by the Apache Maven
- developers.</p>
-
- <p>${project.name} is distributed under the <a href="http://www.apache.org/licenses/">Apache License, version 2.0</a>.</p>
-
- <p></p>We <b>strongly</b> encourage our users to configure a Maven repository mirror closer to their location, please read <a href="./guides/mini/guide-mirror-settings.html">How to Use Mirrors for Repositories</a>.</p>
-
- <a name="mirror"/>
- <subsection name="Mirror">
-
- <p>
- [if-any logo]
- <a href="[link]">
- <img align="right" src="[logo]" border="0"
- alt="logo"/>
- </a>
- [end]
- The currently selected mirror is
- <b>[preferred]</b>.
- If you encounter a problem with this mirror,
- please select another mirror.
- If all mirrors are failing, there are
- <i>backup</i>
- mirrors
- (at the end of the mirrors list) that should be available.
- </p>
-
- <form action="[location]" method="get" id="SelectMirror">
- Other mirrors:
- <select name="Preferred">
- [if-any http]
- [for http]
- <option value="[http]">[http]</option>
- [end]
- [end]
- [if-any ftp]
- [for ftp]
- <option value="[ftp]">[ftp]</option>
- [end]
- [end]
- [if-any backup]
- [for backup]
- <option value="[backup]">[backup] (backup)</option>
- [end]
- [end]
- </select>
- <input type="submit" value="Change"/>
- </form>
-
- <p>
- You may also consult the
- <a href="http://www.apache.org/mirrors/">complete list of
- mirrors.</a>
- </p>
-
- </subsection>
-
- <subsection name="${project.name} ${project.version}">
-
- <p>This is the current stable version of ${project.name}.</p>
-
- <table>
- <thead>
- <tr>
- <th></th>
- <th>Link</th>
- <th>Checksum</th>
- <th>Signature</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>${project.name} ${project.version} (Source zip)</td>
- <td><a href="[preferred]maven/plugin-testing/${project.artifactId}-${project.version}-source-release.zip">maven/plugin-testing/${project.artifactId}-${project.version}-source-release.zip</a></td>
- <td><a href="https://www.apache.org/dist/maven/plugin-testing/${project.artifactId}-${project.version}-source-release.zip.sha512">maven/plugin-testing/${project.artifactId}-${project.version}-source-release.zip.sha512</a></td>
- <td><a href="https://www.apache.org/dist/maven/plugin-testing/${project.artifactId}-${project.version}-source-release.zip.asc">maven/plugin-testing/${project.artifactId}-${project.version}-source-release.zip.asc</a></td>
- </tr>
- </tbody>
- </table>
- </subsection>
-
- <subsection name="Previous Versions">
-
- <p>Older non-recommended releases can be found on our <a href="http://archive.apache.org/dist/maven/plugin-testing/">archive site</a>.</p>
-
- </subsection>
- </section>
- </body>
+ <properties>
+ <title>Download ${project.name} Source</title>
+ </properties>
+ <body>
+ <section name="Download ${project.name} ${project.version} Source">
+
+ <p>${project.name} ${project.version} is distributed in source format. Use a source archive if you intend to
+ build
+ ${project.name} yourself. Otherwise, simply use the ready-made binary artifacts from central repository.
+ </p>
+
+ <p>You will be prompted for a mirror - if the file is not found on yours, please be patient, as it may take
+ 24
+ hours to reach all mirrors.
+ <p/>
+
+ <p>In order to guard against corrupted downloads/installations, it is highly recommended to
+ <a href="http://www.apache.org/dev/release-signing#verifying-signature">verify the signature</a>
+ of the release bundles against the public <a href="https://www.apache.org/dist/maven/KEYS">KEYS</a> used
+ by the Apache Maven
+ developers.
+ </p>
+
+ <p>${project.name} is distributed under the <a href="http://www.apache.org/licenses/">Apache License,
+ version 2.0</a>.
+ </p>
+
+ <p></p>We <b>strongly</b> encourage our users to configure a Maven repository mirror closer to their
+ location, please read <a href="./guides/mini/guide-mirror-settings.html">How to Use Mirrors for
+ Repositories</a>.
+ </p>
+
+ <a name="mirror"/>
+ <subsection name="Mirror">
+
+ <p>
+ [if-any logo]
+ <a href="[link]">
+ <img align="right" src="[logo]" border="0"
+ alt="logo"/>
+ </a>
+ [end]
+ The currently selected mirror is
+ <b>[preferred]</b>.
+ If you encounter a problem with this mirror,
+ please select another mirror.
+ If all mirrors are failing, there are
+ <i>backup</i>
+ mirrors
+ (at the end of the mirrors list) that should be available.
+ </p>
+
+ <form action="[location]" method="get" id="SelectMirror">
+ Other mirrors:
+ <select name="Preferred">
+ [if-any http]
+ [for http]
+ <option value="[http]">[http]</option>
+ [end]
+ [end]
+ [if-any ftp]
+ [for ftp]
+ <option value="[ftp]">[ftp]</option>
+ [end]
+ [end]
+ [if-any backup]
+ [for backup]
+ <option value="[backup]">[backup] (backup)</option>
+ [end]
+ [end]
+ </select>
+ <input type="submit" value="Change"/>
+ </form>
+
+ <p>
+ You may also consult the
+ <a href="http://www.apache.org/mirrors/">complete list of
+ mirrors.
+ </a>
+ </p>
+
+ </subsection>
+
+ <subsection name="${project.name} ${project.version}">
+
+ <p>This is the current stable version of ${project.name}.</p>
+
+ <table>
+ <thead>
+ <tr>
+ <th></th>
+ <th>Link</th>
+ <th>Checksum</th>
+ <th>Signature</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>${project.name} ${project.version} (Source zip)</td>
+ <td>
+ <a href="[preferred]maven/plugin-testing/${project.artifactId}-${project.version}-source-release.zip">
+ maven/plugin-testing/${project.artifactId}-${project.version}-source-release.zip
+ </a>
+ </td>
+ <td>
+ <a href="https://www.apache.org/dist/maven/plugin-testing/${project.artifactId}-${project.version}-source-release.zip.sha512">
+ maven/plugin-testing/${project.artifactId}-${project.version}
+ -source-release.zip.sha512
+ </a>
+ </td>
+ <td>
+ <a href="https://www.apache.org/dist/maven/plugin-testing/${project.artifactId}-${project.version}-source-release.zip.asc">
+ maven/plugin-testing/${project.artifactId}-${project.version}-source-release.zip.asc
+ </a>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </subsection>
+
+ <subsection name="Previous Versions">
+
+ <p>Older non-recommended releases can be found on our <a
+ href="http://archive.apache.org/dist/maven/plugin-testing/">archive site</a>.
+ </p>
+
+ </subsection>
+ </section>
+ </body>
</document>