-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
maven_artifact can't get artifact from local repo. #29334
Comments
From @alikins on 2016-07-11T11:55:05Z Is the behavior any different if repository_url is a file url? like:
|
From @ansibot on 2016-07-11T11:55:05Z @chchrist ping, this issue is still waiting on your feedback. We will close the issue if you do not respond. |
2 similar comments
From @ansibot on 2016-07-11T11:55:05Z @chchrist ping, this issue is still waiting on your feedback. We will close the issue if you do not respond. |
From @ansibot on 2016-07-11T11:55:05Z @chchrist ping, this issue is still waiting on your feedback. We will close the issue if you do not respond. |
From @ktakashi on 2016-07-11T11:55:05Z I've tried the
In the repository directory there's |
From @clabu on 2016-07-11T11:55:05Z This was working using the Previously, the This patch to
If you consider the fix robust enough, I will make a pull request. |
From @petenorth on 2016-07-11T11:55:05Z @clabu The patch to maven_artifact.py didn't resolve the issue for me. The info['status'] seems to come back with -1, I tried using a value of -1 rather than None but to no avail. Version of ansible was: ansible 2.3.0.0 Error I got when I changed info['status'] == None to info['status'] == -1 failed: [node1.example.com] (item={u'version': u'1.1.0-SNAPSHOT', u'groupId': u'com.redhat.camel', u'artifactId': u'camel-amq-consumer'}) => {"failed": true, "item": {"artifactId": "camel-amq-consumer", "groupId": "com.redhat.camel", "version": "1.1.0-SNAPSHOT"}, "module_stderr": "Shared connection to node1.example.com closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n File "/tmp/ansible_MMTYaR/ansible_module_maven_artifact.py", line 424, in \r\n main()\r\n File "/tmp/ansible_MMTYaR/ansible_module_maven_artifact.py", line 414, in main\r\n if downloader.download(artifact, dest):\r\n File "/tmp/ansible_MMTYaR/ansible_module_maven_artifact.py", line 294, in download\r\n url = self.find_uri_for_artifact(artifact)\r\n File "/tmp/ansible_MMTYaR/ansible_module_maven_artifact.py", line 244, in find_uri_for_artifact\r\n xml = self._request(self.base + path, "Failed to download maven-metadata.xml", lambda r: etree.parse(r))\r\n File "/tmp/ansible_MMTYaR/ansible_module_maven_artifact.py", line 283, in _request\r\n return f(response)\r\n File "/tmp/ansible_MMTYaR/ansible_module_maven_artifact.py", line 244, in \r\n xml = self._request(self.base + path, "Failed to download maven-metadata.xml", lambda r: etree.parse(r))\r\n File "lxml.etree.pyx", line 3197, in lxml.etree.parse (src/lxml/lxml.etree.c:64816)\r\n File "parser.pxi", line 1596, in lxml.etree._parseDocument (src/lxml/lxml.etree.c:92968)\r\nTypeError: cannot parse from 'NoneType'\r\n", "msg": "MODULE FAILURE", "rc": 1} |
I get the following error with 2.4.0.0 fatal: [localhost -> localhost]: FAILED! => {"changed": false, "failed": true, "msg": "Failed to download artifact com.example:myproject:0.0.525 because of OK (1329468 bytes)for URL file:///home/user/.m2/repository/com/example/myproject/0.0.525/myproject-0.0.525.jar"} |
From @chchrist on 2016-07-11T11:55:05Z
ISSUE TYPE
COMPONENT NAME
maven_artifact
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
N/A
SUMMARY
maven_artifact can't get artifact from local repo as is looking for maven-metadata.xml and locally is maven-metadata-local.xml
STEPS TO REPRODUCE
Just try to point to your local maven repository.
EXPECTED RESULTS
It should be able to find the maven-metadata-local.xml
ACTUAL RESULTS
Copied from original issue: ansible/ansible-modules-extras#2547
The text was updated successfully, but these errors were encountered: