Skip to content

Commit

Permalink
docs: document and simplify deploy to Maven central
Browse files Browse the repository at this point in the history
  • Loading branch information
olavloite committed Jan 7, 2021
1 parent 3e1b299 commit 7e3d21e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 11 deletions.
24 changes: 24 additions & 0 deletions docs/deploy-to-maven-central.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## Deploying a Version to Maven Central

### Prerequisites

1. A Sonatype Jira account: https://issues.sonatype.org/secure/Signup!default.jspa
2. Permission for your Jira account to publish to the group id 'com.google.cloudspannerecosystem'. This can be requested through Jira.
3. A settings.xml file for Maven (in ~/.m2/settings.xml) containing at least the following information:

```xml
<settings>
<servers>
<server>
<id>ossrh</id>
<username>your-jira-id</username>
<password>your-jira-pwd</password>
</server>
</servers>
</settings>
```

### Deploying to Maven Central

1. Make sure everything builds and the correct version number has been set in the pom.xml
2. Execute `mvn clean deploy -Prelease`
17 changes: 6 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.cloudspannerecosystem</groupId>
<artifactId>liquibase-spanner</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>
<packaging>jar</packaging>
<name>Google Cloud Spanner Liquibase Integeration</name>
<description>Liquibase extension for Google Cloud Spanner</description>
Expand All @@ -26,13 +26,9 @@
</developers>
<distributionManagement>
<snapshotRepository>
<id>sonatype-nexus-snapshots</id>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>sonatype-nexus-staging</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<scm>
<connection>scm:git:[email protected]:cloudspannerecosystem/liquibase-spanner.git</connection>
Expand Down Expand Up @@ -243,13 +239,12 @@
<profiles>
<profile>
<id>release</id>
<activation>
<property>
<name>performRelease</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
Expand Down

0 comments on commit 7e3d21e

Please sign in to comment.