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

Use github action to publish jar file #8

Open
taojing2002 opened this issue Jan 14, 2025 · 4 comments
Open

Use github action to publish jar file #8

taojing2002 opened this issue Jan 14, 2025 · 4 comments
Assignees
Milestone

Comments

@taojing2002
Copy link
Contributor

We need to use the github action to publish the jar file to the github package registry.

Here is the documentation:
https://docs.github.com/en/actions/use-cases-and-examples/publishing-packages/publishing-java-packages-with-maven

@taojing2002
Copy link
Contributor Author

We created the git hub actions to publish the jar file to the github repository.

@taojing2002 taojing2002 self-assigned this Feb 6, 2025
@taojing2002 taojing2002 added this to the Release 2.0.0 milestone Feb 6, 2025
@vchendrix vchendrix reopened this Feb 6, 2025
@vchendrix
Copy link

@taojing2002 Looks like the publish action failed. It is a conflict error, which probably means that you need to overwrite the existing jar or something else.

[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/commons-io/commons-io/2.5/commons-io-2.5.jar (209 kB at 2.5 MB/s)
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.1.0/plexus-utils-3.1.0.jar (262 kB at 3.0 MB/s)
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/slf4j/slf4j-api/1.7.5/slf4j-api-1.7.5.jar (26 kB at 287 kB/s)
[INFO] Uploading to github: https://maven.pkg.github.com/NCEAS/osti-elink/edu/ucsb/nceas/osti-elink/2.0.0/osti-elink-2.0.0.jar
[INFO] Uploading to github: https://maven.pkg.github.com/NCEAS/osti-elink/edu/ucsb/nceas/osti-elink/2.0.0/osti-elink-2.0.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  8.296 s
[INFO] Finished at: 2025-02-06T20:18:13Z
[INFO] ------------------------------------------------------------------------
Error:  Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy (default-deploy) on project osti-elink: ArtifactDeployerException: Failed to deploy artifacts: Could not transfer artifact edu.ucsb.nceas:osti-elink:jar:2.0.0 from/to github (https://maven.pkg.github.com/NCEAS/osti-elink): status code: 409, reason phrase: Conflict (409) -> [Help 1]
Error:  
Error:  To see the full stack trace of the errors, re-run Maven with the -e switch.
Error:  Re-run Maven using the -X switch to enable full debug logging.
Error:  
Error:  For more information about the errors and possible solutions, please read the following articles:
Error:  [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Error: Process completed with exit code 1.

@taojing2002
Copy link
Contributor Author

I saw the error messages about the conflict. I think the reason is that I already manually built the 2.0.0 jar two weeks ago. So the system prevent us to build again since it is a formal release. There is no real code change except a test file after the jar file was built. So I haven't taken a look on how to overwrite it. Do you think we need to build the jar file again? @vchendrix

@vchendrix
Copy link

vchendrix commented Feb 7, 2025 via email

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

No branches or pull requests

2 participants