Skip to content

Commit 1903019

Browse files
authored
Merge pull request #28 from DataDog/tyler/release-plugin
Don't use nexus plugin for release
2 parents de0f60b + 775610c commit 1903019

File tree

2 files changed

+49
-16
lines changed

2 files changed

+49
-16
lines changed

DEVELOPERS.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,29 @@
11
## Developer instructions
22

3-
* How to release a new version
3+
### Testing a release locally
4+
Run nexus locally (assuming you have docker running locally):
5+
6+
```bash
7+
docker run -d -p 8081:8081 --name nexus sonatype/nexus
8+
```
9+
10+
Configure the `distributionManagement` section in the root `pom.xml` to point to the repo on localhost.
11+
12+
Add/update your `~/.m2/settings.xml` with the following config block:
13+
14+
```xml
15+
<settings>
16+
<servers>
17+
<server>
18+
<id>nexus-local</id>
19+
<username>admin</username>
20+
<password>admin123</password>
21+
</server>
22+
</servers>
23+
</settings>
24+
```
25+
26+
Perform the release process as described below.
427

528

629
### How to release a new version

pom.xml

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,21 @@
5151

5252
<distributionManagement>
5353
<snapshotRepository>
54-
<id>ossrh</id>
55-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
54+
<id>nexus-local</id>
55+
<url>http://localhost:8081/nexus/content/repositories/snapshots</url>
5656
</snapshotRepository>
5757
<repository>
58-
<id>ossrh</id>
59-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
58+
<id>nexus-local</id>
59+
<url>http://localhost:8081/nexus/content/repositories/snapshots</url>
6060
</repository>
61+
<!--<snapshotRepository>-->
62+
<!--<id>ossrh</id>-->
63+
<!--<url>https://oss.sonatype.org/content/repositories/snapshots</url>-->
64+
<!--</snapshotRepository>-->
65+
<!--<repository>-->
66+
<!--<id>ossrh</id>-->
67+
<!--<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>-->
68+
<!--</repository>-->
6169
</distributionManagement>
6270

6371
<build>
@@ -121,15 +129,17 @@
121129

122130
<!-- Stuff for releasing on the Maven Central -->
123131
<plugin>
124-
<groupId>org.sonatype.plugins</groupId>
125-
<artifactId>nexus-staging-maven-plugin</artifactId>
126-
<version>1.6.7</version>
127-
<extensions>true</extensions>
128-
<configuration>
129-
<serverId>ossrh</serverId>
130-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
131-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
132-
</configuration>
132+
<artifactId>maven-deploy-plugin</artifactId>
133+
<version>2.8.2</version>
134+
<executions>
135+
<execution>
136+
<id>default-deploy</id>
137+
<phase>deploy</phase>
138+
<goals>
139+
<goal>deploy</goal>
140+
</goals>
141+
</execution>
142+
</executions>
133143
</plugin>
134144
<plugin>
135145
<groupId>org.apache.maven.plugins</groupId>
@@ -141,8 +151,8 @@
141151
<releaseProfiles>release</releaseProfiles>
142152
<goals>deploy</goals>
143153
<checkModificationExcludes>
144-
<checkModificationExclude>**/pom.xml</checkModificationExclude>
145-
</checkModificationExcludes>
154+
<checkModificationExclude>**/pom.xml</checkModificationExclude>
155+
</checkModificationExcludes>
146156
</configuration>
147157
</plugin>
148158
</plugins>

0 commit comments

Comments
 (0)