Building Cougaar from source.
Todd Wright
twright at bbn.com
Mon Dec 4 20:33:50 EST 2006
As Aaron notes, the easiest option is to download a recent build and use
the top-level "build.xml" in the "cougaar-src.zip":
ant install
However, I just tried this and found several bugs. Attached below are
my notes and workarounds.
The Perl script is fairly complex and difficult to use. I'd avoid it if
possible.
Todd
Aaron Helsinger wrote:
> The -r B12_1_5 arg is correct, but of course, it will only work if there
> actually is such a branch. The acme module does not have that branch.
> You can browse which tags are relevant when you use the web based CVS
> browser.
>
> These are standard CVS commands, and a web search should turn up some
> decent manuals.
>
> So the command that you gave checks ou the default branch of the acme
> module, HEAD.
>
> The build.xml files that come out of an individual project
> (<module>/build.xml) are preset with module specific variables.
>
> Use the cougaar-src.zip zip file to get current build.xml files,
> including a parent level build.xml (to go in
> COUGAAR_INSTALL_PATH/build.xml) --- these files are in fact regenerated
> at every build with the current library dependencies, etc. Note however
> that this archive also includes all the source files, which you may not
> want.
>
> The (Perl) build script is in the build module: build/bin/build and uses
> the build/data/moduleTemplate.xml file to generate the per module
> build.xml, and productTemplate.xml to generate the parent level build.xml
>
> If you read the comments in the build.xml, they describe what they expect.
> In particular:
> The (correct) parent.xml will copy jars/lib into sys as necessary
> The build module installs its products in /clib so you wont get missing
> jars there.
>
> Basically, you should only need to:
> 1) Set JAVA_HOME and COUGAAR_INSTALL_PATH
> 2) checkout the modules under COUGAAR_INSTALL_PATH
> --- build is the main module for building other libraries, so you'll
> need that
> --- bootstrap, javaiopatch, core, util, and base get used by basically
> everything else, so you'll likely want those
>
> Any module that you dont want to build yourself, you can just get it
> from a recent build.
> Not all projects/modules on cougaar.org are built using this build
> process and conform to these conventions. The particular modules that
> these Ant build scripts know how to build are those that are configured
> in build/data/default.build. Note however that this data file is
> extensable, and you could add your own project there (as long as your
> directory structure conforms.
>
> I hope this helps,
>
> Aaron
>
> blaise at idistro.com wrote:
>
>>Hello,
>>
>>I've got a few questions about checking out and building cougaar projects
>>from cvs. I've just checked out the source tree using the cvs commands of
>>form: 'cvs -d :pserver:anonymous at cougaar.org:/cvsroot/acme checkout acme'
>>for each project. Is this checking out the source from the current active
>>dev branch, or should I be using the B12_1_5 branch if so how do I do this
>>I tried the -r B12_1_5 tag but it didn't seem to work.
>>
>>Also can't get the source that I have to build, you'll have to excuse my
>>ignorance I'm used to just typing ant or mvn and having everything work
>>itself out from there. I had to take a top level build.xml file (that
>>lives under $COUGAAR_INSTALL_PATH) from one of the zipped distributions,
>>as I couldn't see how to get it out of cvs. I set the env variables
>>COUGAAR_INSTALL_PATH, and JAVA_HOME and typed 'ant'. The build couldn't
>>find classes in the tools.jar to link to. In addition it falls over as
>>java 1.4 is set in the build.xml files and some of the source files
>>contain java 1.5 key words. Also the 3rd party jars aren't found, they are
>>under jars/lib but the build doesn't copy them to sys. Is there a how to
>>guide somewhere on the web site that will take me through the build step
>>by step...
>>
>>Thanks,
>>
>>Blaise.
>>_______________________________________________
>>Cougaar-developers mailing list
>>Cougaar-developers at cougaar.org
>>http://cougaar.org/mailman/listinfo/cougaar-developers
>>
>>
>>
>
> _______________________________________________
> Cougaar-developers mailing list
> Cougaar-developers at cougaar.org
> http://cougaar.org/mailman/listinfo/cougaar-developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cougaar.org/pipermail/cougaar-developers/attachments/20061204/279372b4/ant_workaround.html
More information about the Cougaar-developers
mailing list