Bug 1030231

Summary: Misleading error message when if one of the zanata.ini entries contains invalid URL
Product: [Retired] Zanata Reporter: Ding-Yi Chen <dchen>
Component: Component-MavenAssignee: Damian Jansen <djansen>
Status: CLOSED WONTFIX QA Contact: Zanata-QA Mailling List <zanata-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 3.1CC: zanata-bugs
Target Milestone: ---Keywords: screened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-23 02:34:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ding-Yi Chen 2013-11-14 08:29:35 UTC
Description of problem:
If one of the zanata.ini entries contains invalid URL, running maven client return following error message:

[ERROR] Failed to execute goal org.zanata:zanata-maven-plugin:3.1.2:push (default-cli) on project standalone-pom: Zanata mojo exception: 'SERVER1..url' doesn't map to a class java.net.URL: The value  can't be converted to an URL: no protocol: -> [Help 1]

Version-Release number of selected component (if applicable):
zanata-maven-plugin:3.1.2

How reproducible:
Always with following zanata.ini


# Start zanata.ini
[servers]
SERVER1.url = 
SERVER1.username = USER1
SERVER1.key = KEY1

SERVER2.url = <SERVER2_URL>
SERVER2.username = USER2
SERVER2.key = KEY2
# End zanata.ini

Steps to Reproduce:
1. cd <A_ZANATA_PROJECT>
2.  mvn -e zanata:push -Dzanata.url=<SERVER2_URL>  -Dzanata.srcDir=pot


Actual results:
[ERROR] Failed to execute goal org.zanata:zanata-maven-plugin:3.1.2:push (default-cli) on project standalone-pom: Zanata mojo exception: 'SERVER1..url' doesn't map to a class java.net.URL: The value  can't be converted to an URL: no protocol: -> [Help 1]

Expected results:
Invalid URL in SERVER1.url

Additional info:

Comment 1 Ding-Yi Chen 2015-03-23 02:34:18 UTC
Come to think of it, the client did complain about the it cannot read the URL (which is empty).

And it only happened if the invalid entry come before the referred item.
So it seems like an expected behavior.