| 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, |
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.
- Download and install build tools
- Install J2SE 1.6 and set
JAVA_HOMEaccordingly. - Install Maven and set
MAVEN_HOMEaccordingly. - Install Git.
- On Windows we recommend the msysGit package.
- Follow the instructions provided at github
- Make sure Git is configured correctly: type
git config -lat your console; the valuecore.autocrlfhas to be set toinput - If it is not, open
$GIT_HOME/etc/gitconfigand setcore.autocrlftoinput
- Install J2SE 1.6 and set
- Add
$JAVA_HOME/binand$MAVEN_HOME/binto yourPATH. (Windows:%JAVA_HOME%\binand %MAVEN_HOME%\bin - Checkout Ceres source code using git:
rungit clone git://github.com/bcdev/ceres.giton the command-line in the directory$MY_PROJECTS. A sub-directorycereswill be created. - Cd into
$MY_PROJECTS/ceres - Build Ceres from source and install in local Maven repository: Type
mvn install - Checkout BEAM source code using git:
Typegit clone git://github.com/bcdev/beam.gitin the directory$MY_PROJECTS. - Cd into
$MY_PROJECTS/beam - Build BEAM from source and install in local Maven repository: Type
mvn install - Copy file
$MY_PROJECTS/beam/src/main/config/beam.configto directory$MY_PROJECTS/beam/config/- Set
beam.home = . - Set
beam.app = VisatMain - Set
beam.logLevel = ALL - Set
beam.debug = true - Set
beam.splash.image = ./src/main/bin/common/splash.png
- Set
- Open project in the your IDE. IntelliJ IDEA users:
- In IDEA, go to IDEA Main Menu/File/Import Project
- Choose
$MY_PROJECTS/beam; click OK - Choose Import project from external model and Maven; click next
- Specify
$MY_PROJECTS/beamas root directory; click next - choose org.esa.beam:beam-parent:1; click next
- Set BEAM as project name; click next
- Finish
- Open project in the your IDE. Eclipse users:
- Build Eclipse project files for BEAM: Type
mvn eclipse:eclipse - Delete the created
.projectfile in the main project folder. - Make sure that
M2_REPOclasspath variable is set:- Open Window/Preferences..., then select Java/Build Path/Classpath Variables
- Select New... and add variable
M2_REPO - 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
- Click Main Menu/File/Import
- Select General/Existing Project into Workspace
- Select Root Directory
$MY_PROJECTS/beam - Click Finish
- Build Eclipse project files for BEAM: Type
- 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
- Main class:
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