Skip to content

Commit 577294d

Browse files
authored
Maven pom improvements (#43)
1 parent 58a8bca commit 577294d

File tree

7 files changed

+75
-39
lines changed

7 files changed

+75
-39
lines changed

.github/workflows/build-java-8.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ jobs:
1414
java-version: '8'
1515
distribution: 'temurin'
1616
- name: Build with Maven
17-
run: mvn --batch-mode --update-snapshots package
17+
run: mvn --batch-mode --update-snapshots package -Prelease

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Unreleased
44

5+
- Add maven profile for release
56
- Remove some more warnings reported by JDK 21.
67
[#42](https://github.com/tzaeschke/phtree/pull/42)
78
- Removed `Serializable` interface from `PhFilter`

pom.xml

Lines changed: 69 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -62,23 +62,10 @@
6262

6363
<build>
6464
<plugins>
65-
<plugin>
66-
<groupId>org.apache.maven.plugins</groupId>
67-
<artifactId>maven-javadoc-plugin</artifactId>
68-
<version>3.6.3</version>
69-
<executions>
70-
<execution>
71-
<id>attach-javadocs</id>
72-
<goals>
73-
<goal>jar</goal>
74-
</goals>
75-
</execution>
76-
</executions>
77-
</plugin>
7865
<plugin>
7966
<groupId>org.apache.maven.plugins</groupId>
8067
<artifactId>maven-source-plugin</artifactId>
81-
<version>3.3.0</version>
68+
<version>3.3.1</version>
8269
<executions>
8370
<execution>
8471
<id>attach-sources</id>
@@ -91,10 +78,9 @@
9178
<plugin>
9279
<groupId>org.apache.maven.plugins</groupId>
9380
<artifactId>maven-compiler-plugin</artifactId>
94-
<version>3.11.0</version>
81+
<version>3.13.0</version>
9582
<configuration>
9683
<source>1.8</source>
97-
<target>1.8</target>
9884
<compilerArgument>-Xlint:all</compilerArgument>
9985
<showWarnings>true</showWarnings>
10086
<showDeprecation>true</showDeprecation>
@@ -106,9 +92,9 @@
10692
<plugin>
10793
<groupId>org.apache.maven.plugins</groupId>
10894
<artifactId>maven-surefire-plugin</artifactId>
109-
<version>3.2.5</version>
95+
<version>3.3.1</version>
11096
<configuration>
111-
<argLine>${argLine} -Xmx512m</argLine>
97+
<argLine>@{argLine} -Xmx512m</argLine>
11298
<printSummary>true</printSummary>
11399
<skipTests>false</skipTests>
114100
<includes>
@@ -124,33 +110,19 @@
124110
<plugin>
125111
<groupId>org.apache.maven.plugins</groupId>
126112
<artifactId>maven-jar-plugin</artifactId>
127-
<version>3.3.0</version>
113+
<version>3.4.2</version>
128114
<executions>
129115
<execution>
130116
<goals>
131117
<goal>test-jar</goal>
132118
</goals>
133119
</execution>
134120
</executions>
135-
</plugin>
136-
<plugin>
137-
<groupId>org.apache.maven.plugins</groupId>
138-
<artifactId>maven-gpg-plugin</artifactId>
139-
<version>3.1.0</version>
140-
<executions>
141-
<execution>
142-
<id>sign-artifacts</id>
143-
<phase>verify</phase>
144-
<goals>
145-
<goal>sign</goal>
146-
</goals>
147-
</execution>
148-
</executions>
149121
</plugin>
150122
<plugin>
151123
<groupId>org.sonatype.plugins</groupId>
152124
<artifactId>nexus-staging-maven-plugin</artifactId>
153-
<version>1.6.13</version>
125+
<version>1.6.14</version>
154126
<extensions>true</extensions>
155127
<configuration>
156128
<serverId>ossrh</serverId>
@@ -183,5 +155,68 @@
183155
</plugin>
184156
</plugins>
185157
</build>
158+
159+
<profiles>
160+
<profile>
161+
<id>release</id>
162+
<build>
163+
<plugins>
164+
<plugin>
165+
<groupId>org.apache.maven.plugins</groupId>
166+
<artifactId>maven-gpg-plugin</artifactId>
167+
<version>3.1.0</version>
168+
<executions>
169+
<execution>
170+
<id>sign-artifacts</id>
171+
<phase>verify</phase>
172+
<goals>
173+
<goal>sign</goal>
174+
</goals>
175+
<configuration>
176+
<keyname>${gpg.keyname}</keyname>
177+
<passphraseServerId>${gpg.keyname}</passphraseServerId>
178+
</configuration>
179+
</execution>
180+
</executions>
181+
</plugin>
182+
<plugin>
183+
<groupId>org.apache.maven.plugins</groupId>
184+
<artifactId>maven-javadoc-plugin</artifactId>
185+
<version>3.7.0</version>
186+
<executions>
187+
<execution>
188+
<id>attach-javadocs</id>
189+
<goals>
190+
<goal>jar</goal>
191+
</goals>
192+
</execution>
193+
</executions>
194+
</plugin>
195+
<plugin>
196+
<groupId>org.apache.maven.plugins</groupId>
197+
<artifactId>maven-compiler-plugin</artifactId>
198+
<version>3.13.0</version>
199+
<configuration>
200+
<release>8</release>
201+
<compilerArgument>-Xlint:all</compilerArgument>
202+
<showWarnings>true</showWarnings>
203+
<showDeprecation>true</showDeprecation>
204+
<!--
205+
<compilerArgument>-Werror </compilerArgument>
206+
-->
207+
</configuration>
208+
</plugin>
209+
210+
</plugins>
211+
</build>
212+
</profile>
213+
<profile>
214+
<id>warnings</id>
215+
<properties>
216+
<showWarnings>true</showWarnings>
217+
<compilerArgument>-Xlint:all,-rawtypes</compilerArgument>
218+
</properties>
219+
</profile>
220+
</profiles>
186221
</project>
187222

src/main/java/ch/ethz/globis/phtree/util/MinHeap.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public boolean less(C o1, C o2) {
6565
* @param <T> The entry type. Must implement {@code Comparable<T>}.
6666
*/
6767
public static <T extends Comparable<T>> MinHeap<T> create() {
68-
return new MinHeap<>(DEFAULT_SIZE, new LessWrapper<>(Comparable::compareTo));
68+
return new MinHeap<>(DEFAULT_SIZE, new LessWrapper<>(Comparable<T>::compareTo));
6969
}
7070

7171
/**

src/main/java/ch/ethz/globis/phtree/util/MinHeapPool.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public boolean less(C o1, C o2) {
7373
* @param <T> The entry type. Must implement {@code Comparable<T>}.
7474
*/
7575
public static <T extends Comparable<T>> MinHeapPool<T> create(Supplier<T> supplyFn) {
76-
return new MinHeapPool<>(DEFAULT_SIZE, new LessWrapper<>(Comparable::compareTo), supplyFn);
76+
return new MinHeapPool<>(DEFAULT_SIZE, new LessWrapper<>(Comparable<T>::compareTo), supplyFn);
7777
}
7878

7979
/**

src/main/java/ch/ethz/globis/phtree/util/MinMaxHeap.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public boolean less(C o1, C o2) {
6565
* @param <T> The entry type. Must implement {@code Comparable<T>}.
6666
*/
6767
public static <T extends Comparable<T>> MinMaxHeap<T> create() {
68-
return new MinMaxHeap<>(DEFAULT_SIZE, new LessWrapper<>(Comparable::compareTo));
68+
return new MinMaxHeap<>(DEFAULT_SIZE, new LessWrapper<>(Comparable<T>::compareTo));
6969
}
7070

7171
/**

src/main/java/ch/ethz/globis/phtree/util/MinMaxHeapPool.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ private MinMaxHeapPool(int capacity, Less<T> lessFn, Supplier<T> supplyFn) {
5757
* @return A new MinMaxHeap
5858
*/
5959
public static <T extends Comparable<T>> MinMaxHeapPool<T> create(Supplier<T> supplyFn) {
60-
return new MinMaxHeapPool<>(DEFAULT_SIZE, new LessWrapper<>(Comparable::compareTo), supplyFn);
60+
return new MinMaxHeapPool<>(DEFAULT_SIZE, new LessWrapper<>(Comparable<T>::compareTo), supplyFn);
6161
}
6262

6363
/**

0 commit comments

Comments
 (0)