Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions maven-plugin-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-model</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
Expand All @@ -122,13 +121,10 @@
<dependency>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-api</artifactId>
<version>${resolverVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-util</artifactId>
<version>${resolverVersion}</version>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
Expand Down Expand Up @@ -162,12 +158,12 @@
<!-- tests -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<scope>test</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;

import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.params.provider.Arguments.arguments;

// at least one test class must be public for test-javadoc report
Expand All @@ -42,7 +41,7 @@ public static Stream<Arguments> goalPrefixes() {
@ParameterizedTest
@MethodSource("goalPrefixes")
void defaultGoalPrefix(String groupId, String artifactId, String expectedGoal) {
assertThat(DescriptorGeneratorMojo.getDefaultGoalPrefix(newProject(groupId, artifactId)), is(expectedGoal));
assertEquals(expectedGoal, DescriptorGeneratorMojo.getDefaultGoalPrefix(newProject(groupId, artifactId)));
}

private MavenProject newProject(final String groupId, final String artifactId) {
Expand Down
26 changes: 5 additions & 21 deletions maven-plugin-report-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,10 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.reporting</groupId>
Expand All @@ -61,28 +59,18 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-model-builder</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-model</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-settings</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-api</artifactId>
<version>${resolverVersion}</version>
<scope>provided</scope>
</dependency>

<!-- plugin tools -->
Expand All @@ -94,10 +82,6 @@
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-tools-generators</artifactId>
</dependency>

<!-- doxia -->
<dependency>
Expand Down Expand Up @@ -132,18 +116,18 @@
<artifactId>plexus-i18n</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.sisu</groupId>
<artifactId>org.eclipse.sisu.plexus</artifactId>
<scope>provided</scope>
</dependency>

<!-- tests -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<!-- Depenency is listed here because it's used in ITs -->
<dependency>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,12 @@
import org.apache.maven.rtinfo.RuntimeInformation;
import org.apache.maven.tools.plugin.EnhancedParameterWrapper;
import org.apache.maven.tools.plugin.ExtendedPluginDescriptor;
import org.apache.maven.tools.plugin.generator.PluginDescriptorFilesGenerator;
import org.codehaus.plexus.configuration.PlexusConfiguration;
import org.codehaus.plexus.configuration.PlexusConfigurationException;

/**
* Reads enhanced plugin.xml files as generated by
* {@link PluginDescriptorFilesGenerator} and used by {@link PluginReport}.
* {@code PluginDescriptorFilesGenerator} and used by {@link PluginReport}.
* Populates the slightly extended {@link Parameter} object {@link EnhancedParameterWrapper}.
* In addition populates all (optional) elements added after Maven Plugin API 3.2.5.
*/
Expand Down
31 changes: 9 additions & 22 deletions maven-plugin-tools-annotations/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
<dependency>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-api</artifactId>
<version>${resolverVersion}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand All @@ -78,11 +77,6 @@
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.sisu</groupId>
<artifactId>org.eclipse.sisu.plexus</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-archiver</artifactId>
Expand Down Expand Up @@ -111,24 +105,11 @@
<groupId>com.thoughtworks.qdox</groupId>
<artifactId>qdox</artifactId>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>

<!-- test -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-testing</artifactId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -147,6 +128,12 @@
<artifactId>slf4j-simple</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<!-- used in test runtime -->
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-xml</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
import org.junit.jupiter.api.Test;

import static org.assertj.core.api.Assertions.assertThat;
import static org.codehaus.plexus.testing.PlexusExtension.getBasedir;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
Expand Down Expand Up @@ -132,7 +131,7 @@ void scanParametersWithGenerics() throws ExtractionException, IOException {
@Test
void scanFooMojoClass() throws Exception {
MojoAnnotationsScannerRequest request = new MojoAnnotationsScannerRequest();
request.setClassesDirectories(Collections.singletonList(new File(getBasedir(), "target/test-classes")));
request.setClassesDirectories(Collections.singletonList(new File("target/test-classes")));
request.setIncludePatterns(Arrays.asList("**/FooMojo.class"));
request.setProject(new MavenProject());

Expand Down
8 changes: 2 additions & 6 deletions maven-plugin-tools-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,12 @@
<dependency>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-api</artifactId>
<version>${resolverVersion}</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-classworlds</artifactId>
<version>2.9.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.sisu</groupId>
<artifactId>org.eclipse.sisu.plexus</artifactId>
<scope>provided</scope>
</dependency>
<!-- plexus -->
<dependency>
Expand Down Expand Up @@ -116,7 +112,7 @@
<!-- test -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
import org.opentest4j.AssertionFailedError;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.fail;

/**
* Tests against the locally available javadoc sites. Doesn't require internet connectivity.
Expand Down Expand Up @@ -150,12 +150,12 @@ static void assertUrlValid(final URI url) {
if (url.getFragment() != null) {
Pattern pattern = JavadocSite.getAnchorPattern(url.getFragment());
if (!reader.lines().anyMatch(pattern.asPredicate())) {
throw new AssertionFailedError("Although URL " + url + " exists, no line matching the pattern "
+ pattern + " found in response");
fail("Although URL " + url + " exists, no line matching the pattern " + pattern
+ " found in response");
}
}
} catch (IOException e) {
throw new AssertionFailedError("Could not find URL " + url, e);
fail("Could not find URL " + url, e);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@

import java.util.Locale;

import org.apache.maven.doxia.siterenderer.Renderer;
import org.apache.maven.project.MavenProject;
import org.apache.maven.reporting.AbstractMavenReport;
import org.apache.maven.reporting.MavenReportException;

Expand All @@ -33,24 +31,6 @@ public class MavenReportStub extends AbstractMavenReport {
@Override
protected void executeReport(Locale locale) throws MavenReportException {}

/** {@inheritDoc} */
@Override
protected String getOutputDirectory() {
return null;
}

/** {@inheritDoc} */
@Override
protected MavenProject getProject() {
return null;
}

/** {@inheritDoc} */
@Override
protected Renderer getSiteRenderer() {
return null;
}

/** {@inheritDoc} */
@Override
public String getDescription(Locale locale) {
Expand Down
9 changes: 2 additions & 7 deletions maven-plugin-tools-generators/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
<dependency>
<groupId>org.eclipse.sisu</groupId>
<artifactId>org.eclipse.sisu.plexus</artifactId>
<scope>provided</scope>
</dependency>

<!-- other -->
Expand All @@ -86,7 +87,6 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4jVersion}</version>
</dependency>

<!-- for HTML to plain text conversion -->
Expand All @@ -105,12 +105,7 @@
<!-- test -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-testing</artifactId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import org.apache.maven.tools.plugin.javadoc.JavadocLinkGenerator;
import org.codehaus.plexus.component.repository.ComponentDependency;
import org.codehaus.plexus.configuration.PlexusConfiguration;
import org.codehaus.plexus.testing.PlexusTest;
import org.codehaus.plexus.util.ReaderFactory;
import org.junit.jupiter.api.Test;

Expand All @@ -47,7 +46,6 @@
/**
* @author <a href="mailto:jason@maven.org">Jason van Zyl </a>
*/
@PlexusTest
public class PluginDescriptorFilesGeneratorTest extends AbstractGeneratorTestCase {
@Override
protected void extendPluginDescriptor(PluginDescriptor pluginDescriptor) throws DuplicateParameterException {
Expand Down
2 changes: 1 addition & 1 deletion maven-plugin-tools-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Loading