cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache CXF Documentation > Ant Tasks (2.0.x and 2.1.x)
Date Tue, 03 Jan 2012 20:49:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/2042/9/1/_/styles/combined.css?spaceKey=CXF20DOC&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
     <h2><s>Ant Tasks (2.0.x and 2.1.x)</s></h2>
     <h4>Page <b>removed</b> by             <a href="https://cwiki.apache.org/confluence/display/~mazzag">Glen
Mazza</a>
    </h4>
     <br/>
     <div class="notificationGreySide">
         <p>CXF 2.1 and previous provided separate Ant tasks for wsdl2java and java2ws.
CXF 2.2 and more recent rely on the Ant &lt;java/&gt; task.  Examples of using the
Ant &lt;java/&gt; task are on the <a href="/confluence/display/CXF20DOC/WSDL+to+Java"
title="WSDL to Java">wsdl2java</a> and <a href="/confluence/display/CXF20DOC/Java+to+WS"
title="Java to WS">java2ws</a> pages.</p>

<p>For CXF 2.1 and previous, the tasks are 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.</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-xml">
&lt;project name=<span class="code-quote">"hello world demo"</span> default=<span
class="code-quote">"build"</span> basedir=<span class="code-quote">"."</span>
         <span class="code-keyword">xmlns:cxf</span>=<span class="code-quote">"antlib:org.apache.cxf.ant.extensions"</span>
&gt;

    <span class="code-tag">&lt;import file=<span class="code-quote">"../common_build.xml"</span>/&gt;</span>
       

    <span class="code-tag">&lt;path id='cxf.anttasks.classpath'&gt;</span>
     <span class="code-tag">&lt;pathelement location='${cxf.home}/modules/integration/cxf-anttasks-2.1.jar'/&gt;</span>
     <span class="code-tag">&lt;path refid='cxf.classpath'/&gt;</span>
    <span class="code-tag">&lt;/path&gt;</span>

    &lt;taskdef uri=<span class="code-quote">"antlib:org.apache.cxf.ant.extensions"</span>
             resource=<span class="code-quote">"org/apache/cxf/ant/extensions/antlib.xml"</span>
             classpathref=<span class="code-quote">"cxf.anttasks.classpath"</span>/&gt;

    <span class="code-tag">&lt;target name=<span class="code-quote">"generate.code"</span>&gt;</span>
        <span class="code-tag">&lt;echo level=<span class="code-quote">"info"</span>
message=<span class="code-quote">"Generating code using wsdl2java..."</span>/&gt;</span>
        <span class="code-tag">&lt;mkdir dir=<span class="code-quote">"${build.src.dir}"</span>/&gt;</span>
        <span class="code-tag">&lt;mkdir dir=<span class="code-quote">"${build.classes.dir}"</span>/&gt;</span>
        &lt;cxf:wsdl2java wsdl=<span class="code-quote">"${wsdl.dir}/hello_world.wsdl"</span>

                       sourceDestDir=<span class="code-quote">"${build.src.dir}"</span>
                       destDir=<span class="code-quote">"${build.classes.dir}"</span>/&gt;
    <span class="code-tag">&lt;/target&gt;</span>


<span class="code-tag">&lt;/project&gt;</span>
</pre>
</div></div>
     </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message