Skip to content

Commit 60780c3

Browse files
author
Malte Finsterwalder
committed
only add option B-classpath, when an non empty xjc configuration is found
1 parent dcd8f32 commit 60780c3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/me/seeber/gradle/wsimport/WsimportTask.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,10 @@ protected void runWsimport(Path baseDir, Path wsdlFile) {
152152
options.put("s", getDestinationDir());
153153
options.put("extension", true);
154154
options.put("Xnocompile", true);
155-
options.put("B-classpath", getProject().getConfigurations().getAt("xjc").getAsPath());
155+
final Configuration xjcConfig = getProject().getConfigurations().getAt("xjc");
156+
if (xjcConfig != null && !xjcConfig.isEmpty()) {
157+
options.put("B-classpath", xjcConfig.getAsPath());
158+
}
156159

157160
for (String extension : getXjcExtensions()) {
158161
options.put("B-X" + extension, true);

0 commit comments

Comments
 (0)