Skip to end of metadata
Go to start of metadata
Important license notice, please read!

The BEAM/VISAT user interface makes use of the JIDE Swing components (docking and action framework). JIDE is not an open-source product,
but JIDE Software has granted a free developer license to the BEAM project. It is for exclusive use within the frame of the open-source BEAM project.
So if you want to use JIDE outside of BEAM in your own applications, please contact
sales@jidesoft.com to get a copy of your own. They provides free developer licenses for open
source projects.

In the following is described how BEAM 4 is build from sources using the Maven build tool.
See also Configuration Management for a description of the structure of the source tree and the module naming and versioning.

Build BEAM Development Trunk (Version 5)

Assuming you have good internet connection, the following build procedure shall not take you longer than approx. 1h.

  1. Download and install build tools
    1. Install J2SE 1.6 and set JAVA_HOME accordingly.
    2. Install Maven and set MAVEN_HOME accordingly.
    3. Install Git.
      • On Windows we recommend the msysGit package.
      • Follow the instructions provided at github
      • Make sure Git is configured correctly: type git config -l at your console; the value core.autocrlf has to be set to input
      • If it is not, open $GIT_HOME/etc/gitconfig and set core.autocrlf to input
  2. Add $JAVA_HOME/bin and $MAVEN_HOME/bin to your PATH. (Windows:  %JAVA_HOME%\bin and %MAVEN_HOME%\bin
  3. Checkout Ceres source code using git:
    run git clone git://github.com/bcdev/ceres.git on the command-line in the directory $MY_PROJECTS. A sub-directory ceres will be created.
  4. Cd into $MY_PROJECTS/ceres
  5. Build Ceres from source and install in local Maven repository: Type mvn install
  6. Checkout BEAM source code using git:
    Type git clone git://github.com/bcdev/beam.git in the directory $MY_PROJECTS.
  7. Cd into $MY_PROJECTS/beam
  8. Build BEAM from source and install in local Maven repository: Type mvn install
  9. Copy file $MY_PROJECTS/beam/src/main/config/beam.config to directory $MY_PROJECTS/beam/config/
    1. Set beam.home = .
    2. Set beam.app = VisatMain
    3. Set beam.logLevel = ALL
    4. Set beam.debug = true
    5. Set beam.splash.image = ./src/main/bin/common/splash.png
  10. Open project in the your IDE. IntelliJ IDEA users:
    1. In IDEA, go to IDEA Main Menu/File/Import Project
    2. Choose $MY_PROJECTS/beam; click OK
    3. Choose Import project from external model and Maven; click next
    4. Specify $MY_PROJECTS/beam as root directory; click next
    5. choose org.esa.beam:beam-parent:1; click next
    6. Set BEAM as project name; click next
    7. Finish
  11. Open project in the your IDE. Eclipse users:
    1. Build Eclipse project files for BEAM: Type mvn eclipse:eclipse
    2. Delete the created .project file in the main project folder.
    3. Make sure that M2_REPOclasspath variable is set:
      1. Open Window/Preferences..., then select Java/Build Path/Classpath Variables
      2. Select New... and add variable M2_REPO
      3. Select Folder... and choose the location of your Maven local repository, e.g ~/.m2/repository. On Windows Vista the default Maven repository is C:\Users\<Username>\.m2\repository
    4. Click Main Menu/File/Import
    5. Select General/Existing Project into Workspace
    6. Select Root Directory $MY_PROJECTS/beam
    7. Click Finish
  12. Use the following configuration to run BEAM/VISAT:
    • Main class: com.bc.ceres.launcher.Launcher
    • VM parameters: -Xmx1024M -Dceres.context=beam
    • Program parameters: none
    • Working directory: $MY_PROJECTS/beam
    • Use classpath of module (project in Eclipse): beam-bootstrap

Build ApiDoc

In order to create the ApiDoc files call the following Maven command: mvn javadoc:aggregate
This will generate the files into $MY_PROJECTS/beam/target/site/apidocs

Build zip file of sources

In order to create a zipped file containing all the soources you have to include the assembly src/main/assembly/src.xml file in the POM. And call the Maven command mvn assembly:assembly
This generates a zip file named <artifactId>-<version>.zip in the {$MY_PROJECTS/beam/target directory.

Build BEAM Bug-fixing Branch

Just switch to the specific branch
For example to witch to the 4.6.x maintenance branch

  • Use git checkout 4.6.x

Maven Command Reference

See also http://maven.apache.org/plugins/index.html.
Projects With JNI

Project lifecycle command overview

mvn compile
mvn test
mvn test-compile
mvn package
mvn install
mvn site
mvn clean
mvn process-resources
mvn site-deploy
mvn clean package
mvn clean install

Creating/updating an IDEA project from a Maven 2 POM:

mvn idea:idea

Creating a new project from scratch:

mvn archetype:create -DgroupId=<group-id> -DartifactId=<artifact-id>

Installing a (non-redistributable) JAR in your local repository:

mvn install:install-file -Dfile=<path-to-file> -DgroupId=<group-id> -DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=<packaging> -DgeneratePom=true

For instance (Java Mail):

mvn install:install-file -Dfile=mail.jar -DgroupId=javax.mail -DartifactId=mail -Dversion=1.3.2 -Dpackaging=jar  -DgeneratePom=true
Labels
  • None