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 Sat, 31 Dec 2011 18:23: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><a href="https://cwiki.apache.org/confluence/display/CXF20DOC/Ant+Tasks+%282.0.x+and+2.1.x%29">Ant
Tasks (2.0.x and 2.1.x)</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~mazzag">Glen
Mazza</a>
    </h4>
        <div id="versionComment">
        <b>Comment:</b>
        Text update.  This page should be deleted as the info here is way obsolete.<br
/>
    </div>
        <br/>
                         <h4>Changes (3)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">CXF
2.1 and previous provides ant tasks for wsdl2java and java2ws. These tasks are not in CXF
2.2, since it&#39;s simple enough to use &lt;java/&gt;. <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">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 [wsdl2java|WSDL to Java] and [java2ws|JAVA to WS] pages. <br></td></tr>
            <tr><td class="diff-unchanged" > <br>The tasks are delivered
in a separate jar file: modules/integration/cxf-anttasks-2.1.jar. <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >&lt;/project&gt; <br>{code}
<br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">
<br>Note you may always use the Ant &lt;java/&gt; task directly instead and
with the same options as available with the command-line [wsdl2java|WSDL to Java] and [java2ws|JAVA
to WS] (CXF 2.1) or [java2wsdl|JAVA 2 WSDL] (CXF 2.0.x) options.  Examples of such usage are
on the tools&#39; respective pages. <br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <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>The tasks are delivered in a separate jar file: modules/integration/cxf-anttasks-2.1.jar.</p>

<p>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 id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="https://cwiki.apache.org/confluence/display/CXF20DOC/Ant+Tasks+%282.0.x+and+2.1.x%29">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=81994&revisedVersion=7&originalVersion=6">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/CXF20DOC/Ant+Tasks+%282.0.x+and+2.1.x%29?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message