Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to maven 3.2.5 #33

Merged
merged 1 commit into from
Apr 19, 2022
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
129 changes: 107 additions & 22 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ under the License.
<artifactId>maven-plugins</artifactId>
<groupId>org.apache.maven.plugins</groupId>
<version>34</version>
<relativePath>../../pom/maven/maven-plugins/pom.xml</relativePath>
<relativePath/>
</parent>

<artifactId>maven-project-info-reports-plugin</artifactId>
Expand Down Expand Up @@ -120,11 +120,13 @@ under the License.
<properties>
<doxiaVersion>1.11.1</doxiaVersion>
<doxia-sitetoolsVersion>1.11.1</doxia-sitetoolsVersion>
<mavenVersion>3.0</mavenVersion>
<mavenVersion>3.2.5</mavenVersion>
<scmVersion>1.12.2</scmVersion>
<aetherVersion>1.0.0.v20140518</aetherVersion>
<sitePluginVersion>3.11.0</sitePluginVersion>
<surefire.version>2.22.2</surefire.version>
<javaVersion>7</javaVersion>
<javaVersion>8</javaVersion>
<mavenPluginToolsVersion>3.6.4</mavenPluginToolsVersion>
<checkstyle.violation.ignore>ParameterNumber,MethodLength</checkstyle.violation.ignore>
<project.build.outputTimestamp>2022-02-21T20:17:22Z</project.build.outputTimestamp>
</properties>
Expand All @@ -139,45 +141,50 @@ under the License.
<groupId>org.apache.maven.reporting</groupId>
<artifactId>maven-reporting-impl</artifactId>
<version>3.1.0</version>
<exclusions>
<exclusion>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- Maven -->
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-compat</artifactId>
<version>${mavenVersion}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>${mavenVersion}</version>
<scope>provided</scope>
</dependency>
<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-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-repository-metadata</artifactId>
<version>${mavenVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-settings</artifactId>
<version>${mavenVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
Expand All @@ -187,7 +194,7 @@ under the License.
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-shared-utils</artifactId>
<version>3.3.3</version>
<version>3.3.4</version>
</dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
Expand All @@ -198,12 +205,25 @@ under the License.
<groupId>com.google.code.findbugs</groupId>
<artifactId>bcel-findbugs</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.maven</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.bcel</groupId>
<artifactId>bcel</artifactId>
<version>6.2</version>
<version>6.5.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.aether</groupId>
<artifactId>aether-api</artifactId>
<version>${aetherVersion}</version>
</dependency>

<dependency>
Expand All @@ -214,12 +234,18 @@ under the License.
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-common-artifact-filters</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
<exclusions>
<exclusion>
<groupId>org.sonatype.sisu</groupId>
<artifactId>sisu-inject-plexus</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-artifact-transfer</artifactId>
<version>0.12.0</version>
<version>0.13.1</version>
</dependency>

<!-- SCM -->
Expand All @@ -233,6 +259,12 @@ under the License.
<artifactId>maven-scm-manager-plexus</artifactId>
<version>${scmVersion}</version>
<scope>runtime</scope>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.maven.scm</groupId>
Expand Down Expand Up @@ -294,11 +326,23 @@ under the License.
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-sink-api</artifactId>
<version>${doxiaVersion}</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-core</artifactId>
<version>${doxiaVersion}</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- Doxia Sitetools -->
Expand Down Expand Up @@ -326,6 +370,12 @@ under the License.
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-integration-tools</artifactId>
<version>${doxia-sitetoolsVersion}</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- Plexus -->
Expand All @@ -343,7 +393,7 @@ under the License.
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.3.0</version>
<version>3.4.1</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
Expand All @@ -352,6 +402,12 @@ under the License.
</dependency>

<!-- Test -->
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-compat</artifactId>
<version>${mavenVersion}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.httpunit</groupId>
<artifactId>httpunit</artifactId>
Expand All @@ -361,13 +417,19 @@ under the License.
<dependency>
<groupId>org.apache.maven.plugin-testing</groupId>
<artifactId>maven-plugin-testing-harness</artifactId>
<version>2.1</version>
<version>3.3.0</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -383,15 +445,33 @@ under the License.
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.sonatype.aether</groupId>
<artifactId>aether-connector-wagon</artifactId>
<version>1.7</version>
<groupId>org.eclipse.aether</groupId>
<artifactId>aether-impl</artifactId>
<version>${aetherVersion}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.aether</groupId>
<artifactId>aether-connector-basic</artifactId>
<version>${aetherVersion}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.aether</groupId>
<artifactId>aether-transport-wagon</artifactId>
<version>${aetherVersion}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-http-lightweight</artifactId>
<version>3.3.4</version>
<version>3.5.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.32</version>
<scope>test</scope>
</dependency>

Expand All @@ -404,7 +484,7 @@ under the License.
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
<version>2.11.0</version>
</dependency>
</dependencies>

Expand Down Expand Up @@ -437,6 +517,11 @@ under the License.
<keyalg>RSA</keyalg>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.6.4</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@
import org.apache.maven.report.projectinfo.stubs.DependencyArtifactStubFactory;
import org.codehaus.plexus.i18n.I18N;
import org.codehaus.plexus.util.StringUtils;
import org.sonatype.aether.impl.internal.SimpleLocalRepositoryManager;
import org.sonatype.aether.util.DefaultRepositorySystemSession;
import org.eclipse.aether.internal.impl.SimpleLocalRepositoryManagerFactory;
import org.eclipse.aether.DefaultRepositorySystemSession;
import org.eclipse.aether.repository.LocalRepository;

/**
* Abstract class to test reports generation with <a href="http://www.httpunit.org/">HTTPUnit</a> framework.
Expand Down Expand Up @@ -184,7 +185,7 @@ protected AbstractProjectInfoReport createReportMojo( String goal, File pluginXm
legacySupport.setSession( newMavenSession( new MavenProjectStub() ) );
DefaultRepositorySystemSession repoSession =
(DefaultRepositorySystemSession) legacySupport.getRepositorySession();
repoSession.setLocalRepositoryManager( new SimpleLocalRepositoryManager( artifactStubFactory.getWorkingDir() ) );
repoSession.setLocalRepositoryManager( new SimpleLocalRepositoryManagerFactory().newInstance( repoSession, new LocalRepository( artifactStubFactory.getWorkingDir() ) ) );

setVariableValueToObject( mojo, "session", legacySupport.getSession() );
setVariableValueToObject( mojo, "remoteRepositories", mojo.getProject().getRemoteArtifactRepositories() );
Expand All @@ -200,7 +201,7 @@ protected File generateReport( AbstractProjectInfoReport mojo, File pluginXmlFil
ProjectBuilder builder = lookup( ProjectBuilder.class );

ProjectBuildingRequest buildingRequest = new DefaultProjectBuildingRequest();
buildingRequest.setRepositorySession( null );
buildingRequest.setRepositorySession( lookup( LegacySupport.class ).getRepositorySession() );

assertNotNull( "Local repository", mojo.localRepository );
testMavenProject = builder.build( pluginXmlFile, buildingRequest ).getProject();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
import org.apache.maven.artifact.DefaultArtifact;
import org.apache.maven.artifact.handler.DefaultArtifactHandler;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.repository.DefaultArtifactRepository;
import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy;
import org.apache.maven.artifact.repository.MavenArtifactRepository;
import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
import org.apache.maven.artifact.versioning.VersionRange;
import org.apache.maven.model.Build;
Expand Down Expand Up @@ -154,8 +155,8 @@ public Set<Artifact> getArtifacts()
@Override
public List<ArtifactRepository> getRemoteArtifactRepositories()
{
ArtifactRepository repository = new DefaultArtifactRepository( "central", "https://repo1.maven.org/maven2",
new DefaultRepositoryLayout() );
ArtifactRepository repository = new MavenArtifactRepository( "central", "https://repo1.maven.org/maven2",
new DefaultRepositoryLayout(), new ArtifactRepositoryPolicy(), new ArtifactRepositoryPolicy() );

return Collections.singletonList( repository );
}
Expand Down