Building dependencies don't update version numbers

"Mark Derricutt" <mark-eB0Nx5sQHd/[email protected]> Fri, 04 Apr 2003 13:23:10 +1200
Newsgroups gmane.comp.java.anthill.devel,gmane.comp.java.anthill
Message-ID <[email protected]>
A problem we discovered the other day was that building from a dependency
group wouldn't automatically update the version numbers.

I traced the problem down to the DependencyGroup.Member inner class
caching a copy of the BuildDef, as a result, after the first build, the
version number is set, and reused for each build.

My simple patch for this is to reset the version to null on each build.

I added a ticket in bugzilla mentioning this as well.


[mark@celldweller anthill]$ cvs diff DependencyGroup.java
Index: DependencyGroup.java
===================================================================
RCS file: /usr/local/cvs/Anthill/source/main/java/com/urbancode/anthill/DependencyGroup.java,v
retrieving revision 1.17
diff -u -r1.17 DependencyGroup.java
--- DependencyGroup.java        2003/03/06 23:19:26     1.17
+++ DependencyGroup.java        2003/04/04 01:21:27
@@ -546,6 +546,8 @@
         //----------------------------------------------------------------------
         public void build(DependencyGroup.Scope scope) {
             BuildDefinition buildDef = getBuildDefinition();
+            // MD: Set version null, this -should- force a version increment on dependency builds.
+            buildDef.setVersion(null);