axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject svn commit: r375231 - in /webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl: codegen/emitter/ template/general/
Date Mon, 06 Feb 2006 09:11:35 GMT
Author: ajith
Date: Mon Feb  6 01:11:34 2006
New Revision: 375231

URL: http://svn.apache.org/viewcvs?rev=375231&view=rev
Log:
Updated the services.xml generation to streamline the generated ant build files

Modified:
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/MultiLanguageClientEmitter.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/adbAntBuildTemplate.xsl
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/defaultAntBuildTemplate.xsl
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/xmlbeansAntBuildTemplate.xsl

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/MultiLanguageClientEmitter.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/MultiLanguageClientEmitter.java?rev=375231&r1=375230&r2=375231&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/MultiLanguageClientEmitter.java
(original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/MultiLanguageClientEmitter.java
Mon Feb  6 01:11:34 2006
@@ -1548,6 +1548,9 @@
         addAttribute(doc, "package", "", rootElement);
         addAttribute(doc, "classpackage", configuration.getPackageName(), rootElement);
         addAttribute(doc, "name", porttypeName + SERVICE_CLASS_SUFFIX, rootElement);
+        if (!configuration.isWriteTestCase()){
+             addAttribute(doc, "testOmit", "true", rootElement);
+        }
         addAttribute(doc, "servicename", serviceName, rootElement);
 
         Iterator it = MEPtoClassMap.keySet().iterator();
@@ -1561,8 +1564,7 @@
 
         }
 
