Skip to content

Commit 9a92f16

Browse files
committed
build: setting up deployment to Maven Central
1 parent 2114046 commit 9a92f16

File tree

2 files changed

+126
-7
lines changed

2 files changed

+126
-7
lines changed

RELEASE.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
Use the following to test an incremental release + deploy:
3+
4+
```
5+
mvn -B release:clean release:prepare -DdryRun=true
6+
```
7+
8+
If everything seems successful the following will actual perform a deploy:
9+
10+
```
11+
mvn -B release:clean release:prepare release:perform
12+
```
13+
14+
Use this command to set a specific version:
15+
16+
```
17+
mvn -B release:update-versions -DdevelopmentVersion=1.2.3-SNAPSHOT
18+
```
19+
20+
A manual deploy can be done like this:
21+
22+
```
23+
mvn clean deploy -P release
24+
```

pom.xml

Lines changed: 102 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0"
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
<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">
53
<modelVersion>4.0.0</modelVersion>
64

75
<groupId>org.codejive</groupId>
86
<artifactId>java-properties</artifactId>
9-
<version>0.1-SNAPSHOT</version>
7+
<version>0.0.1-SNAPSHOT</version>
108

119
<name>Java Properties parser</name>
1210
<description>A simple Java Properties parser that retains the exact format of the input file, including any comments</description>
13-
<url>https://github.com/quintesse/java-properties</url>
11+
<url>https://github.com/codejive/java-properties</url>
1412

1513
<licenses>
1614
<license>
@@ -19,6 +17,15 @@
1917
</license>
2018
</licenses>
2119

20+
<developers>
21+
<developer>
22+
<name>Tako Schotanus</name>
23+
<email>tako@codejive.org</email>
24+
<organization>Codejive</organization>
25+
<organizationUrl>https://github.com/quintesse</organizationUrl>
26+
</developer>
27+
</developers>
28+
2229
<properties>
2330
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2431
<maven.compiler.source>8</maven.compiler.source>
@@ -59,8 +66,8 @@
5966
<include>.gitignore</include>
6067
<include>.gitattributes</include>
6168
</includes>
62-
<trimTrailingWhitespace/>
63-
<endWithNewline/>
69+
<trimTrailingWhitespace />
70+
<endWithNewline />
6471
<indent>
6572
<spaces>true</spaces>
6673
<spacesPerTab>4</spacesPerTab>
@@ -83,8 +90,96 @@
8390
</execution>
8491
</executions>
8592
</plugin>
93+
<plugin>
94+
<groupId>org.sonatype.plugins</groupId>
95+
<artifactId>nexus-staging-maven-plugin</artifactId>
96+
<version>1.6.7</version>
97+
<extensions>true</extensions>
98+
<configuration>
99+
<serverId>ossrh</serverId>
100+
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
101+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
102+
</configuration>
103+
</plugin>
104+
<plugin>
105+
<groupId>org.apache.maven.plugins</groupId>
106+
<artifactId>maven-release-plugin</artifactId>
107+
<version>2.5.3</version>
108+
<configuration>
109+
<releaseProfiles>release</releaseProfiles>
110+
<tagNameFormat>v@{project.version}</tagNameFormat>
111+
<goals>deploy</goals>
112+
</configuration>
113+
</plugin>
86114
</plugins>
87115

88116
</build>
89117

118+
<profiles>
119+
<profile>
120+
<id>release</id>
121+
<build>
122+
<plugins>
123+
<plugin>
124+
<groupId>org.apache.maven.plugins</groupId>
125+
<artifactId>maven-source-plugin</artifactId>
126+
<version>2.2.1</version>
127+
<executions>
128+
<execution>
129+
<id>attach-sources</id>
130+
<goals>
131+
<goal>jar-no-fork</goal>
132+
</goals>
133+
</execution>
134+
</executions>
135+
</plugin>
136+
<plugin>
137+
<groupId>org.apache.maven.plugins</groupId>
138+
<artifactId>maven-javadoc-plugin</artifactId>
139+
<version>2.9.1</version>
140+
<executions>
141+
<execution>
142+
<id>attach-javadocs</id>
143+
<goals>
144+
<goal>jar</goal>
145+
</goals>
146+
</execution>
147+
</executions>
148+
</plugin>
149+
<plugin>
150+
<groupId>org.apache.maven.plugins</groupId>
151+
<artifactId>maven-gpg-plugin</artifactId>
152+
<version>1.5</version>
153+
<executions>
154+
<execution>
155+
<id>sign-artifacts</id>
156+
<phase>verify</phase>
157+
<goals>
158+
<goal>sign</goal>
159+
</goals>
160+
</execution>
161+
</executions>
162+
</plugin>
163+
</plugins>
164+
</build>
165+
</profile>
166+
</profiles>
167+
168+
<scm>
169+
<connection>scm:git:git://github.com/codejive/java-properties.git</connection>
170+
<developerConnection>scm:git:git@github.com:codejive/java-properties.git</developerConnection>
171+
<url>http://github.com/codejive/java-properties</url>
172+
<tag>HEAD</tag>
173+
</scm>
174+
175+
<distributionManagement>
176+
<snapshotRepository>
177+
<id>ossrh</id>
178+
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
179+
</snapshotRepository>
180+
<repository>
181+
<id>ossrh</id>
182+
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
183+
</repository>
184+
</distributionManagement>
90185
</project>

0 commit comments

Comments
 (0)