[CXF-7156] added portName configuration option to the Java2WSMojo to no longer have to use argline for the portname option This closes #208
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/6fe5b5a8 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/6fe5b5a8 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/6fe5b5a8 Branch: refs/heads/3.1.x-fixes Commit: 6fe5b5a80d477ba460c223e62f4b73b825cd3771 Parents: 6187ae4 Author: Stefaan Dutry <[email protected]> Authored: Sun Nov 27 13:47:19 2016 +0100 Committer: Daniel Kulp <[email protected]> Committed: Fri Dec 2 11:49:21 2016 -0500 ---------------------------------------------------------------------- .../apache/cxf/maven_plugin/Java2WSMojo.java | 22 +++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/6fe5b5a8/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/Java2WSMojo.java ---------------------------------------------------------------------- diff --git a/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/Java2WSMojo.java b/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/Java2WSMojo.java index f819aa4..b97c7d3 100644 --- a/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/Java2WSMojo.java +++ b/maven-plugins/java2ws-plugin/src/main/java/org/apache/cxf/maven_plugin/Java2WSMojo.java @@ -151,6 +151,12 @@ public class Java2WSMojo extends AbstractMojo { private Boolean genWrapperbean; /** + * @parameter + */ + private String portName; + + + /** * Attach the generated wsdl file to the list of files to be deployed * on install. This means the wsdl file will be copied to the repository * with groupId, artifactId and version of the project and type "wsdl". @@ -283,12 +289,12 @@ public class Java2WSMojo extends AbstractMojo { } } - if (frontend != null) { + if (!StringUtils.isEmpty(frontend)) { args.add("-frontend"); args.add(frontend); } - if (databinding != null) { + if (!StringUtils.isEmpty(databinding)) { args.add("-databinding"); args.add(databinding); } @@ -315,13 +321,13 @@ public class Java2WSMojo extends AbstractMojo { } // target namespace arg - if (targetNamespace != null) { + if (!StringUtils.isEmpty(targetNamespace)) { args.add("-t"); args.add(targetNamespace); } // servicename arg - if (serviceName != null) { + if (!StringUtils.isEmpty(serviceName)) { args.add("-servicename"); args.add(serviceName); } @@ -337,11 +343,17 @@ public class Java2WSMojo extends AbstractMojo { } // address arg - if (address != null) { + if (!StringUtils.isEmpty(address)) { args.add("-address"); args.add(address); } + // portname arg + if (!StringUtils.isEmpty(portName)) { + args.add("-portname"); + args.add(portName); + } + if (argline != null) { StringTokenizer stoken = new StringTokenizer(argline, " "); while (stoken.hasMoreTokens()) {
