Skip to content

Commit

Permalink
Preparing for release to Maven Central (#99)
Browse files Browse the repository at this point in the history
* Adding run instructions to README

* Preparing for release to Maven Central
  • Loading branch information
rafaelsilverioit authored Dec 19, 2024
1 parent 3130550 commit 3f8f429
Show file tree
Hide file tree
Showing 11 changed files with 423 additions and 186 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ To run with Maven, you just need to run the following command:
mvn exec:java -f stundb/application/pom.xml
```

### Deploying to Maven Central

Run tests and then deploy to Maven Central:
```bash
mvn clean test -P runAcceptanceTests
mvn clean deploy -P publishToCentral -pl \!io.github.rafaelsilverioit:stundb-acceptance-tests
```

----------------------------

## Backlog
Expand Down
99 changes: 94 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,37 @@
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.stundb</groupId>
<groupId>io.github.rafaelsilverioit</groupId>
<artifactId>stundb</artifactId>
<version>1.0.0</version>
<name>StunDB</name>
<name>${project.groupId}:${project.artifactId}</name>
<description>StunDB - A stunning distributed key-value database</description>
<url>https://github.com/rafaelsilverioit/stundb</url>
<packaging>pom</packaging>

<licenses>
<license>
<name>MIT License</name>
<url>https://opensource.org/license/mit</url>
<distribution>repo</distribution>
</license>
</licenses>
<organization>
<name>Rafael Silvério Amaral</name>
</organization>

<developers>
<developer>
<name>Rafael Silvério Amaral</name>
<email>[email protected]</email>
<organization>None</organization>
<organizationUrl>https://github.com/rafaelsilverioit</organizationUrl>
</developer>
</developers>

<scm>
<connection>scm:git:git://github.com/rafaelsilverioit/stundb.git</connection>
<developerConnection>scm:git:ssh://github.com:rafaelsilverioit/stundb.git</developerConnection>
<url>https://github.com/rafaelsilverioit/stundb/tree/master</url>
</scm>

<properties>
<java.version>21</java.version>
<org.mapstruct.version>1.5.5.Final</org.mapstruct.version>
Expand All @@ -31,6 +46,7 @@
<mockito.version>5.11.0</mockito.version>
<jackson.version>2.18.1</jackson.version>
<maven.compiler.plugin.version>3.13.0</maven.compiler.plugin.version>
<maven.resources.plugin.version>3.3.1</maven.resources.plugin.version>
<skipTests>false</skipTests>
</properties>
<modules>
Expand Down Expand Up @@ -188,4 +204,77 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>publishToCentral</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.11.2</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.2.7</version>
<configuration>
<keyname>D83D1CAA8DF9FDF2</keyname>
</configuration>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.6.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
<ignorePublishedComponents>true</ignorePublishedComponents>
<excludeArtifacts>
<excludeArtifact>stundb</excludeArtifact>
<excludeArtifact>stundb-parent</excludeArtifact>
<excludeArtifact>stundb-net</excludeArtifact>
<excludeArtifact>stundb-net-server</excludeArtifact>
<excludeArtifact>stundb-application</excludeArtifact>
<excludeArtifact>stundb-acceptance-tests</excludeArtifact>
</excludeArtifacts>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Loading

0 comments on commit 3f8f429

Please sign in to comment.