Skip to content

Commit

Permalink
Merge pull request #41 from smeup/mvn-central-migration
Browse files Browse the repository at this point in the history
Mvn central migration
  • Loading branch information
mattiabonardi committed Nov 25, 2022
2 parents 122b2e3 + babbb14 commit 241f31a
Show file tree
Hide file tree
Showing 14 changed files with 534 additions and 524 deletions.
18 changes: 0 additions & 18 deletions .github/workflows/build.yml

This file was deleted.

24 changes: 24 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Deploy to maven central
on:
push:
branches: [master, develop]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Maven Central Repository
uses: actions/setup-java@v1
with:
java-version: 1.8
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Deploy with Maven
run: mvn -B clean pre-site deploy -DautoDropAfterRelease=true -DskipTests -Pci-cd
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
18 changes: 0 additions & 18 deletions .github/workflows/update-jitpack.yml

This file was deleted.

23 changes: 4 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Reload: a record level access library for modern databases
![reload Logo](/images/logo-reload-small.png)

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![](https://jitpack.io/v/smeup/reload.svg)](https://jitpack.io/#smeup/reload)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)



Expand Down Expand Up @@ -50,20 +50,11 @@ Reload has a modular architecture based on a common interface. You can use exiti

## How to use this code in your project

At the moment, we use [Jitpack](https://jitpack.io/) to publish the [project](https://jitpack.io/#smeup/reload).
See more details [here](docs/jitpack.md).
We use [Maven Central](https://repo1.maven.org/maven2/.) to publish the [project](https://repo1.maven.org/maven2/io/github/smeup/reload/).
See more details [here](docs/central.md).

### Maven
If you use Maven, add these lines to your pom.xml in order to add the repository

<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>

Then add the following dependencies for the core library:
If you use Maven, add the following dependencies for the core library:

<dependency>
<groupId>com.github.smeup.reload</groupId>
Expand All @@ -74,12 +65,6 @@ Then add the following dependencies for the core library:
### Gradle
Here are the configurationd to add to your build.gradle:
```
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
...
implementation 'com.github.smeup:reload:-SNAPSHOT'
Expand Down
10 changes: 5 additions & 5 deletions assembly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@

<!-- Now, select which projects to include in this module-set. -->
<includes>
<include>com.github.smeup.reload:base</include>
<include>com.github.smeup.reload:sql</include>
<include>com.github.smeup.reload:nosql</include>
<include>com.github.smeup.reload:manager</include>
<include>com.github.smeup.reload:jt400</include>
<include>io.github.smeup.reload:base</include>
<include>io.github.smeup.reload:sql</include>
<include>io.github.smeup.reload:nosql</include>
<include>io.github.smeup.reload:manager</include>
<include>io.github.smeup.reload:jt400</include>
</includes>
<binaries>
<outputDirectory>modules/maven-assembly-plugin</outputDirectory>
Expand Down
90 changes: 44 additions & 46 deletions base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,50 +16,48 @@
~
-->

<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/maven-v4_0_0.xsd">

<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.github.smeup.reload</groupId>
<artifactId>reload</artifactId>
<version>development-SNAPSHOT</version>
</parent>

<groupId>com.github.smeup.reload</groupId>
<artifactId>base</artifactId>
<version>development-SNAPSHOT</version>

<packaging>jar</packaging>

<name>base</name>

<build>
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
<testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<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/maven-v4_0_0.xsd">

<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>io.github.smeup.reload</groupId>
<artifactId>reload</artifactId>
<version>develop-SNAPSHOT</version>
</parent>

<artifactId>base</artifactId>

<packaging>jar</packaging>

<name>base</name>

<build>
<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
<testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
30 changes: 15 additions & 15 deletions distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,41 +20,41 @@
<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">
<modelVersion>4.0.0</modelVersion>

<parent>
<artifactId>reload</artifactId>
<groupId>com.github.smeup.reload</groupId>
<version>development-SNAPSHOT</version>
<groupId>io.github.smeup.reload</groupId>
<version>develop-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>


<artifactId>distribution</artifactId>

<dependencies>
<dependency>
<groupId>com.github.smeup.reload</groupId>
<groupId>io.github.smeup.reload</groupId>
<artifactId>base</artifactId>
<version>development-SNAPSHOT</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.github.smeup.reload</groupId>
<groupId>io.github.smeup.reload</groupId>
<artifactId>sql</artifactId>
<version>development-SNAPSHOT</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.github.smeup.reload</groupId>
<groupId>io.github.smeup.reload</groupId>
<artifactId>nosql</artifactId>
<version>development-SNAPSHOT</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.github.smeup.reload</groupId>
<groupId>io.github.smeup.reload</groupId>
<artifactId>jt400</artifactId>
<version>development-SNAPSHOT</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.github.smeup.reload</groupId>
<groupId>io.github.smeup.reload</groupId>
<artifactId>manager</artifactId>
<version>development-SNAPSHOT</version>
<version>${project.version}</version>
</dependency>
</dependencies>

Expand Down
23 changes: 23 additions & 0 deletions docs/central.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Maven Central deploy

## Steps

### Build

Build project with Maven including sources and (javadocs)[https://github.com/Kotlin/dokka].

### Sign

Sign all jars with gpg (signature plugin)[https://maven.apache.org/plugins/maven-gpg-plugin/].

### Deploy

Deploy all artifact to (Sonatype Nexus)[https://s01.oss.sonatype.org/], close staging repository and release to maven central.

## Command

To execute automatically all steps run:

```
mvn -B clean pre-site deploy -DautoDropAfterRelease=true -DskipTests -Pci-cd
```
14 changes: 0 additions & 14 deletions docs/jitpack.md

This file was deleted.

15 changes: 6 additions & 9 deletions jt400/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,29 +29,26 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.github.smeup.reload</groupId>
<groupId>io.github.smeup.reload</groupId>
<artifactId>reload</artifactId>
<version>development-SNAPSHOT</version>
<version>develop-SNAPSHOT</version>
</parent>

<groupId>com.github.smeup.reload</groupId>
<artifactId>jt400</artifactId>
<version>development-SNAPSHOT</version>

<packaging>jar</packaging>

<name>jt400</name>

<dependencies>
<dependency>
<groupId>com.github.smeup.reload</groupId>
<groupId>io.github.smeup.reload</groupId>
<artifactId>base</artifactId>
<version>development-SNAPSHOT</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.github.smeup.reload</groupId>
<groupId>io.github.smeup.reload</groupId>
<artifactId>base</artifactId>
<version>development-SNAPSHOT</version>
<version>${project.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
Expand Down
Loading

0 comments on commit 241f31a

Please sign in to comment.