Kepler Build System Summary
A summary of how to use the Kepler Build System.
This documentation gives you the minimum amount of information that you need to quickly build Kepler.
See Instructions and Overview of the Kepler Build System for details. See also Kepler and Eclipse.
Assumptions
- You are running Java 1.8. To test this assumption type: "java -version"
- You are using Ant 1.8.2. To test this assumption type: "ant -version"
- You have installed Maven 3.0.3 or newer. To test this assumption: "mvn --version"
- You have installed an SVN client. To test this assumption type: "svn --version"
- Your firewall isn't blocking outbound traffic on port 3690 (ptolemy checkout via the svn: protocol won't work in Kepler-2.3 and 2.0. The development trunk uses https:, not svn:, so it does not have this problem. Details)
Getting Started
First, you need to decide whether you would like to work off:
- the subversion development trunk of Kepler (cutting edge, the least stable),
- the kepler-2.x branches (when associated with a released 2.x.y version, very stable. Much less stable when associated with a pending release) or
- the kepler-1.0 branch (no active development, use 2.x instead).
To work off the subversion development trunk issue the following commands:
mkdir kepler.modules cd kepler.modules svn co https://code.kepler-project.org/code/kepler/trunk/modules/build-area cd build-area ant change-to -Dsuite=kepler ant run
To work off the kepler-2.4 branch:
mkdir kepler.modules cd kepler.modules svn co https://code.kepler-project.org/code/kepler/releases/release-branches/build-area-2.4 build-area cd build-area ant change-to -Dsuite=kepler-2.4
To work off the kepler-1.0 branch:
mkdir kepler.modules cd kepler.modules svn co https://code.kepler-project.org/code/kepler/trunk/modules/build-area cd build-area ant change-to -Dsuite=kepler-1.0After completing one of the above sets of steps, start Kepler with:
ant run
How to Contribute Your Own Code
You need to make your own suite along with whatever source modules you would like to contribute.
Example:
I want to add source code to extent the functionality of Kepler, including overriding existing classes in Kepler or Ptolemy. I need a source module to store this code. I also need to make a suite that tells the build system how this module relates to Kepler and Ptolemy and other modules. Let us call the module we will make foo-module and the suite we will make foo-suite. Hopefully, you will choose better names for your code.
Type the following commands:
ant make-suite -Dname=foo-suite
This makes a suite called foo-suite in the modules area as a peer to kepler-1.0-jar-tag and loader. Edit the following file:
../foo-suite/module-info/modules.txt so that it has the following content:
foo-module *kepler-1.0
Next, make the foo-module where you can put your source:
ant make-module -Dname=foo-module
Put any source code you would like to in the src folder of the foo-module.
Sharing Your Code with Other Developers
Now that you have made a suite and a module with source, you would probably like to share it with others. You can upload it to our repository. That is easy enough:
ant upload -Dmodule=foo-suite ant upload -Dmodule=foo-module
Now, other developer can get your suite after they download the build by issuing the following command:
ant change-to -Dsuite=foo-suite
Finally, please note that you can store any modules in your own Subversion repository instead of our if you like. Just append the Subversion URL right after the module name in modules.txt like the following fictional example:
foo-module svn://pantara.genomecenter.ucdavis.edu/extensions/foo-module/trunk loader kepler-1.0-jar-tag
While loader and kepler-1.0-jar-tag will retrieved from appropriate places in the Kepler repository at https://code.kepler-project.org/code/kepler the foo-module will be stored at the url specified.
Sharing Your Work with Scientists
So, you have developed a useful scientific workflow and an associated source code in foo-module and would now like to share this work with scientists. How can you go about doing that? One solution is to use the package command to create a zip which in turn will contain an executable jar that a scientist can double click on to execute your project just as you do whenever you type in ant run. Just type:ant package -Dsuite=foo-suite
This will create a foo-suite.zip file in the kepler.build directory. When this file is unzipped, it will contain a foo-suite.jar that can be double-clicked to run Kepler along with your extension.
Using an IDE to Develop Source Code
The Extension Build System supports three major IDEs: Intellij IDEA, Eclipse, and Netbeans. To generate project files for these IDEs and a particular configuration of modules as specified in modules.txt, try one of the following commands as appropriate:
ant idea ant eclipse ant netbeans
Problems Downloading Ptolemy
If you get errors compiling Kepler about missing classes in ptolemy.aaa.bbb packages, then the Ptolemy sources were not downloaded. You can manually get them from svn:
cd ../ptolemy rm -fr src svn co https://repo.eecs.berkeley.edu/svn-anon/projects/eal/ptII/trunk src cd ../build-area ant run