-//        fillSyncAttributes(doc, rootElement);
-//        loadOperations(boundInterface, doc, rootElement, axisBinding);
+
 
         return rootElement;
     }

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/adbAntBuildTemplate.xsl
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/adbAntBuildTemplate.xsl?rev=375231&r1=375230&r2=375231&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/adbAntBuildTemplate.xsl
(original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/adbAntBuildTemplate.xsl
Mon Feb  6 01:11:34 2006
@@ -63,9 +63,11 @@
                 <mkdir>
                     <xsl:attribute name="dir">${lib}</xsl:attribute>
                 </mkdir>
-                <mkdir>
-                    <xsl:attribute name="dir">${test}</xsl:attribute>
-                </mkdir>
+                <xsl:if test="not(@testOmit)">
+                    <mkdir>
+                        <xsl:attribute name="dir">${test}</xsl:attribute>
+                    </mkdir>
+                </xsl:if>
             </target>
 
             <target name="pre.compile.test" depends="init">
@@ -90,7 +92,7 @@
 
             </target>
 
-            <target name="compile.all" depends="pre.compile.test">
+            <target name="compile.src" depends="pre.compile.test">
                 <xsl:attribute name="if">jars.ok</xsl:attribute>
                 <javac debug="on">
                     <xsl:attribute name="destdir">${classes}</xsl:attribute>
@@ -100,14 +102,12 @@
                     </classpath>
                 </javac>
             </target>
-            <target name="compile.test" depends="pre.compile.test">
+
+            <target name="compile.test" depends="compile.src">
                 <xsl:attribute name="if">jars.ok</xsl:attribute>
                 <javac debug="on">
                     <xsl:attribute name="destdir">${classes}</xsl:attribute>
                     <src>
-                        <xsl:attribute name="path">${src}</xsl:attribute>
-                    </src>
-                    <src>
                         <xsl:attribute name="path">${test}</xsl:attribute>
                     </src>
                     <classpath>
@@ -127,7 +127,7 @@
             </target>
             <target name="jar.all" depends="jar.server, jar.client">
             </target>
-            <target name="jar.server" depends="compile.all,echo.classpath.problem">
+            <target name="jar.server" depends="compile.src,echo.classpath.problem">
                 <xsl:attribute name="if">jars.ok</xsl:attribute>
                 <copy>
                     <xsl:attribute name="toDir">${classes}/META-INF</xsl:attribute>
@@ -145,24 +145,19 @@
                     </fileset>
                 </jar>
             </target>
-            <target name="jar.client" depends="compile.test" if="jars.ok">
-                <jar>
-                    <xsl:attribute name="destfile">${lib}/${name}-test-client.jar</xsl:attribute>
-                    <fileset>
-                        <xsl:attribute name="dir">${classes}</xsl:attribute>
-                        <exclude><xsl:attribute name="name">**/META-INF/*.*</xsl:attribute></exclude>
-                        <exclude><xsl:attribute name="name">**/lib/*.*</xsl:attribute></exclude>
-                        <exclude><xsl:attribute name="name">**/*MessageReceiver.class</xsl:attribute></exclude>
-                        <exclude><xsl:attribute name="name">**/*Skeleton.class</xsl:attribute></exclude>
-                    </fileset>
-                    <!--<fileset>
-                        <xsl:attribute name="dir">${resources}</xsl:attribute>
-                        <exclude><xsl:attribute name="name">**/*.wsdl</xsl:attribute></exclude>
-                        <exclude><xsl:attribute name="name">**/*.xml</xsl:attribute></exclude>
-                    </fileset>-->
-                </jar>
-            </target>
-            <target name="jar.client.test.omit" depends="compile.test" if="jars.ok">
+
+            <!-- select between the -->
+
+            <target name="jar.client" if="jars.ok">
+                 <!--set the correct depends target-->
+                <xsl:choose>
+                    <xsl:when test="@testOmit">
+                        <xsl:attribute name="depends">compile.src</xsl:attribute>
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <xsl:attribute name="depends">compile.test</xsl:attribute>
+                    </xsl:otherwise>
+                </xsl:choose>
                 <jar>
                     <xsl:attribute name="destfile">${lib}/${name}-test-client.jar</xsl:attribute>
                     <fileset>
@@ -171,15 +166,13 @@
                         <exclude><xsl:attribute name="name">**/lib/*.*</xsl:attribute></exclude>
                         <exclude><xsl:attribute name="name">**/*MessageReceiver.class</xsl:attribute></exclude>
                         <exclude><xsl:attribute name="name">**/*Skeleton.class</xsl:attribute></exclude>
-                        <exclude><xsl:attribute name="name">**/*Test.class</xsl:attribute></exclude>
                     </fileset>
-                   <!-- <fileset>
-                        <xsl:attribute name="dir">${resources}</xsl:attribute>
-                        <exclude><xsl:attribute name="name">**/*.wsdl</xsl:attribute></exclude>
-                        <exclude><xsl:attribute name="name">**/*.xml</xsl:attribute></exclude>
-                    </fileset>-->
                 </jar>
             </target>
+
+
+
+
             <target depends="jar.server" name="make.repo" if="jars.ok">
                 <mkdir>
                     <xsl:attribute name="dir">${build}/repo/</xsl:attribute>

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/defaultAntBuildTemplate.xsl
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/defaultAntBuildTemplate.xsl?rev=375231&r1=375230&r2=375231&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/defaultAntBuildTemplate.xsl
(original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/defaultAntBuildTemplate.xsl
Mon Feb  6 01:11:34 2006
@@ -39,6 +39,11 @@
                 <mkdir>
                     <xsl:attribute name="dir">${lib}</xsl:attribute>
                 </mkdir>
+                <xsl:if test="not(@testOmit)">
+                    <mkdir>
+                        <xsl:attribute name="dir">${test}</xsl:attribute>
+                    </mkdir>
+                </xsl:if>
             </target>
 
             <target name="pre.compile.test" depends="init">
@@ -55,15 +60,15 @@
 
                 <xsl:comment>Print out the availabilities</xsl:comment>
                 <echo>
-                     <xsl:attribute name="message">Stax Availability= ${stax.available}</xsl:attribute>
+                    <xsl:attribute name="message">Stax Availability= ${stax.available}</xsl:attribute>
                 </echo>
                 <echo>
-                     <xsl:attribute name="message">Axis2 Availability= ${axis2.available}</xsl:attribute>
+                    <xsl:attribute name="message">Axis2 Availability= ${axis2.available}</xsl:attribute>
                 </echo>
 
             </target>
 
-            <target name="compile.all" depends="pre.compile.test">
+            <target name="compile.src" depends="echo.classpath.problem">
                 <xsl:attribute name="if">jars.ok</xsl:attribute>
                 <javac debug="on">
                     <xsl:attribute name="destdir">${classes}</xsl:attribute>
@@ -77,11 +82,8 @@
                 </javac>
             </target>
 
-            <target name="compile.test" depends="pre.compile.test,compile.all">
+            <target name="compile.test" depends="compile.src">
                 <xsl:attribute name="if">jars.ok</xsl:attribute>
-                <mkdir>
-                    <xsl:attribute name="dir">${test}</xsl:attribute>
-                </mkdir>
                 <javac debug="on">
                     <xsl:attribute name="destdir">${classes}</xsl:attribute>
                     <xsl:attribute name="srcdir">${test}</xsl:attribute>
@@ -103,36 +105,16 @@
                 "></echo>
             </target>
 
-            <!--<target name="jar.all" depends="compile.all,echo.classpath.problem">
-                <xsl:attribute name="if">jars.ok</xsl:attribute>
-                <jar>
-                    <xsl:attribute name="basedir">${classes}</xsl:attribute>
-                    <xsl:attribute name="destfile">${lib}/${name}.jar</xsl:attribute>
-                </jar>
-            </target>-->
-
-            <target name="jar.client" depends="compile.test,echo.classpath.problem" if="jars.ok">
-               <jar>
-                    <xsl:attribute name="destfile">${lib}/${name}-client.jar</xsl:attribute>
-                    <fileset>
-                        <xsl:attribute name="dir">${classes}</xsl:attribute>
-                        <exclude>
-                            <xsl:attribute name="name">**/META-INF/*.*</xsl:attribute>
-                        </exclude>
-                        <exclude>
-                            <xsl:attribute name="name">**/lib/*.*</xsl:attribute>
-                        </exclude>
-                        <exclude>
-                            <xsl:attribute name="name">**/*MessageReceiver.class</xsl:attribute>
-                        </exclude>
-                        <exclude>
-                            <xsl:attribute name="name">**/*Skeleton.class</xsl:attribute>
-                        </exclude>
-                    </fileset>
-                </jar>
-            </target>
 
-            <target name="jar.client.test.omit" depends="compile.all,echo.classpath.problem"
if="jars.ok">
+            <target name="jar.client"  if="jars.ok">
+                 <xsl:choose>
+                    <xsl:when test="@testOmit">
+                        <xsl:attribute name="depends">compile.src</xsl:attribute>
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <xsl:attribute name="depends">compile.test</xsl:attribute>
+                    </xsl:otherwise>
+                </xsl:choose>
                 <jar>
                     <xsl:attribute name="destfile">${lib}/${name}-client.jar</xsl:attribute>
                     <fileset>
@@ -149,14 +131,15 @@
                         <exclude>
                             <xsl:attribute name="name">**/*Skeleton.class</xsl:attribute>
                         </exclude>
-                        <exclude>
-                            <xsl:attribute name="name">**/*Test.class</xsl:attribute>
-                        </exclude>
                     </fileset>
                 </jar>
             </target>
 
-            <target name="jar.server" depends="compile.all,echo.classpath.problem">
+
+
+
+
+            <target name="jar.server" depends="compile.src,echo.classpath.problem">
                 <xsl:attribute name="if">jars.ok</xsl:attribute>
                 <copy>
                     <xsl:attribute name="toDir">${classes}/META-INF</xsl:attribute>

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/xmlbeansAntBuildTemplate.xsl
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/xmlbeansAntBuildTemplate.xsl?rev=375231&r1=375230&r2=375231&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/xmlbeansAntBuildTemplate.xsl
(original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/xmlbeansAntBuildTemplate.xsl
Mon Feb  6 01:11:34 2006
@@ -63,9 +63,12 @@
                 <mkdir>
                     <xsl:attribute name="dir">${lib}</xsl:attribute>
                 </mkdir>
-                <mkdir>
-                    <xsl:attribute name="dir">${test}</xsl:attribute>
-                </mkdir>
+                <xsl:if test="not(@testOmit)">
+                    <mkdir>
+                        <xsl:attribute name="dir">${test}</xsl:attribute>
+                    </mkdir>
+                </xsl:if>
+
             </target>
 
             <target name="jar.xbeans">
@@ -92,18 +95,18 @@
 
                 <xsl:comment>Print out the availabilities</xsl:comment>
                 <echo>
-                     <xsl:attribute name="message">XmlBeans Availability = ${xbeans.available}</xsl:attribute>
+                    <xsl:attribute name="message">XmlBeans Availability = ${xbeans.available}</xsl:attribute>
                 </echo>
                 <echo>
-                     <xsl:attribute name="message">Stax Availability= ${stax.available}</xsl:attribute>
+                    <xsl:attribute name="message">Stax Availability= ${stax.available}</xsl:attribute>
                 </echo>
                 <echo>
-                     <xsl:attribute name="message">Axis2 Availability= ${axis2.available}</xsl:attribute>
+                    <xsl:attribute name="message">Axis2 Availability= ${axis2.available}</xsl:attribute>
                 </echo>
 
             </target>
 
-            <target name="compile.all" depends="pre.compile.test">
+            <target name="compile.src" depends="pre.compile.test" >
                 <xsl:attribute name="if">jars.ok</xsl:attribute>
                 <javac debug="on">
                     <xsl:attribute name="destdir">${classes}</xsl:attribute>
@@ -116,22 +119,26 @@
                     </classpath>
                 </javac>
             </target>
-            <target name="compile.test" depends="pre.compile.test">
+
+
+            <target name="compile.test" depends="compile.src">
                 <xsl:attribute name="if">jars.ok</xsl:attribute>
                 <javac debug="on">
                     <xsl:attribute name="destdir">${classes}</xsl:attribute>
-                    <src>
-                        <xsl:attribute name="path">${src}</xsl:attribute>
-                    </src>
+
                     <src>
                         <xsl:attribute name="path">${test}</xsl:attribute>
                     </src>
+
                     <classpath>
                         <xsl:attribute name="location">${lib}/${xbeans.packaged.jar.name}</xsl:attribute>
                     </classpath>
                     <classpath>
                         <xsl:attribute name="refid">axis2.class.path</xsl:attribute>
                     </classpath>
+
+                    <!-- todo -->
+
                 </javac>
             </target>
 
@@ -146,7 +153,7 @@
             </target>
             <target name="jar.all" depends="jar.server, jar.client">
             </target>
-            <target name="jar.server" depends="compile.all,echo.classpath.problem">
+            <target name="jar.server" depends="compile.src,echo.classpath.problem">
                 <xsl:attribute name="if">jars.ok</xsl:attribute>
                 <copy>
                     <xsl:attribute name="toDir">${classes}/META-INF</xsl:attribute>
@@ -169,24 +176,21 @@
                     </fileset>
                 </jar>
             </target>
-            <target depends="compile.test" name="jar.client" if="jars.ok">
-                <jar>
-                    <xsl:attribute name="destfile">${lib}/${name}-test-client.jar</xsl:attribute>
-                    <fileset>
-                        <xsl:attribute name="dir">${classes}</xsl:attribute>
-                        <exclude><xsl:attribute name="name">**/META-INF/*.*</xsl:attribute></exclude>
-                        <exclude><xsl:attribute name="name">**/lib/*.*</xsl:attribute></exclude>
-                        <exclude><xsl:attribute name="name">**/*MessageReceiver.class</xsl:attribute></exclude>
-                        <exclude><xsl:attribute name="name">**/*Skeleton.class</xsl:attribute></exclude>
-                    </fileset>
-                    <fileset>
-                        <xsl:attribute name="dir">${resources}</xsl:attribute>
-                        <exclude><xsl:attribute name="name">**/*.wsdl</xsl:attribute></exclude>
-                        <exclude><xsl:attribute name="name">**/*.xml</xsl:attribute></exclude>
-                    </fileset>
-                </jar>
-            </target>
-            <target depends="compile.test" name="jar.client.test.omit" if="jars.ok">
+
+
+
+            <target  name="jar.client" if="jars.ok">
+                <!--set the correct depends target-->
+                <xsl:choose>
+                    <xsl:when test="@testOmit">
+                        <xsl:attribute name="depends">compile.src</xsl:attribute>
+                    </xsl:when>
+                    <xsl:otherwise>
+                        <xsl:attribute name="depends">compile.test</xsl:attribute>
+                    </xsl:otherwise>
+                </xsl:choose>
+
+
                 <jar>
                     <xsl:attribute name="destfile">${lib}/${name}-test-client.jar</xsl:attribute>
                     <fileset>
@@ -195,7 +199,7 @@
                         <exclude><xsl:attribute name="name">**/lib/*.*</xsl:attribute></exclude>
                         <exclude><xsl:attribute name="name">**/*MessageReceiver.class</xsl:attribute></exclude>
                         <exclude><xsl:attribute name="name">**/*Skeleton.class</xsl:attribute></exclude>
-                        <exclude><xsl:attribute name="name">**/*Test.class</xsl:attribute></exclude>
+
                     </fileset>
                     <fileset>
                         <xsl:attribute name="dir">${resources}</xsl:attribute>
@@ -204,6 +208,12 @@
                     </fileset>
                 </jar>
             </target>
+
+
+
+
+
+
             <target depends="jar.server" name="make.repo" if="jars.ok">
                 <mkdir>
                     <xsl:attribute name="dir">${build}/repo/</xsl:attribute>
@@ -255,9 +265,9 @@
                 </junit>
             </target>
             <target name="clean">
-              <delete>
-                <xsl:attribute name="dir">${build}</xsl:attribute>
-              </delete>
+                <delete>
+                    <xsl:attribute name="dir">${build}</xsl:attribute>
+                </delete>
             </target>
         </project>
     </xsl:template>



Mime
View raw message