Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,24 @@ mongoDB:
options: // optional connection configuration parameters for the Mongo driver
disabled: // optional boolean that will cause the Module to provide non-null, but non-functional DB/MongoClient objects
```
---
# Creating new Maven Central Repository Release in Sonatype Nexus

## Requirements

### Registered with access role to Nexus repository
Request access by submitting ticket to Nexus [support](https://support.sonatype.com/hc/en-us/requests/new). This may take a few days to fulfill

### GPG keypair
[Instructions](https://central.sonatype.org/publish/requirements/gpg/) for creating keypair and sending public GPG key

### Update local Maven settings.xml
File should be found in Maven local repository `~/.m2/settings.xml` or `$HOME/.m2/settings.xml`. Follow these [instructions](https://central.sonatype.org/publish/publish-maven/) specific to updating local settins.xml.
Note: the needed plugins are already added to dropwizard-mongo-module [pom.xml](https://github.com/washingtonpost/dropwizard-mongo-module/blob/master/pom.xml).

## Push Release to Nexus

1. Create Git release
2. Checkout release to local
3. Execute `mvn clean deploy -Dmaven.skip.test=true -Dpgp.passphrase=<your-gpg-passphrase>`
4. Validate in Nexus [dropwizard-mongo-module](https://oss.sonatype.org/#stagingRepositories) for any errors. *Failed Signature Validation* means GPG verification was not successful.
27 changes: 27 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,33 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>