javaee / metro-jax-ws

https://javaee.github.io/metro-jax-ws/
Other
132 stars 68 forks source link

wsimport issue with symlink and file URI #1147

Open glassfishrobot opened 10 years ago

glassfishrobot commented 10 years ago

wsimport fails if the binding file is behind a symlinked and the path is provided as URI to wsimport. The URI is used because of the wsimport ant task which detects the link and then uses URI.

ls -ld /test-dir
lrwxr-xr-x  1 root  wheel  22 Mar 19 16:38 /test-dir -> /Users/romano/test-dir

export S1AS_HOME=/Users/romano/workspaces/glassfish/main/appserver/distributions/glassfish/target/stage/glassfish4
$S1AS_HOME/glassfish/bin/wsimport -d test -Xendorsed -keep -b file:/test-dir/custom-server.xml /test-dir/AddNumbers.wsdl

parsing WSDL...

[ERROR]     "file:/test-dir/AddNumbers.wsdl" is not a part of this compilation. Is this a mistake for "file:/test-dir/custom-server.xml"?
  line 49 of file:/test-dir/custom-server.xml

    Failed to parse the WSDL.

Environment

macos

Affected Versions

[2.2.4, 2.2.5, 2.2.6, 2.2.7, 2.2.8]

glassfishrobot commented 10 years ago

Reported by @romain-grecourt

glassfishrobot commented 10 years ago

@lukasj said: see WsImport2.java#488-507 where where 'file:/' protocol is being added to the path (#503)

glassfishrobot commented 8 years ago

inforedaster said: I have à jenkins 1.642.2 master without slave, my jenkins home directory is /var/lib/jenkins and for jobs directory i have been made a symbolic link :

lrwxrwxrwx. 1 jenkins jenkins 24 May 27 12:00 jobs -> /lun/data1/jenkins/jobs/

all my projects work well exept one a meven project multi modules is a project where i have a wsdl parssing take an error in every build (the same problem with the maven and free-style job) :

in the first step of maven plugin execution all wsdl files is located with the symbolik link but in the parssing it's located by physical link

when i do mvn install ine the server with putty it works well

can you help or any idea to resolve this probleme

[INFO] — jaxws-maven-plugin:2.3:wsimport (wsimport-from-userrights) @ usrMgrInterface — [INFO] Processing: file:/var/lib/jenkins/jobs/PROJECT1_MAVEN/workspace/Module5Ejb/usrMgrInterface/src/main/resources/META-INF/wsdl/usrmgr-userrights_v1.wsdl [INFO] jaxws:wsimport args: [-keep, -s, /var/lib/jenkins/jobs/PROJECT1_MAVEN/workspace/Module5Ejb/usrMgrInterface/target/jaxws, -d, /var/lib/jenkins/jobs/PROJECT1_MAVEN/workspace/Module5Ejb/usrMgrInterface/target/classes, -verbose, -encoding, UTF-8, -Xnocompile, -wsdllocation, META-INF/wsdl/usrmgr-userrights_v1.wsdl, -b, /var/lib/jenkins/jobs/PROJECT1_MAVEN/workspace/Module5Ejb/usrMgrInterface/src/main/resources/META-INF/wsdl/usrmgr-userrights_v1.xjb, -b, /var/lib/jenkins/jobs/PROJECT1_MAVEN/workspace/Module5Ejb/usrMgrInterface/src/main/resources/META-INF/wsdl/usrmgr-userrights_v1_def.xjb, "file:/var/lib/jenkins/jobs/PROJECT1_MAVEN/workspace/Module5Ejb/usrMgrInterface/src/main/resources/META-INF/wsdl/usrmgr-userrights_v1.wsdl"] parsing WSDL...

[ERROR] "file:/lun/data1/jenkins/jobs/PROJECT1_MAVEN/workspace/Module5Ejb/usrMgrInterface/src/main/resources/META-INF/wsdl/usrmgr-userrights_v1.wsdl" is not a part of this compilation. Is this a mistake for "file:/lun/data1/jenkins/jobs/PROJECT1_MAVEN/workspace/Module5Ejb/usrMgrInterface/src/main/resources/META-INF/wsdl/usrmgr-userrights_v1.xjb"? line 4 of file:/lun/data1/jenkins/jobs/PROJECT1_MAVEN/workspace/Module5Ejb/usrMgrInterface/src/main/resources/META-INF/wsdl/usrmgr-userrights_v1.xjb

[ERROR] "file:/lun/data1/jenkins/jobs/PROJECT1_MAVEN/workspace/Module5Ejb/usrMgrInterface/src/main/resources/META-INF/wsdl/usrmgr-userrights_v1_def.wsdl" is not a part of this compilation. Is this a mistake for "file:/lun/data1/jenkins/jobs/PROJECT1_MAVEN/workspace/Module5Ejb/usrMgrInterface/src/main/resources/META-INF/wsdl/usrmgr-userrights_v1_def.xjb"? line 8 of file:/lun/data1/jenkins/jobs/PROJECT1_MAVEN/workspace/Module5Ejb/usrMgrInterface/src/main/resources/META-INF/wsdl/usrmgr-userrights_v1_def.xjb

[ERROR] "file:/lun/data1/jenkins/jobs/PROJECT1_MAVEN/workspace/Module5Ejb/usrMgrInterface/src/main/resources/META-INF/wsdl/usrmgr-userrights_v1.xsd" is not a part of this compilation. Is this a mistake for "file:/lun/data1/jenkins/jobs/PROJECT1_MAVEN/workspace/Module5Ejb/usrMgrInterface/src/main/resources/META-INF/wsdl/usrmgr-userrights_v1_def.xjb"? line 16 of file:/lun/data1/jenkins/jobs/PROJECT1_MAVEN/workspace/Module5Ejb/usrMgrInterface/src/main/resources/META-INF/wsdl/usrmgr-userrights_v1_def.xjb

[ERROR] "file:/lun/data1/jenkins/jobs/PROJECT1_MAVEN/workspace/Module5Ejb/usrMgrInterface/src/main/resources/META-INF/wsdl/technical-environment_v2.xsd" is not a part of this compilation. Is this a mistake for "file:/var/lib/jenkins/jobs/PROJECT1_MAVEN/workspace/Module5Ejb/usrMgrInterface/src/main/resources/META-INF/wsdl/technical-environment_v2.xsd"? line 24 of file:/lun/data1/jenkins/jobs/PROJECT1_MAVEN/workspace/Module5Ejb/usrMgrInterface/src/main/resources/META-INF/wsdl/usrmgr-userrights_v1_def.xjb

glassfishrobot commented 7 years ago

This issue was imported from java.net JIRA JAX_WS-1147