Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Tools / November 2003

Tip: Looking for answers? Try searching our database.

exclude tag is too powerful in a multi user environment

Thread view: 
quig - 11 Nov 2003 22:27 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
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.