-
Notifications
You must be signed in to change notification settings - Fork 39
build publish maven plugin from CI to sonatype #65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
octonato
merged 38 commits into
rgc/feature-branch-maven-java
from
mvn-publish-to-sonatype
Jun 25, 2021
Merged
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
61ffe25
wip
raboof bc1fd64
Sign artifacts
raboof 2f8836b
Deploy the maven plugin specifically
raboof e8098af
Add sonatype credentials
raboof d997f50
Add gpg key and passphrase
raboof ccaaf89
consistent ci job name
raboof 77b6eda
Escape '<<'
raboof e478997
Create temporary key for local artifacts
raboof 7dd9d21
Invalid option: --pinentry-mode
raboof 18b8bf9
explicitly invoke gpg2?
raboof 526ee42
get gpg version
raboof a5d0e2c
gpg2
raboof 9069a4e
sudo apt-get
raboof 46cb2b5
First update
raboof 5b4d6e3
Get version
raboof f08e0c0
don't set pinentry-mode
raboof c482734
--gen-key
raboof d40934d
Test publishing maven plugin from branch
raboof a5fa39f
No distributionManagement for sub-pom?
raboof 683a3c2
Make sure ~/.m2, including the deps cache, is available
raboof 1f1aba0
Create ~/.m2 if it does not exist yet
raboof 061ab80
Add missing </settings>
raboof de2c035
Fix type in SDK_VERSION env var
raboof 966a351
Avoid 'gpg: signing failed: Inappropriate ioctl for device'
raboof 60e2fce
export?
raboof 239c6e7
Set passphrase with env var as well?
raboof c61e866
Maybe --batch avoids pinentry?
raboof ea11f95
gpg versions
raboof cb284c5
pinentry loopback after all?
raboof 142a495
Roll back gpg version changes that I now think were unneeded
raboof 75cb91a
Cleaning up
raboof e255da4
Configure signing in profile
raboof 694e2f4
Only sign when releasing
raboof ca45c8d
Less gpg config needed for tests
raboof afcf8ef
Publish all submodules in one go
raboof 356504b
Enable nexus-staging-maven-plugin for all 3 maven projects
raboof c4be131
Only deploy the submodules
raboof 8d03b51
Add requirements to circleci again
raboof File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -2,15 +2,15 @@ | |
| <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> | ||
|
|
||
| <groupId>com.akkaserverless</groupId> | ||
| <artifactId>akkaserverless-maven-java</artifactId> | ||
| <version>1.0-SNAPSHOT</version> | ||
| <packaging>pom</packaging> | ||
|
|
||
| <url>https://www.lightbend.com/akka-serverless</url> | ||
| <url>https://www.lightbend.com/akkaserverless</url> | ||
| <scm> | ||
| <url>https://github.com/lightbend/akkaserverless-maven-java</url> | ||
| <url>https://github.com/lightbend/akkaserverless-java-sdk</url> | ||
| </scm> | ||
|
|
||
| <developers> | ||
|
|
@@ -46,34 +46,89 @@ | |
| </repositories> | ||
|
|
||
| <distributionManagement> | ||
| <repository> | ||
| <id>lightbend-akkaserverless-cloudsmith</id> | ||
| <name>Cloudsmith</name> | ||
| <url>https://maven.cloudsmith.io/lightbend/akkaserverless/</url> | ||
| </repository> | ||
| <snapshotRepository> | ||
| <id>ossrh</id> | ||
| <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url> | ||
| </snapshotRepository> | ||
| </distributionManagement> | ||
|
|
||
| <build> | ||
| <pluginManagement> | ||
| <plugins> | ||
| <plugin> | ||
| <groupId>org.sonatype.plugins</groupId> | ||
| <artifactId>nexus-staging-maven-plugin</artifactId> | ||
| <version>1.6.7</version> | ||
| <extensions>true</extensions> | ||
| <configuration> | ||
| <serverId>ossrh</serverId> | ||
| <nexusUrl>https://s01.oss.sonatype.org</nexusUrl> | ||
| <autoReleaseAfterClose>false</autoReleaseAfterClose> | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we could set this to 'true' eventually, but for the first release perhaps let's give ourselves a chance to check the artifacts? |
||
| </configuration> | ||
| </plugin> | ||
| <plugin> | ||
| <groupId>org.apache.maven.plugins</groupId> | ||
| <artifactId>maven-resources-plugin</artifactId> | ||
| <version>3.2.0</version> | ||
| </plugin> | ||
| <plugin> | ||
| <!-- | ||
| this plugin allow us to change the version of this projects and submodules | ||
| we use it in CI to align the project with the current SDK version | ||
| --> | ||
| <groupId>org.codehaus.mojo</groupId> | ||
| <artifactId>versions-maven-plugin</artifactId> | ||
| <version>2.8.1</version> | ||
| </plugin> | ||
| </plugins> | ||
| </pluginManagement> | ||
| <plugins> | ||
| <plugin> | ||
| <groupId>org.apache.maven.plugins</groupId> | ||
| <artifactId>maven-resources-plugin</artifactId> | ||
| <version>3.2.0</version> | ||
| </plugin> | ||
| <plugin> | ||
| <!-- | ||
| this plugin allow us to change the version of this projects and submodules | ||
| we use it in CI to align the project with the current SDK version | ||
| --> | ||
| <groupId>org.codehaus.mojo</groupId> | ||
| <artifactId>versions-maven-plugin</artifactId> | ||
| <version>2.8.1</version> | ||
| <artifactId>maven-deploy-plugin</artifactId> | ||
| <version>2.8.2</version> | ||
| <configuration> | ||
| <skip>true</skip> | ||
| </configuration> | ||
| <inherited>false</inherited> | ||
| </plugin> | ||
| </plugins> | ||
| </pluginManagement> | ||
| </build> | ||
|
|
||
| <profiles> | ||
| <profile> | ||
| <id>release</id> | ||
| <build> | ||
| <plugins> | ||
| <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> | ||
| <gpgArguments> | ||
| <!-- | ||
| Needed on gpg 2.2 to avoid using the TTY | ||
| to ask for the password. | ||
| --> | ||
| <arg>--pinentry-mode</arg> | ||
| <arg>loopback</arg> | ||
| </gpgArguments> | ||
| </configuration> | ||
| </execution> | ||
| </executions> | ||
| </plugin> | ||
| </plugins> | ||
| </build> | ||
| </profile> | ||
| </profiles> | ||
|
|
||
| <modules> | ||
| <module>akkaserverless-maven-plugin</module> | ||
| <module>akkaserverless-maven-archetype-value-entity</module> | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to investigate it further. We may be doing something wrong.
When I was bringing the maven code here, I was surprised to see that I have to call sbt publishM2 more then once in the same CI build. I was planning to call only once and reuse the local artifacts on the next jobs. Didn't work as expected.