Skip to content
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

Merged

Conversation

MatthewKhouzam
Copy link
Contributor

There is none

@@ -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

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)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok!

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

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?

Copy link
Contributor Author

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
Copy link
Contributor

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

Copy link
Contributor

@marcdumais-work marcdumais-work Mar 13, 2024

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.

Copy link
Contributor Author

@MatthewKhouzam MatthewKhouzam Mar 13, 2024

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

@marcdumais-work
Copy link
Contributor

marcdumais-work commented Mar 12, 2024

An advanced example from the setup-java repo : close to our use-case but there are small differences that you could look-into if this still does not work after responding to current comments:
https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#publishing-using-apache-maven

e.g. they use "maven" as value for "server-id":

server-id: maven # Value of the distributionManagement/repository/id field of the pom.xml

There is none

Signed-off-by: Matthew Khouzam <[email protected]>
@MatthewKhouzam MatthewKhouzam merged commit 355f705 into eclipse-tracecompass:main Mar 13, 2024
7 checks passed
@MatthewKhouzam MatthewKhouzam deleted the no-settings branch March 13, 2024 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants