our project has a fileset for excluding files/dirs that are not ready
for others in our group to use. however, this causes problems for the
person working on those excluded files since they cannot forcefully
include them w/o removing them from the common fileset in the build
file. that could cause problems if checked in to CVS since the
not-ready code would cause problems for the other people. (confused?
i am.)
an example:
<fileset name="common.excludes">
<exclude name="foo/bar/" />
<exclude name="arc/tan/line/" />
...
</fileset>
<target...>
<javac ....
<include name="${subdir}**/*.java" />
<patternset refid="${common.excludes}" />
....>
</target>
the problem happens when subdir is something in the path of one of the
common.excludes.
ie. subdir = arc/tan/
has anyone found a way to keep other people from building part of a
project, work on that part yourself, and not have concurrency problems
when someone checks in the build file that opens up broken code to
everyone?
Raymond DeCampo - 12 Nov 2003 02:52 GMT
> has anyone found a way to keep other people from building part of a
> project, work on that part yourself, and not have concurrency problems
> when someone checks in the build file that opens up broken code to
> everyone?
We do the following: The build properties for ANT are read from a file
called build.properties. This file is not checked in and is
individually tailored by each developer. A file with the default
(production) build properties is checked in under
build-template.properties. All the ANT targets depend on an init
target. The init target detects if the build.properties file is
available. If it is, it is used. If not, it is created by copying the
build-template.properties file. Thus, the build works on a fresh checkout.
In your particular case allow the excluded files to be defined by the
build properties and the developers can override in their local
build.properties.
Ray
Robert Klemme - 12 Nov 2003 08:09 GMT
> our project has a fileset for excluding files/dirs that are not ready
> for others in our group to use. however, this causes problems for the
[quoted text clipped - 16 lines]
> <include name="${subdir}**/*.java" />
> <patternset refid="${common.excludes}" />
This should read
<patternset refid="common.excludes" />
> ....>
> </target>
[quoted text clipped - 8 lines]
> when someone checks in the build file that opens up broken code to
> everyone?
<target name="compile" depends="compile.common,compile.tmp"/>
<target name="compile.common">
<javac ....
<include name="${subdir}**/*.java" />
<patternset refid="${common.excludes}" />
....>
</target>
<target name="compile.tmp" if="${compile.tmp}>
<javac ....
<include name="${subdir}**/*.java" />
....>
</target>
with tmp: ant -Dcompile.tmp=true compile
without tmp: ant compile
Regards
robert