Skip to content

Commit 58aa967

Browse files
authored
Merge pull request #21 from headius/new_maven_deploy
Switch to new Maven Central deploy config
2 parents 9e862f1 + 485d663 commit 58aa967

2 files changed

Lines changed: 86 additions & 33 deletions

File tree

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,19 @@ Contributing
2525
4. Push to the branch (`git push origin my-new-feature`)
2626
5. Create new Pull Request
2727

28+
Releasing
29+
---------
30+
31+
Java 1.8 must be used to run integration tests at the moment.
32+
33+
Deploy snapshots when the version ends with "-SNAPSHOT" using `mvn deploy`.
34+
35+
Releasing requires the version to not end with "-SNAPSHOT" and you should specify the "-Prelease" profile to sign the artifacts.
36+
37+
```
38+
mvn deploy -Prelease
39+
```
40+
2841
meta-fu
2942
-------
3043

pom.xml

Lines changed: 73 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
<?xml version="1.0"?>
22
<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">
33
<modelVersion>4.0.0</modelVersion>
4-
<parent>
5-
<groupId>org.sonatype.oss</groupId>
6-
<artifactId>oss-parent</artifactId>
7-
<version>9</version>
8-
</parent>
94
<groupId>org.jruby.maven</groupId>
105
<artifactId>mavengem</artifactId>
116
<version>2.0.3-SNAPSHOT</version>
@@ -54,33 +49,79 @@
5449
<jruby.version>9.4.5.0</jruby.version>
5550
</properties>
5651

57-
<repositories>
58-
<repository>
59-
<releases>
60-
<enabled>false</enabled>
61-
</releases>
62-
<snapshots>
63-
<enabled>true</enabled>
64-
</snapshots>
65-
<id>sonatype</id>
66-
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
67-
</repository>
68-
</repositories>
69-
70-
<pluginRepositories>
71-
<pluginRepository>
72-
<releases>
73-
<enabled>false</enabled>
74-
</releases>
75-
<snapshots>
76-
<enabled>true</enabled>
77-
</snapshots>
78-
<id>sonatype</id>
79-
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
80-
</pluginRepository>
81-
</pluginRepositories>
52+
<profiles>
53+
<profile>
54+
<id>release</id>
55+
<build>
56+
<plugins>
57+
<plugin>
58+
<artifactId>maven-gpg-plugin</artifactId>
59+
<version>3.2.8</version>
60+
<executions>
61+
<execution>
62+
<id>sign-artifacts</id>
63+
<phase>verify</phase>
64+
<goals>
65+
<goal>sign</goal>
66+
</goals>
67+
</execution>
68+
</executions>
69+
<configuration>
70+
<gpgArguments>
71+
<gpgArgument>--pinentry-mode</gpgArgument>
72+
<gpgArgument>loopback</gpgArgument>
73+
</gpgArguments>
74+
</configuration>
75+
</plugin>
76+
</plugins>
77+
</build>
78+
</profile>
79+
</profiles>
8280

8381
<build>
82+
<plugins>
83+
<plugin>
84+
<artifactId>maven-source-plugin</artifactId>
85+
<version>3.4.0</version>
86+
<executions>
87+
<execution>
88+
<id>attach-sources</id>
89+
<goals>
90+
<goal>jar-no-fork</goal>
91+
</goals>
92+
</execution>
93+
</executions>
94+
</plugin>
95+
<plugin>
96+
<groupId>org.apache.maven.plugins</groupId>
97+
<artifactId>maven-surefire-plugin</artifactId>
98+
<version>3.5.5</version>
99+
</plugin>
100+
<plugin>
101+
<artifactId>maven-javadoc-plugin</artifactId>
102+
<version>3.12.0</version>
103+
<executions>
104+
<execution>
105+
<id>attach-javadocs</id>
106+
<goals>
107+
<goal>jar</goal>
108+
</goals>
109+
</execution>
110+
</executions>
111+
<configuration>
112+
<doclint>none</doclint>
113+
</configuration>
114+
</plugin>
115+
<plugin>
116+
<groupId>org.sonatype.central</groupId>
117+
<artifactId>central-publishing-maven-plugin</artifactId>
118+
<version>0.10.0</version>
119+
<extensions>true</extensions>
120+
<configuration>
121+
<publishingServerId>central</publishingServerId>
122+
</configuration>
123+
</plugin>
124+
</plugins>
84125
<pluginManagement>
85126
<plugins>
86127
<plugin>
@@ -102,10 +143,9 @@
102143
</plugin>
103144
<plugin>
104145
<artifactId>maven-compiler-plugin</artifactId>
105-
<version>3.3</version>
146+
<version>3.15.0</version>
106147
<configuration>
107-
<source>8</source>
108-
<target>8</target>
148+
<release>8</release>
109149
</configuration>
110150
</plugin>
111151
</plugins>

0 commit comments

Comments
 (0)