build.xml 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <?xml version="1.0"?>
  2. <!--
  3. Generated by WSDLToJava Compiler.
  4. This class was generated by Apache CXF 2.1.10
  5. Mon Nov 13 20:34:57 CST 2017
  6. Generated source version: 2.1.10
  7. -->
  8. <project name="cxf wsdltojava" default="build" basedir=".">
  9. <property environment="env"/>
  10. <property name="home.dir" location="${basedir}"/>
  11. <property name="build.dir" location ="${basedir}/build"/>
  12. <property name="build.classes.dir" location ="${build.dir}/classes"/>
  13. <property name="build.src.dir" location ="${basedir}"/>
  14. <!-- find the tools jar -->
  15. <available property="tools.jar" value="$${env.JAVA_HOME}/lib/tools.jar"
  16. file="${env.JAVA_HOME}/lib/tools.jar"/>
  17. <path id="jdk.tools.classpath">
  18. <pathelement location="${tools.jar}"/>
  19. </path>
  20. <condition property="is.java.version.15">
  21. <or>
  22. <equals arg1="${ant.java.version}" arg2="1.5"/>
  23. <equals arg1="${ant.java.version}" arg2="1.6"/>
  24. </or>
  25. </condition>
  26. <fail message="cxf requires Java version 1.5 or higher. You are currently using Java version ${ant.java.version}."
  27. unless="is.java.version.15"/>
  28. <!-- Determine cxf.home, either from the environment variable CXF_HOME
  29. - or using ../..
  30. -->
  31. <condition property="cxf.home" value="${env.CXF_HOME}">
  32. <isset property="env.CXF_HOME"/>
  33. </condition>
  34. <fail message="Please set CXF_HOME environment variable." unless="cxf.home"/>
  35. <!-- Determine cxf.jar.file, either ${cxf.home}/build/lib/cxf.jar
  36. - in a source distribution, or ${cxf.home}/lib/cxf-manifest.jar in a binary
  37. - distribution.
  38. -->
  39. <condition property="cxf-manifest.jar.file" value="${cxf.home}/build/lib/cxf-manifest.jar">
  40. <available file="cxf-manifest.jar" type="file" filepath="${cxf.home}/build/lib"/>
  41. </condition>
  42. <property name="cxf-manifest.jar.file" value="${cxf.home}/lib/cxf-manifest.jar"/>
  43. <fail message="The location ${cxf.home} does not seem to contain a cxf installation; if you are importing this common build file from a location other than the cxf samples directory then you need to set the cxf_HOME environment variable.">
  44. <condition>
  45. <not>
  46. <isset property="cxf-manifest.jar.file" />
  47. </not>
  48. </condition>
  49. </fail>
  50. <!-- Determine the tools directory, either ${cxf.home}/tools
  51. - in a source distribution, or ${cxf.home}/lib in a binary
  52. - distribution.
  53. -->
  54. <condition property="thirdparty.tools.dir" value="${cxf.home}/tools">
  55. <available file="tools" type="dir" filepath="${cxf.home}"/>
  56. </condition>
  57. <condition property="thirdparty.tools.dir" value="${cxf.home}/lib">
  58. <available file="lib" type="dir" filepath="${cxf.home}"/>
  59. </condition>
  60. <property name="cxf.etc.dir" location="${cxf.home}/etc"/>
  61. <path id="cxf.classpath">
  62. <pathelement location="${home.dir}" />
  63. <pathelement location="${build.classes.dir}"/>
  64. <pathelement location="${cxf-manifest.jar.file}"/>
  65. </path>
  66. <target name="SendMessageAndUpdateServiceClient" description="Run com.wechatclient.SendMessageAndUpdateService_SendMessageAndUpdateServicePort_Client" depends="compile">
  67. <property name="param" value=""/>
  68. <cxfrun classname="com.wechatclient.SendMessageAndUpdateService_SendMessageAndUpdateServicePort_Client"
  69. param1="http://9.23.28.14:7001/wechatpage_bus/ws/SendMessageAndUpdateService?wsdl"
  70. param2="${op}"
  71. param3="${param}"/>
  72. </target>
  73. <target name="SendMessageAndUpdateServiceServer" description="Run com.wechatclient.SendMessageAndUpdateService_SendMessageAndUpdateServicePort_Server" depends="compile">
  74. <cxfrun classname="com.wechatclient.SendMessageAndUpdateService_SendMessageAndUpdateServicePort_Server"
  75. param1="http://9.23.28.14:7001/wechatpage_bus/ws/SendMessageAndUpdateService?wsdl"/>
  76. </target>
  77. <target name="compile">
  78. <mkdir dir="${build.classes.dir}"/>
  79. <javac srcdir="${build.src.dir}" destdir="${build.classes.dir}" debug="true">
  80. <classpath refid="cxf.classpath" />
  81. </javac>
  82. </target>
  83. <target name="checkstyle">
  84. <checkstyle config="${checkstyle.config.file}">
  85. <fileset dir="${basedir}/src" includes="**/*.java"/>
  86. <classpath>
  87. <path refid="cxf.classpath"/>
  88. </classpath>
  89. </checkstyle>
  90. </target>
  91. <target name="clean">
  92. <delete dir="${build.classes.dir}"/>
  93. <delete file="${java.timestamp.file}"/>
  94. <delete file="demo.log"/>
  95. </target>
  96. <target name="build" depends="compile" description="build demo client and server"/>
  97. <macrodef name="cxfrun">
  98. <attribute name="classname"/>
  99. <attribute name="param1" default=""/>
  100. <attribute name="param2" default=""/>
  101. <attribute name="param3" default=""/>
  102. <attribute name="param4" default=""/>
  103. <attribute name="param5" default=""/>
  104. <attribute name="jvmarg1" default="-D"/>
  105. <attribute name="jvmarg2" default="-D"/>
  106. <attribute name="jvmarg3" default="-D"/>
  107. <attribute name="jvmarg4" default="-D"/>
  108. <attribute name="jvmarg5" default="-D"/>
  109. <sequential>
  110. <java classname="@{classname}" fork="yes">
  111. <classpath>
  112. <path refid="cxf.classpath"/>
  113. </classpath>
  114. <arg value="@{param1}"/>
  115. <arg value="@{param2}"/>
  116. <arg value="@{param3}"/>
  117. <arg value="@{param4}"/>
  118. <arg value="@{param5}"/>
  119. <jvmarg value="@{jvmarg1}"/>
  120. <jvmarg value="@{jvmarg2}"/>
  121. <jvmarg value="@{jvmarg3}"/>
  122. <jvmarg value="@{jvmarg4}"/>
  123. <jvmarg value="@{jvmarg5}"/>
  124. <assertions>
  125. <enable package="org.apache.cxf"/>
  126. </assertions>
  127. <sysproperty key="java.util.logging.config.file" value="${cxf.etc.dir}/logging.properties"/>
  128. <sysproperty key="log4j.configuration" value="file:///${cxf.etc.dir}/log4j.properties"/>
  129. </java>
  130. </sequential>
  131. </macrodef>
  132. </project>