Bug 737817

Summary: putproject,putversion,putuser have property names inconsistent with their config parameter names
Product: [Retired] Zanata Reporter: Ding-Yi Chen <dchen>
Component: Component-Maven, UsabilityAssignee: Runa Bhattacharjee <runab>
Status: CLOSED CURRENTRELEASE QA Contact: Ding-Yi Chen <dchen>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.4-RCCC: ankit, damason, sflaniga, zanata-bugs, zanata-dev-internal
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 1.4-SNAPSHOT (20110915-1852) Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-10-28 08:12:21 UTC Type: ---
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 2011-09-13 07:36:25 UTC
Description of problem:
According to Zanata plugin documentation (https://zanata.ci.cloudbees.com/job/zanata-site/site/zanata-maven-plugin/putversion-mojo.html)

versionProject and versionSlug are valid and required parameters.
However, specifying these parameters do not actually works.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Assume project "AboutFedora" exists in zanata server.


2. Assume zanata.ini has following line:

zanata_1_4_auto.url=http://zanata.server.com/
zanata_1_4_auto.username=admin
zanata_1_4_auto.key=b6d7044e9ee3b2447c28fb7c50d86d98


3. mvn -e zanata:putversion  -Dzanata.project.type=podir  -Dzanata.versionProject=AboutFedora -Dzanata.versionSlug=f13


  
Actual results:
[ERROR] Failed to execute goal org.zanata:zanata-maven-plugin:1.4-SNAPSHOT:putversion (default-cli) on project null: The parameters 'versionProject', 'versionSlug' for goal org.zanata:zanata-maven-plugin:1.4-SNAPSHOT:putversion are missing or invalid -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.zanata:zanata-maven-plugin:1.4-SNAPSHOT:putversion (default-cli) on project null: The parameters 'versionProject', 'versionSlug' for goal org.zanata:zanata-maven-plugin:1.4-SNAPSHOT:putversion are missing or invalid



Expected results:
Version "f13" is created for project "AboutFedora"

Additional info:
Parameters which actually work are:
-Dzanata.version.slug=f13 
-Dzanata.version.project=AboutFedora

Comment 1 Sean Flanigan 2011-09-13 07:42:55 UTC
According to:
https://zanata.ci.cloudbees.com/job/zanata-site/site/zanata-maven-plugin/putversion-mojo.html#versionProject

the system property ("expression") for the configuration parameter "versionProject" is "zanata.version.project".  Similarly for versionSlug.

Comment 2 Ding-Yi Chen 2011-09-14 01:16:01 UTC
(In reply to comment #1)
> According to:
> https://zanata.ci.cloudbees.com/job/zanata-site/site/zanata-maven-plugin/putversion-mojo.html#versionProject
> 
> the system property ("expression") for the configuration parameter
> "versionProject" is "zanata.version.project".  Similarly for versionSlug.

Which is inconsistent with other parameters of other goals, such as projectConfig, userConfig, and projectType.

Comment 3 David Mason 2011-09-14 01:32:42 UTC
This is related to the trouble I was having with mvn zanata:putproject. There was no way to determine from the error messages or usage information how to specify these properties.

Comment 4 Sean Flanigan 2011-09-14 01:45:59 UTC
> Which is inconsistent with other parameters of other goals, such as
projectConfig, userConfig, and projectType.

Yes, true.  I can break backward compatibility if you like.  I'm pretty sure no-one but us uses these options.

But if I change it in master only (1.5), your test scripts will need to be different between 1.4 and 1.5.


> This is related to the trouble I was having with mvn zanata:putproject. There
was no way to determine from the error messages or usage information how to
specify these properties.

That's just Maven for you.  It only appears in the generated site docs, not the stdout usage.

But making it consistent with the other goals would probably help.

Comment 5 Sean Flanigan 2011-09-14 03:34:10 UTC
Okay, the goals putproject, putversion and putuser now use the same naming conventions for property names (compared to the config param names) as all the other goals: if the param name is "abcXyz", the property name is "zanata.abcXyz". eg -Dzanata.abcXyz=foo

This is in 1.4 and master.  https://github.com/zanata/zanata/commit/fdf3c6f94100be1ec859df2677f8ad8a5d9ac61a

Comment 6 Ding-Yi Chen 2011-09-14 03:58:46 UTC
Test system changed accordingly, will verify it once the REST tests pass.

Comment 7 Ding-Yi Chen 2011-09-19 04:28:52 UTC
VERIFIED with Zanata version 1.4-SNAPSHOT (20110915-1852).