Skip to content

Commit

Permalink
Reduce warnings when building rewrite-maven-plugin (#860)
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek committed Sep 9, 2024
1 parent 61dc437 commit 89dde5f
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .sdkmanrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Enable auto-env through the sdkman_auto_env config
# Add key=value pairs of SDKs to use below
java=17.0.9-tem
java=17.0.12-tem
16 changes: 16 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,22 @@
<scope>import</scope>
<type>pom</type>
</dependency>
<!-- Transitive through Plexus, but with provided scope -->
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-api-meta</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-api-xml</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-xml-impl</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down
8 changes: 4 additions & 4 deletions src/main/java/org/openrewrite/maven/AbstractRewriteMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
package org.openrewrite.maven;

import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject;
import org.apache.maven.rtinfo.RuntimeInformation;
Expand All @@ -32,6 +31,7 @@
import org.openrewrite.ipc.http.HttpSender;
import org.openrewrite.ipc.http.HttpUrlConnectionSender;

import javax.inject.Inject;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
Expand All @@ -50,13 +50,13 @@ public abstract class AbstractRewriteMojo extends ConfigurableRewriteMojo {
@Parameter(property = "rewrite.resolvePropertiesInYaml", defaultValue = "true")
protected boolean resolvePropertiesInYaml;

@Component
@Inject
protected RuntimeInformation runtime;

@Component
@Inject
protected SettingsDecrypter settingsDecrypter;

@Component
@Inject
protected RepositorySystem repositorySystem;

protected Environment environment() throws MojoExecutionException {
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/openrewrite/maven/RewriteDryRunIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
@MavenJupiterExtension
@MavenOption(MavenCLIOptions.NO_TRANSFER_PROGRESS)
@MavenOption(MavenCLIExtra.MUTE_PLUGIN_VALIDATION_WARNING)
@MavenOption(MavenCLIOptions.DEBUG)
@MavenOption(MavenCLIOptions.VERBOSE)
@MavenGoal("${project.groupId}:${project.artifactId}:${project.version}:dryRun")
class RewriteDryRunIT {

Expand Down

0 comments on commit 89dde5f

Please sign in to comment.