Costin Manolache wrote:
Stefan Bodewig wrote:


On Wed, 20 Nov 2002, Nicola Ken Barozzi <[EMAIL PROTECTED]> wrote:


np, Stefan came to the rescue :-)

But did it wrong, expect another nag.


Do you want me to commit my gump descriptor ? It seems to be working fine.


Attached is a proposed buildfile for embed. I can now build it easily on my machine with it :-)

--
Nicola Ken Barozzi                   [EMAIL PROTECTED]
            - verba volant, scripta manent -
   (discussions get forgotten, just code remains)
---------------------------------------------------------------------
##############
# Properties used by the embed build
##############

##############
# Base paths

base.path=/usr/share/java
ant.src=../..
commons.src=${ant.src}/../jakarta-commons
sandbox.src=${ant.src}/../jakarta-commons-sandbox

##############
# Jar paths
  
#Those 2 should be moved to JXPath and velocity

commons-logging.jar=${commons.src}/logging/dist/commons-logging.jar 
commons-discovery.jar=${commons.src}/discovery/dist/commons-discovery.jar
jxpath.jar=${commons.src}/jxpath/dist/commons-jxpath.jar 
velocity.jar=${base.path}/velocity/velocity-20020220.jar
jexl.jar=${sandbox.src}/jexl/dist/commons-jexl.jar

##############
# Build paths

embed.build=build

    
##############
# Build properties

debug=true
<project name="embed" default="main" basedir=".">

  <description>Embed proposal</description>

  <property file="${user.home}/build.properties" />
  <property file="user.properties" />
  <property file="default.properties" />
    
  <target name="init">
      <mkdir dir="build/classes" />
  </target>
      
  <target name="main" depends="build" />

  <target name="build" depends="init">
    <javac srcdir="src/java"  
           debug="${debug}"
           destdir="${embed.build}/classes" >
      <include name="**" />
      <exclude name="org/apache/tools/ant/taskdefs/optional/**" />
    </javac>

    <copy toDir="${embed.build}/classes">
      <fileset dir="src/java" includes="META-INF/**" />
    </copy>

    <jar file="${embed.build}/ant-sax2.jar" basedir="${embed.build}/classes">
      <include name="**" />
    </jar>
  </target>

  <target name="embed-optional" depends="init">
    <javac srcdir="src/java"  
           debug="${debug}"
           destdir="${embed.build}/classes" >
      <include name="org/apache/tools/ant/taskdefs/optional/**" />
      <classpath>
        <!-- all this will move to their package -->
        <pathelement location="build/classes" />
        <pathelement location="${jxpath.jar}" />
        <pathelement location="${velocity.jar}" />
        <pathelement location="${jexl.jar}" />
        <pathelement location="${commons-discovery.jar}" />
      </classpath>
    </javac>

    <copy toDir="${embed.build}/classes">
      <fileset dir="src/java" includes="META-INF/**" />
    </copy>

    <jar file="${embed.build}/optional-dynprop.jar" basedir="${embed.build}/classes">
      <include name="org/apache/tools/ant/taskdefs/optional/**" />
    </jar>
  </target>

  <target name="install" description="Installs built jars">
    <echo message="${embed.build}/ant-sax2.jar toDir=${ant.home}/lib"/>
    
    <mkdir dir="${ant.home}/lib"/>    
    <copy file="${embed.build}/ant-sax2.jar" toDir="${ant.home}/lib"/>
  </target>

  <target name="install-embed" depends="main, install" 
          description="Installs core built jars"/>
     
 
  <target name="install-embed-optional" depends="embed-optional, install" 
          description="Installs extra built jars">
    <copy file="${commons-logging.jar}" toDir="${ant.home}/lib"/>
    <copy file="${commons-discovery.jar}" toDir="${ant.home}/lib"/>
  </target> 

  <target name="gump" description="Patch gump bootstrap ant" depends="main" >
    <!-- What we'll do - in order to get around gump classpath use - is
         to recreate ant.jar ( using build/classes ) to include our code -->
    <unjar jar="${ant.src}/bootstrap/lib/ant.jar" dest="${embed.build}/classes" />
    <delete file="${ant.src}/bootstrap/lib/ant.jar" />
    <jar file="${ant.src}/bootstrap/lib/ant.jar" basedir="${embed.build}/classes"/>
  </target>
  
</project>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to