From a27c2fcf469a556d3f04d273c5dd1df04e36c9d2 Mon Sep 17 00:00:00 2001 From: "arnaud.mergey@semarchy.com" Date: Fri, 22 Nov 2024 19:52:13 +0100 Subject: [PATCH] fix http apache artifact --- data/2024.09/maven-artifacts.json | 2 +- .../eclipse-full-dependencies-2024.09.pom | 6 +++--- .../eclipse-full-dependencies-2024.09.pom.md5 | 2 +- .../eclipse-full-dependencies-2024.09.pom.sha1 | 2 +- .../eclipse-full-dependencies-2024.09.pom.sha256 | 2 +- .../eclipse-full-dependencies-2024.09.pom.sha512 | 2 +- .../jmini/utils/ecentral/ECentralTaskTest.java | 2 +- .../jmini/utils/ecentral/MavenResolverTest.java | 16 ++++++++++++++++ 8 files changed, 25 insertions(+), 9 deletions(-) diff --git a/data/2024.09/maven-artifacts.json b/data/2024.09/maven-artifacts.json index 4dfc2ea..b344809 100644 --- a/data/2024.09/maven-artifacts.json +++ b/data/2024.09/maven-artifacts.json @@ -616,7 +616,7 @@ }, { "groupId": "org.apache.httpcomponents", - "artifactId": "httpcore-nio", + "artifactId": "httpcore-osgi", "version": "4.4.16" }, { diff --git a/repo/fr/jmini/ecentral/eclipse-full-dependencies/2024.09/eclipse-full-dependencies-2024.09.pom b/repo/fr/jmini/ecentral/eclipse-full-dependencies/2024.09/eclipse-full-dependencies-2024.09.pom index 387d69e..382b770 100644 --- a/repo/fr/jmini/ecentral/eclipse-full-dependencies/2024.09/eclipse-full-dependencies-2024.09.pom +++ b/repo/fr/jmini/ecentral/eclipse-full-dependencies/2024.09/eclipse-full-dependencies-2024.09.pom @@ -148,7 +148,7 @@ 5.2.3 5.2.3 4.5.14 - 4.4.16 + 4.4.16 1.2.25 9.11.1 9.11.1 @@ -1288,8 +1288,8 @@ org.apache.httpcomponents - httpcore-nio - ${httpcore-nio.version} + httpcore-osgi + ${httpcore-osgi.version} ch.qos.reload4j diff --git a/repo/fr/jmini/ecentral/eclipse-full-dependencies/2024.09/eclipse-full-dependencies-2024.09.pom.md5 b/repo/fr/jmini/ecentral/eclipse-full-dependencies/2024.09/eclipse-full-dependencies-2024.09.pom.md5 index 1b3d495..af565dc 100644 --- a/repo/fr/jmini/ecentral/eclipse-full-dependencies/2024.09/eclipse-full-dependencies-2024.09.pom.md5 +++ b/repo/fr/jmini/ecentral/eclipse-full-dependencies/2024.09/eclipse-full-dependencies-2024.09.pom.md5 @@ -1 +1 @@ -8ae1aadd9130ce886f708892a73b752c \ No newline at end of file +6f89af48b379a983d140be4323aac257 \ No newline at end of file diff --git a/repo/fr/jmini/ecentral/eclipse-full-dependencies/2024.09/eclipse-full-dependencies-2024.09.pom.sha1 b/repo/fr/jmini/ecentral/eclipse-full-dependencies/2024.09/eclipse-full-dependencies-2024.09.pom.sha1 index e46c3da..58e2b53 100644 --- a/repo/fr/jmini/ecentral/eclipse-full-dependencies/2024.09/eclipse-full-dependencies-2024.09.pom.sha1 +++ b/repo/fr/jmini/ecentral/eclipse-full-dependencies/2024.09/eclipse-full-dependencies-2024.09.pom.sha1 @@ -1 +1 @@ -e04101087081b3906db937b1bb9aa7308501ddae \ No newline at end of file +d38543807c125a488f91012f3a08adeb38435d46 \ No newline at end of file diff --git a/repo/fr/jmini/ecentral/eclipse-full-dependencies/2024.09/eclipse-full-dependencies-2024.09.pom.sha256 b/repo/fr/jmini/ecentral/eclipse-full-dependencies/2024.09/eclipse-full-dependencies-2024.09.pom.sha256 index 86899d6..a14dd21 100644 --- a/repo/fr/jmini/ecentral/eclipse-full-dependencies/2024.09/eclipse-full-dependencies-2024.09.pom.sha256 +++ b/repo/fr/jmini/ecentral/eclipse-full-dependencies/2024.09/eclipse-full-dependencies-2024.09.pom.sha256 @@ -1 +1 @@ -b4b14d7e638be47cc4dfb99e6318524ad24802821ca7ba1958da08766e6ac70d \ No newline at end of file +d9f26ceb7182bbc2f8a0bdd8e60d5815f484a6f5eb74a28118229936654742d2 \ No newline at end of file diff --git a/repo/fr/jmini/ecentral/eclipse-full-dependencies/2024.09/eclipse-full-dependencies-2024.09.pom.sha512 b/repo/fr/jmini/ecentral/eclipse-full-dependencies/2024.09/eclipse-full-dependencies-2024.09.pom.sha512 index 4e46d89..9d64935 100644 --- a/repo/fr/jmini/ecentral/eclipse-full-dependencies/2024.09/eclipse-full-dependencies-2024.09.pom.sha512 +++ b/repo/fr/jmini/ecentral/eclipse-full-dependencies/2024.09/eclipse-full-dependencies-2024.09.pom.sha512 @@ -1 +1 @@ -548b37d8876886b676ed10009e4e992d4125b83685906f8b138dfd73affe21401395c16c9e0829fcd124705c57ade85670b39e65321c316ed9551fd3ef908113 \ No newline at end of file +bc4dfac1ac86e172868f2f566de3c5d496ba306c17ad5db53bdd100451a2d9f10f8846a81350598f89c52164a0e31c020beb7ec2e008337bfa28136299636afa \ No newline at end of file diff --git a/src/test/java/fr/jmini/utils/ecentral/ECentralTaskTest.java b/src/test/java/fr/jmini/utils/ecentral/ECentralTaskTest.java index 07936b8..d387062 100644 --- a/src/test/java/fr/jmini/utils/ecentral/ECentralTaskTest.java +++ b/src/test/java/fr/jmini/utils/ecentral/ECentralTaskTest.java @@ -311,7 +311,7 @@ void testApacheHttpToMavenArtifact() throws Exception { List mavenMappings = ECentralTask.readMavenMappings(); { - MavenArtifact mavenArtifact = ECentralTask.toMavenArtifact(new BndEntry("org.apache.httpcomponents.httpcore", "4.4.16.v20221207-1049"), mavenMappings) + MavenArtifact mavenArtifact = ECentralTask.toMavenArtifact(new BndEntry("org.apache.httpcomponents.httpcore", "4.4.16"), mavenMappings) .orElseThrow(); assertThat(mavenArtifact.getGroupId()) .as("groupId") diff --git a/src/test/java/fr/jmini/utils/ecentral/MavenResolverTest.java b/src/test/java/fr/jmini/utils/ecentral/MavenResolverTest.java index d695901..136c7d9 100644 --- a/src/test/java/fr/jmini/utils/ecentral/MavenResolverTest.java +++ b/src/test/java/fr/jmini/utils/ecentral/MavenResolverTest.java @@ -35,6 +35,22 @@ void testResolveJakartaAnnotation() throws IOException { assertThat(resolver.resolve(result.toPath())).isEqualTo(jakartaAnnotationArtifact); } + @Test + void testResolveApacheHttpCore() throws IOException { + MavenArtifact jartifact = new MavenArtifact("org.apache.httpcomponents", "httpcore-osgi", "4.4.16"); + + String urlInMavenCentral = Maven.jarMavenCentralUrl(jartifact); + + File result = Unirest.get(urlInMavenCentral) + .asFile(Files.createTempFile("testMaven", ".jar") + .toAbsolutePath() + .toString(), StandardCopyOption.REPLACE_EXISTING) + .getBody(); + + MavenResolver resolver = new MavenResolver(); + assertThat(resolver.resolve(result.toPath())).isEqualTo(jartifact); + } + @Test void testResolvePotential() throws IOException { MavenArtifact osgiXmlArtifact = new MavenArtifact("org.osgi", "org.osgi.util.xml", "1.0.2");