geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject cvs commit: incubator-geronimo/modules/xbeans maven.xml project.xml
Date Mon, 01 Sep 2003 22:00:40 GMT
jdillon     2003/09/01 15:00:40

  Modified:    modules/xbeans maven.xml project.xml
  Log:
   o Using uptodate to only build schema classes when needed
   o some cleanup of maven code
  
  Revision  Changes    Path
  1.4       +66 -77    incubator-geronimo/modules/xbeans/maven.xml
  
  Index: maven.xml
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/xbeans/maven.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- maven.xml	1 Sep 2003 15:28:26 -0000	1.3
  +++ maven.xml	1 Sep 2003 22:00:40 -0000	1.4
  @@ -6,7 +6,8 @@
     xmlns:j="jelly:core"
     xmlns:u="jelly:util"
     xmlns:ant="jelly:ant"
  -  xmlns:castor="castor">
  +  xmlns:maven="jelly:maven"
  +  xmlns:castor="common:castor">
     
     <preGoal name="xdoc:jelly-transform">
       <attainGoal name="html2xdoc"/>
  @@ -26,96 +27,84 @@
     <!-- ================================= -->
     
     <goal name="generate:xmlbeans"
  -  	description="Generates the XML beans using XMLBeans">
  +  	    description="Generates the XML beans using XMLBeans">
   
  -   	<!-- a dummy scope tag to change XML namespace to ant -->
  -  	<j:scope xmlns="jelly:ant">
  -      <mkdir dir="${dir}"/>
  +  	<j:jelly xmlns="jelly:ant">
  +      <!-- currently there's a classloader bug with xsdconfig files with Ant task
  +  	  <taskdef name="xmlbean"
  +               classname="com.bea.xbean.tool.XMLBean"
  +               classpathref="maven.dependency.classpath"/>
         
  -<!-- currently there's a classloader bug with xsdconfig files with Ant task
  -  	  <taskdef name="xmlbean" classname="com.bea.xbean.tool.XMLBean" classpathref="maven.dependency.classpath"/>
  -        
  -	  <xmlbean
  -	    schema="${basedir}/src/schema"
  -	    srcgendir="${basedir}/target/src"
  +      <xmlbean
  +	      schema="${basedir}/src/schema"
  +	      srcgendir="${basedir}/target/src"
           classpathref="maven.dependency.classpath" 
           srconly="true"
  -	    download="true"
  -	    failonerror="true" />
  --->
  -
  -      <java classname="com.bea.xbean.tool.SchemaCompiler" fork="yes">
  -        <classpath refid="maven.dependency.classpath"/>
  -        <arg value="-src"/>
  -        <arg value="${basedir}/target/src/schema"/>
  -        <arg value="-srconly"/>
  -        <arg value="-dl"/>
  -        <arg value="on"/>
  -        <arg value="${basedir}/src"/>
  -      </java>
  -    </j:scope>
  +	      download="true"
  +	      failonerror="true" />
  +      -->
  +      
  +      <j:set var="uptodatePropName" value="xmlbeans.uptodate"/>
  +      <j:expr value="${context.setVariable(uptodatePropName, null)}"/>
  +      <j:set var="uptodateFile" value="${basedir}/target/xmlbeans/tstamp"/>
  +      
  +      <uptodate property="${uptodatePropName}"
  +                targetfile="${uptodateFile}">
  +        <srcfiles dir="${basedir}/target/xmlbeans/gen" includes="**/*.xsd*"/>
  +      </uptodate>
  +      
  +      <j:if test="${context.getVariable(uptodatePropName) == null}">
  +        <java classname="com.bea.xbean.tool.SchemaCompiler" fork="yes">
  +          <classpath refid="maven.dependency.classpath"/>
  +          <arg value="-src"/>
  +          <arg value="${basedir}/target/xmlbeans/gen"/>
  +          <arg value="-srconly"/>
  +          <arg value="-dl"/>
  +          <arg value="on"/>
  +          <arg value="${basedir}/src"/>
  +        </java>
  +        
  +        <touch file="${uptodateFile}"/>
  +      </j:if>
  +      
  +    </j:jelly>
     </goal>
     	
  -
  -
     <goal name="generate:jaxb"
  -  	description="Generates the XML beans using JAXB">
  -
  -   	<!-- a dummy scope tag to change XML namespace to ant -->
  -  	<j:scope xmlns="jelly:ant">
  -
  -<!--  	
  - 	   <j:set var="schema" value="${basedir}/src/schema/j2ee_1_4.xsd"/>
  ---> 	   
  - 	   <j:set var="schema" value="${basedir}/src/schema/ejb-jar_2_1.xsd"/>
  - 	   <j:set var="dir" value="${basedir}/target/src"/>
  +  	    description="Generates the XML beans using JAXB">
       
  -        <taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask">
  -          <classpath refid="maven.dependency.classpath" />
  +  	<j:jelly xmlns="jelly:ant">
  +      
  +      <!-- <j:set var="schema" value="${basedir}/src/schema/j2ee_1_4.xsd"/> -->
  +      <j:set var="schema" value="${basedir}/src/schema/ejb-jar_2_1.xsd"/>
  +      <j:set var="dir" value="${basedir}/target/src"/>
  +      
  +      <taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask">
  +        <classpath refid="maven.dependency.classpath" />
       	</taskdef>
  +      
  +      <ant:mkdir dir="${dir}"/>
  +      
  +      <xjc target="${dir}" package="org.apache.geronimo.xmlbeans.ejb" extension="true">
  +        <arg value="-nv"/>
           
  -        <ant:mkdir dir="${dir}"/>
  +        <schema dir="${basedir}/src/schema" includes="j2ee_1*.xsd,ejb-jar*.xsd"/>

  +        <binding dir="${basedir}/src/etc" includes="*.xjb"/>
           
  -        <xjc target="${dir}" package="org.apache.geronimo.xmlbeans.ejb" extension="true">
  -          <arg value="-nv"/>
  -          
  -          <schema  dir="${basedir}/src/schema" includes="j2ee_1*.xsd,ejb-jar*.xsd"/>

  -          <binding dir="${basedir}/src/etc" includes="*.xjb"/>
  -          
           <!--
  -          <produces dir="??" includes="* impl/*" />
  +        <produces dir="??" includes="* impl/*" />
           -->
  -        </xjc>
  -    </j:scope>
  +      </xjc>
  +    </j:jelly>
     </goal>
     	
     <goal name="generate:castor"
  -  	description="Generates the XML beans using Castor">
  -    <attainGoal name="castor:prepare-filesystem"/>
  -
  - 	<j:set var="schema" value="${basedir}/src/schema/ejb-jar_2_1.xsd"/>
  -    <j:set var="gen" value="${pom.getPluginContext('maven-castor-plugin').getVariable('maven.castor.dest')}"/>
  -    
  -    <ant:java className="org.exolab.castor.builder.SourceGenerator"
  -              failonerror="true">
  -      <ant:arg value="-i"/>
  -      <ant:arg value="${schema}"/>
  -      <ant:arg value="-binding-file"/>
  -      <ant:arg value="${basedir}/src/etc/binding-configuration.xml"/>
  -      <ant:arg value="-package"/>
  -      <ant:arg value="org.apache.geronimo.xmlbeans.ejb"/>
  -      <ant:arg value="-types"/>
  -      <ant:arg value="j2"/>
  -      <ant:arg value="-nomarshall"/>
  -      <ant:arg value="-f"/>
  -      <ant:arg value="-dest"/>
  -      <ant:arg value="${gen}"/>
  -    </ant:java>   
  -    <!-- this does not currently support -binding-file 
  -    <castor:generate schema="${basedir}/src/schema/ejb-jar_2_1.xsd"
  -                     package="org.apache.geronimo.xmlbeans.ejb"
  -                     marshal="false"
  -                     types="j2"/>
  -    -->
  +        description="Generates the XML beans using Castor">
  +    <castor:generate
  +      schema="${basedir}/src/schema/ejb-jar_2_1.xsd"
  +      binding="${basedir}/src/etc/binding-configuration.xml"
  +      package="org.apache.geronimo.xbeans.ejb"
  +      marshal="false"
  +      types="j2"/>
     </goal>
   </project>
  
  
  
  1.2       +6 -25     incubator-geronimo/modules/xbeans/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/xbeans/project.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- project.xml	22 Aug 2003 11:18:56 -0000	1.1
  +++ project.xml	1 Sep 2003 22:00:40 -0000	1.2
  @@ -38,7 +38,7 @@
       </dependency>
       
       <!-- For JAXB -->
  -<!--    
  +    <!--
       <dependency>
         <id>jaxb+api</id>
         <version>1.2</version>
  @@ -71,10 +71,10 @@
         <id>xsdlib</id>
         <version>20030225</version>
       </dependency>
  --->
  +    -->
   
   	<!-- for castor -->
  -<!--	
  +  <!-- 
       <dependency>
         <id>castor</id>
         <version>0.9.5</version>
  @@ -96,7 +96,7 @@
         <version>1.0.3</version>
         <url>http://jakarta.apache.org/commons/logging.html</url>
       </dependency>
  --->    
  +    -->
       
     </dependencies>
     
  @@ -106,26 +106,7 @@
     <!-- =================== -->
     
     <build>
  -    <sourceDirectory>${basedir}/target/src</sourceDirectory>
  -
  -    <unitTest>
  -      <!-- For some reason this is not pulled from the global project -->
  -      <includes>
  -        <include>**/*Test.java</include>
  -      </includes>
  -      <excludes>
  -        <exclude>**/Abstract*.java</exclude>
  -      </excludes>
  -      
  -      <resources>
  -        <resource>
  -          <directory>${basedir}/src/test</directory>
  -          <includes>
  -            <include>**/*.xml</include>
  -          </includes>
  -        </resource>
  -      </resources>
  -    </unitTest>
  +    <sourceDirectory>${basedir}/target/xmlbeans/gen</sourceDirectory>
     </build>
   
     <reports>
  
  
  

Mime
View raw message