Skip to content

Commit

Permalink
generate 2023.12 bom
Browse files Browse the repository at this point in the history
  • Loading branch information
amergey committed Dec 10, 2023
1 parent 2f64f0a commit 035372f
Show file tree
Hide file tree
Showing 12 changed files with 24,284 additions and 10 deletions.
5,122 changes: 5,122 additions & 0 deletions data/2023.12/bnd-output.txt

Large diffs are not rendered by default.

2,462 changes: 2,462 additions & 0 deletions data/2023.12/maven-artifacts.json

Large diffs are not rendered by default.

13,657 changes: 13,657 additions & 0 deletions data/2023.12/potential-maven-artifacts.json

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions data/2023.12/repolist.bndrun
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-standalone true
-plugin.p2 \
aQute.bnd.repository.p2.provider.P2Repository; \
url="https://download.eclipse.org/releases/2023-12"

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
75a6629833030f3960f75467182f6e96
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
528dbfeea2bd23c1b3798433616546113cbffb3c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
79a4224772e83d7dbadb4901770480150b73513e601ae8883cf683a3b473d7bc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
86e12789bcfc0d826608b682dd9cee2086405ae2a90935c7096798f0a7f5a4447d218cddf122bdd5cb602c65781ac57a0bd87d835109e985c46cbbd9a9976f02
7 changes: 5 additions & 2 deletions src/main/resources/mavenMappings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,21 @@
<mavenMappings namePattern="com\.sun\.el" groupId="org.eclipse.jetty.orbit" artifactId="com.sun.el" versionPattern="(.*)" versionTemplate="$1" />
<mavenMappings namePattern="javassist" groupId="org.javassist" artifactId="javassist" versionPattern="([^.]+)\.([^.]+)\.([^.]+)\.([^.]+)" versionTemplate="$1.$2.$3-$4"/>
<mavenMappings namePattern="javax\.annotation" groupId="jakarta.annotation" artifactId="jakarta.annotation-api"/>
<mavenMappings namePattern="jakarta\.annotation-api" groupId="jakarta.annotation" artifactId="jakarta.annotation-api"/>
<mavenMappings namePattern="javax\.activation" groupId="com.sun.activation" artifactId="jakarta.activation" versionPattern="([^.]+)\.([^.]+)\.([^.]+)\.([^.]+)" versionTemplate="$1.$2.$3"/>
<mavenMappings namePattern="javax\.el" groupId="javax.el" artifactId="el-api" versionPattern="([^.]+)\.([^.]+)\.0(?:\..*)?" versionTemplate="$1.$2"/>
<mavenMappings namePattern="jakarta\.el" groupId="jakarta.el" artifactId="jakarta.el-api" versionPattern="([^.]+)\.([^.]+)\.([^.]+)\.([^.]+)" versionTemplate="$1.$2.$3"/>
<mavenMappings namePattern="org\.jdom" groupId="org.jdom" artifactId="jdom" versionPattern="([^.]+)\.([^.]+)\.([^.]+)\.([^.]+)" versionTemplate="$1.$2.$3"/>
<mavenMappings namePattern="jakarta\.ws\.rs-api" groupId="jakarta.ws.rs" artifactId="jakarta.ws.rs-api" versionPattern="([^.]+)\.([^.]+)\.([^.]+)" versionTemplate="$1.$2.$3"/>
<mavenMappings namePattern="javax\.ws\.rs" groupId="jakarta.ws.rs" artifactId="jakarta.ws.rs-api" versionPattern="([^.]+)\.([^.]+)\.([^.]+)\.([^.]+)" versionTemplate="$1.$2.$3"/>
<mavenMappings namePattern="javax\.el-api" groupId="jakarta.el" artifactId="jakarta.el-api" versionPattern="(.*)" versionTemplate="$1"/>
<mavenMappings namePattern="jakarta\.xml\.bind" groupId="jakarta.xml.bind" artifactId="jakarta.xml.bind-api"/>
<mavenMappings namePattern="([^.]+)\.servlet$" groupId="$1.servlet" artifactId="$1.servlet-api"/>
<mavenMappings namePattern="([^.]+)\.servlet$" groupId="$1.servlet" artifactId="$1.servlet-api" versionPattern="([^.]+)\.([^.]+)\.([^.]+)\.([^.]+)" versionTemplate="$1.$2.$3"/>
<mavenMappings namePattern="([^.]+)\.servlet\.jsp(.*)" groupId="$1.servlet.jsp" artifactId="$1.servlet.jsp-api"/>
<mavenMappings namePattern="(javax.inject)" groupId="$1" artifactId="$1" versionPattern="([^.]+)\.0(?:\..*)?" versionTemplate="$1"/>
<mavenMappings namePattern="jakarta\.inject\.jakarta\.inject-api" groupId="jakarta.inject" artifactId="jakarta.inject-api"/>
<mavenMappings namePattern="org\.apache\.commons\.cli" groupId="commons-cli" artifactId="commons-cli" versionPattern="([^.]+)\.([^.]+)\.([^.]+)" versionTemplate="$1.$2.$3"/>
<mavenMappings namePattern="org\.apache\.commons\.compress" groupId="org.apache.commons" artifactId="commons-compress" versionPattern="([^.]+)\.([^.]+)\.0(?:\..*)?" versionTemplate="$1.$2"/>
<mavenMappings namePattern="org\.apache\.commons\.compress" groupId="org.apache.commons" artifactId="commons-compress" versionPattern="([^.]+)\.([^.]+)\.([^.]+)" versionTemplate="$1.$2.$3"/>
<mavenMappings namePattern="org\.apache\.commons\.collections" groupId="commons-collections" artifactId="commons-collections" versionPattern="([^.]+)\.([^.]+)\.([^.]+)\.([^.]+)" versionTemplate="$1.$2.$3"/>
<mavenMappings namePattern="org\.apache\.commons\.commons-fileupload" groupId="commons-fileupload" artifactId="commons-fileupload" versionPattern="([^.]+)\.([^.]+)\.0(?:\..*)?" versionTemplate="$1.$2"/>
<mavenMappings namePattern="org\.apache\.commons\.(commons-[^.]+)" groupId="$1" artifactId="$1"/>
Expand Down
40 changes: 32 additions & 8 deletions src/test/java/fr/jmini/utils/ecentral/ECentralTaskTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -241,29 +241,53 @@ void testToMavenArtifactIo() throws Exception {
@Test
void testToMavenArtifactJavax() throws Exception {
List<MavenMapping> mavenMappings = ECentralTask.readMavenMappings();
MavenArtifact icu = ECentralTask.toMavenArtifact(new BndEntry("jakarta.servlet.jsp", "3.0.0.v20210105-0527"), mavenMappings)
MavenArtifact artifact = ECentralTask.toMavenArtifact(new BndEntry("jakarta.servlet.jsp", "3.0.0.v20210105-0527"), mavenMappings)
.orElseThrow();
assertThat(icu.getGroupId())
assertThat(artifact.getGroupId())
.as("groupId")
.isEqualTo("jakarta.servlet.jsp");
assertThat(icu.getArtifactId())
assertThat(artifact.getArtifactId())
.as("artifactId")
.isEqualTo("jakarta.servlet.jsp-api");
assertThat(icu.getVersion())
assertThat(artifact.getVersion())
.as("version")
.isEqualTo("3.0.0");

icu = ECentralTask.toMavenArtifact(new BndEntry("jakarta.ws.rs-api", "2.1.6"), mavenMappings)
artifact = ECentralTask.toMavenArtifact(new BndEntry("jakarta.ws.rs-api", "2.1.6"), mavenMappings)
.orElseThrow();
assertThat(icu.getGroupId())
assertThat(artifact.getGroupId())
.as("groupId")
.isEqualTo("jakarta.ws.rs");
assertThat(icu.getArtifactId())
assertThat(artifact.getArtifactId())
.as("artifactId")
.isEqualTo("jakarta.ws.rs-api");
assertThat(icu.getVersion())
assertThat(artifact.getVersion())
.as("version")
.isEqualTo("2.1.6");

artifact = ECentralTask.toMavenArtifact(new BndEntry("jakarta.annotation-api", "1.3.5"), mavenMappings)
.orElseThrow();
assertThat(artifact.getGroupId())
.as("groupId")
.isEqualTo("jakarta.annotation");
assertThat(artifact.getArtifactId())
.as("artifactId")
.isEqualTo("jakarta.annotation-api");
assertThat(artifact.getVersion())
.as("version")
.isEqualTo("1.3.5");

artifact = ECentralTask.toMavenArtifact(new BndEntry("jakarta.inject.jakarta.inject-api", "1.0.5"), mavenMappings)
.orElseThrow();
assertThat(artifact.getGroupId())
.as("groupId")
.isEqualTo("jakarta.inject");
assertThat(artifact.getArtifactId())
.as("artifactId")
.isEqualTo("jakarta.inject-api");
assertThat(artifact.getVersion())
.as("version")
.isEqualTo("1.0.5");
}

@Test
Expand Down
13 changes: 13 additions & 0 deletions src/test/java/fr/jmini/utils/ecentral/RunTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,19 @@
*/
class RunTest {

@Test
void run_2023_12() throws Exception {
Input input = new Input()
.withReleaseName("2023-12")
.withArtifactId("eclipse-full-dependencies");
ECentralTask task = new ECentralTask(input);
task.run();
String mavenArtifacts = Files.readString(task.getMavenArtifactsFile(), StandardCharsets.UTF_8);
String potentialMavenArtifacts = Files.readString(task.getPotentialMavenArtifactsFile(), StandardCharsets.UTF_8);

assertThatJson(mavenArtifacts).isEqualTo(potentialMavenArtifacts);
}

@Test
void run_2023_09() throws Exception {
Input input = new Input()
Expand Down

0 comments on commit 035372f

Please sign in to comment.