Author: sagara Date: Fri Apr 13 12:29:52 2012 New Revision: 1325737 URL: http://svn.apache.org/viewvc?rev=1325737&view=rev Log: Fixed AXIS2-5283 - now Maven plug-in support for host, port, user, password proxy parameters.
Modified: axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/src/main/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojo.java Modified: axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/src/main/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojo.java URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/src/main/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojo.java?rev=1325737&r1=1325736&r2=1325737&view=diff ============================================================================== --- axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/src/main/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojo.java (original) +++ axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/src/main/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojo.java Fri Apr 13 12:29:52 2012 @@ -239,6 +239,26 @@ public class WSDL2CodeMojo extends Abstr /** @parameter */ private NamespaceURIMapping[] namespaceURIs = null; + + /** + * @parameter expression="${axis2.wsdl2code.http-proxy-host}" + */ + private String httpProxyHost = null; + + /** + * @parameter expression="${axis2.wsdl2code.http-proxy-port}" + */ + private String httpProxyPort = null; + + /** + * @parameter expression="${axis2.wsdl2code.http-proxy-user}" + */ + private String httpProxyUser = null; + + /** + * @parameter expression="${axis2.wsdl2code.http-proxy-password}" + */ + private String httpProxyPassword = null; /** Fills the option map. This map is passed onto the code generation API to generate the code. */ private Map<String,CommandLineOption> fillOptionMap() throws MojoFailureException { @@ -507,6 +527,39 @@ public class WSDL2CodeMojo extends Abstr CommandLineOptionConstants.WSDL2JavaConstants.NAME_SPACE_TO_PACKAGE_OPTION, new String[] { getNamespaceToPackagesMap() })); } + + if (httpProxyHost != null) { + optionMap + .put(CommandLineOptionConstants.WSDL2JavaConstants.HTTP_PROXY_HOST_OPTION_LONG, + new CommandLineOption( + CommandLineOptionConstants.WSDL2JavaConstants.HTTP_PROXY_HOST_OPTION_LONG, + new String[] { httpProxyHost })); + } + + if (httpProxyPort != null) { + optionMap + .put(CommandLineOptionConstants.WSDL2JavaConstants.HTTP_PROXY_PORT_OPTION_LONG, + new CommandLineOption( + CommandLineOptionConstants.WSDL2JavaConstants.HTTP_PROXY_PORT_OPTION_LONG, + new String[] { httpProxyPort })); + } + + if (httpProxyUser != null) { + optionMap + .put(CommandLineOptionConstants.WSDL2JavaConstants.HTTP_PROXY_USER_OPTION_LONG, + new CommandLineOption( + CommandLineOptionConstants.WSDL2JavaConstants.HTTP_PROXY_USER_OPTION_LONG, + new String[] { httpProxyUser })); + } + + if (httpProxyPassword != null) { + optionMap + .put(CommandLineOptionConstants.WSDL2JavaConstants.HTTP_PROXY_PASSWORD_OPTION_LONG, + new CommandLineOption( + CommandLineOptionConstants.WSDL2JavaConstants.HTTP_PROXY_PASSWORD_OPTION_LONG, + new String[] { httpProxyPassword })); + } + return optionMap; }