Skip to content

Commit a57b1a5

Browse files
committed
Improve publishing
1 parent 3735fe8 commit a57b1a5

File tree

2 files changed

+93
-28
lines changed

2 files changed

+93
-28
lines changed

.github/workflows/maven-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ jobs:
1212
- name: Set up Maven Central Repository
1313
uses: actions/setup-java@v4
1414
with:
15-
java-version: '8'
15+
java-version: '11'
1616
distribution: 'temurin'
17-
server-id: ossrh
17+
server-id: central
1818
server-username: MAVEN_USERNAME
1919
server-password: MAVEN_PASSWORD
2020
- name: Publish package

pom.xml

Lines changed: 91 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,51 @@
77
<artifactId>yoclib-jsonrpc</artifactId>
88
<version>1.0.0-SNAPSHOT</version>
99

10-
<properties>
11-
<maven.compiler.source>8</maven.compiler.source>
12-
<maven.compiler.target>8</maven.compiler.target>
13-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
14-
</properties>
15-
16-
<dependencies>
17-
<dependency>
18-
<groupId>org.json</groupId>
19-
<artifactId>json</artifactId>
20-
<version>20240303</version>
21-
</dependency>
22-
<dependency>
23-
<groupId>org.junit.jupiter</groupId>
24-
<artifactId>junit-jupiter-engine</artifactId>
25-
<version>5.9.2</version>
26-
<scope>test</scope>
27-
</dependency>
28-
</dependencies>
10+
<description>This yocLibrary enables your project to encode and decode JSON-RPC messages in Java.</description>
11+
<url>https://yocto.com</url>
2912

3013
<build>
3114
<plugins>
15+
<plugin>
16+
<groupId>org.apache.maven.plugins</groupId>
17+
<artifactId>maven-gpg-plugin</artifactId>
18+
<version>1.5</version>
19+
<executions>
20+
<execution>
21+
<id>sign-artifacts</id>
22+
<phase>verify</phase>
23+
<goals>
24+
<goal>sign</goal>
25+
</goals>
26+
</execution>
27+
</executions>
28+
</plugin>
29+
<plugin>
30+
<groupId>org.apache.maven.plugins</groupId>
31+
<artifactId>maven-javadoc-plugin</artifactId>
32+
<version>2.9.1</version>
33+
<executions>
34+
<execution>
35+
<id>attach-javadocs</id>
36+
<goals>
37+
<goal>jar</goal>
38+
</goals>
39+
</execution>
40+
</executions>
41+
</plugin>
42+
<plugin>
43+
<groupId>org.apache.maven.plugins</groupId>
44+
<artifactId>maven-source-plugin</artifactId>
45+
<version>2.2.1</version>
46+
<executions>
47+
<execution>
48+
<id>attach-sources</id>
49+
<goals>
50+
<goal>jar-no-fork</goal>
51+
</goals>
52+
</execution>
53+
</executions>
54+
</plugin>
3255
<plugin>
3356
<groupId>org.jacoco</groupId>
3457
<artifactId>jacoco-maven-plugin</artifactId>
@@ -49,15 +72,57 @@
4972
</execution>
5073
</executions>
5174
</plugin>
75+
<plugin>
76+
<groupId>org.sonatype.central</groupId>
77+
<artifactId>central-publishing-maven-plugin</artifactId>
78+
<version>0.4.0</version>
79+
<extensions>true</extensions>
80+
<configuration>
81+
<publishingServerId>central</publishingServerId>
82+
<tokenAuth>true</tokenAuth>
83+
<autoPublish>true</autoPublish>
84+
</configuration>
85+
</plugin>
5286
</plugins>
5387
</build>
5488

55-
<distributionManagement>
56-
<repository>
57-
<id>ossrh</id>
58-
<name>Central Repository OSSRH</name>
59-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
60-
</repository>
61-
</distributionManagement>
89+
<dependencies>
90+
<dependency>
91+
<groupId>org.json</groupId>
92+
<artifactId>json</artifactId>
93+
<version>20240303</version>
94+
</dependency>
95+
<dependency>
96+
<groupId>org.junit.jupiter</groupId>
97+
<artifactId>junit-jupiter-engine</artifactId>
98+
<version>5.9.2</version>
99+
<scope>test</scope>
100+
</dependency>
101+
</dependencies>
102+
103+
<developers>
104+
<developer>
105+
<id>ben221199</id>
106+
<name>Ben van Hartingsveldt</name>
107+
<email>ben.vanhartingsveldt@yocto.com</email>
108+
<organization>Yocto</organization>
109+
<organizationUrl>https://yocto.com</organizationUrl>
110+
</developer>
111+
</developers>
112+
113+
<licenses>
114+
<license>
115+
<name>GPL-v3.0</name>
116+
<url>http://www.gnu.org/licenses/gpl-3.0.txt</url>
117+
</license>
118+
</licenses>
119+
120+
<properties>
121+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
122+
</properties>
123+
124+
<scm>
125+
<url>https://github.com/yocto/yoclib-jsonrpc-java.git</url>
126+
</scm>
62127

63128
</project>

0 commit comments

Comments
 (0)