Skip to content

Commit 609a660

Browse files
authored
Merge branch 'codehaus-plexus:master' into hubspot
2 parents 99d599a + e39577b commit 609a660

File tree

8 files changed

+136
-19
lines changed

8 files changed

+136
-19
lines changed

.github/workflows/codeql.yml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ "master" ]
17+
pull_request:
18+
branches: [ "master" ]
19+
schedule:
20+
- cron: '33 4 * * 1'
21+
22+
jobs:
23+
analyze:
24+
name: Analyze (${{ matrix.language }})
25+
# Runner size impacts CodeQL analysis time. To learn more, please see:
26+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
27+
# - https://gh.io/supported-runners-and-hardware-resources
28+
# - https://gh.io/using-larger-runners (GitHub.com only)
29+
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
30+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
31+
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
32+
permissions:
33+
# required for all workflows
34+
security-events: write
35+
36+
# required to fetch internal or private CodeQL packs
37+
packages: read
38+
39+
# only required for workflows in private repositories
40+
actions: read
41+
contents: read
42+
43+
strategy:
44+
fail-fast: false
45+
matrix:
46+
include:
47+
- language: java-kotlin
48+
build-mode: none # This mode only analyzes Java. Set this to 'autobuild' or 'manual' to analyze Kotlin too.
49+
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
50+
# Use `c-cpp` to analyze code written in C, C++ or both
51+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
52+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
53+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
54+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
55+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
56+
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
57+
steps:
58+
- name: Checkout repository
59+
uses: actions/checkout@v4
60+
61+
# Initializes the CodeQL tools for scanning.
62+
- name: Initialize CodeQL
63+
uses: github/codeql-action/init@v3
64+
with:
65+
languages: ${{ matrix.language }}
66+
build-mode: ${{ matrix.build-mode }}
67+
# If you wish to specify custom queries, you can do so here or in a config file.
68+
# By default, queries listed here will override any specified in a config file.
69+
# Prefix the list here with "+" to use these queries and those in the config file.
70+
71+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
72+
# queries: security-extended,security-and-quality
73+
74+
# If the analyze step fails for one of the languages you are analyzing with
75+
# "We were unable to automatically build your code", modify the matrix above
76+
# to set the build mode to "manual" for that language. Then modify this step
77+
# to build your code.
78+
# ℹ️ Command-line programs to run using the OS shell.
79+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
80+
- if: matrix.build-mode == 'manual'
81+
shell: bash
82+
run: |
83+
echo 'If you are using a "manual" build mode for one or more of the' \
84+
'languages you are analyzing, replace this with the commands to build' \
85+
'your code, for example:'
86+
echo ' make bootstrap'
87+
echo ' make release'
88+
exit 1
89+
90+
- name: Perform CodeQL Analysis
91+
uses: github/codeql-action/analyze@v3
92+
with:
93+
category: "/language:${{matrix.language}}"

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Plexus-Compiler
44
[![Apache License, Version 2.0, January 2004](https://img.shields.io/github/license/codehaus-plexus/plexus-compiler.svg?label=License)](http://www.apache.org/licenses/)
55
[![Maven Central](https://img.shields.io/maven-central/v/org.codehaus.plexus/plexus-compiler.svg?label=Maven%20Central)](https://search.maven.org/artifact/org.codehaus.plexus/plexus-compiler)
66
[![CI](https://github.com/codehaus-plexus/plexus-compiler/actions/workflows/maven.yml/badge.svg)](https://github.com/codehaus-plexus/plexus-compiler/actions/workflows/maven.yml)
7+
[![Reproducible Builds](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/jvm-repo-rebuild/reproducible-central/master/content/org/codehaus/plexus/plexus-compiler/badge.json)](https://github.com/jvm-repo-rebuild/reproducible-central/blob/master/content/org/codehaus/plexus/plexus-compiler/README.md)
78

89
This component is an Compilation API used by Apache Maven Compiler plugin on the top of different Compiler Engines: Javac, Eclipse Compiler, etc..
910

plexus-compiler-its/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
<plugin>
4747
<groupId>org.apache.maven.plugins</groupId>
4848
<artifactId>maven-invoker-plugin</artifactId>
49-
<version>3.6.0</version>
49+
<version>3.7.0</version>
5050
<executions>
5151
<execution>
5252
<id>integration-tests</id>

plexus-compilers/plexus-compiler-eclipse/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<dependency>
2626
<groupId>org.eclipse.jdt</groupId>
2727
<artifactId>ecj</artifactId>
28-
<version>3.37.0</version>
28+
<version>3.38.0</version>
2929
</dependency>
3030
<dependency>
3131
<groupId>javax.inject</groupId>

plexus-compilers/plexus-compiler-javac-errorprone/src/test/java/org/codehaus/plexus/compiler/javac/JavacErrorProneCompilerTest.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,13 @@ protected int expectedWarnings() {
1717
String javaVersion = getJavaVersion();
1818
if (javaVersion.startsWith("1.8")) {
1919
return 1;
20-
} else if (javaVersion.contains("18") || javaVersion.contains("19") || javaVersion.contains("20")) {
20+
} else if (javaVersion.contains("18")
21+
|| javaVersion.contains("19")
22+
|| javaVersion.contains("20")
23+
|| javaVersion.contains("21")
24+
|| javaVersion.contains("22")
25+
|| javaVersion.contains("23")) {
2126
return 5;
22-
} else if (javaVersion.contains("21")) {
23-
return 6;
2427
}
2528
return 2;
2629
}

plexus-compilers/plexus-compiler-javac/src/test/java/org/codehaus/plexus/compiler/javac/AbstractJavacCompilerTest.java

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ protected int expectedErrors() {
6868
|| javaVersion.contains("18")
6969
|| javaVersion.contains("19")
7070
|| javaVersion.contains("20")
71-
|| javaVersion.contains("21")) {
71+
|| javaVersion.contains("21")
72+
|| javaVersion.contains("22")
73+
|| javaVersion.contains("23")) {
7274
return 5;
7375
}
7476
// javac output changed for misspelled modifiers starting in 1.6...they now generate 2 errors per occurrence,
@@ -92,7 +94,9 @@ protected int expectedWarnings() {
9294
|| javaVersion.contains("18")
9395
|| javaVersion.contains("19")
9496
|| javaVersion.contains("20")
95-
|| javaVersion.contains("21")) {
97+
|| javaVersion.contains("21")
98+
|| javaVersion.contains("22")
99+
|| javaVersion.contains("23")) {
96100
return 1;
97101
}
98102
if (javaVersion.contains("1.8")) {
@@ -141,6 +145,12 @@ public String getTargetVersion() {
141145
if (javaVersion.contains("21")) {
142146
return "21";
143147
}
148+
if (javaVersion.contains("22")) {
149+
return "22";
150+
}
151+
if (javaVersion.contains("23")) {
152+
return "23";
153+
}
144154
return super.getTargetVersion();
145155
}
146156

@@ -177,6 +187,12 @@ public String getSourceVersion() {
177187
if (javaVersion.contains("21")) {
178188
return "21";
179189
}
190+
if (javaVersion.contains("22")) {
191+
return "22";
192+
}
193+
if (javaVersion.contains("23")) {
194+
return "23";
195+
}
180196
return super.getTargetVersion();
181197
}
182198

@@ -192,7 +208,9 @@ protected Collection<String> expectedOutputFiles() {
192208
|| javaVersion.contains("18")
193209
|| javaVersion.contains("19")
194210
|| javaVersion.contains("20")
195-
|| javaVersion.contains("21")) {
211+
|| javaVersion.contains("21")
212+
|| javaVersion.contains("22")
213+
|| javaVersion.contains("23")) {
196214
return Arrays.asList(
197215
"org/codehaus/foo/Deprecation.class",
198216
"org/codehaus/foo/ExternalDeps.class",

plexus-compilers/plexus-compiler-javac/src/test/java/org/codehaus/plexus/compiler/javac/JavaxToolsCompilerTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ public class JavaxToolsCompilerTest extends AbstractJavacCompilerTest {
2727
@Override
2828
protected int expectedWarnings() {
2929
String javaVersion = getJavaVersion();
30-
if (javaVersion.contains("21")) {
31-
return 8;
30+
if (javaVersion.contains("21") || javaVersion.contains("22") || javaVersion.contains("23")) {
31+
return 1;
3232
} else {
3333
return super.expectedWarnings();
3434
}

pom.xml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.codehaus.plexus</groupId>
77
<artifactId>plexus</artifactId>
8-
<version>17</version>
8+
<version>18</version>
99
</parent>
1010

1111
<artifactId>plexus-compiler</artifactId>
@@ -48,7 +48,9 @@
4848
<aspectj.version>1.9.21</aspectj.version>
4949
<mavenVersion>3.6.3</mavenVersion>
5050
<minimalMavenBuildVersion>${mavenVersion}</minimalMavenBuildVersion>
51-
<errorprone.version>2.26.1</errorprone.version>
51+
<errorprone.version>2.30.0</errorprone.version>
52+
<eclipse.sisu.version>0.9.0.M3</eclipse.sisu.version>
53+
<sisuMavenPluginVersion>${eclipse.sisu.version}</sisuMavenPluginVersion>
5254
<trimStackTrace>false</trimStackTrace>
5355
<preparationGoals>clean install</preparationGoals>
5456
<maven.compiler.version>3.13.0</maven.compiler.version>
@@ -111,37 +113,37 @@
111113
<dependency>
112114
<groupId>org.codehaus.plexus</groupId>
113115
<artifactId>plexus-testing</artifactId>
114-
<version>1.3.0</version>
116+
<version>1.4.0</version>
115117
</dependency>
116118
<dependency>
117119
<groupId>com.google.guava</groupId>
118120
<artifactId>guava</artifactId>
119-
<version>33.1.0-jre</version>
121+
<version>33.2.1-jre</version>
120122
</dependency>
121123
<dependency>
122124
<groupId>org.eclipse.sisu</groupId>
123125
<artifactId>org.eclipse.sisu.plexus</artifactId>
124-
<version>0.9.0.M2</version>
126+
<version>${eclipse.sisu.version}</version>
125127
</dependency>
126128
<dependency>
127129
<groupId>org.eclipse.sisu</groupId>
128130
<artifactId>org.eclipse.sisu.inject</artifactId>
129-
<version>0.9.0.M2</version>
131+
<version>${eclipse.sisu.version}</version>
130132
</dependency>
131133
<dependency>
132134
<groupId>org.hamcrest</groupId>
133135
<artifactId>hamcrest</artifactId>
134-
<version>2.2</version>
136+
<version>3.0</version>
135137
</dependency>
136138
<dependency>
137139
<groupId>org.codehaus.plexus</groupId>
138140
<artifactId>plexus-utils</artifactId>
139-
<version>4.0.0</version>
141+
<version>4.0.1</version>
140142
</dependency>
141143
<dependency>
142144
<groupId>org.codehaus.plexus</groupId>
143145
<artifactId>plexus-xml</artifactId>
144-
<version>3.0.0</version>
146+
<version>3.0.1</version>
145147
</dependency>
146148
<dependency>
147149
<groupId>org.slf4j</groupId>

0 commit comments

Comments
 (0)