Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

build: how to handle changes in package structure?

Status
Not open for further replies.

grcar

IS-IT--Management
Apr 14, 2005
1
DE
We are managing builds of a Java project, using ANT as buildtool.
Version control system = ClearCase
Development is distributed at several sites.
project size = approximately 40 developer.


Now we ran into following problem:
Developer A changes path structure (from "ngs.dto" to "ngs.util.dto").
Developer B expected his dependend project to have a build error, but it there was none. After looking at the "utildto" jar, I see that both the old classes and new classes are there! Both package structures exist. (For example, I have "com\sitraffic\ngs\dto\AbstractDeepCopy.class" AND "com\sitraffic\ngs\dto\util\AbstractDeepCopy.class".) This is because the "classes" directory is not cleaned when a rebuild is required.

Unfortunately ANT is not designed to add only built .class files into jar. But you have to use file patterns to specify what to add to the jar. Usually .class files are generated into a seperate directory and added with a wildcard **/*.class to goal-target .jar. So after updating package structure, old .class files are added to future builds, as long as target is not cleaned up.

Now I see 2 possibilities:
1) Developer has to know, when package structure changed -> force a clean in advance
2) enforce a clean in advance on every build -> this will decrease performance of local developer builds.


I'm sure that other development teams have same problems.
I would be interested in, how do you handle/coordinate changes in package structure?
Any help appreciated.
Thanks.
 
I would personally consider it a good practice to clean on every build. Or, at least provide a task that will clean, so when a developer knows a change has been made, they'll just call the clean build instead of the regular build.

________________________________________
Michael Flanakin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top