Closed tmoschou closed 7 years ago
Looks like https://github.com/ansible/ansible-modules-extras/blob/devel/packaging/language/maven_artifact.py#L335 is the likely culprit. The destination dir name building may make more sense to move into MavenArtifact() class.
@chrisisbeef, ping. This issue is still waiting on your response. click here for bot help
@chrisisbeef, ping. This issue is still waiting on your response. click here for bot help
@tmoschou / @alikins - I'll take a look at this today
@chrisisbeef I have also the issue and found at line 214 that we go check the latest build number regardless of the classifier. I have 2 classifier A and B which have build numbers 79 and 80. If I want to download the snapshot for A it will give the build version of B because it's the latest. I will try to fix it and make a pull request.
edit: done Pull request posted
@chrisisbeef, ping. This issue is still waiting on your response. click here for bot help
@chrisisbeef, ping. This issue is still waiting on your response. click here for bot help
@chrisisbeef, ping. This issue is still waiting on your response. click here for bot help
Apparently this https://github.com/ansible/ansible-modules-extras/commit/1db36bea62d032f841153f2abd04d84fceb48fa7 fixes the issue. consider review for closing
No 1db36be doesn't fix the issue for a non snapshot version with classifier
@chrisisbeef, ping. This issue is still waiting on your response. click here for bot help
This repository has been locked. All new issues and pullrequests should be filed in https://github.com/ansible/ansible
Please read through the repomerge page in the dev guide. The guide contains links to tools which automatically move your issue or pullrequest to the ansible/ansible repo.
This issue was moved to ansible/ansible#24724
ISSUE TYPE
COMPONENT NAME
maven_artifact
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
OS X El Capitan v10.11.4
SUMMARY
When specifying a classifier for maven_artifact and a directory as the dest parameter, the destination filename is constructed assuming no classifier. I.e.
artifact_id + "-" + version + "." + extension
vsartifact_id + "-" + version + "-" + classifier + "." + extension
This causes problems when say downloading multiple artifacts with same same groupId:artifactId:version coordinates. Depending of the version of lib/ansible/modules/extras used, either subsequent artifacts are skipped because the destination exists, or is overwritten as the MD5 hash is different.
STEPS TO REPRODUCE
EXPECTED RESULTS
Should download two artifacts to
ACTUAL RESULTS
One file
/tmp/ansible-test/stanford-corenlp-3.6.0.jar