Build from Source

Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version. Compare with Current  |   View Page History
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 4.2-SNAPSHOT)

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 Subversion and set SVN_HOME accordingly.
  2. Add $JAVA_HOME/bin, $MAVEN_HOME/bin and $SVN_HOME/bin to your PATH. (Windows:  %JAVA_HOME%\bin, %MAVEN_HOME%\bin and %SVN_HOME%\bin)
  3. Checkout Ceres source code using Subversion:
    Type svn co https://www.brockmann-consult.de/svn/os/ceres/trunk $MY_PROJECTS/ceres-0.x
  4. Cd into $MY_PROJECTS/ceres-0.x
  5. Build Ceres from source and install in local Maven repository: Type mvn install
  6. Checkout BEAM source code using Subversion:
    Type svn co https://www.brockmann-consult.de/svn/os/beam-4.x/trunk $MY_PROJECTS/beam-4.x
  7. Cd into $MY_PROJECTS/beam-4.x
  8. Build BEAM from source and install in local Maven repository: Type mvn install
  9. Copy $MY_PROJECTS/beam-4.x/src/main/config/beam.config to $MY_PROJECTS/beam-4.x/config/## Set beam.home = .## Set beam.app = VisatMain
    1. Set beam.logLevel = ALL
    2. Set beam.debug = true
    3. Set beam.splash.image = ./src/main/bin/common/splash.png
  10. Open project in the your IDE. IntelliJ IDEA users:
    1. Build IDEA project files for BEAM: Type mvn idea:idea
    2. In IDEA, go to the IDEA Main Menu/File/Open Project and simply open the created project file $MY_PROJECTS/beam-4.x/beam.ipr
  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_REPO classpath 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-4.x
    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-4.x
    • Use classpath of module (project in Eclipse): beam-bootstrap

Build BEAM 4.1 Bug-fixing Branch

Same as above, but

  1. Use local project directories $MY_PROJECTS/ceres-0.6.x and $MY_PROJECTS/beam-4.1.x
  2. Use svn co https://www.brockmann-consult.de/svn/os/ceres/branches/0.6.x $MY_PROJECTS/ceres-0.6.x
  3. Use svn co https://www.brockmann-consult.de/svn/os/beam-4.x/branches/4.1.x $MY_PROJECTS/beam-4.1.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
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.