# Using Ansible with Archiva

**URL:** <https://forum.ansible.com/t/using-ansible-with-archiva/23435>\
**Category:** Ansible Project\
**Created:** [January 11, 2017, 1:42pm UTC](https://forum.ansible.com/t/using-ansible-with-archiva/23435 "2017-01-11T13:42:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![g.roberts](https://avatars.discourse-cdn.com/v4/letter/g/ee59a6/32.png) [@g.roberts](https://forum.ansible.com/u/g.roberts)\
**Post date:** [January 11, 2017, 1:42pm UTC](https://forum.ansible.com/t/using-ansible-with-archiva/23435/1 "2017-01-11T13:42:32Z")

</div>

I am new to Ansible and am trying to get a download from an Archiva respository. I am using the extra called maven\_artifact. I can successfully download an artifact from Maven Central but not from my local Archiva. By all accounts, Archiva is working properly. It could be something as simple as me not getting the URL right when using Archiva, but I can’t tell. The URL Ansible assembles does not appear to be anything Archiva would understand, according to the Archiva REST API.

Is this supposed to work at all? If so, how?

Thanks in advance

This works:

`

---

<div class="post-metadata">

**Author:** ![g.roberts](https://avatars.discourse-cdn.com/v4/letter/g/ee59a6/32.png) [@g.roberts](https://forum.ansible.com/u/g.roberts)\
**Post date:** [January 12, 2017, 12:45pm UTC](https://forum.ansible.com/t/using-ansible-with-archiva/23435/2 "2017-01-12T12:45:41Z")

</div>

> I am new to Ansible and am trying to get a download from an Archiva  
> respository. I am using the extra called maven\_artifact. I can  
> successfully download an artifact from Maven Central but not from my local  
> Archiva. By all accounts, Archiva is working properly. It could be  
> something as simple as me not getting the URL right when using Archiva, but  
> I can't tell. The URL Ansible assembles does not appear to be anything  
> Archiva would understand, according to the Archiva REST API.
> 
> Is this supposed to work at all? If so, how?
> 
> Thanks in advance
> 
> This works:
> 
> ---  
> - hosts: localhost  
> &nbsp;&nbsp;connection: local  
> &nbsp;&nbsp;tasks:  
> &nbsp;&nbsp;- name: Get federation artifact  
> &nbsp;&nbsp;&nbsp;&nbsp;maven\_artifact:  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;group\_id: junit  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;artifact\_id: junit  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;version: 4.11  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;repository\_url: '[http://repo1.maven.org/maven2](http://repo1.maven.org/maven2)’  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dest: ./junit.jar  
> ...
> 
> This does not work:
> 
> ---  
> - hosts: localhost  
> &nbsp;&nbsp;connection: local  
> &nbsp;&nbsp;tasks:  
> &nbsp;&nbsp;- name: Get federation artifact  
> &nbsp;&nbsp;&nbsp;&nbsp;maven\_artifact:  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;group\_id: org.webgme.guest  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;artifact\_id: WeatherFederateProject-java  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;version: LATEST  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;repository\_url: '[http://cpswtng](http://cpswtng)\_archiva:8080'  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dest: ./WeatherFederateProject.jar

...
