-
Notifications
You must be signed in to change notification settings - Fork 5
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
Remove references to settings.xml #17
Remove references to settings.xml #17
Conversation
.github/workflows/maven-publish.yml
Outdated
@@ -32,7 +32,7 @@ jobs: | |||
server-password: MAVEN_PASSWORD | |||
gpg-passphrase: PASSPHRASE | |||
- name: Make a snapshot | |||
run: mvn -Pdeploy -Pproduction --no-transfer-progress --batch-mode clean deploy -U | |||
run: mvn --no-transfer-progress --batch-mode clean deploy -U |
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.
the profiles should stay (-Pdeploy and -Pproduction)
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.
Ok!
.github/workflows/maven-publish.yml
Outdated
server-username: MAVEN_USERNAME | ||
server-password: MAVEN_PASSWORD | ||
gpg-passphrase: PASSPHRASE | ||
|
||
- name: Publish to Maven Central Repository | ||
run: mvn --batch-mode deploy -s $GITHUB_WORKSPACE/settings.xml | ||
run: mvn --batch-mode deploy |
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.
shouldn't it also have the profiles here?
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.
let's try!
@@ -44,14 +44,13 @@ jobs: | |||
java-version: '11' | |||
distribution: 'temurin' | |||
cache: 'maven' | |||
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml |
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.
In the GitHub documentation example, the server-id
line is kept:
https://docs.github.com/en/actions/publishing-packages/publishing-java-packages-with-maven#publishing-packages-to-the-maven-central-repository-and-github-packages
update: seems the default value is "github", so you want to keep the line:
https://github.com/actions/setup-java#maven-options
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.
In the doc linked above, they provide some corresponding content of the generated settings.xml - you should "cat" the one(s) generated in your workflow and compare, making sure the parameters you pass tp setup-java
are reflected in there.
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.
ossrh
is for maven central AFAIK
github
is for github packages
An advanced example from the e.g. they use "maven" as value for "server-id":
|
There is none Signed-off-by: Matthew Khouzam <[email protected]>
64df011
to
fdf3ba6
Compare
There is none