Bug 868125 - [xliff] Should be able to include *_en_US.xml as source
[xliff] Should be able to include *_en_US.xml as source
Status: CLOSED CURRENTRELEASE
Product: Zanata
Classification: Community
Component: Component-Maven (Show other bugs)
development
Unspecified Unspecified
unspecified Severity high
: ---
: 2.0
Assigned To: Alex Eng
Ding-Yi Chen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-19 01:57 EDT by Ding-Yi Chen
Modified: 2013-02-25 22:46 EST (History)
3 users (show)

See Also:
Fixed In Version: 2.0.3-SNAPSHOT (20121106-0949)
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-25 22:46:30 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Test case (904.83 KB, application/x-gzip)
2012-10-19 01:58 EDT, Ding-Yi Chen
no flags Details
Correct test case (904.83 KB, application/x-compressed-tar)
2012-10-19 02:29 EDT, Ding-Yi Chen
no flags Details

  None (edit)
Description Ding-Yi Chen 2012-10-19 01:57:15 EDT
Description of problem:
Some xliff project such as spacewalk use _en_US.xml as postfix for translation.

However, even if we explicitly states:
<zanata.includes>StringResource_en_US.xml</zanata.includes>
in pom.xml, maven client won't be able to find it.

Version-Release number of selected component (if applicable):
Zanata version 1.8.0-SNAPSHOT (20121019-0031)
[INFO] client API version: 1.8.0-SNAPSHOT, server API version: 1.8.0-SNAPSHOT


How reproducible:
Always

Steps to Reproduce:
1. Create project spacewalk and version master
2. Download and extract the attachment
3. cd spacewalk
4. zanata -e zanata:push -Dzanata.url=YourServer
  
Actual results:
[INFO] Found source document: StringResource_en
[INFO] Found source document: StringResource_en_GB
[INFO] Found source document: StringResource_en-US
[INFO] Found source document: StringResource_en-GB

en_US is not found.


Expected results:
[INFO] Found source document: StringResource_en
[INFO] Found source document: StringResource_en_GB
[INFO] Found source document: StringResource_en-GB
[INFO] Found source document: StringResource_en-US
[INFO] Found source document: StringResource_en_US

en_US is found.
Comment 1 Ding-Yi Chen 2012-10-19 01:58:26 EDT
Created attachment 629781 [details]
Test case
Comment 2 Ding-Yi Chen 2012-10-19 02:29:38 EDT
Created attachment 629803 [details]
Correct test case
Comment 5 Ding-Yi Chen 2012-10-23 02:06:13 EDT
Tested with Zanata version 1.8.0-SNAPSHOT (20121023-1429)

maven client 1.7.5-SNAPSHOT now works normal.

However, with maven client 1.8.0-SNAPSHOT, following error appeared without -Dzanata.copyTrans=false:

[ERROR] Failed to execute goal org.zanata:zanata-maven-plugin:1.8.0-SNAPSHOT:push (default-cli) on project null: Zanata mojo exception: Could not invoke copy trans. The service was not available (404) -> [Help 1]                                      
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.zanata:zanata-maven-plugin:1.8.0-SNAPSHOT:push (default-cli) on project null: Zanata mojo exception 
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)                                   
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)                                   
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)                                   
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)           
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)           
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)               
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)                           
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)                                                    
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)                                                      
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)                                                          
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)                                                           
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)                                                             
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)                                                       
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)                                     
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)                             
        at java.lang.reflect.Method.invoke(Method.java:597)                                                                  
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)                               
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)                                       
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)                             
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)                                         
Caused by: org.apache.maven.plugin.MojoExecutionException: Zanata mojo exception                                             
        at org.zanata.maven.ConfigurableMojo.execute(ConfigurableMojo.java:133)                                              
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)                 
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)                                   
        ... 19 more                                                                            ========================

However, it works if -Dzanata.copyTrans=false is given.

Reassigned.
Comment 6 Ding-Yi Chen 2012-10-31 02:58:56 EDT
Test with Zanata version 2.0.2 (20121030-2357)
and maven client 1.8.0-SNAPSHOT

[ERROR] Failed to execute goal org.zanata:zanata-maven-plugin:1.8.0-SNAPSHOT:push (default-cli) on project null: Zanata mojo exception: Failed while pushing document: [org.hibernate.exception.SQLGrammarException: could not update: [org.zanata.model.HDocument#8068]] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.zanata:zanata-maven-plugin:1.8.0-SNAPSHOT:push (default-cli) on project null: Zanata mojo exception
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:158)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Zanata mojo exception
	at org.zanata.maven.ConfigurableMojo.execute(ConfigurableMojo.java:133)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
	... 19 more
Caused by: java.lang.RuntimeException: Failed while pushing document: [org.hibernate.exception.SQLGrammarException: could not update: [org.zanata.model.HDocument#8068]]
	at org.zanata.client.commands.push.PushCommand.pushSrcDocToServer(PushCommand.java:402)
	at org.zanata.client.commands.push.PushCommand.pushCurrentModule(PushCommand.java:323)
	at org.zanata.client.commands.push.PushCommand.run(PushCommand.java:183)
	at org.zanata.maven.ConfigurableMojo.runCommand(ConfigurableMojo.java:158)
	at org.zanata.maven.PushPullMojo.runCommand(PushPullMojo.java:33)
	at org.zanata.maven.ConfigurableMojo.execute(ConfigurableMojo.java:129)
	... 21 more
[ERROR] 
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Comment 8 Alex Eng 2012-11-05 23:00:25 EST
Retested in zanata-master-auto with version 2.0.0, cannot reproduce the error stack above. Suspect it might be server side problem when test is being conducted. Require QA retest
Comment 9 Ding-Yi Chen 2012-11-05 23:54:58 EST
VERIFIED with Zanata version 2.0.3-SNAPSHOT (20121106-0949)

Note You need to log in before you can comment on or make changes to this bug.