Visual COBOL 4.0 Eclipse Windows Incremental Build with ant

We're working with a large native procedural COBOL code base and have automated the build with Bamboo and ant.  On our build server, we only want to compile programs that have been changed since the last buld (all source is pulled from Git for the build).  Are incremental builds possible in this scenario?  Can someone provide more detail be provided  about how VC Eclipse tracks changes and copybook dependencies when building incrementally.

  • Hi StompinBob,


    As you probably know, Visual COBOL for Eclipse will use incremental builds by default for Native code when working inside of Eclipse. That is, if a Native COBOL project contains multiple programs and copy files, and only a certain program has been changed, only that program will be rebuilt.


    The same extends to copy files - if a copy file used by only one of the programs is modified, only the affected program will be rebuilt. For Eclipse to be aware of the change, the copy file must be in a project. The copy file can be the Native COBOL project, or a COBOL Copybook project that is referenced by the Native COBOL project. This assumes that you have changed the file using the Eclipse editor. If you change the file externally (as might happen with a source control system fetching a new version) I don't believe Eclipse will be automatically aware of the change. In that case, you can do a Refresh of the project, and Eclipse will notice the changes, and build incrementally based on them.


    A special note about copy files. Visual COBOL for Eclipse offers the option of pointing to an external (non-project) location for copy files (using Project->Properties, and then Micro Focus->Build Path, and then Adding the location under Copybooks. If you use this option Eclipse will not be aware of a change made to copy files in the external location. This is one of the reasons we recommend that copy files be placed into a project where possible.


    Regarding your question about using Ant and doing incremental builds, there is an option you can specify as part of the ant command:




    to request an incremental build. Here is a link to a page in the documentation that describes building using Ant, and shows the option for incremental builds:



    Hope this helps…

  • Thanks  .  I think we need to better understand the "refresh" capability of Eclipse and if we can somehow use it within an automated build.