Bug 836054 - zanata-maven-plugin can't handle backslash on Windows
zanata-maven-plugin can't handle backslash on Windows
Product: Zanata
Classification: Community
Component: Component-Maven (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: ---
: 1.7
Assigned To: Sean Flanigan
Zanata-QA Mailling List
Depends On:
  Show dependency treegraph
Reported: 2012-06-27 21:13 EDT by Sean Flanigan
Modified: 2013-11-26 22:35 EST (History)
2 users (show)

See Also:
Fixed In Version: zanata-maven-plugin-3.1.2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-11-26 22:24:37 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Sean Flanigan 2012-06-27 21:13:18 EDT
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 02:58:41 EST
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
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBu
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
        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
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
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
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
        ... 19 more
Caused by: java.lang.RuntimeException: unknown project type: Properties
        at org.zanata.client.commands.push.PushCommand.getStrategy(PushCommand.j
        at org.zanata.client.commands.push.PushCommand.pushCurrentModule(PushCom
        at org.zanata.client.commands.push.PushCommand.run(PushCommand.java:205)

        at org.zanata.maven.ConfigurableMojo.runCommand(ConfigurableMojo.java:15
        at org.zanata.maven.AbstractPushPullMojo.runCommand(AbstractPushPullMojo
        at org.zanata.maven.ConfigurableMojo.execute(ConfigurableMojo.java:129)
        ... 21 more
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[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

Comment 3 Sean Flanigan 2013-02-27 22:19:39 EST
The project type has to be "properties" in lower case.
Comment 4 Ding-Yi Chen 2013-11-08 03:04:40 EST
VERIFIED with zanata-maven-plugin-3.1.2
Comment 5 Sean Flanigan 2013-11-26 22:15:07 EST
Closing VERIFIED bugs for Zanata versions <= 3.1.
Comment 6 Sean Flanigan 2013-11-26 22:16:39 EST
Closing VERIFIED bugs for Zanata versions <= 3.1.
Comment 7 Sean Flanigan 2013-11-26 22:18:32 EST
Closing VERIFIED bugs for Zanata versions <= 3.1.
Comment 8 Sean Flanigan 2013-11-26 22:24:37 EST
Closing VERIFIED bugs for Zanata versions <= 3.1.
Comment 9 Sean Flanigan 2013-11-26 22:33:12 EST
Closing VERIFIED bugs for Zanata versions <= 3.1.
Comment 10 Sean Flanigan 2013-11-26 22:35:28 EST
Closing VERIFIED bugs for Zanata versions <= 3.1.

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