Ant Tasks (2.0.x and 2.1.x)Page edited by Glen Mazza
Comment:
Text update. This page should be deleted as the info here is way obsolete.
Changes (3)
Full ContentCXF 2.1 and previous provided separate Ant tasks for wsdl2java and java2ws. CXF 2.2 and more recent rely on the Ant <java/> task. Examples of using the Ant <java/> task are on the wsdl2java and java2ws pages. The tasks are delivered in a separate jar file: modules/integration/cxf-anttasks-2.1.jar. Here is a snippet from the wsdl_first_anttask sample provided in the CXF distribution. It shows the declaration of the task jar file via the ant 'antlib' mechanisms, and the use of the wsdl2java task. <project name="hello world demo" default="build" basedir="." xmlns:cxf="antlib:org.apache.cxf.ant.extensions" >
<import file="../common_build.xml"/>
<path id='cxf.anttasks.classpath'>
<pathelement location='${cxf.home}/modules/integration/cxf-anttasks-2.1.jar'/>
<path refid='cxf.classpath'/>
</path>
<taskdef uri="antlib:org.apache.cxf.ant.extensions"
resource="org/apache/cxf/ant/extensions/antlib.xml"
classpathref="cxf.anttasks.classpath"/>
<target name="generate.code">
<echo level="info" message="Generating code using wsdl2java..."/>
<mkdir dir="${build.src.dir}"/>
<mkdir dir="${build.classes.dir}"/>
<cxf:wsdl2java wsdl="${wsdl.dir}/hello_world.wsdl"
sourceDestDir="${build.src.dir}"
destDir="${build.classes.dir}"/>
</target>
</project>
Change Notification Preferences
View Online
|
View Changes
|
Add Comment
|
- [CONF] Apache CXF Documentation > Ant Tasks (2.0.x and 2.1.x... confluence
