Skip to content

Commit c9fbe91

Browse files
committed
Configure project for automated releases
1 parent ad95ee9 commit c9fbe91

File tree

2 files changed

+52
-15
lines changed

2 files changed

+52
-15
lines changed

pom.xml

Lines changed: 50 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
22
<modelVersion>4.0.0</modelVersion>
3-
4-
<parent>
5-
<artifactId>oss-parent</artifactId>
6-
<groupId>org.sonatype.oss</groupId>
7-
<version>9</version>
8-
</parent>
9-
103
<groupId>com.pivovarit</groupId>
114
<artifactId>throwing-function</artifactId>
125
<version>1.6.0-SNAPSHOT</version>
@@ -52,11 +45,14 @@
5245
</properties>
5346

5447
<build>
48+
<defaultGoal>deploy</defaultGoal>
49+
<finalName>${project.artifactId}-${project.version}</finalName>
50+
5551
<plugins>
5652
<plugin>
5753
<groupId>org.apache.maven.plugins</groupId>
5854
<artifactId>maven-compiler-plugin</artifactId>
59-
<version>3.7.0</version>
55+
<version>3.13.0</version>
6056
<configuration>
6157
<source>1.8</source>
6258
<target>1.8</target>
@@ -69,7 +65,11 @@
6965
<version>3.4.2</version>
7066
<configuration>
7167
<archive>
68+
<manifest>
69+
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
70+
</manifest>
7271
<manifestEntries>
72+
<Build-Time>${maven.build.timestamp}</Build-Time>
7373
<Automatic-Module-Name>com.pivovarit.function</Automatic-Module-Name>
7474
</manifestEntries>
7575
</archive>
@@ -78,20 +78,46 @@
7878

7979
<plugin>
8080
<groupId>org.apache.maven.plugins</groupId>
81-
<artifactId>maven-javadoc-plugin</artifactId>
82-
<version>3.1.1</version>
81+
<artifactId>maven-resources-plugin</artifactId>
82+
<version>3.3.1</version>
8383
<configuration>
84-
<doclint>none</doclint> <!-- Turnoff all checks -->
84+
<encoding>UTF-8</encoding>
8585
</configuration>
86+
</plugin>
87+
88+
<plugin>
89+
<groupId>org.apache.maven.plugins</groupId>
90+
<artifactId>maven-gpg-plugin</artifactId>
91+
<version>3.2.6</version>
8692
<executions>
8793
<execution>
88-
<id>attach-javadocs</id>
94+
<id>sign-artifacts</id>
95+
<phase>verify</phase>
8996
<goals>
90-
<goal>jar</goal>
97+
<goal>sign</goal>
9198
</goals>
99+
<configuration>
100+
<gpgArguments>
101+
<arg>--pinentry-mode</arg>
102+
<arg>loopback</arg>
103+
</gpgArguments>
104+
</configuration>
92105
</execution>
93106
</executions>
94107
</plugin>
108+
109+
<plugin>
110+
<artifactId>maven-surefire-plugin</artifactId>
111+
<version>3.5.0</version>
112+
</plugin>
113+
114+
<plugin>
115+
<groupId>org.apache.felix</groupId>
116+
<artifactId>maven-bundle-plugin</artifactId>
117+
<version>5.1.9</version>
118+
<extensions>true</extensions>
119+
</plugin>
120+
95121
</plugins>
96122
</build>
97123

@@ -116,4 +142,15 @@
116142
<scope>test</scope>
117143
</dependency>
118144
</dependencies>
145+
146+
<distributionManagement>
147+
<repository>
148+
<id>sonatype-nexus-staging</id>
149+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
150+
</repository>
151+
<snapshotRepository>
152+
<id>sonatype-nexus-snapshots</id>
153+
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
154+
</snapshotRepository>
155+
</distributionManagement>
119156
</project>

src/test/java/com/pivovarit/function/ThrowingBiConsumerTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class ThrowingBiConsumerTest {
1313

1414
@Test
1515
void givenString_whenSortJava8_thenSorted() {
16-
String sorted = "bdCa".chars()
16+
String sorted = "bdca".chars()
1717
.sorted()
1818
.collect(StringBuilder::new, StringBuilder::appendCodePoint, StringBuilder::append)
1919
.toString();
@@ -103,4 +103,4 @@ void shouldConsumeAndSneakyThrow() {
103103
.isInstanceOf(IOException.class)
104104
.hasNoCause();
105105
}
106-
}
106+
}

0 commit comments

Comments
 (0)