You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrf-dev@ws.apache.org by sc...@apache.org on 2005/01/06 20:36:23 UTC

svn commit: r124423 - /incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/Wsdl2Java.java /incubator/apollo/trunk/src/templates/build.properties.vm /incubator/apollo/trunk/src/templates/build.xml.vm

Author: scamp
Date: Thu Jan  6 11:36:21 2005
New Revision: 124423

URL: http://svn.apache.org/viewcvs?view=rev&rev=124423
Log:
copy the wsdl to the src/wsdl dir
Modified:
   incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/Wsdl2Java.java
   incubator/apollo/trunk/src/templates/build.properties.vm
   incubator/apollo/trunk/src/templates/build.xml.vm

Modified: incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/Wsdl2Java.java
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/Wsdl2Java.java?view=diff&rev=124423&p1=incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/Wsdl2Java.java&r1=124422&p2=incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/Wsdl2Java.java&r2=124423
==============================================================================
--- incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/Wsdl2Java.java	(original)
+++ incubator/apollo/trunk/src/java/org/apache/ws/resource/tool/Wsdl2Java.java	Thu Jan  6 11:36:21 2005
@@ -48,6 +48,7 @@
 import javax.xml.namespace.QName;
 import java.io.File;
 import java.io.FileWriter;
+import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.HashMap;
@@ -410,6 +411,8 @@
          {
             throw new Exception( xErrorListener.toString(  ) );
          }
+         //copy wsdl to subdir of src
+         copyWsdlFile(wsdlFile);
       }
       finally
       {
@@ -418,7 +421,15 @@
       }
    }
 
