Skip to content
This repository has been archived by the owner on Sep 21, 2022. It is now read-only.

jaxws-maven-plugin: Binding files can not be found if path contains encoded charecters like %2f #137

Open
glassfishrobot opened this issue Apr 18, 2016 · 3 comments

Comments

@glassfishrobot
Copy link
Contributor

We have git feature branches that follow the git-flow naming pattern 'feature/somefeature'. On our Jenkins buildserver the / gets encoded to %2f so it is stored in a directory '/some/path/feature%2fsomefeature'.

Now the jaxws-maven-plugin decodes this one step to far when looking for binding files, it looks for binding files in '/some/path/feature/somefeature/' which does not exist, it should look in 'some/path/feature%2fsomefeature/'.

The wsdl files are found correctly, so I made a patch that looks for the binding files the same way as for the wsdl files:

diff --git a/src/main/java/org/jvnet/jax_ws_commons/jaxws/WsImportMojo.java b/src/main/java/org/jvnet/jax_ws_commons/jaxws/WsImportMojo.java
index 3bd6003..b4fb7dd 100644
— a/src/main/java/org/jvnet/jax_ws_commons/jaxws/WsImportMojo.java
+++ b/src/main/java/org/jvnet/jax_ws_commons/jaxws/WsImportMojo.java
@@ -475,7 +475,7 @@ abstract class WsImportMojo extends AbstractJaxwsMojo

for (File binding : bindings)

{ args.add("-b"); - args.add("'" + binding.getAbsolutePath() + "'"); + args.add("'" + binding.toURI() + "'"); }

getLog().debug( "jaxws:wsimport args: " + args );

Environment

linux, windows, java6, java8

Affected Versions

[2.3]

@glassfishrobot
Copy link
Contributor Author

Reported by boerh1

@glassfishrobot
Copy link
Contributor Author

boerh1 said:
Forgot the formatting, this reads better:

diff --git a/src/main/java/org/jvnet/jax_ws_commons/jaxws/WsImportMojo.java b/src/main/java/org/jvnet/jax_ws_commons/jaxws/WsImportMojo.java
index 3bd6003..b4fb7dd 100644
--- a/src/main/java/org/jvnet/jax_ws_commons/jaxws/WsImportMojo.java
+++ b/src/main/java/org/jvnet/jax_ws_commons/jaxws/WsImportMojo.java
@@ -475,7 +475,7 @@ abstract class WsImportMojo extends AbstractJaxwsMojo

         for (File binding : bindings) {
             args.add("-b");
-            args.add("'" + binding.getAbsolutePath() + "'");
+            args.add("'" + binding.toURI() + "'");
         }

         getLog().debug( "jaxws:wsimport args: " + args );
--

@glassfishrobot
Copy link
Contributor Author

This issue was imported from java.net JIRA JAX_WS_COMMONS-137

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants