Build jar from maven project on github
I couldn't find any tutorials on how to do this.
i have a project in java version 21 at
https://github.com/asdru22/JavaGame/
if i try and use github actions i get an error when it tries to update the dependency graphs.
23 Replies
⌛
This post has been reserved for your question.
Hey @asdru! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
https://github.com/asdru22/JavaGame/blob/main/.github/workflows/maven.yml
this file was a template from github, i just changed the versions to 21
Maybe use a more recent version?
- name: Submit Dependency Snapshot uses: advanced-security/maven-dependency-submission-action@v3
there's also
v4
i tried setting the version to 4 but i still get some erorrs
Error: TypeError: Cannot read properties of undefined (reading 'forEach')
Error: Error: Could not generate a snapshot of the dependencies; Cannot read properties of undefined (reading 'forEach')
Error: Failed to generate a dependency snapshot, check logs for more details, Error: Could not generate a snapshot of the dependencies; Cannot read properties of undefined (reading 'forEach')
Can you show where this happens with v4?
oh you set the wrong thing to v4
the last line is
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
is there a particular order where i need to put this? i put it under the "build with maven" part
that should be
uses: advanced-security/maven-dependency-submission-action@v4
we are both talking about changing that line: https://github.com/asdru22/JavaGame/blob/f7561fad216b2268f15c7354036c7be87d3b5b08/.github/workflows/maven.yml#L36C7-L36C106
GitHub
JavaGame/.github/workflows/maven.yml at f7561fad216b2268f15c7354036...
Onest no idea. Contribute to asdru22/JavaGame development by creating an account on GitHub.
ooh i see
let me try
i get this error with the updated .yaml
I think you might need to set permissions
GitHub
Getting 403 even if permissions:write is set · Issue #55 · advanced...
Hi, In an open-source project we are using this action as follows: https://github.com/apache/santuario-xml-security-java/blob/main/.github/workflows/dependency-submission.yml When I (who have write...
https://github.blog/2020-08-03-github-actions-improvements-for-fork-and-pull-request-workflows/
seems that it works only on private repos?
Chris Patterson
The GitHub Blog
GitHub Actions improvements for fork and pull request workflows
Today GitHub Actions shipped a series of features designed to improve your workflows when working with PRs from repository forks. New settings for private repository forks Many GitHub customers choose to work in a forking model instead of a branching model with their private repositories. Until now, users were not able to run workflows on […]
make sure to set the permission
contents:write
unless i have enterprise or org repositories
I think you need to add
probably at the top somewhere outside of the
jobs
actually no inside your job
probably something like
yeaah it works
apologies for the stupid question, but does this mean that there is the built jar downloadable somewhere?
no
If you want that, you'd need to
- create the JAR
- upload it
which can be done in GitHub Actions
you are even already creating it in your workflow
but not uploading
ah i see
i found the documentation i'll try and see if i can do that
Post Closed
This post has been closed by <@372715536121069578>.