Re: JARS in cvs

Nick Chalko <[email protected]>
Newsgroups gmane.comp.krysalis.devel
Message-ID <[email protected]>
Nick Chalko wrote:

> I will try to do it as a sample in one of my anlets that shamefully 
> have the jars checked in
>

The version antlet now downloads it jars as needed. 

The key part is
<target name="version.init">
  <mkdir dir="${version.antlet.dir}/lib/"/>
  <get 
src="http://unc.dl.sourceforge.net/sourceforge/krysalis/krysalis-version-0.9.0-rc2.jar" 

    dest="${version.antlet.dir}/lib/krysalis-version-0.9.0-rc2.jar"
    verbose="true"
    usetimestamp="true"/>
 

  <!-- Classpath for my jars -->
 <path id="version.classpath">
    <fileset dir="${version.antlet.dir}/lib/">
      <include name="*.jar"/>
    </fileset>
 </path>

  <taskdef resource="version"
          classpathref="version.classpath"/>   
</target>


The antlet is available at 
http://metamorphosis.sourceforge.net/antlet/version-0.2.jar

Here is sample usage

<?xml version="1.0" ?>
<!-- $Header: /cvsroot/metamorphosis//antlets/version/test/build.xml,v 
1.1 2004/02/24 07:11:30 chalko Exp $ -->
<project default="all" basedir="." name="version.test">

    <description>Bootstraps the antlet maker</description>

    <property name="project.name" value="version-test"/>
    <property name="project.version" value="0.1"/>
   
    <!-- set these properties before the import -->
   
    <property name="build.dir" value="${basedir}/build"/>
    <property name="project.package" value="org.krysalis.version.test"/>
    <property name="project.src.dir" value="${basedir}/src"/>
    <path id="version-test.classpath">
    </path>


      <typedef resource="org/krysalis/centipede2/ant/antlib.xml"/>
    <importer name="init-0.1"/>

   <importer name="java-0.1" />
   <importer name="version-0.2" 
href="http://metamorphosis.sourceforge.net/antlet/version-0.2.jar"/>
  
   <target name="all" depends="compile"/>
   <target name="compile" depends="version-stamp,java.antlet.compile"/>
   
   
</project>



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.