User: vharcq  
  Date: 02/02/25 09:43:30

  Added:       core/test/script Build.bat build.sh build.xml
  Log:
  The script used to generated from test tagged classes
  In the future it will also start JUnit comparison
  
  Revision  Changes    Path
  1.1                  xdoclet/core/test/script/Build.bat
  
  Index: Build.bat
  ===================================================================
  @echo off
  rem ----- Verify and Set Required Environment Variables -----------------------
  
  if not "%JAVA_HOME%" == "" goto gotJavaHome
  echo You must set JAVA_HOME to point at your Java Development Kit distribution
  goto cleanup
  
  :gotJavaHome
  
  set _CP_=..\..\..\lib\ant.jar
  set _CP_=%_CP_%;..\..\..\lib\crimson.jar
  set _CP_=%_CP_%;..\..\..\lib\jaxp.jar
  
  "%JAVA_HOME%\bin\java.exe" -classpath "%JAVA_HOME%\lib\tools.jar;%_CP_%;%CLASSPATH%" 
-Dlog4j.configuration=log4j.properties org.apache.tools.ant.Main %1 %2 %3 %4 %5
  
  
  :cleanup
  
  
  
  1.1                  xdoclet/core/test/script/build.sh
  
  Index: build.sh
  ===================================================================
  #! /bin/sh
  
  # OS specific support.  $var _must_ be set to either true or false.
  cygwin=false;
  case "`uname`" in
    CYGWIN*) cygwin=true ;;
  esac
  
  # For Cygwin, ensure paths are in UNIX format before anything is touched
  if $cygwin ; then
    [ -n "$JAVA_HOME" ] &&
      JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
  fi
  
  CWD=`pwd`
  DIRNAME=`dirname $0`
  
  cd $DIRNAME
  
  CP=../lib/ant.jar\
  :../lib/jaxp.jar\
  :../lib/crimson.jar\
  :$JAVA_HOME/lib/tools.jar
  
  if $cygwin; then
    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
    CP=`cygpath --path --windows "$CP"`
  fi
  
  $JAVA_HOME/bin/java -classpath $CP org.apache.tools.ant.Main $1 $2 $3 $4 $5
  
  cd -
  
  
  
  1.1                  xdoclet/core/test/script/build.xml
  
  Index: build.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <project name="XDoclet" default="main" basedir="..">
  
  
     <!-- Set up java.class.path -->
     <path id="project.class.path">
        <!-- LOG4J properties -->
        <pathelement path="${basedir}\script" />
  
        <fileset dir="..\dist\lib">
           <include name="**/*.jar" />
        </fileset>
        <fileset dir="..\..\lib">
           <include name="**/*.jar" />
        </fileset>
  
        <!-- append the external classpath lastly -->
        <pathelement path="${java.class.path}" />
  
     </path>
  
  
     <!-- Init -->
     <target name="init">
  
        <property name="lib.dir" value="lib" />
        <property name="xdoclet.jar.path" value="${basedir}/../dist/lib/xdoclet.jar" />
        <property name="log4j.jar.path" value="${basedir}/../../lib/log4j.jar" />
        <echo message="LOJ4G ${log4j.jar.path}"/>
        <property name="log4j.path" value="${basedir}/script" />
        <property name="ant.jar.path" value="${basedir}/../../lib/ant.jar" />
  
        <property name="Name" value="UnitTests" />
        <property name="name" value="unitTests" />
  
        <property name="src.dir" value="src" />
        <property name="generated.src.dir" value="gen-src" />
  
        <property name="web.dir" value="${src.dir}/web" />
        <property name="java.dir" value="${src.dir}" />
        <property name="generated.java.dir" value="${generated.src.dir}/java" />
  
        <property name="config.dir" value="config" />
        <property name="build.dir" value="build" />
        <property name="dist.dir" value="dist" />
  
        <property name="build.compiler" value="modern" />
        <property name="classpath" value="" />
  
        <property name="ejb.dir"               value="${build.dir}/ejb"/>
        <property name="ejb.classes.dir"       value="${ejb.dir}/classes"/>
        <property name="ejb.dd.dir"            value="${ejb.dir}/META-INF"/>
  
        <property name="ejb.generic.dir"       value="${ejb.dir}/generic-ejb"/>
        <property name="ejb.generic.file"      
