Changes between Version 44 and Version 45 of BuildSystem


Ignore:
Timestamp:
12/14/12 22:54:25 (7 years ago)
Author:
welberge
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BuildSystem

    v44 v45  
    3939and error prone. Instead, we use a dependency manager, 
    4040[[http://ant.apache.org/ivy/|Ivy]]. 
     41 
     42=== How does it work? === 
     43Every project has an "ivy.xml" file that describes project dependencies. The 
     44ant build files, relying on the Ivy system, use these so called "ivy's" for resolving 
     45the contents of the project's lib directory. The system is based upon the 
     46notion of configurations, versions, and status of versions. For example, our 
     47build system uses "alpha", "daily build", and "release" as possible status of some 
     48jar version. The ordering of these statuses is relevant. For instance, when you 
     49ask for a "latest beta" version of some module Ivy will choose the latest amongst 
     50published daily releases and release (but not alpha) versions of that module. Similarly, if 
     51you ask for a "latest alpha", anything is acceptable, but if you ask for a "latest 
     52release", then only versions classified as "release" are taken into consideration. 
     53Ivy allows for several "configurations" of the project, each with its own set 
     54of dependencies. Currently, we have configurations for producing alpha, daily build, 
     55and release versions of the project itself, and a "test" configuration for (extra) 
     56dependencies needed for running tests. (For technical reasons we have two more 
     57configurations, called \master" and \default", which are discussed below) The 
     58workflow is roughly as follows: first move the project into either the alpha, 
     59beta or release configuration, second do your development, including testing 
     60etc, third publish an alpha, beta or normal release based upon the current 
     61configuration. When you actually publish, we attach a version number to the 
     62jar file. Also, the Ivy system records metadata concerning published modules 
     63based upon version numbers, to be used later on, when resolving for other 
     64projects. It does so by publishing not just a "jar" file (or other "artefacts", as 
     65they are called by Ivy), but also an accompanying ivy.xml file, derived from 
     66the project's ivy at the moment of publication. In this way, the Ivy system 
     67knows not only about direct dependencies, but is also capable of resolving 
     68recursive dependencies. This means that, for instance, when my module X 
     69declares (just) a dependency on the HmiGraphics package, the resolve process 
     70will look into the dependencies of HmiGraphics. The result is that project 
     71X will receive jar files for HmiGraphics, but also for HmiAnimation, HmiXml, 
     72HmiMath, and HmiUtil, because of (recursive) dependencies. When some jar 
     73file is required more than once, say via a direct dependency and also via some 
     74indirect dependency, and the versions required are not consistent, then Ivy 
     75delivers the "latest" version. So, for instance, in the example above, if project 
     76X declares (direct) dependencies on the alpha version of HmiGraphics and the 
     77release version of HmiXml, while the alpha version of HmiGraphics declares itself 
     78a dependency on the beta version of HmiXml, then project X will receive that 
     79beta version of HmiXml. That should be ok: since we are asking for some alpha 
     80version (of HmiGraphics, we should allow other alpha and/or beta versions if 
     81HmiGraphics actually needs them, even if our own project would be satisfied 
     82with the most recent release version. 
    4183 
    4284