Skip to content

Commit 7d36682

Browse files
committed
Merge branch 'master' into feature/101-support-constructor-collection-injection
2 parents c564187 + 043270b commit 7d36682

File tree

24 files changed

+486
-247
lines changed

24 files changed

+486
-247
lines changed

.github/workflows/ci.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
matrix:
1010
os: [ubuntu-latest, macos-latest, windows-latest]
11-
java: [11, 17, 21, 22-ea, 23-ea]
11+
java: [11, 17, 21, 22, 23-ea]
1212
distribution: ['temurin']
1313
fail-fast: false
1414
max-parallel: 4

.github/workflows/codeql.yml

+6
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ jobs:
5050
- name: Checkout repository
5151
uses: actions/checkout@v4
5252

53+
- name: Setup Java
54+
uses: actions/setup-java@v4
55+
with:
56+
java-version: 17
57+
distribution: 'temurin'
58+
5359
# Initializes the CodeQL tools for scanning.
5460
- name: Initialize CodeQL
5561
uses: github/codeql-action/init@v3

.github/workflows/site.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
2626
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2727
- name: Deploy Site to gh-pages
28-
uses: JamesIves/github-pages-deploy-action@v4.5.0
28+
uses: JamesIves/github-pages-deploy-action@v4.6.1
2929
with:
3030
ssh-key: true
3131
branch: gh-pages

.github/workflows/sonatype.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
java-version: 21
1818
distribution: zulu
1919
- name: Deploy to Sonatype
20-
run: ./mvnw deploy -DskipTests -B -V --no-transfer-progress --settings ./.mvn/settings.xml -Dlicense.skip=true
20+
run: ./mvnw deploy -DskipTests -B -V --no-transfer-progress --settings ./.mvn/settings.xml -Dlicense.skip=true -Prelease -Dgpg.skip
2121
env:
2222
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
2323
CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }}

.mvn/extensions.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
4-
Copyright 2009-2023 the original author or authors.
4+
Copyright 2009-2024 the original author or authors.
55
66
Licensed under the Apache License, Version 2.0 (the "License");
77
you may not use this file except in compliance with the License.

.mvn/settings.xml

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
4-
Copyright 2009-2023 the original author or authors.
4+
Copyright 2009-2024 the original author or authors.
55
66
Licensed under the Apache License, Version 2.0 (the "License");
77
you may not use this file except in compliance with the License.
@@ -18,12 +18,15 @@
1818
-->
1919
<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2020
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 https://maven.apache.org/xsd/settings-1.2.0.xsd">
21+
2122
<servers>
23+
<!-- Used for sonatype snapshots and releases -->
2224
<server>
2325
<id>ossrh</id>
2426
<username>${env.CI_DEPLOY_USERNAME}</username>
2527
<password>${env.CI_DEPLOY_PASSWORD}</password>
2628
</server>
29+
2730
<!-- Used for gh-pages-scm publish via maven-scm-publish-plugin -->
2831
<server>
2932
<id>gh-pages-scm</id>
@@ -32,10 +35,19 @@
3235
<scmVersion>gh-pages</scmVersion>
3336
</configuration>
3437
</server>
38+
39+
<!-- Github deployments (site) -->
3540
<server>
3641
<id>github</id>
3742
<username>${env.CI_DEPLOY_USERNAME}</username>
3843
<password>${env.GITHUB_TOKEN}</password>
3944
</server>
45+
46+
<!-- NVD API Access (dependency-check-plugin) -->
47+
<server>
48+
<id>nvd</id>
49+
<password>${env.NVD_API_KEY}</password>
50+
</server>
4051
</servers>
52+
4153
</settings>

.mvn/wrapper/MavenWrapperDownloader.java

+44-49
Original file line numberDiff line numberDiff line change
@@ -21,77 +21,72 @@
2121
import java.io.InputStream;
2222
import java.net.Authenticator;
2323
import java.net.PasswordAuthentication;
24+
import java.net.URI;
2425
import java.net.URL;
2526
import java.nio.file.Files;
2627
import java.nio.file.Path;
2728
import java.nio.file.Paths;
2829
import java.nio.file.StandardCopyOption;
30+
import java.util.concurrent.ThreadLocalRandom;
2931

30-
public final class MavenWrapperDownloader
31-
{
32-
private static final String WRAPPER_VERSION = "3.2.0";
32+
public final class MavenWrapperDownloader {
33+
private static final String WRAPPER_VERSION = "3.3.1";
3334

34-
private static final boolean VERBOSE = Boolean.parseBoolean( System.getenv( "MVNW_VERBOSE" ) );
35+
private static final boolean VERBOSE = Boolean.parseBoolean(System.getenv("MVNW_VERBOSE"));
3536

36-
public static void main( String[] args )
37-
{
38-
log( "Apache Maven Wrapper Downloader " + WRAPPER_VERSION );
37+
public static void main(String[] args) {
38+
log("Apache Maven Wrapper Downloader " + WRAPPER_VERSION);
3939

40-
if ( args.length != 2 )
41-
{
42-
System.err.println( " - ERROR wrapperUrl or wrapperJarPath parameter missing" );
43-
System.exit( 1 );
40+
if (args.length != 2) {
41+
System.err.println(" - ERROR wrapperUrl or wrapperJarPath parameter missing");
42+
System.exit(1);
4443
}
4544

46-
try
47-
{
48-
log( " - Downloader started" );
49-
final URL wrapperUrl = new URL( args[0] );
50-
final String jarPath = args[1].replace( "..", "" ); // Sanitize path
51-
final Path wrapperJarPath = Paths.get( jarPath ).toAbsolutePath().normalize();
52-
downloadFileFromURL( wrapperUrl, wrapperJarPath );
53-
log( "Done" );
54-
}
55-
catch ( IOException e )
56-
{
57-
System.err.println( "- Error downloading: " + e.getMessage() );
58-
if ( VERBOSE )
59-
{
45+
try {
46+
log(" - Downloader started");
47+
final URL wrapperUrl = URI.create(args[0]).toURL();
48+
final String jarPath = args[1].replace("..", ""); // Sanitize path
49+
final Path wrapperJarPath = Paths.get(jarPath).toAbsolutePath().normalize();
50+
downloadFileFromURL(wrapperUrl, wrapperJarPath);
51+
log("Done");
52+
} catch (IOException e) {
53+
System.err.println("- Error downloading: " + e.getMessage());
54+
if (VERBOSE) {
6055
e.printStackTrace();
6156
}
62-
System.exit( 1 );
57+
System.exit(1);
6358
}
6459
}
6560

66-
private static void downloadFileFromURL( URL wrapperUrl, Path wrapperJarPath )
67-
throws IOException
68-
{
69-
log( " - Downloading to: " + wrapperJarPath );
70-
if ( System.getenv( "MVNW_USERNAME" ) != null && System.getenv( "MVNW_PASSWORD" ) != null )
71-
{
72-
final String username = System.getenv( "MVNW_USERNAME" );
73-
final char[] password = System.getenv( "MVNW_PASSWORD" ).toCharArray();
74-
Authenticator.setDefault( new Authenticator()
75-
{
61+
private static void downloadFileFromURL(URL wrapperUrl, Path wrapperJarPath)
62+
throws IOException {
63+
log(" - Downloading to: " + wrapperJarPath);
64+
if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
65+
final String username = System.getenv("MVNW_USERNAME");
66+
final char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
67+
Authenticator.setDefault(new Authenticator() {
7668
@Override
77-
protected PasswordAuthentication getPasswordAuthentication()
78-
{
79-
return new PasswordAuthentication( username, password );
69+
protected PasswordAuthentication getPasswordAuthentication() {
70+
return new PasswordAuthentication(username, password);
8071
}
81-
} );
72+
});
8273
}
83-
try ( InputStream inStream = wrapperUrl.openStream() )
84-
{
85-
Files.copy( inStream, wrapperJarPath, StandardCopyOption.REPLACE_EXISTING );
74+
Path temp = wrapperJarPath
75+
.getParent()
76+
.resolve(wrapperJarPath.getFileName() + "."
77+
+ Long.toUnsignedString(ThreadLocalRandom.current().nextLong()) + ".tmp");
78+
try (InputStream inStream = wrapperUrl.openStream()) {
79+
Files.copy(inStream, temp, StandardCopyOption.REPLACE_EXISTING);
80+
Files.move(temp, wrapperJarPath, StandardCopyOption.REPLACE_EXISTING);
81+
} finally {
82+
Files.deleteIfExists(temp);
8683
}
87-
log( " - Downloader complete" );
84+
log(" - Downloader complete");
8885
}
8986

90-
private static void log( String msg )
91-
{
92-
if ( VERBOSE )
93-
{
94-
System.out.println( msg );
87+
private static void log(String msg) {
88+
if (VERBOSE) {
89+
System.out.println(msg);
9590
}
9691
}
9792

.mvn/wrapper/maven-wrapper.properties

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17+
wrapperVersion=3.3.1
1718
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip
18-
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
19+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.1/maven-wrapper-3.3.1.jar

0 commit comments

Comments
 (0)