@ChuckJonas the provider of a VS Code PMD Plugin for Salesforce want's to allow his plugin to offer an Auto-Upgrade whenever a new PMD version is available. This ticket should provide a lightweight solution for this.
An idea is using the new GitHub Packages feature.
@ChuckJonas can you elaborate a bit on what you would need and how you see "Packages" solve this? @adangel did you already think about using this new feature for PMD?
I didn't consider github packages yet, because we have already a binary repo: maven central
You can learn about the available versions by polling: https://repo.maven.apache.org/maven2/net/sourceforge/pmd/pmd/maven-metadata.xml
In maven central, we don't publish the binary distribution, but that would be available on github releases: https://github.com/pmd/pmd/releases/latest
Github also provides an API, so you can do that:
VERSION=$(curl -s https://api.github.com/repos/pmd/pmd/releases/latest | jq --raw-output ".tag_name")
DOWNLOAD_URL=$(curl -s https://api.github.com/repos/pmd/pmd/releases/latest | jq --raw-output ".assets[].browser_download_url" | grep pmd-bin)
echo "version=${VERSION}"
echo "url=${DOWNLOAD_URL}"
awesome, I think this should give me what I need to add some auto-update capabilities.
Cheers
@ChuckJonas I made you assignee. Would you mind closing this when the existing solution works out for you?
weird, I'm still unable to close this issue.
(You can go ahead and close it out... If I have any issue I will reopen)
Thanks
As emailed to Andreas earlier, PMD 6.22 is not available at https://mvnrepository.com/artifact/net.sourceforge.pmd/pmd-java
This appears to have happened before with another project.
https://github.com/eclipse/jetty.project/issues/2309
I wasn't aware that mvnrepository.com was a third-party site.
Most helpful comment
I didn't consider github packages yet, because we have already a binary repo: maven central
You can learn about the available versions by polling: https://repo.maven.apache.org/maven2/net/sourceforge/pmd/pmd/maven-metadata.xml
In maven central, we don't publish the binary distribution, but that would be available on github releases: https://github.com/pmd/pmd/releases/latest
Github also provides an API, so you can do that: