Skip to content

Update all dependencies and fix all build warnings #28

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

Merged
merged 3 commits into from
Jul 19, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
7 changes: 4 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ jobs:
jdk: ['11']
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.2.2
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v1
uses: actions/setup-java@v4.7.1
with:
distribution: 'temurin'
java-version: ${{ matrix.jdk }}
- name: Cache Maven packages
uses: actions/cache@v3
uses: actions/cache@v4.2.3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
Expand Down
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Patrick Reinhart <https://github.com/reinhapa[@reinhapa]>
:group-name: org.adoptopenjdk.maven.plugins
:project-full-path: AdoptOpenJDK/{project-name}
:github-branch: master
:jdk-version: 12
:jdk-version: 11
:jdk-url: https://jdk.java.net/{jdk-version}
:adoptopenjdk-url: https://adoptopenjdk.net

Expand Down
37 changes: 19 additions & 18 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,9 @@
</distributionManagement>

<properties>
<junit.version>4.13.2</junit.version>
<mockito.version>3.8.0</mockito.version>
<easymock.version>4.2</easymock.version>
<mavenVersion>3.9.8</mavenVersion>
<mavenVersion>3.9.11</mavenVersion>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

Expand All @@ -79,16 +78,19 @@
<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-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.plugin-tools</groupId>
Expand Down Expand Up @@ -160,36 +162,35 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
<version>3.5.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.14.0</version>
<configuration>
<source>11</source>
<target>11</target>
<release>11</release>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.0.0-M1</version>
<version>3.1.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>3.0.0-M1</version>
<version>3.1.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<version>3.4.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<version>3.11.2</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand All @@ -202,7 +203,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.6.0</version>
<version>3.15.1</version>
<configuration>
<goalPrefix>jsplitpkgscan</goalPrefix>
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
Expand All @@ -211,17 +212,17 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.2.0</version>
<version>3.3.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.9.1</version>
<version>3.21.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<version>3.3.1</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -234,17 +235,17 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<version>3.5.3</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<version>3.2.8</version>
</plugin>
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>6.1.1</version>
<version>12.1.3</version>
<executions>
<execution>
<goals>
Expand Down Expand Up @@ -292,7 +293,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
<version>3.2.0</version>
<version>3.9.1</version>
<configuration>
<debug>true</debug>
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class JsplitpkgscanMojo extends AbstractMojo {
/**
* Execute jsplitpgkscan tool for the projects artifact against all it's dependencies.
*
* @throws MojoExecutionException
* @throws MojoExecutionException General exception thrown if the mojo execution fails.
*/
@Override
public void execute() throws MojoExecutionException {
Expand Down
16 changes: 16 additions & 0 deletions src/main/java/org/adoptopenjdk/maven/plugins/OutputParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,29 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
* Parses the output of the jsplitpkgscan tool and provides a callback with the results.
* The output is expected to be in a specific format where each line contains a package name
* followed by module details.
*/
public class OutputParser {
private final BiConsumer<String, Set<ModuleDetail>> consumer;

/**
* Constructs an OutputParser with a consumer that will handle the parsed results.
*
* @param consumer a BiConsumer that takes a package name and a set of ModuleDetail objects
*/
public OutputParser(BiConsumer<String, Set<ModuleDetail>> consumer) {
this.consumer = consumer;
}

/**
* Parses the provided output data and invokes the consumer with the package name and module details.
*
* @param outputData the byte array containing the output data to parse
* @throws IOException if an I/O error occurs while reading the output data
*/
public void parse(byte[] outputData) throws IOException {
Pattern pattern = Pattern.compile("^[\\s]+([0-9]+)[\\s]+(.*)$");
try (BufferedReader reader = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(outputData)))) {
Expand Down