-   private void initPortTypeInfoMap(  )
+    private void copyWsdlFile(File wsdlFile)
+            throws IOException
+    {
+        File wsdlDir = new File(m_srcOutputDir, "wsdl");
+        wsdlDir.mkdirs();
+        FileUtils.copyFile(wsdlFile, new File(wsdlDir,wsdlFile.getName()));
+    }
+
+    private void initPortTypeInfoMap(  )
    {
       addPortType2JavaInfo( new GetResourcePropertyPortType2JavaInfo(  ) );
       addPortType2JavaInfo( new GetMultipleResourcePropertiesPortType2JavaInfo(  ) );

Modified: incubator/apollo/trunk/src/templates/build.properties.vm
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/templates/build.properties.vm?view=diff&rev=124423&p1=incubator/apollo/trunk/src/templates/build.properties.vm&r1=124422&p2=incubator/apollo/trunk/src/templates/build.properties.vm&r2=124423
==============================================================================
--- incubator/apollo/trunk/src/templates/build.properties.vm	(original)
+++ incubator/apollo/trunk/src/templates/build.properties.vm	Thu Jan  6 11:36:21 2005
@@ -3,7 +3,7 @@
 # Uncomment and modify the below lines if you would like to deploy to a
 # wsrf webapp located somewhere other than the default location of
 # ../webapps/wsrf (e.g. ${env.CATALINA_HOME}/webapps/wsrf)
-#wsrf.webapp.dir=${env.CATALINA_HOME}/webapps/wsrf
+wsrf.webapp.dir=C:/Projects/apache/apollo/trunk/target/wsrf
 
 # Uncomment and modify the below lines if you require a proxy to connect to external web sites
 #http.proxyHost=proxy.xyz.com

Modified: incubator/apollo/trunk/src/templates/build.xml.vm
Url: http://svn.apache.org/viewcvs/incubator/apollo/trunk/src/templates/build.xml.vm?view=diff&rev=124423&p1=incubator/apollo/trunk/src/templates/build.xml.vm&r1=124422&p2=incubator/apollo/trunk/src/templates/build.xml.vm&r2=124423
==============================================================================
--- incubator/apollo/trunk/src/templates/build.xml.vm	(original)
+++ incubator/apollo/trunk/src/templates/build.xml.vm	Thu Jan  6 11:36:21 2005
@@ -9,75 +9,45 @@
    <!-- workaround for those IDEs that dont set ant.home as per the ant script -->
    <property name="ant.home" value="env.ANT_HOME"/>
    
-   <property name="generated.src.dir"     location="build/src"/>
-   <property name="classes.dir"           location="build/classes"/>
-   <property name="src.dir"               location="src" />
+   <property name="classes.dir"           location="classes"/>
+   <property name="jar.dir"           	  location="jar"/>
+   <property name="src.dir"               location="src/java" />
    <property name="filesystem.wsdl"       location="FileSystem.wsdl" />
-   <property name="sysprop.wsdl"       	  location="SysProps.wsdl" />
    <property name="url"                   value="${base.url}/filesystem" />
    <property name="xml.basedir"           location="${basedir}" />
 
    <target name="init">
      
-     <available file="../../webapps/wsrf" type="dir" property="dist.wsrf.webapp.dir" value="../../webapps/wsrf" />         
+    <!-- <available file="../../webapps/wsrf" type="dir" property="dist.wsrf.webapp.dir" value="../../webapps/wsrf" />         
      <condition property="wsrf.webapp.dir" value="${dist.wsrf.webapp.dir}">
         <isset property="dist.wsrf.webapp.dir"/>
      </condition>     
+ 
      
-     
-     <fail unless="wsrf.webapp.dir" message="webapp dir ../../webapps/wsrf does not exist." />    
+     <fail unless="wsrf.webapp.dir" message="webapp dir ../../webapps/wsrf does not exist." /> 
+        --> 
      <echo>Using webapp dir: ${wsrf.webapp.dir}</echo>    
     
      <path id="apollo.classpath.id">
        <pathelement location="${wsrf.webapp.dir}/WEB-INF/classes" />
        <fileset dir="${wsrf.webapp.dir}/WEB-INF/lib" includes="*.jar" />
+       <fileset dir="${jar.dir}" />
        <pathelement location="${activation.jar}" />
        <pathelement location="${mail.jar}" />
      </path>
      <property name="apollo.classpath" refid="apollo.classpath.id" />
    
-   </target>
-
-   <target name="generate"
-           depends="init"
-           description="generate Axis service classes and XMLBeans types for the filesystem WSDL">      
-     
-     <property name="tmp.dir" location="${wsrf.webapp.dir}/_tmp_" />
-     <mkdir dir="${tmp.dir}" />
-     <copy file="${filesystem.wsdl}" todir="${tmp.dir}" overwrite="true" />
-     <taskdef name="wsdl2Java" classname="org.apache.ws.resource.Wsdl2JavaTask" classpath="${apollo.classpath}" />              
-     <wsdl2Java wsdl="${tmp.dir}/filesystem.wsdl"
-                srcOutputDir="${generated.src.dir}"
-                classesOutputDir="${classes.dir}"  
-                classpath="${apollo.classpath}"
-                debug="off"
-                proxyHost="${http.proxyHost}"
-                proxyPort="${http.proxyPort}"
-                nonProxyHosts="${http.nonProxyHosts}" /> 
-     <copy file="${sysprop.wsdl}" todir="${tmp.dir}" overwrite="true" />     
-     <wsdl2Java wsdl="${tmp.dir}/SysProps.wsdl"
-	     srcOutputDir="${generated.src.dir}"
-	     classesOutputDir="${classes.dir}"  
-	     classpath="${apollo.classpath}"
-	     debug="off"
-	     proxyHost="${http.proxyHost}"
-	     proxyPort="${http.proxyPort}"
-	nonProxyHosts="${http.nonProxyHosts}" /> 
-     <delete dir="${tmp.dir}" />
-               
-   </target>
+   </target>   
 
    <target name="compile"
            depends="init"
-           description="compile all classes below generated/classes directory">         
-      <javac srcdir="${generated.src.dir}"
-             destdir="${classes.dir}"           
-             classpathref="apollo.classpath.id"
-             debug="on" />
+           description="compile all classes below classes directory">  
+      <mkdir dir="${classes.dir}" />
       <javac srcdir="${src.dir}"
              destdir="${classes.dir}"           
              classpathref="apollo.classpath.id"
-             debug="on" />         
+             debug="on" 
+             excludes="xmlbeans/**"/>         
       <copy todir="${classes.dir}">
          <fileset dir="${src.dir}" excludes="**/*.java,**/package.html" />
       </copy>
@@ -124,7 +94,8 @@
       
    </target>
    <target name="clean" description="delete the generated source and class files">
-       <delete dir="generated" />
+       <delete dir="${src.dir}" /> <!-- this should not be here!  -->
+       <delete dir="${classes.dir}" />
    </target>
    
    <target name="usage">      

---------------------------------------------------------------------
To unsubscribe, e-mail: apollo-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: apollo-dev-help@ws.apache.org