axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: ws-axis/contrib/wss4j .cvsignore build.xml
Date Tue, 14 Oct 2003 12:07:59 GMT
dims        2003/10/14 05:07:59

  Added:       contrib/wss4j .cvsignore build.xml
  Log:
  ******* WORK IN PROGRESS *******
  
  Initial check-in of my sandbox for ws-security related code.
  
  Revision  Changes    Path
  1.1                  ws-axis/contrib/wss4j/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  .cvsignore
  before.xml
  after.xml
  build
  *.wsdd
  
  
  
  1.1                  ws-axis/contrib/wss4j/build.xml
  
  Index: build.xml
  ===================================================================
  <?xml version="1.0"?>
  
  <!--
       This file is intended for ANT, a Java based build tool.
       ANT is available from http://jakarta.apache.org/ant/index.html
  
       This build file is intended to build the wss4j package,
       available from http://wss4j.sf.net/
  -->
  
  <project name="The wss4j Package" default="usage" basedir=".">
    <target name="init">
      <property name='product.Name'      value='Apache-WS-Security-J'/>
      <property name='product.name'      value='wss4j'/>
      <property name='product.shortname' value='wss4j'/>
  
      <property name='product.version.major' value='0'/>
      <property name='product.version.minor' value='01'/>
      <property name='product.version.level' value='D'/>
      <property name='product.Version'   value='${product.version.major}.${product.version.minor}.${product.version.level}'/>
      <property name='product.version'   value='${product.version.major}.${product.version.minor}.${product.version.level}'/>
      <property name='product_version'   value='${product.version.major}_${product.version.minor}_${product.version.level}'/>
      <property name="year"              value="2003" />
      <property name="copyright"         value="Copyright &#169; ${year} Apache XML
Project. All Rights Reserved." />
  
      <property name="dir.doc"               value="./doc" />
      <property name="dir.libs"              value="./lib" />
      <property name="dir.src"               value="./src" />
      <property name="dir.src.unitTests"     value="./test" />
      <property name="dir.src.samples"       value="./samples" />
  
      <property name="build.dir"             value="./build" />
      <property name="build.classes"         value="${build.dir}/classes" />
  
      <property name="jar.library"           value="${product.shortname}.jar" />
  
      <property name="build.doc"             value="${build.dir}/doc" />
      <property name="build.doc.xml"         value="${build.doc}/xml" />
      <property name="build.doc.html"        value="${build.doc}/html" />
      <property name="build.javadoc"         value="${build.doc.html}/api" />
      <property name="build.junit.xml"       value="${build.doc.xml}/junit" />
      <property name="build.junit.html"      value="${build.doc.html}/junit" />
  
      <path id="classpath.libraries" description="3rd party libs">
        <fileset dir="${dir.libs}">
          <include name="**/*.jar"/>
        </fileset>
      </path>
  
      <path id="classpath.wss4j" description="wss4j classes; first try pure class files,
then jars">
        <pathelement path="${build.classes}" />
        <pathelement path="${build.dir}/${jar.library}" />
      </path>
  
      <path id="classpath.library">
        <path refid="classpath.wss4j" />
        <path refid="classpath.libraries" />
      </path>
  
      <path id="classpath.test">
        <!-- classpath for test is librarypath plus junit -->
        <path refid="classpath.library" />
      </path>
  
      <path id="classpath.test.jar">
        <!-- classpath for test is librarypath plus junit -->
        <path refid="classpath.library" />
        <pathelement path="${build.dir}/${jar.library}" />
        <pathelement path="${build.dir}/${jar.tests}" />
      </path>
  
      <patternset id="distFiles">
         <include name="build.xml" />
         <include name="INSTALL" />
         <include name="keys.asc" />
         <include name="LICENSE.txt" />
         <include name="README" />
         <include name="Readme.html" />
         <include name="TODO" />
      </patternset>
  
      <patternset id="srcFiles">
         <!-- for some strange reasons, I can't use ${src} but must use src -->
         <include name="src/**/*" />
      </patternset>
  
      <patternset id="srcSamplesFiles">
         <include name="samples/**/*" />
      </patternset>
  
      <patternset id="srcUnitTestsFiles">
         <include name="test/**/*" />
      </patternset>
  
      <property name="javadoc.packages"
                value="
  org.apache.ws.security.wssec,
  org.apache.ws.security.wssec.security,
  org.apache.ws.security.components,
  org.apache.ws.security.components.crypto,
  org.apache.ws.security.message,
  org.apache.ws.security.message.token,
  org.apache.ws.security.util,
  " />
  
      <echo message="-------------------------------------------------------------------"
/>
      <echo message="-------------- ${product.Name} v${product.Version} [${year}] ----------------"
/>
      <echo message="-------------------------------------------------------------------"
/>
      <echo message="Building with ${ant.version}"/>
      <echo message="using build file ${ant.file}"/>
      <echo message="Java ${java.version} located at ${java.home} "/>
      <echo message="-------------------------------------------------------------------"/>
        
    </target>
  
    <target name="usage" depends="init">
      <echo message="                                                                 
 " />
      <echo message="                                                                 
 " />
      <echo message=" Build instructions                                              
 " />
      <echo message="-------------------------------------------------------------------"
