Skip to content

Commit e133768

Browse files
authored
Merge pull request #175 from liangyuanpeng/java_deps
java: collate the dependency version into properties
2 parents 7dac2f3 + 02d5f72 commit e133768

File tree

1 file changed

+31
-17
lines changed

1 file changed

+31
-17
lines changed

java/pom.xml

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -38,65 +38,79 @@
3838

3939
<maven.build.timestamp.format>yyyyMMddHHmmss</maven.build.timestamp.format>
4040
<maven.build.timestamp>${maven.build.timestamp}</maven.build.timestamp>
41+
42+
<protobuf-java.version>4.27.0</protobuf-java.version>
43+
<slf4j.version>1.7.30</slf4j.version>
44+
<jackson.version>2.13.2</jackson.version>
45+
<apache.commons-lang3.version>3.4</apache.commons-lang3.version>
46+
<logback.version>1.2.3</logback.version>
47+
<junit.version>4.13</junit.version>
48+
<jmh.version>1.28</jmh.version>
49+
<maven-compiler-plugin.version>3.3</maven-compiler-plugin.version>
50+
<maven-source-plugin.version>2.0.2</maven-source-plugin.version>
51+
<maven-eclipse-plugin.version>2.6</maven-eclipse-plugin.version>
52+
<buildnumber-maven-plugin.version>1.4</buildnumber-maven-plugin.version>
53+
<maven-jar-plugin.version>3.2.0</maven-jar-plugin.version>
54+
<formatter-maven-plugin.version>2.16.0</formatter-maven-plugin.version>
4155
</properties>
4256
<dependencies>
4357
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
4458
<dependency>
4559
<groupId>com.google.protobuf</groupId>
4660
<artifactId>protobuf-java</artifactId>
47-
<version>4.27.0</version>
61+
<version>${protobuf-java.version}</version>
4862
</dependency>
4963
<dependency>
5064
<groupId>org.slf4j</groupId>
5165
<artifactId>slf4j-api</artifactId>
52-
<version>1.7.30</version>
66+
<version>${slf4j.version}</version>
5367
</dependency>
5468
<!-- Jackson Core -->
5569
<dependency>
5670
<groupId>com.fasterxml.jackson.core</groupId>
5771
<artifactId>jackson-core</artifactId>
58-
<version>2.13.2</version>
72+
<version>${jackson.version}</version>
5973
</dependency>
6074
<!-- Jackson Annotations -->
6175
<dependency>
6276
<groupId>com.fasterxml.jackson.core</groupId>
6377
<artifactId>jackson-annotations</artifactId>
64-
<version>2.13.2</version>
78+
<version>${jackson.version}</version>
6579
</dependency>
6680
<!-- Jackson Databind -->
6781
<dependency>
6882
<groupId>com.fasterxml.jackson.core</groupId>
6983
<artifactId>jackson-databind</artifactId>
70-
<version>2.13.2</version>
84+
<version>${jackson.version}</version>
7185
</dependency>
7286
<dependency>
7387
<groupId>org.apache.commons</groupId>
7488
<artifactId>commons-lang3</artifactId>
75-
<version>3.4</version>
89+
<version>${apache.commons-lang3.version}</version>
7690
</dependency>
7791
<!-- test dependencies -->
7892
<dependency>
7993
<groupId>ch.qos.logback</groupId>
8094
<artifactId>logback-classic</artifactId>
81-
<version>1.2.3</version>
95+
<version>${logback.version}</version>
8296
<scope>test</scope>
8397
</dependency>
8498
<dependency>
8599
<groupId>junit</groupId>
86100
<artifactId>junit</artifactId>
87-
<version>4.13</version>
101+
<version>${junit.version}</version>
88102
<scope>test</scope>
89103
</dependency>
90104
<dependency>
91105
<groupId>org.openjdk.jmh</groupId>
92106
<artifactId>jmh-core</artifactId>
93-
<version>1.28</version>
107+
<version>${jmh.version}</version>
94108
<scope>test</scope>
95109
</dependency>
96110
<dependency>
97111
<groupId>org.openjdk.jmh</groupId>
98112
<artifactId>jmh-generator-annprocess</artifactId>
99-
<version>1.28</version>
113+
<version>${jmh.version}</version>
100114
<scope>test</scope>
101115
</dependency>
102116
</dependencies>
@@ -105,7 +119,7 @@
105119
<extension>
106120
<groupId>kr.motd.maven</groupId>
107121
<artifactId>os-maven-plugin</artifactId>
108-
<version>1.7.0</version>
122+
<version>${os-maven-plugin.version}</version>
109123
</extension>
110124
</extensions>
111125
<resources>
@@ -131,7 +145,7 @@
131145
<plugin>
132146
<groupId>net.revelc.code.formatter</groupId>
133147
<artifactId>formatter-maven-plugin</artifactId>
134-
<version>2.16.0</version>
148+
<version>${formatter-maven-plugin.version}</version>
135149
<configuration>
136150
<!-- specify your configuration here -->
137151
</configuration>
@@ -198,12 +212,12 @@
198212
<target>${java.version}</target>
199213
<encoding>UTF-8</encoding>
200214
</configuration>
201-
<version>3.3</version>
215+
<version>${maven-compiler-plugin.version}</version>
202216
</plugin>
203217
<plugin>
204218
<groupId>org.apache.maven.plugins</groupId>
205219
<artifactId>maven-source-plugin</artifactId>
206-
<version>2.0.2</version>
220+
<version>${maven-source-plugin.version}</version>
207221
<executions>
208222
<execution>
209223
<id>attach-sources</id>
@@ -216,7 +230,7 @@
216230
<plugin>
217231
<groupId>org.apache.maven.plugins</groupId>
218232
<artifactId>maven-eclipse-plugin</artifactId>
219-
<version>2.6</version>
233+
<version>${maven-eclipse-plugin.version}</version>
220234
<configuration>
221235
<downloadSources>true</downloadSources>
222236
</configuration>
@@ -229,7 +243,7 @@
229243
<plugin>
230244
<groupId>org.codehaus.mojo</groupId>
231245
<artifactId>buildnumber-maven-plugin</artifactId>
232-
<version>1.4</version>
246+
<version>${buildnumber-maven-plugin.version}</version>
233247
<executions>
234248
<execution>
235249
<phase>validate</phase>
@@ -246,7 +260,7 @@
246260
</plugin>
247261
<plugin>
248262
<artifactId>maven-jar-plugin</artifactId>
249-
<version>3.2.0</version>
263+
<version>${maven-jar-plugin.version}</version>
250264
<configuration>
251265
<archive>
252266
<manifest>

0 commit comments

Comments
 (0)