# Error executing maven\_artifact plugin

**URL:** <https://forum.ansible.com/t/error-executing-maven-artifact-plugin/20266>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [January 19, 2016, 8:10am UTC](https://forum.ansible.com/t/error-executing-maven-artifact-plugin/20266 "2016-01-19T08:10:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bob\_Nuggett](https://avatars.discourse-cdn.com/v4/letter/b/d07c76/32.png) [@Bob\_Nuggett](https://forum.ansible.com/u/Bob_Nuggett)\
**Post date:** [January 19, 2016, 8:10am UTC](https://forum.ansible.com/t/error-executing-maven-artifact-plugin/20266/1 "2016-01-19T08:10:57Z")

</div>

I get the following error when trying to execute the maven\_artifact plugin

`

fatal: [172.28.128.6]: FAILED! =\> {“changed”: false, “failed”: true, “module\_stderr”: “”, “module\_stdout”: “Traceback (most recent call last):\r\n File "/home/ubuntu/.ansible/tmp/ansible-tmp-1453190793.13-232530634322851/maven\_artifact", line 25, in \r\n from lxml import etree\r\nImportError: No module named lxml\r\n”, “msg”: “MODULE FAILURE”, “parsed”: false}  
`

I have followed the instructions at: [http://lxml.de/installation.html](http://lxml.de/installation.html)  
I have also followed the instructions at: [http://stackoverflow.com/questions/6504810/how-to-install-lxml-on-ubuntu](http://stackoverflow.com/questions/6504810/how-to-install-lxml-on-ubuntu)

But the module is still not found.

What am I doing wrong?

Here’s my environment:

`uname -a Linux vagrant-ubuntu-trusty-64 3.13.0-71-generic #114-Ubuntu SMP Tue Dec 1 02:34:22 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux`

`$ ansible --version ansible 2.0.0.1 config file = /home/vagrant/project/ansible.cfg configured module search path = Default w/o overrides`

`  
$ pip list | grep lxml  
lxml (3.3.3)

`

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [January 19, 2016, 1:51pm UTC](https://forum.ansible.com/t/error-executing-maven-artifact-plugin/20266/2 "2016-01-19T13:51:08Z")

</div>

lxml needs to be installed on the remote target device where the task is executing, not on the local control machine (unless they are one in the same)

I suggest adding a task that will install lxml via the pip module before executing any tasks that require it.
