Bug 836054

Summary: zanata-maven-plugin can't handle backslash on Windows
Product: [Retired] Zanata Reporter: Sean Flanigan <sflaniga>
Component: Component-MavenAssignee: Sean Flanigan <sflaniga>
Status: CLOSED CURRENTRELEASE QA Contact: Zanata-QA Mailling List <zanata-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 1.6CC: dchen, zanata-bugs
Target Milestone: ---   
Target Release: 1.7   
Hardware: Unspecified   
OS: Unspecified   
URL: https://www.redhat.com/archives/zanata-users/2012-June/msg00008.html
Whiteboard:
Fixed In Version: zanata-maven-plugin-3.1.2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-27 03:24:37 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 Sean Flanigan 2012-06-28 01:13:18 UTC
Description of problem:
The Maven plugin doesn't handle backslash characters in file paths, so they are pushed to Zanata as is, leading to 400 errors from the server.

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

How reproducible:
Would be 100% for Windows clients

Steps to Reproduce:
1. On a Windows platform, create a project which has source files (eg properties) in a subdirectory, eg subdir\messages.properties
2. Run mvn zanata:push
  
Actual results:
[ERROR] Failed to execute goal org.zanata:zanata-maven-plugin:1.5.0:push (default-cli) on project test: Zanata mojo exception: operation returned 400 (Bad Request): , uri: http://srvbldbrn:8380/zanata/rest/projects/p/test/iterations/i/1.0/r, annotations: [ javax ws rs PUT(), @javax.ws.rs.Path(value=
{id})] -> [Help 1]

Expected results:
Pushes file successfully

Additional info:

Comment 2 Ding-Yi Chen 2013-02-27 07:58:41 UTC
Tested with zanata-maven-plugin:2.2.0 

Run with
mvn -e org.zanata:zanata-maven-plugin:push -Dzanata.url=<Server>

Now it does not recognize project-type "Properties"



[ERROR] Failed to execute goal org.zanata:zanata-maven-plugin:2.2.0:push (defaul
t-cli) on project standalone-pom: Zanata mojo exception: unknown project type: P
roperties -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o
rg.zanata:zanata-maven-plugin:2.2.0:push (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.buildProje
ct(LifecycleModuleBuilder.java:84)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:59)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBu
ild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.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(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:290)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:230)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.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(Default
BuildPluginManager.java:101)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:209)
        ... 19 more
Caused by: java.lang.RuntimeException: unknown project type: Properties
        at org.zanata.client.commands.push.PushCommand.getStrategy(PushCommand.j
ava:95)
        at org.zanata.client.commands.push.PushCommand.pushCurrentModule(PushCom
mand.java:283)
        at org.zanata.client.commands.push.PushCommand.run(PushCommand.java:205)

        at org.zanata.maven.ConfigurableMojo.runCommand(ConfigurableMojo.java:15
8)
        at org.zanata.maven.AbstractPushPullMojo.runCommand(AbstractPushPullMojo
.java:41)
        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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
xception


Reassigned

Comment 3 Sean Flanigan 2013-02-28 03:19:39 UTC
The project type has to be "properties" in lower case.

Comment 4 Ding-Yi Chen 2013-11-08 08:04:40 UTC
VERIFIED with zanata-maven-plugin-3.1.2

Comment 5 Sean Flanigan 2013-11-27 03:15:07 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.

Comment 6 Sean Flanigan 2013-11-27 03:16:39 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.

Comment 7 Sean Flanigan 2013-11-27 03:18:32 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.

Comment 8 Sean Flanigan 2013-11-27 03:24:37 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.

Comment 9 Sean Flanigan 2013-11-27 03:33:12 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.

Comment 10 Sean Flanigan 2013-11-27 03:35:28 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.