Skip to content
This repository was archived by the owner on Jun 4, 2024. It is now read-only.

Commit da295a7

Browse files
authored
Relocation to vitalijr2/aws-lambda-slf4j
* Update Maven Wrapper to 3.3.2 * Update readme.md (#145) * Update Maven Shade plugin's properties * Relocation to vitalijr2/aws-lambda-slf4j
1 parent e204ca8 commit da295a7

File tree

12 files changed

+291
-131
lines changed

12 files changed

+291
-131
lines changed

.mvn/.gitignore

-1
This file was deleted.

.mvn/maven.config

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
--fail-at-end
2+
--show-version
3+
-Djava.awt.headless=true
4+
-DinstallAtEnd=true
5+
-DdeployAtEnd=true
16
-Dhttps.protocols=TLSv1.2
27
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN
3-
-Djava.awt.headless=true

.mvn/wrapper/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
maven-wrapper.jar
+93
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import java.io.IOException;
21+
import java.io.InputStream;
22+
import java.net.Authenticator;
23+
import java.net.PasswordAuthentication;
24+
import java.net.URI;
25+
import java.net.URL;
26+
import java.nio.file.Files;
27+
import java.nio.file.Path;
28+
import java.nio.file.Paths;
29+
import java.nio.file.StandardCopyOption;
30+
import java.util.concurrent.ThreadLocalRandom;
31+
32+
public final class MavenWrapperDownloader {
33+
private static final String WRAPPER_VERSION = "3.3.2";
34+
35+
private static final boolean VERBOSE = Boolean.parseBoolean(System.getenv("MVNW_VERBOSE"));
36+
37+
public static void main(String[] args) {
38+
log("Apache Maven Wrapper Downloader " + WRAPPER_VERSION);
39+
40+
if (args.length != 2) {
41+
System.err.println(" - ERROR wrapperUrl or wrapperJarPath parameter missing");
42+
System.exit(1);
43+
}
44+
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) {
55+
e.printStackTrace();
56+
}
57+
System.exit(1);
58+
}
59+
}
60+
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() {
68+
@Override
69+
protected PasswordAuthentication getPasswordAuthentication() {
70+
return new PasswordAuthentication(username, password);
71+
}
72+
});
73+
}
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);
83+
}
84+
log(" - Downloader complete");
85+
}
86+
87+
private static void log(String msg) {
88+
if (VERBOSE) {
89+
System.out.println(msg);
90+
}
91+
}
92+
93+
}

.mvn/wrapper/maven-wrapper.properties

+4-2
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,7 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17-
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
17+
wrapperVersion=3.3.2
18+
distributionType=source
19+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.7/apache-maven-3.9.7-bin.zip
20+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.3.2/maven-wrapper-3.3.2.jar

core/pom.xml

+8
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,14 @@
9898
</dependency>
9999
</dependencies>
100100
<description>An SLF4J Logger implementation for AWS Lambda, code module</description>
101+
<distributionManagement>
102+
<relocation>
103+
<artifactId></artifactId>
104+
<groupId></groupId>
105+
<message>The project was moved to vitalijr2/aws-lambda-slf4j on 18-02-2024.</message>
106+
<version>1.1.1</version>
107+
</relocation>
108+
</distributionManagement>
101109
<modelVersion>4.0.0</modelVersion>
102110
<name>SLF4J for AWS Lambda Core</name>
103111
<parent>

json-logger/pom.xml

+8
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,14 @@
7979
</dependency>
8080
</dependencies>
8181
<description>An SLF4J Logger implementation for AWS Lambda, JSON Output</description>
82+
<distributionManagement>
83+
<relocation>
84+
<artifactId></artifactId>
85+
<groupId></groupId>
86+
<message>The project was moved to vitalijr2/aws-lambda-slf4j on 18-02-2024.</message>
87+
<version>1.1.1</version>
88+
</relocation>
89+
</distributionManagement>
8290
<modelVersion>4.0.0</modelVersion>
8391
<name>SLF4J for AWS Lambda JSON Logger</name>
8492
<parent>

logger/pom.xml

+8
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,14 @@
8484
</dependency>
8585
</dependencies>
8686
<description>An SLF4J Logger implementation for AWS Lambda</description>
87+
<distributionManagement>
88+
<relocation>
89+
<artifactId></artifactId>
90+
<groupId></groupId>
91+
<message>The project was moved to vitalijr2/aws-lambda-slf4j on 18-02-2024.</message>
92+
<version>1.1.1</version>
93+
</relocation>
94+
</distributionManagement>
8795
<modelVersion>4.0.0</modelVersion>
8896
<name>SLF4J for AWS Lambda Logger</name>
8997
<parent>

0 commit comments

Comments
 (0)