Repository: ansible/ansible

Issue:
bugfix: packaging/language/maven_artifact module fails to import urlparse
##### ISSUE TYPE
 - Bug Report


##### COMPONENT NAME
packaging/language/maven_artifact

##### ANSIBLE VERSION
<!--- Paste verbatim output from “ansible --version” between quotes below -->
```
ansible 2.4.0 (devel 60676add33) last updated 2017/08/01 09:56:14 (GMT -500)
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/aptdevadm/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /opt/ansible/lib/ansible
  executable location = /opt/ansible/bin/ansible
  python version = 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]

```

##### CONFIGURATION
<!---
Mention any settings you have changed/added/removed in ansible.cfg
(or using the ANSIBLE_* environment variables).
-->
NA
##### OS / ENVIRONMENT
<!---
Mention the OS you are running Ansible from, and the OS you are
managing, or say “N/A” for anything that is not platform-specific.
Also mention the specific version of what you are trying to control,
e.g. if this is a network bug the version of firmware on the network device.
-->
N/A
##### SUMMARY
<!--- Explain the problem briefly -->
Attempt to use maven_artifact results in:
```
The full traceback is:
Traceback (most recent call last):
  File "/tmp/ansible_LT8fq3/ansible_module_maven_artifact.py", line 421, in <module>
    main()
  File "/tmp/ansible_LT8fq3/ansible_module_maven_artifact.py", line 374, in main
    parsed_url = urlparse(repository_url)
TypeError: 'Module_six_moves_urllib_parse' object is not callable

fatal: [localhost]: FAILED! => {
    "changed": false, 
    "failed": true, 
    "module_stderr": "Traceback (most recent call last):\n  File \"/tmp/ansible_LT8fq3/ansible_module_maven_artifact.py\", line 421, in <module>\n    main()\n  File \"/tmp/ansible_LT8fq3/ansible_module_maven_artifact.py\", line 374, in main\n    parsed_url = urlparse(repository_url)\nTypeError: 'Module_six_moves_urllib_parse' object is not callable\n", 
    "module_stdout": "", 
    "msg": "MODULE FAILURE", 
    "rc": 0
}
```
Related to line 148 of maven_artifact.py not importing the urlparser correctly.

##### STEPS TO REPRODUCE
<!---
For bugs, show exactly how to reproduce the problem, using a minimal test-case.
For new features, show how the feature would be used.
-->

<!--- Paste example playbooks or commands between quotes below -->
```yaml
- maven_artifact:
    group_id: ssl-certs
    artifact_id: ssl_certs
    extension: zip
    repository_url: 'https://nexus/SRC/content/groups/public/'
    dest: "{{tmp_dir}}"
```

<!--- You can also paste gist.github.com links for larger files -->

##### EXPECTED RESULTS
<!--- What did you expect to happen when running the steps above? -->
Retrieve the artifact

##### ACTUAL RESULTS
<!--- What actually happened? If possible run with extra verbosity (-vvvv) -->

<!--- Paste verbatim command output between quotes below -->
```
The full traceback is:
Traceback (most recent call last):
  File "/tmp/ansible_LT8fq3/ansible_module_maven_artifact.py", line 421, in <module>
    main()
  File "/tmp/ansible_LT8fq3/ansible_module_maven_artifact.py", line 374, in main
    parsed_url = urlparse(repository_url)
TypeError: 'Module_six_moves_urllib_parse' object is not callable

fatal: [localhost]: FAILED! => {
    "changed": false, 
    "failed": true, 
    "module_stderr": "Traceback (most recent call last):\n  File \"/tmp/ansible_LT8fq3/ansible_module_maven_artifact.py\", line 421, in <module>\n    main()\n  File \"/tmp/ansible_LT8fq3/ansible_module_maven_artifact.py\", line 374, in main\n    parsed_url = urlparse(repository_url)\nTypeError: 'Module_six_moves_urllib_parse' object is not callable\n", 
    "module_stdout": "", 
    "msg": "MODULE FAILURE", 
    "rc": 0
}
```



Discussion:
cc @chrisisbeef
[click here for bot help](https://github.com/ansible/ansibullbot/blob/master/ISSUE_HELP.md)
<!--- boilerplate: notify --->

Resolving patch:
diff --git a/lib/ansible/modules/packaging/language/maven_artifact.py b/lib/ansible/modules/packaging/language/maven_artifact.py
--- a/lib/ansible/modules/packaging/language/maven_artifact.py
+++ b/lib/ansible/modules/packaging/language/maven_artifact.py
@@ -145,7 +145,7 @@
     HAS_BOTO = False
 
 from ansible.module_utils.basic import AnsibleModule
-from ansible.module_utils.six.moves.urllib import parse as urlparse
+from ansible.module_utils.six.moves.urllib.parse import urlparse
 from ansible.module_utils.urls import fetch_url
 
 


Test patch: