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

Reduce warnings when building rewrite-maven-plugin #860

Merged
merged 1 commit into from
Sep 9, 2024
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
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