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

Require Maven 3.2.5 #319

Merged
merged 1 commit into from
Jul 12, 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
33 changes: 14 additions & 19 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
<artifactId>plexus-component-annotations</artifactId>
<version>2.1.1</version>
<optional>true</optional>
</dependency>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
Expand All @@ -162,11 +162,22 @@
<version>0.13.1</version>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<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>org.apache.maven</groupId>
Expand Down Expand Up @@ -195,8 +206,7 @@
</dependencies>

<properties>
<mavenVersion>3.0</mavenVersion>

<mavenVersion>3.2.5</mavenVersion>
<slf4j.version>1.7.36</slf4j.version>
<project.build.outputTimestamp>2022-01-18T09:14:02Z</project.build.outputTimestamp>
</properties>
Expand All @@ -213,21 +223,6 @@
<detectOfflineLinks>false</detectOfflineLinks>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.6.4</version>
<configuration>
<goalPrefix>exec</goalPrefix>
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
</configuration>
<executions>
<execution>
<id>default-descriptor</id>
<phase>process-classes</phase>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>

Expand Down
9 changes: 3 additions & 6 deletions src/test/java/org/codehaus/mojo/exec/ExecJavaMojoTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintStream;
import java.nio.charset.StandardCharsets;

import org.apache.maven.execution.MavenSession;
import org.apache.maven.monitor.logging.DefaultLog;
Expand All @@ -33,13 +32,12 @@
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.ProjectBuilder;
import org.apache.maven.project.ProjectBuildingRequest;
import org.apache.maven.repository.internal.MavenRepositorySystemSession;
import org.codehaus.plexus.logging.Logger;
import org.codehaus.plexus.logging.console.ConsoleLogger;
import org.codehaus.plexus.util.StringOutputStream;
import org.eclipse.aether.DefaultRepositorySystemSession;
import org.eclipse.aether.RepositorySystemSession;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.sonatype.aether.impl.internal.SimpleLocalRepositoryManager;

/**
* @author Jerome Lacoste
Expand Down Expand Up @@ -341,8 +339,7 @@ private void setUpProject( File pomFile, AbstractMojo mojo )

ProjectBuildingRequest buildingRequest = mock( ProjectBuildingRequest.class );
when( session.getProjectBuildingRequest() ).thenReturn( buildingRequest );
MavenRepositorySystemSession repositorySession = new MavenRepositorySystemSession();
repositorySession.setLocalRepositoryManager( new SimpleLocalRepositoryManager( LOCAL_REPO ) );
RepositorySystemSession repositorySession = new DefaultRepositorySystemSession();
when( buildingRequest.getRepositorySession() ).thenReturn( repositorySession );

ProjectBuilder builder = lookup( ProjectBuilder.class );
Expand Down
7 changes: 1 addition & 6 deletions src/test/java/org/codehaus/mojo/exec/ExecMojoTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,11 @@
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.ProjectBuilder;
import org.apache.maven.project.ProjectBuildingRequest;
import org.apache.maven.repository.internal.MavenRepositorySystemSession;
import org.codehaus.plexus.logging.Logger;
import org.codehaus.plexus.logging.console.ConsoleLogger;
import org.codehaus.plexus.util.StringOutputStream;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.sonatype.aether.impl.internal.SimpleLocalRepositoryManager;

/**
* @author Jerome Lacoste
Expand Down Expand Up @@ -250,10 +248,7 @@ private void setUpProject( File pomFile, ExecMojo mojo )

ProjectBuildingRequest buildingRequest = mock( ProjectBuildingRequest.class );
when( session.getProjectBuildingRequest() ).thenReturn( buildingRequest );
MavenRepositorySystemSession repositorySession = new MavenRepositorySystemSession();
repositorySession.setLocalRepositoryManager( new SimpleLocalRepositoryManager( LOCAL_REPO ) );
when( buildingRequest.getRepositorySession() ).thenReturn( repositorySession );


ProjectBuilder builder = lookup( ProjectBuilder.class );

mojo.setBasedir( File.createTempFile( "mvn-temp", "txt" ).getParentFile() );
Expand Down