community.general
community.general copied to clipboard
[maven_artifact] can not download the latest snapshot version of an artifact
Summary
I got a maven repository with multiple artifacts deployed to one snapshot version (0.0.1-SNAPSHOT). They are then all saved with their timestamps in this one version.
When I try to download the snapshot version of an artifact I always get the first version which has been pushed to that snapshot version. Instead, I would always want to get the latest version.
The reason could be the order in the implementation. This idea resulted from this stackoverflow answer.
Issue Type
Bug Report
Component Name
maven_artifact
Ansible Version
$ ansible --version
2.10.8
Community.general Version
$ ansible-galaxy collection list community.general
1.3.6
Configuration
$ ansible-config dump --only-changed
_nothing_
OS / Environment
NAME="Oracle Linux Server" VERSION="7.9" ID="ol" ID_LIKE="fedora" VARIANT="Server" VARIANT_ID="server" VERSION_ID="7.9" PRETTY_NAME="Oracle Linux Server 7.9"
Steps to Reproduce
- name: download artifact
maven_artifact:
artifact_id: artifact
group_id: group.id
version: 0.0.1-SNAPSHOT
repository_url: https://maven.pkg.github.com/org/repo
extension: jar
username: "{{ githubUsername }}"
password: "{{ githubRepoToken }}"
dest: /home/{{ ansible_user }}/automation/artifacts/
Expected Results
I expected to get the latest timestamp of this snapshot version.
Actual Results
I got the earliest timestamp of this snapshot version.
Code of Conduct
- [X] I agree to follow the Ansible Code of Conduct
Files identified in the description:
If these files are incorrect, please update the component name
section of the description or use the !component
bot command.
cc @tumbl3w33d @turb click here for bot help
Files identified in the description:
If these files are incorrect, please update the component name
section of the description or use the !component
bot command.