value="${ejb.generic.dir}/${name}-ejb.jar"/>
  
        <property name="ejb.weblogic.dir"      value="${ejb.dir}/weblogic-ejb"/>
        <property name="ejb.weblogic.file"     
value="${ejb.weblogic.dir}/${name}-ejb.jar"/>
  
  
        <!-- These are here to test the use of properties in @tags -->
        <property name="jboss.create.table" value="true" />
        <property name="jboss.remove.table" value="true" />
        <property name="jboss.tuned.updates" value="true" />
        <property name="jboss.read.only" value="false" />
  
     </target>
  
  
     <!-- Prepare -->
     <target name="prepare" depends="init">
  
        <mkdir dir="${build.dir}" />
  
        <mkdir dir="${build.dir}/ejb" />
        <mkdir dir="${build.dir}/ejb/META-INF" />
  
        <mkdir dir="${build.dir}/web" />
        <mkdir dir="${build.dir}/web/WEB-INF" />
        <mkdir dir="${build.dir}/web/WEB-INF/tlds" />
        <mkdir dir="${build.dir}/web/WEB-INF/classes" />
  
        <mkdir dir="${build.dir}/j2ee" />
        <mkdir dir="${build.dir}/j2ee/META-INF" />
  
        <mkdir dir="${build.dir}/jmx" />
  
        <mkdir dir="${dist.dir}" />
  
        <mkdir dir="${generated.src.dir}" />
        <mkdir dir="${generated.java.dir}" />
  
        <mkdir dir="${ejb.dd.dir}"/>
        <mkdir dir="${ejb.classes.dir}"/>
        <mkdir dir="${ejb.generic.dir}"/>
        <mkdir dir="${ejb.weblogic.dir}"/>
  
     </target>
  
     <!-- Run EJBDoclet -->
     <target name="ejbdoclet" depends="prepare">
  
        <taskdef name="ejbdoclet"
                 classname="xdoclet.ejb.EjbDocletTask" 
classpath="${xdoclet.jar.path};${log4j.jar.path};${ant.jar.path}"
        />
  
        <ejbdoclet
           sourcepath="${java.dir};${log4j.path}"
           destdir="${generated.java.dir}"
           classpathref="project.class.path"
           excludedtags="@version,@author"
           ejbspec="2.0"
           force="${xdoclet.force}">
  
           <!--
              It's good practice to put interfaces in a separate "interfaces"
              package than in EJB bean implementations, but if you don't like it
              or want to apply another package naming convention, just remove the
              following like add as many <packageSubstitution/> as you want to
              configure it.
           -->
           <packageSubstitution packages="ejb" substituteWith="interfaces"/>
  
           <fileset dir="${java.dir}">
              <include name="xdoclet/retest/bean/**/*Bean.java" />
           </fileset>
  
           <dataobject/>
           <valueobject/>
           <remoteinterface/>
           <localinterface/>
           <homeinterface />
           <utilobject/>
           <localhomeinterface/>
           <entitypk/>
           <entitycmp>
              <!-- packageSubstitution packages="ejb" substituteWith="ejb.impl"/>
              <packageSubstitution packages="ejb.cmr" substituteWith="ejb.cmr.impl"/ 
-->
           </entitycmp>
           <entitybmp/>
           <session/>
  
           <deploymentdescriptor destdir="${ejb.dd.dir}" validatexml="true" />
  
           <jboss
              version="3.0"
              xmlencoding="UTF-8"
              destdir="${ejb.dd.dir}"
              validatexml="false"
              typemapping="Hypersonic SQL"
           />
           <weblogic
              version="6.1"
              xmlencoding="UTF-8"
              destdir="${ejb.dd.dir}"
              validatexml="true"
              datasource="xdoclet.tests"
              mergedir="${src.dir}"
           />
           <jrun
              version="4.0"
              xmlencoding="UTF-8"
              destdir="${ejb.dd.dir}"
              validatexml="true"
           />
  
           <!--
           <webSphere destdir="${build.dir}/ejb/META-INF" />
           <orion/>
           -->
  
           <apachesoap destdir="${build.dir}/web" />
  
           <!--
           Have struts form objects generated based on entity beans'
           data objects.  Will require struts.jar to compile. -->
           <strutsform />
  
  
           <!--
           Have a mapping.xml file generated for castor classes.
           -->
           <castormapping destdir="${build.dir}/ejb/classes" validatexml="false" />
           <!-- -->
  
        </ejbdoclet>
  
     </target>
  
  
     <!-- Run WebDoclet -->
     <target name="webdoclet" depends="prepare">
  
        <taskdef name="webdoclet"
                 classname="xdoclet.web.WebDocletTask" 
