Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1157359

Summary: [Maven] Failed to pull the .po files that have period '.' in RHEL
Product: [Retired] Zanata Reporter: Ding-Yi Chen <dchen>
Component: Component-MavenAssignee: Patrick Huang <pahuang>
Status: CLOSED CURRENTRELEASE QA Contact: Zanata-QA Mailling List <zanata-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: client-3.4CC: ccheng, zanata-bugs
Target Milestone: ---   
Target Release: client-3.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 3.4.1-SNAPSHOT Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-04-20 01:13:07 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 2014-10-27 06:06:27 UTC
Description of problem:
zanata-maven-plugin failed to pull the files that have period '.' from Zanata with the command 

mvn org.zanata:zanata-maven-plugin:pull -Dzanata.encodeTabs=false -Dzanata.disableSSLCert

It seems work with Fedora-21, but not in RHEL 6 and RHEL 7

Version-Release number of selected component (if applicable):
Server: Zanata 3.6.0-SNAPSHOT (git-jenkins-zanata-server-verify-integration-master-3917-SUCCESS)
Client: [INFO] client API version: 3.4.1, server API version: 3.4.0

How reproducible:
Always with RHEL 6 and RHEL 7

Steps to Reproduce:
1. Working with about-fedora project
2. cp pot/About_Fedora.pot pot/About.Fedora.pot
3. Push with 
   mvn -B -e org.zanata:zanata-maven-plugin:push -Dzanata.encodeTabs=false -Dzanata.disableSSLCert
4. Pull with 
   mvn -B -e org.zanata:zanata-maven-plugin:pull -Dzanata.encodeTabs=false -Dzanata.disableSSLCert

Actual results:
[ERROR] Operation failed: expect an unqualified document name (without extension)

    To retry from the last document, please set the following option(s):

        -Dzanata.fromDoc="About.Fedora"


[ERROR] Failed to execute goal org.zanata:zanata-maven-plugin:3.4.0:pull (default-cli) on project standalone-pom: Zanata mojo exception: expect an unqualified document name (without extension) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.zanata:zanata-maven-plugin:3.4.0:pull (default-cli) on project standalone-pom: 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:320)
        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:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        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:414)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:357)
Caused by: org.apache.maven.plugin.MojoExecutionException: Zanata mojo exception
        at org.zanata.maven.ConfigurableMojo.execute(ConfigurableMojo.java:142)
        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: expect an unqualified document name (without extension)
        at org.zanata.client.commands.pull.PullCommand.run(PullCommand.java:340)
        at org.zanata.client.commands.ConfigurableCommand.runWithActions(ConfigurableCommand.java:107)
        at org.zanata.maven.ConfigurableMojo.runCommand(ConfigurableMojo.java:161)
        at org.zanata.maven.AbstractPushPullMojo.runCommand(AbstractPushPullMojo.java:40)
        at org.zanata.maven.ConfigurableMojo.execute(ConfigurableMojo.java:140)
        ... 21 more
Caused by: java.lang.IllegalArgumentException: expect an unqualified document name (without extension)
        at com.google.common.base.Preconditions.checkArgument(Preconditions.java:92)
        at org.zanata.client.commands.UnqualifiedSrcDocName.from(UnqualifiedSrcDocName.java:39)
        at org.zanata.client.commands.pull.AbstractPullStrategy.getTransFileToWrite(AbstractPullStrategy.java:29)
        at org.zanata.client.commands.pull.PullCommand.run(PullCommand.java:237)
        ... 25 more

Expected results:
Successfully without any error.

Additional info:
Fedora 21: (working)
   mvn -version:  
Apache Maven 3.2.2 (NON-CANONICAL_2014-06-19T11:19:24_mockbuild; 2014-06-19T21:19:24+10:00)
Maven home: /usr/share/maven
Java version: 1.8.0_25, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.25-0.b18.fc21.x86_64/jre
Default locale: zh_TW, platform encoding: UTF-8
OS name: "linux", version: "3.17.1-302.fc21.x86_64", arch: "amd64", family: "unix"


RHEL 7: (not working)
   mvn -version:
Apache Maven 3.0.5 (Red Hat 3.0.5-16)
Maven home: /usr/share/maven
Java version: 1.7.0_71, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.71-2.5.3.1.el7_0.x86_64/jre
Default locale: zh_TW, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-123.8.1.el7.x86_64", arch: "amd64", family: "unix

Comment 2 Patrick Huang 2014-10-27 23:35:54 UTC
Looks like we shouldn't be enforcing an extension check. There is no way we can tell whether a file has extension or it's just a dot in the file name.

Comment 3 Patrick Huang 2014-10-27 23:45:35 UTC
https://github.com/zanata/zanata-client/pull/33

Comment 4 Ding-Yi Chen 2014-10-28 07:17:54 UTC
VERIFIED with 3.4.1-SNAPSHOT
commit 3d73c911cd9b3de0693954c293ec6ef69e2ae1ca

Comment 5 Chester Cheng 2015-01-19 05:11:49 UTC
I got a similar issue:

1. Check source files as instructed in https://engineering.redhat.com/rt/Ticket/Display.html?id=332510#txn-6572735

2. Run " mvn org.zanata:zanata-maven-plugin:pull -Dzanata.encodeTabs=false -Dzanata.disableSSLCert"

[ERROR] Operation failed: expect an unqualified document name (without extension)

    To retry from the last document, please set the following option(s):

        -Dzanata.fromDoc="7.1_Release_Notes"

.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.570 s
[INFO] Finished at: 2015-01-19T15:08:29+10:00
[INFO] Final Memory: 19M/169M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.zanata:zanata-maven-plugin:3.4.0:pull (default-cli) on project standalone-pom: Zanata mojo exception: expect an unqualified document name (without extension) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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 6 Chester Cheng 2015-01-19 05:29:58 UTC
(In reply to Chester Cheng from comment #5)
> I got a similar issue:
> 
> 1. Check source files as instructed in
> https://engineering.redhat.com/rt/Ticket/Display.html?id=332510#txn-6572735
> 
> 2. Run " mvn org.zanata:zanata-maven-plugin:pull -Dzanata.encodeTabs=false
> -Dzanata.disableSSLCert"
> 
> [ERROR] Operation failed: expect an unqualified document name (without
> extension)
> 
>     To retry from the last document, please set the following option(s):
> 
>         -Dzanata.fromDoc="7.1_Release_Notes"
> 

BTW, the client/server versions are:

[INFO] client API version: 3.4.1, server API version: 3.4.0
[WARNING] client API version is 3.4.1, but server API version is 3.4.0

Also, these versions work:

[INFO] client API version: 3.0.1, server API version: 3.4.0
[WARNING] client API version is 3.0.1, but server API version is 3.4.0