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.
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.