Skip to content

Commit

Permalink
Upgrade to maven 4.0.0-beta-3
Browse files Browse the repository at this point in the history
  • Loading branch information
gnodet committed Jun 17, 2024
1 parent 2feecb1 commit 113ee2e
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 15 deletions.
41 changes: 29 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ under the License.
<parent>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugins</artifactId>
<version>41</version>
<version>42</version>
<relativePath />
</parent>

Expand Down Expand Up @@ -61,24 +61,28 @@ under the License.
</distributionManagement>

<properties>
<mavenVersion>4.0.0-alpha-12</mavenVersion>
<mavenVersion>4.0.0-beta-3</mavenVersion>
<project.build.outputTimestamp>2023-06-14T18:50:52Z</project.build.outputTimestamp>
<javaVersion>8</javaVersion>
<javaVersion>17</javaVersion>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-di</artifactId>
<version>${mavenVersion}</version>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-api-core</artifactId>
<version>${mavenVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jakarta.inject</groupId>
<artifactId>jakarta.inject-api</artifactId>
<version>2.0.1</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.codehaus.plexus</groupId>
Expand Down Expand Up @@ -114,22 +118,35 @@ under the License.
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.36</version>
<version>2.0.13</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>org.apache.maven</groupId>
<artifactId>maven-di</artifactId>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.10.3-SNAPSHOT</version>
<version>4.0.0-SNAPSHOT</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.2</version>
<version>3.2.5</version>
<configuration>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
import java.nio.file.Path;
import java.nio.file.Paths;

import jakarta.inject.Inject;
import org.apache.maven.api.Session;
import org.apache.maven.api.di.Inject;
import org.apache.maven.api.plugin.Log;
import org.apache.maven.api.plugin.MojoException;
import org.apache.maven.api.plugin.annotations.Mojo;
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/org/apache/maven/plugins/clean/Cleaner.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ class Cleaner {

private static final boolean ON_WINDOWS = Os.isFamily(Os.FAMILY_WINDOWS);

private static final String LAST_DIRECTORY_TO_DELETE = Cleaner.class.getName() + ".lastDirectoryToDelete";
private static final SessionData.Key<Path> LAST_DIRECTORY_TO_DELETE =
SessionData.key(Path.class, Cleaner.class.getName() + ".lastDirectoryToDelete");

/**
* The maven session. This is typically non-null in a real run, but it can be during unit tests.
Expand Down Expand Up @@ -140,7 +141,7 @@ private boolean fastDelete(Path baseDir) {
try {
Files.move(baseDir, tmpDir, StandardCopyOption.REPLACE_EXISTING);
if (session != null) {
session.getData().set(LAST_DIRECTORY_TO_DELETE, baseDir.toFile());
session.getData().set(LAST_DIRECTORY_TO_DELETE, baseDir);
}
baseDir = tmpDir;
} catch (IOException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,14 @@ private void testSymlink(LinkCreator linkCreator) throws Exception {
assertFalse(Files.exists(dirWithLnk));
}

// @Provides
// @Singleton
// private Project createProject() {
// ProjectStub project = new ProjectStub();
// project.setGroupId("myGroupId");
// return project;
// }

// @Provides
// @Singleton
// @SuppressWarnings("unused")
Expand Down

0 comments on commit 113ee2e

Please sign in to comment.