Skip to content

Commit e4f2e30

Browse files
authored
build(pom): Implement BOM dependency management (#33)
* build(pom): Implement BOM dependency management * doc: Update README.md to reflect the latest changes
1 parent e1e8870 commit e4f2e30

File tree

3 files changed

+36
-116
lines changed

3 files changed

+36
-116
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ nbactions.xml
2020
# Maven
2121
pom.xml.*
2222
release.properties
23+
.flattened-pom.xml
2324

2425
# VS Code
2526
.factorypath

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ X.509-Attacker is a tool based on ASN.1 Tool for creating arbitrary certificates
88
ASN.1 Tool (https://github.com/tls-attacker/ASN.1-Tool) in terms of certificate signing. Also, X.509-Attacker
99
introduces a feature of referencing XML elements in order to avoid redundancies when defining certificates in XML.
1010

11-
#Installation
11+
# Installation
1212

1313
In order to compile and use X.509-Attacker, you need to have Java and Maven installed. On Ubuntu you can install Maven by
1414
running:
@@ -29,8 +29,8 @@ If you want to use this project as a dependency, you do not have to compile it y
2929
```xml
3030
<dependency>
3131
<groupId>de.rub.nds</groupId>
32-
<artifactId>X509Attacker</artifactId>
33-
<version>1.2.0</version>
32+
<artifactId>x509-attacker</artifactId>
33+
<version>2.0.0</version>
3434
</dependency>
3535
```
3636

pom.xml

Lines changed: 32 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
6+
<parent>
7+
<groupId>de.rub.nds</groupId>
8+
<artifactId>protocol-toolkit-bom</artifactId>
9+
<version>1.1.0</version>
10+
</parent>
611

7-
<groupId>de.rub.nds</groupId>
8-
<artifactId>X509Attacker</artifactId>
12+
<artifactId>x509-attacker</artifactId>
913
<version>1.4.0-SNAPSHOT</version>
10-
<packaging>jar</packaging>
1114

1215
<name>X.509-Attacker</name>
1316
<description>X.509-Attacker is a tool based on ASN.1 Tool for creating arbitrary certificates; including especially
@@ -25,18 +28,6 @@
2528
</license>
2629
</licenses>
2730

28-
<distributionManagement>
29-
<snapshotRepository>
30-
<id>rub-nexus</id>
31-
<name>TLS-Attacker Internal Repository</name>
32-
<url>https://hydrogen.cloud.nds.rub.de/nexus/repository/maven-snapshots/</url>
33-
</snapshotRepository>
34-
<repository>
35-
<id>ossrh</id>
36-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
37-
</repository>
38-
</distributionManagement>
39-
4031
<developers>
4132
<developer>
4233
<id>nkafka</id>
@@ -61,49 +52,40 @@
6152
<!-- scope: compile -->
6253
<dependency>
6354
<groupId>de.rub.nds</groupId>
64-
<artifactId>ModifiableVariable</artifactId>
65-
<version>3.6.0-SNAPSHOT</version>
55+
<artifactId>modifiable-variable</artifactId>
6656
</dependency>
6757
<dependency>
6858
<groupId>de.rub.nds</groupId>
69-
<artifactId>Asn1Tool</artifactId>
70-
<version>1.5.0-SNAPSHOT</version>
59+
<artifactId>asn1-tool</artifactId>
7160
</dependency>
7261
<dependency>
7362
<groupId>org.apache.logging.log4j</groupId>
7463
<artifactId>log4j-api</artifactId>
75-
<version>2.19.0</version>
7664
</dependency>
7765
<dependency>
7866
<groupId>org.apache.logging.log4j</groupId>
7967
<artifactId>log4j-core</artifactId>
80-
<version>2.19.0</version>
8168
</dependency>
8269
<dependency>
8370
<groupId>org.bouncycastle</groupId>
8471
<artifactId>bcpkix-jdk15on</artifactId>
85-
<version>1.64</version>
8672
</dependency>
8773
<dependency>
8874
<groupId>org.bouncycastle</groupId>
8975
<artifactId>bcprov-jdk15on</artifactId>
90-
<version>1.64</version>
9176
</dependency>
9277
<dependency>
9378
<groupId>jakarta.xml.bind</groupId>
9479
<artifactId>jakarta.xml.bind-api</artifactId>
95-
<version>4.0.0</version>
9680
</dependency>
9781
<dependency>
9882
<groupId>org.glassfish.jaxb</groupId>
9983
<artifactId>jaxb-runtime</artifactId>
100-
<version>4.0.0</version>
10184
</dependency>
10285
<!-- scope: test -->
10386
<dependency>
10487
<groupId>org.junit.jupiter</groupId>
10588
<artifactId>junit-jupiter</artifactId>
106-
<version>5.9.0</version>
10789
<scope>test</scope>
10890
</dependency>
10991
</dependencies>
@@ -114,7 +96,6 @@
11496
<plugin>
11597
<groupId>org.apache.maven.plugins</groupId>
11698
<artifactId>maven-clean-plugin</artifactId>
117-
<version>3.2.0</version>
11899
<executions>
119100
<execution>
120101
<id>default-clean</id>
@@ -147,35 +128,10 @@
147128
</executions>
148129
</plugin>
149130
<!--################# default lifecycle plugins #################-->
150-
<!-- Enforce maven and java version -->
151-
<plugin>
152-
<groupId>org.apache.maven.plugins</groupId>
153-
<artifactId>maven-enforcer-plugin</artifactId>
154-
<version>3.1.0</version>
155-
<executions>
156-
<execution>
157-
<id>enforce-versions</id>
158-
<goals>
159-
<goal>enforce</goal>
160-
</goals>
161-
<configuration>
162-
<rules>
163-
<requireMavenVersion>
164-
<version>3.6</version>
165-
</requireMavenVersion>
166-
<requireJavaVersion>
167-
<version>${maven.compiler.source}</version>
168-
</requireJavaVersion>
169-
</rules>
170-
</configuration>
171-
</execution>
172-
</executions>
173-
</plugin>
174131
<!-- Formatting -->
175132
<plugin>
176133
<groupId>net.revelc.code.formatter</groupId>
177134
<artifactId>formatter-maven-plugin</artifactId>
178-
<version>2.20.0</version>
179135
<configuration>
180136
<configFile>${project.basedir}/maven-eclipse-codestyle.xml</configFile>
181137
</configuration>
@@ -191,7 +147,6 @@
191147
<plugin>
192148
<groupId>com.mycila</groupId>
193149
<artifactId>license-maven-plugin</artifactId>
194-
<version>4.1</version>
195150
<configuration>
196151
<header>${project.basedir}/license_header_plain.txt</header>
197152
<strictCheck>true</strictCheck>
@@ -220,17 +175,39 @@
220175
</execution>
221176
</executions>
222177
</plugin>
178+
<!-- Flatten pom.xml before install / deploy phases -->
179+
<plugin>
180+
<groupId>org.codehaus.mojo</groupId>
181+
<artifactId>flatten-maven-plugin</artifactId>
182+
<configuration>
183+
<flattenMode>ossrh</flattenMode>
184+
</configuration>
185+
<executions>
186+
<execution>
187+
<id>flatten</id>
188+
<phase>process-resources</phase>
189+
<goals>
190+
<goal>flatten</goal>
191+
</goals>
192+
</execution>
193+
<execution>
194+
<id>flatten-clean</id>
195+
<phase>clean</phase>
196+
<goals>
197+
<goal>clean</goal>
198+
</goals>
199+
</execution>
200+
</executions>
201+
</plugin>
223202
<!-- Copy project resources to output directory -->
224203
<plugin>
225204
<groupId>org.apache.maven.plugins</groupId>
226205
<artifactId>maven-resources-plugin</artifactId>
227-
<version>3.3.0</version>
228206
</plugin>
229207
<!-- Compile source files -->
230208
<plugin>
231209
<groupId>org.apache.maven.plugins</groupId>
232210
<artifactId>maven-compiler-plugin</artifactId>
233-
<version>3.10.1</version>
234211
<configuration>
235212
<source>${maven.compiler.source}</source>
236213
<target>${maven.compiler.target}</target>
@@ -240,13 +217,11 @@
240217
<plugin>
241218
<groupId>org.apache.maven.plugins</groupId>
242219
<artifactId>maven-surefire-plugin</artifactId>
243-
<version>3.0.0-M7</version>
244220
</plugin>
245221
<!-- Build jar file -->
246222
<plugin>
247223
<groupId>org.apache.maven.plugins</groupId>
248224
<artifactId>maven-jar-plugin</artifactId>
249-
<version>3.3.0</version>
250225
<configuration>
251226
<archive>
252227
<manifest>
@@ -262,7 +237,6 @@
262237
<plugin>
263238
<groupId>org.apache.maven.plugins</groupId>
264239
<artifactId>maven-javadoc-plugin</artifactId>
265-
<version>3.4.1</version>
266240
<configuration>
267241
<source>${maven.compiler.source}</source>
268242
<javadocExecutable>
@@ -282,7 +256,6 @@
282256
<plugin>
283257
<groupId>org.apache.maven.plugins</groupId>
284258
<artifactId>maven-source-plugin</artifactId>
285-
<version>3.2.1</version>
286259
<executions>
287260
<execution>
288261
<id>attach-sources</id>
@@ -296,7 +269,6 @@
296269
<plugin>
297270
<groupId>org.apache.maven.plugins</groupId>
298271
<artifactId>maven-dependency-plugin</artifactId>
299-
<version>3.3.0</version>
300272
<executions>
301273
<execution>
302274
<id>copy</id>
@@ -331,61 +303,11 @@
331303
</execution>
332304
</executions>
333305
</plugin>
334-
<!-- Sign artifacts -->
335-
<plugin>
336-
<groupId>org.apache.maven.plugins</groupId>
337-
<artifactId>maven-gpg-plugin</artifactId>
338-
<version>3.0.1</version>
339-
<executions>
340-
<execution>
341-
<id>sign-artifacts</id>
342-
<goals>
343-
<goal>sign</goal>
344-
</goals>
345-
</execution>
346-
</executions>
347-
<configuration>
348-
<skip>${skip.signature}</skip>
349-
</configuration>
350-
</plugin>
351-
<!-- Install artifacts to local maven repository -->
352-
<plugin>
353-
<groupId>org.apache.maven.plugins</groupId>
354-
<artifactId>maven-install-plugin</artifactId>
355-
<version>3.0.1</version>
356-
</plugin>
357-
<!-- Artifact deployment to OSSRH -->
358-
<plugin>
359-
<groupId>org.sonatype.plugins</groupId>
360-
<artifactId>nexus-staging-maven-plugin</artifactId>
361-
<version>1.6.13</version>
362-
<extensions>true</extensions>
363-
<configuration>
364-
<serverId>ossrh</serverId>
365-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
366-
<!-- deploy with the following command: mvn nexus-staging:release -->
367-
<autoReleaseAfterClose>false</autoReleaseAfterClose>
368-
</configuration>
369-
</plugin>
370306
<!--############ plugins without lifecycle bindings #############-->
371-
<!-- Dependency version management -->
372-
<plugin>
373-
<groupId>org.codehaus.mojo</groupId>
374-
<artifactId>versions-maven-plugin</artifactId>
375-
<version>2.12.0</version>
376-
</plugin>
377307
<!-- Codestyle -->
378308
<plugin>
379309
<groupId>org.apache.maven.plugins</groupId>
380310
<artifactId>maven-checkstyle-plugin</artifactId>
381-
<version>3.2.0</version>
382-
<dependencies>
383-
<dependency>
384-
<groupId>com.puppycrawl.tools</groupId>
385-
<artifactId>checkstyle</artifactId>
386-
<version>10.3.3</version>
387-
</dependency>
388-
</dependencies>
389311
<configuration>
390312
<configLocation>${project.basedir}/checkstyle.xml</configLocation>
391313
<violationSeverity>info</violationSeverity>
@@ -401,8 +323,5 @@
401323
<maven.compiler.source>11</maven.compiler.source>
402324
<maven.compiler.target>11</maven.compiler.target>
403325
<maven.build.timestamp.format>yyyy</maven.build.timestamp.format>
404-
<!-- We redefine the signature generation process, which is enabled by default,
405-
but cannot be performed by typical users. Enable it using -Dskip.signature=false -->
406-
<skip.signature>true</skip.signature>
407326
</properties>
408327
</project>

0 commit comments

Comments
 (0)