Skip to content

Commit 2774168

Browse files
committed
Updated the build pipeline to fulfill the deployment requirements for Maven Central.
1 parent 7f24a4f commit 2774168

File tree

2 files changed

+95
-15
lines changed

2 files changed

+95
-15
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
java-version: 17
2121
cache: 'maven'
2222
- name: Build Packages (without tests)
23-
run: ./mvnw clean package -Dmaven.test.skip=true
23+
run: ./mvnw -P build-deploy clean package -Dmaven.test.skip=true
2424
- name: Build Deploy Path
2525
shell: bash
2626
run: echo "DEPLOY_PATH=$( echo '${{ secrets.DEPLOYMENT_REMOTE_TARGET }}/extended-java-model-parser-and-printer' )" >> $GITHUB_ENV
@@ -47,7 +47,7 @@ jobs:
4747
gpg-passphrase: MAVEN_GPG_PASSPHRASE
4848
cache: 'maven'
4949
- name: Deploy to Apache Maven Central
50-
run: mvn -Pdeploy-mvn-central deploy
50+
run: mvn -P deploy-mvn-central deploy
5151
env:
5252
CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
5353
CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }}

pom.xml

Lines changed: 93 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,29 @@
1111
<packaging>pom</packaging>
1212
<name>Extended JaMoPP Parent</name>
1313
<description>This package acts as the parent module for all extended JaMoPP modules.</description>
14+
<url>https://github.com/MDSD-Tools/TheExtendedJavaModelParserAndPrinter</url>
15+
16+
<licenses>
17+
<license>
18+
<name>Eclipse Public License - v 1.0</name>
19+
<url>https://www.eclipse.org/org/documents/epl-v10.html</url>
20+
</license>
21+
</licenses>
22+
23+
<developers>
24+
<developer>
25+
<name>Martin Armbruster</name>
26+
<email>martin.armbruster@kit.edu</email>
27+
<organization>MCSE, KIT</organization>
28+
<organizationUrl>https://mcse.kastel.kit.edu</organizationUrl>
29+
</developer>
30+
</developers>
31+
32+
<scm>
33+
<connection>scm:git:git://github.com/MDSD-Tools/TheExtendedJavaModelParserAndPrinter.git</connection>
34+
<developerConnection>scm:git:https://github.com/MDSD-Tools/TheExtendedJavaModelParserAndPrinter.git</developerConnection>
35+
<url>https://github.com/MDSD-Tools/TheExtendedJavaModelParserAndPrinter/tree/main</url>
36+
</scm>
1437

1538
<properties>
1639
<maven.compiler.source>17</maven.compiler.source>
@@ -161,8 +184,8 @@
161184
</plugin>
162185
<plugin>
163186
<groupId>org.apache.maven.plugins</groupId>
164-
<artifactId>maven-sources-plugin</artifactId>
165-
<version>3.2.1</version>
187+
<artifactId>maven-source-plugin</artifactId>
188+
<version>3.4.0</version>
166189
</plugin>
167190
<plugin>
168191
<groupId>org.apache.maven.plugins</groupId>
@@ -199,29 +222,75 @@
199222
<artifactId>maven-surefire-plugin</artifactId>
200223
<version>3.1.0</version>
201224
</plugin>
225+
<plugin>
226+
<groupId>org.apache.maven.plugins</groupId>
227+
<artifactId>maven-javadoc-plugin</artifactId>
228+
<version>3.12.0</version>
229+
</plugin>
202230
</plugins>
203231
</pluginManagement>
232+
<plugins>
233+
<plugin>
234+
<groupId>org.apache.maven.plugins</groupId>
235+
<artifactId>maven-source-plugin</artifactId>
236+
<executions>
237+
<execution>
238+
<goals>
239+
<goal>jar</goal>
240+
</goals>
241+
</execution>
242+
</executions>
243+
</plugin>
244+
</plugins>
204245
</build>
205246

206247
<profiles>
248+
<profile>
249+
<id>build-deploy</id>
250+
<build>
251+
<plugins>
252+
<plugin>
253+
<groupId>org.apache.maven.plugins</groupId>
254+
<artifactId>maven-javadoc-plugin</artifactId>
255+
<executions>
256+
<execution>
257+
<goals>
258+
<goal>jar</goal>
259+
</goals>
260+
</execution>
261+
</executions>
262+
<configuration>
263+
<tags>
264+
<tag>
265+
<name>model</name>
266+
<placement>a</placement>
267+
<head>Model</head>
268+
</tag>
269+
<tag>
270+
<name>generated</name>
271+
<placement>a</placement>
272+
<head>Generated</head>
273+
</tag>
274+
<tag>
275+
<name>ordered</name>
276+
<placement>a</placement>
277+
<head>Ordered</head>
278+
</tag>
279+
</tags>
280+
<doclint>all,-missing</doclint>
281+
</configuration>
282+
</plugin>
283+
</plugins>
284+
</build>
285+
</profile>
207286
<profile>
208287
<id>deploy-mvn-central</id>
209-
<distributionManagement>
210-
<snapshotRepository>
211-
<id>ossrh</id>
212-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
213-
</snapshotRepository>
214-
<repository>
215-
<id>ossrh</id>
216-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
217-
</repository>
218-
</distributionManagement>
219288
<build>
220289
<plugins>
221290
<plugin>
222291
<groupId>org.apache.maven.plugins</groupId>
223292
<artifactId>maven-gpg-plugin</artifactId>
224-
<version>1.6</version>
293+
<version>3.2.7</version>
225294
<executions>
226295
<execution>
227296
<id>sign-artifacts</id>
@@ -238,6 +307,17 @@
238307
</gpgArguments>
239308
</configuration>
240309
</plugin>
310+
<plugin>
311+
<groupId>org.sonatype.central</groupId>
312+
<artifactId>central-publishing-maven-plugin</artifactId>
313+
<version>0.9.0</version>
314+
<extensions>true</extensions>
315+
<configuration>
316+
<publishingServerId>central</publishingServerId>
317+
<autoPublish>true</autoPublish>
318+
<waitUntil>published</waitUntil>
319+
</configuration>
320+
</plugin>
241321
</plugins>
242322
</build>
243323
</profile>

0 commit comments

Comments
 (0)