-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
maven-plugin: added configuration for publishing the plugin (#23)
Note: Publishing the library itself is incomplete and requires adding signing of the package for it to work. Signing needs to be done manually at the moment and does not work on github actions without additional changes
- Loading branch information
Showing
4 changed files
with
111 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,8 @@ jobs: | |
with: | ||
distribution: temurin | ||
java-version: 11 | ||
gpg-private-key: ${{ secrets.gpg_key }} | ||
gpg-passphrase: ${{ secrets.gpg_passphrase }} | ||
|
||
- name: Setup Gradle | ||
uses: gradle/[email protected] | ||
|
@@ -46,7 +48,7 @@ jobs: | |
- name: Build Maven Plugin | ||
run: | | ||
cd maven-plugin | ||
mvn clean install --batch-mode | ||
mvn clean install -Dgpg.passphrase='${{ secrets.gpg_passphrase }}' --batch-mode | ||
- name: Integration tests with maven plugin | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,7 @@ tasks.jar { | |
archiveBaseName.set(rootProject.name) | ||
} | ||
|
||
|
||
publishing { | ||
publications { | ||
create<MavenPublication>("hibernate-provider") { | ||
|
@@ -59,13 +60,13 @@ publishing { | |
url = "http://www.apache.org/licenses/LICENSE-2.0.txt" | ||
} | ||
} | ||
// developers { | ||
// developer { | ||
// id = "johnd" | ||
// name = "John Doe" | ||
// email = "[email protected]" | ||
// } | ||
// } | ||
developers { | ||
developer { | ||
id = "Ariga" | ||
name = "Ariga" | ||
email = "[email protected]" | ||
} | ||
} | ||
scm { | ||
connection = "scm:git:git://github.com/ariga/atlas-provider-hibernate.git" | ||
developerConnection = "scm:git:ssh://github.com/ariga/atlas-provider-hibernate.git" | ||
|
@@ -74,7 +75,13 @@ publishing { | |
} | ||
} | ||
} | ||
|
||
repositories { | ||
maven { | ||
name = "ossrh" | ||
credentials(PasswordCredentials::class) | ||
url = uri("https://s01.oss.sonatype.org/content/groups/staging/") | ||
} | ||
maven { | ||
name = "localPluginRepository" | ||
url = uri("../.local-plugin-repository") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,8 @@ | |
<groupId>io.atlasgo</groupId> | ||
<artifactId>hibernate-provider-maven-plugin</artifactId> | ||
<packaging>maven-plugin</packaging> | ||
<version>0.1</version> | ||
<version>0.2-SNAPSHOT</version> | ||
<description>Atlas Hibernate schema provider</description> | ||
|
||
<name>hibernate-provider-maven-plugin Maven Mojo</name> | ||
<url>https://github.com/ariga/atlas-provider-hibernate</url> | ||
|
@@ -16,6 +17,28 @@ | |
<maven.compiler.source>11</maven.compiler.source> | ||
</properties> | ||
|
||
<licenses> | ||
<license> | ||
<name>The Apache License, Version 2.0</name> | ||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> | ||
</license> | ||
</licenses> | ||
|
||
<developers> | ||
<developer> | ||
<name>Ariga</name> | ||
<email>[email protected]</email> | ||
<organization>Ariga</organization> | ||
<organizationUrl>https://atlasgo.cloud/</organizationUrl> | ||
</developer> | ||
</developers> | ||
|
||
<scm> | ||
<connection>scm:git:git://github.com/ariga/atlas-provider-hibernate.git</connection> | ||
<developerConnection>scm:git:ssh://github.com:ariga/atlas-provider-hibernate.git</developerConnection> | ||
<url>http://github.com/ariga/atlas-provider-hibernate/tree/master</url> | ||
</scm> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.hibernate.orm</groupId> | ||
|
@@ -54,6 +77,17 @@ | |
</dependency> | ||
</dependencies> | ||
|
||
<distributionManagement> | ||
<snapshotRepository> | ||
<id>ossrh</id> | ||
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url> | ||
</snapshotRepository> | ||
<repository> | ||
<id>ossrh</id> | ||
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url> | ||
</repository> | ||
</distributionManagement> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
|
@@ -75,6 +109,65 @@ | |
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-source-plugin</artifactId> | ||
<version>2.2.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>2.9.1</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>1.5</version> | ||
<executions> | ||
<execution> | ||
<id>sign-artifacts</id> | ||
<phase>verify</phase> | ||
<goals> | ||
<goal>sign</goal> | ||
</goals> | ||
<configuration> | ||
<keyname>${gpg.keyname}</keyname> | ||
<passphraseServerId>${gpg.keyname}</passphraseServerId> | ||
<gpgArguments> | ||
<arg>--pinentry-mode</arg> | ||
<arg>loopback</arg> | ||
</gpgArguments> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.sonatype.plugins</groupId> | ||
<artifactId>nexus-staging-maven-plugin</artifactId> | ||
<version>1.6.13</version> | ||
<extensions>true</extensions> | ||
<configuration> | ||
<serverId>ossrh</serverId> | ||
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl> | ||
<autoReleaseAfterClose>false</autoReleaseAfterClose> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.jetbrains.kotlin</groupId> | ||
<artifactId>kotlin-maven-plugin</artifactId> | ||
|