You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2023/04/29 11:35:37 UTC
[maven] branch MNG-7777-guice6 created (now 1b8964f37)
This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a change to branch MNG-7777-guice6
in repository https://gitbox.apache.org/repos/asf/maven.git
at 1b8964f37 [MNG-7777] Upgrade Guice to 6 - adds support to jakarta.inject (WIP)
This branch includes the following new commits:
new 3fbe0d789 [MNG-7743] Make the build work on JDK 20
new 1b8964f37 [MNG-7777] Upgrade Guice to 6 - adds support to jakarta.inject (WIP)
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[maven] 02/02: [MNG-7777] Upgrade Guice to 6 - adds support to jakarta.inject (WIP)
Posted by sl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a commit to branch MNG-7777-guice6
in repository https://gitbox.apache.org/repos/asf/maven.git
commit 1b8964f37b3f0bce098ee4711966d5669f72e7b4
Author: Sylwester Lachiewicz <sl...@apache.org>
AuthorDate: Sat Apr 29 13:33:44 2023 +0200
[MNG-7777] Upgrade Guice to 6 - adds support to jakarta.inject (WIP)
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 9a2df428e..666b99129 100644
--- a/pom.xml
+++ b/pom.xml
@@ -135,7 +135,7 @@ under the License.
<plexusInterpolationVersion>1.26</plexusInterpolationVersion>
<!-- Blocked by 3.4.0+ changes, see MNG-7710 -->
<plexusUtilsVersion>3.5.1</plexusUtilsVersion>
- <guiceVersion>5.1.0</guiceVersion>
+ <guiceVersion>6.0.0-rc1</guiceVersion>
<guavaVersion>31.1-jre</guavaVersion>
<guavafailureaccessVersion>1.0.1</guavafailureaccessVersion>
<wagonVersion>3.5.3</wagonVersion>
[maven] 01/02: [MNG-7743] Make the build work on JDK 20
Posted by sl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
slachiewicz pushed a commit to branch MNG-7777-guice6
in repository https://gitbox.apache.org/repos/asf/maven.git
commit 3fbe0d789a7d3237b065d1a2ccc6c75d4663d1a0
Author: Petr Široký <pe...@pm.me>
AuthorDate: Sat Mar 18 21:42:15 2023 +0100
[MNG-7743] Make the build work on JDK 20
* the behaviour before the fix was already pretty confusing. JDK 19 and
older do not check the presense of '{' in the constructor, so the
URL object got created, but when converting to file the result would
be e.g. '/../../src/test/remote-repo' which is completely wrong.
But it seems the affected tests did not really care, as all of them
were passing
---
.../apache/maven/repository/TestRepositoryConnector.java | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/maven-core/src/test/java/org/apache/maven/repository/TestRepositoryConnector.java b/maven-core/src/test/java/org/apache/maven/repository/TestRepositoryConnector.java
index 4fd761003..89c749eb9 100644
--- a/maven-core/src/test/java/org/apache/maven/repository/TestRepositoryConnector.java
+++ b/maven-core/src/test/java/org/apache/maven/repository/TestRepositoryConnector.java
@@ -49,10 +49,17 @@ public class TestRepositoryConnector implements RepositoryConnector {
public TestRepositoryConnector(RemoteRepository repository) {
this.repository = repository;
- try {
- basedir = FileUtils.toFile(new URL(repository.getUrl()));
- } catch (MalformedURLException e) {
- throw new IllegalStateException(e);
+ String repositoryUrl = repository.getUrl();
+ if (repositoryUrl.contains("${")) {
+ // the repository url contains unresolved properties and getting the basedir is not possible
+ // in JDK 20+ 'new URL(string)' will fail if the string contains a curly brace
+ this.basedir = null;
+ } else {
+ try {
+ basedir = FileUtils.toFile(new URL(repositoryUrl));
+ } catch (MalformedURLException e) {
+ throw new IllegalStateException(e);
+ }
}
}