Skip to content

Commit

Permalink
fix http apache artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
amergey committed Nov 22, 2024
1 parent ae0fbcc commit a27c2fc
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 9 deletions.
2 changes: 1 addition & 1 deletion data/2024.09/maven-artifacts.json
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@
},
{
"groupId": "org.apache.httpcomponents",
"artifactId": "httpcore-nio",
"artifactId": "httpcore-osgi",
"version": "4.4.16"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
<httpcore5.version>5.2.3</httpcore5.version>
<httpcore5-h2.version>5.2.3</httpcore5-h2.version>
<httpclient-osgi.version>4.5.14</httpclient-osgi.version>
<httpcore-nio.version>4.4.16</httpcore-nio.version>
<httpcore-osgi.version>4.4.16</httpcore-osgi.version>
<reload4j.version>1.2.25</reload4j.version>
<lucene-analysis-common.version>9.11.1</lucene-analysis-common.version>
<lucene-analysis-smartcn.version>9.11.1</lucene-analysis-smartcn.version>
Expand Down Expand Up @@ -1288,8 +1288,8 @@
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore-nio</artifactId>
<version>${httpcore-nio.version}</version>
<artifactId>httpcore-osgi</artifactId>
<version>${httpcore-osgi.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.reload4j</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8ae1aadd9130ce886f708892a73b752c
6f89af48b379a983d140be4323aac257
Original file line number Diff line number Diff line change
@@ -1 +1 @@
e04101087081b3906db937b1bb9aa7308501ddae
d38543807c125a488f91012f3a08adeb38435d46
Original file line number Diff line number Diff line change
@@ -1 +1 @@
b4b14d7e638be47cc4dfb99e6318524ad24802821ca7ba1958da08766e6ac70d
d9f26ceb7182bbc2f8a0bdd8e60d5815f484a6f5eb74a28118229936654742d2
Original file line number Diff line number Diff line change
@@ -1 +1 @@
548b37d8876886b676ed10009e4e992d4125b83685906f8b138dfd73affe21401395c16c9e0829fcd124705c57ade85670b39e65321c316ed9551fd3ef908113
bc4dfac1ac86e172868f2f566de3c5d496ba306c17ad5db53bdd100451a2d9f10f8846a81350598f89c52164a0e31c020beb7ec2e008337bfa28136299636afa
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ void testApacheHttpToMavenArtifact() throws Exception {
List<MavenMapping> 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")
Expand Down
16 changes: 16 additions & 0 deletions src/test/java/fr/jmini/utils/ecentral/MavenResolverTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit a27c2fc

Please sign in to comment.