/>
      <echo message="                                                                 
 " />
      <echo message=" available targets are:                                          
 " />
      <echo message="                                                                 
 " />
      <echo message="   compile         --> compiles everything                    
    " />
      <echo message="   compile.library --> compiles the source code               
    " />
      <echo message="   compile.samples --> compiles the samples source code       
    " />
      <echo message="   compile.tests   --> compiles the tests source code         
    " />
      <echo message="                                                                 
 " />
      <echo message="   javadoc         --> generates the API documentation        
    " />
      <echo message="                       (needs Java > 1.2)                     
    " />
      <echo message="                                                                 
 " />
      <echo message="   test            --> runs the defined JUnit tests           
    " />
      <echo message="                                                                 
 " />
      <echo message="   clean           --> cleans up all generated files and      
    " />
      <echo message="                       directories                               
 " />
      <echo message="   jar             --> creates the JAR file                   
    " />
      <echo message="   gump            --> includes javadoc, compile jar and test 
    " />
      <echo message="                                                                 
 " />
      <echo message="   usage           --> provides help on using the build tool  
    " />
      <echo message="                       (default)                                 
 " />
      <echo message="                                                                 
 " />
      <echo message=" See comments inside the build.xml file for more details.        
 " />
      <echo message="-------------------------------------------------------------------"
/>
      <echo message="                                                                 
 " />
    </target>
  
    <target name="clean" depends="init"
            description="Clean up all temporary build files">
      <delete dir="${build.dir}" />
      <delete file="before.xml" />
      <delete file="after.xml" />
    </target>
  
    <target name="prepare" depends="init"
            description="This target generates a first build directory and checks for some
libraries">
      <tstamp />
      <mkdir dir="${build.dir}" />
  
      <available property="junit.present" classname="junit.framework.TestCase">
         <!-- check whether JUnit is available -->
         <classpath refid="classpath.test" />
      </available>
  
      <available property="jdk14.present" classname="java.security.cert.CertPath">
         <!-- check whether JDK14 is available -->
         <classpath refid="classpath.test" />
      </available>
  
      <available property="bc.present" classname="org.bouncycastle.jce.provider.BouncyCastleProvider">
         <!-- check whether BouncyCastle is available -->
         <classpath refid="classpath.test" />
      </available>
  
         
      <echo message="--- Flags (Note: If the {property name} is displayed, "/>
      <echo message="           then the component is not present)" />
      <echo message="jdk14.present=${jdk14.present}" />
      <echo message="bc.present=${bc.present}" />
  
    </target>
  
    <!-- #################################################################### -->
    <!-- #################################################################### -->
    <!-- #################################################################### -->
    <!-- #################################################################### -->
    <!-- #################################################################### -->
  
    <target name="prepare-src" depends="prepare" description="This target copies the Java
sources and brands the version information">
      <!-- create directories -->
      <mkdir dir="${build.classes}" />
    </target>
  
    <target name="javadoc"
            depends="prepare-src"
            description="Generates javadoc from all .java files; this is done on the 'branded'
files">
      <mkdir dir="${build.doc}" />
      <mkdir dir="${build.doc.html}" />
      <mkdir dir="${build.javadoc}" />
  
      <javadoc destdir="${build.javadoc}"
               packagenames="${javadoc.packages}"
               classpathref="classpath.test">
               <!-- additionalparam="-breakiterator"-->
         <sourcepath>
            <pathelement location="${dir.src}" />
            <pathelement location="${dir.src.unitTests}" />
            <pathelement location="${dir.src.samples}" />
         </sourcepath>
      </javadoc>
    </target>
  
    <!-- #################################################################### -->
  
    <!-- Aliases -->
    <target name="javadocs" depends="javadoc" />
    <target name="jars" depends="jar" />
  
    <!-- Collections -->
    <target name="gump" depends="clean,javadoc,jar,test" description="Target for the gump
run" />
    <target name="compile" depends="compile.library, compile.samples, compile.tests" description="compile
everything" />
  
    <!-- #################################################################### -->
  
    <target name="compile.library" depends="prepare-src">
      <!-- Compile the java code from ${dir.src} into ${build.classes} -->
      <javac srcdir="${dir.src}" destdir="${build.classes}" debug="on">
        <classpath refid="classpath.library" />
        <exclude name="**/Merlin.java" unless="jdk14.present"/>
        <exclude name="**/MerlinPFX.java" unless="jdk14.present"/>
        <exclude name="**/BouncyCastle.java" unless="bc.present"/>
      </javac>
      <!-- Copy Property files -->
      <copy todir="${build.classes}" >
        <fileset dir="${dir.src}" includes="**/*.properties" />
      </copy>
    </target>
  
    <target name="compile.tests"
            depends="compile.library"
            if="junit.present">
      <!-- Compile the java code from ${dir.src} into ${build.classes} -->
      <javac srcdir="${dir.src.unitTests}" destdir="${build.classes}" debug="on">
        <classpath refid="classpath.test" />
      </javac>
      <!-- Copy Property files -->
      <copy todir="${build.classes}" >
        <fileset dir="${dir.src.unitTests}" includes="**/*.properties" />
      </copy>
    </target>
  
    <target name="compile.samples"
            depends="compile.library">
      <!-- Compile the java code from ${dir.src} into ${build.classes} -->
      <javac srcdir="${dir.src.samples}"
  	   debug="on"
             destdir="${build.classes}">
        <classpath refid="classpath.library" />
      </javac>
    </target>
  
    <target name="test"
            depends="compile"
            if="junit.present"
            description="Starts all JUnit test cases">
       <java classname="wssec.TestWSSecurity"
             fork="yes"
             taskname="junit"
             failonerror="true">
          <classpath refid="classpath.test" />
       </java>
    </target>
  
    <target name="jar"
            depends="compile, test"
            description="Creates the ${jar.library}">
  
       <jar jarfile="${build.dir}/${jar.library}"
            basedir="${build.classes}"
            includes="**/*, *.txt"
            />
    </target>
  
  </project>
  
  
  

Mime
View raw message