Closed glassfishrobot closed 11 years ago
Reported by ahammar
ahammar said: I've created a patch containing an IT showing this issue. I don't seem to have permission to attach a file to the ticket, so the patch can be found here: https://dl.dropbox.com/u/5695604/JAX_WS_COMMONS-95_IT.patch
schueffi said: Unfortunately this fix only covers the "local" wsdl files, but does not cover the "via url" wsdl files.
A better patch, which also account for default source folders (with the very same check as in AbstractJaxWsMojo) whould be this one (against the 2.2-version). Please reconsider the patch and improve solutions even if one is using wsdl-via-url.
--- WsImportMojo.java 2013-04-23 09:24:54.802510394 +0200
+++ WsImportMojo.java 2013-04-23 09:37:06.648928867 +0200
@@ -321,6 +321,10 @@
getLog().info("jaxws:wsimport args: " + args);
wsImport(args);
touchStaleFile(url);
+ } else {
+if (!isDefaultSrc(getSourceDestDir()) || keep) {
+ addSourceRoot(getSourceDestDir().getAbsolutePath());
+}
}
}
}
@@ -341,6 +345,10 @@
getLog().info("jaxws:wsimport args: " + args);
wsImport(args);
touchStaleFile(wsdlUrl);
+ } else {
+if (!isDefaultSrc(getSourceDestDir()) || keep) {
+ addSourceRoot(getSourceDestDir().getAbsolutePath());
+}
}
}
}
@lukasj said: schueffi: good catch!
@lukasj said: closing issues after 2.2.1 release
This issue was imported from java.net JIRA JAX_WS_COMMONS-95
Marked as fixed on Monday, May 13th 2013, 4:00:19 am
The source dir with the generated sources is only registered with the current Maven build if the output is stale (and thus, sources re-generated). This causes issues e.g. with v3.0 of maven-compiler-plugin which has a new approach to recompiling where all compiled classes are removed in a project if it is out of sync. If the jaxws generated source dir is then not registered, those classes are not compiled.
The solution is that the generated source dir should always be registered if there are generated classes.
The workaround currently is to execute "mvn clean install" instead of "mvn install", which is not a good Maven experience.
Environment
n/a
Affected Versions
[2.2]