classpath="${xdoclet.jar.path};${log4j.jar.path};${ant.jar.path}"
        />
  
        <webdoclet
           sourcepath="${java.dir}"
           destdir="${generated.java.dir}"
           classpathref="project.class.path"
           force="${xdoclet.force}">
  
           <fileset dir="${java.dir}">
              <include name="**/*Servlet.java" />
              <include name="**/*Filter.java" />
              <include name="**/*Tag.java" />
              <include name="**/*Action.java" />
           </fileset>
  
           <deploymentdescriptor servletspec="2.3" destdir="${build.dir}/web/WEB-INF" >
              <taglib uri="http://java.sun.com/jstl/ea/core"; location="/WEB-INF/c.tld" 
/>
           </deploymentdescriptor>
  
           <jsptaglib jspversion="1.2" destdir="${build.dir}/web/WEB-INF/tlds"
              shortname="j2ee" validateXml="false"
           />
           <!-- -->
           <jbosswebxml destdir="${build.dir}/web/WEB-INF" />
  
           <jrunwebxml destdir="${build.dir}/web/WEB-INF"  mergedir="${src.dir}" />
  
           <!-- -->
           <!-- generate WebWork stuff, uncomment it if you want to run it.
           -->
           <webWorkConfigProperties />
           <webWorkActionDocs javadocdir="api" mergedir="${src.dir}"/>
  
        </webdoclet>
  
     </target>
  
     <target name="jmxdoclet" depends="prepare">
  
        <taskdef name="jmxdoclet"
                 classname="xdoclet.jmx.JMXDocletTask" 
classpath="${xdoclet.jar.path};${log4j.jar.path};${ant.jar.path}"
        />
  
        <jmxdoclet
           sourcepath="${java.dir}"
           destdir="${generated.java.dir}"
           classpathref="project.class.path"
           force="${xdoclet.force}">
  
           <fileset dir="${java.dir}">
              <include name="xdoclet/retest/bean/jmx/**/*.java" />
           </fileset>
  
           <!-- Create the {0}MBean interface for the MBean -->
           <mbeaninterface mergedir="${src.dir}"/>
  
           <!-- Create the OpenJMX specific description adaptor class for the MBean -->
           <openjmxDescription />
  
        </jmxdoclet>
  
     </target>
  
     <!-- Compile -->
     <target name="compile" depends="compile-ejbs,webdoclet,jmxdoclet">
  
        <!-- Compile web classes -->
        <javac srcdir="${java.dir};${generated.java.dir}"
               destdir="${build.dir}/web/WEB-INF/classes"
               includes="xdoclet/retest/bean/web/*.java"
               debug="on">
  
           <classpath refid="project.class.path" />
        </javac>
  
        <javac srcdir="${java.dir};${generated.java.dir}"
               destdir="${build.dir}/jmx"
               includes="xdoclet/retest/bean/jmx/*.java"
               debug="on">
  
           <classpath refid="project.class.path" />
        </javac>
  
     </target>
  
     <target name="compile-ejbs" depends="ejbdoclet">
        <!-- Compile EJBs -->
        <javac srcdir="${java.dir};${generated.java.dir}"
               destdir="${ejb.classes.dir}"
               
includes="xdoclet/retest/bean/ejb/*.java,xdoclet/retest/bean/interfaces/*.java"
               debug="on">
  
           <classpath refid="project.class.path" />
        </javac>
     </target>
  
     <!-- Clean everything -->
     <target name="clean" depends="init">
  
        <delete dir="${build.dir}" />
        <delete dir="${dist.dir}" />
        <delete dir="${generated.src.dir}" />
  
     </target>
  
     <target name="clean-build" depends="clean, main" />
  
     <!-- Main -->
     <target name="main" depends="compile-ejbs" />
  
  </project>
  
  
  

_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to