ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCallum" <mich...@spinsoftware.com>
Subject RE: Feature Request: Ant batching support
Date Wed, 07 Mar 2001 19:43:14 GMT
In reply to Stephane Bailliez <sbailliez@imediation.com>:
[why the marked up email?]

Why not put all the third party paths into some a propeties file...

thirdparty.lib.xalan=/path/to.jar

And then include this file in all the module build files using <property 
file="/path/to/lib.properties"/>

I have set up common tasks for all projects at work. Importing into project files using xml

imports.
The common tasks where necessary call to stub targets in the project files.

If a project needs some extra functionality it can add tasks to the stub target that would

normally be empty. (not perfect but it works).

There is a common properties file used by all projects that is loaded after a project property
file.
So the project can overdie global settings.

example...

--begin shared file--
<property file="/properties/home/${project.name}"/>
<property file="/properties/home/common.properties"/>
<target name="init" depends="project.init">
  do init stuff
</target>
<target name="compile" depends="init,project.compile">
    <javac
      srcDir="${build.source.dir}"
      destdir="${classes.dir}">
      <classpath refid="project.classpath"/>
      <patternset refid="pattern.source.files"/>
    </javac>
</target>
-
--end shared file--

--begin shared file--
<!DOCTYPE project [
  <!ENTITY shared    SYSTEM "file:shared/file/home/shared.xml">
]>
	<project name="Project" default="compile" basedir=".">
   	<property name="project.name" value="project"/>

	   &shared;

		<!-- define the pattern.source.files here eg -->
      <patternset id="pattern.source.files">
         <include name="com/domain/**/*.java"/>
      </patternset>
  

	   <target name="project.init">
       < !-- is empty as no project specific init stuff -->
	   </target>

	   <target name="compile.init">
       < !-- is empty as no project specific compile stuff -->
	   </target>
---end shared file--

Hope this helps.

Michael

--- BEGIN GEEK CODE BLOCK ---
Version 3.12
GCS d+(-) s:- a-- C++(+++)$ UL++++(H)(S)$ P+++$ L+++$>++++
E--- W++ N++ o++ K? !w() O? !M V? PS+ PE+++ Y+ t+ 5++ X++ 
R(+) !tv b++(++++) D++ G>++ e++> h--()(*) r+ y+()
--- END GEEK CODE BLOCK ---

Mime
View raw message