Using Eclipse for building block development

Blog Post created by on Dec 24, 2015

This how-to article is useful for first-timers who want to set up Eclipse for Learn building blocks development

Setting up Eclipse (step-by-step)


1. Install the latest "Java EE" Eclipse, e.g. "Luna"
2. Blackboard SDK
Get the SDK (libraries for a Dynamic Web Project) JAR libraries by downloading the installer jar file from Behind the Blackboard, unzipping it, and selecting the ___/payload/systemlib or ___/blackboard/apps/tomcat/lib directories (more info:
• bb-cms-admin.jar
• bb-platform.jar
• bb-taglibs.jar
• server-api.jar
• b2deploy-task-1.1.jar (this is used along with the Starting B2, it can be downloaded from
3. Set- up the Starting building block
The Starting Block v.1.6.1093795 is already installed and configured in the Learn "bbdev" Box. It allows you to deploy your Building Block remotely.First, you have to add a line to the Vagrantfile: :forwarded_port, guest: 8080, host: 9876.Then apply a configuration change in the file of the running instance: bbconfig.frontend.protocol=httpIn Eclipse you have to update to your "build.gradle" file: deployServer = "localhost:9876"
4. How to use the Starting Block
The Starting Block is invoked directly via URL.Access help screen: http://<server>/webapps/bb-starting-block-BBLEARN/execute/help
To perform a Building Block install: http://<server>/webapps/bb-starting-block-bb_bb60/execute/install?fileName=d:/<my-bblock-name>.war&clean=true&available=trueTo test if your Starter building block is working try to access an already installed war under the bb filesystem: <domain>/webapps/bb-starting-block-BBLEARN/execute/install?fileName=/usr/local/blackboard/system/autoinstall/basic.learning/allavailable/assessment.war
5. Add the "WebTools" and "Mylyn" plugins for Eclipse

6. Add the "Blackboard" plugin for Eclipse

List installed plugins: Help > About Eclipse Platform > From this dialog, click Plug-in Details- (plugin 1.0.16)
7. How to create a building block project using the Blackboard plugin
Create your First Project in Eclipse: File > New > Project > Select "Dynamic Web Project" or "Blackboard Project"Properties > Java Build Path > Add External JAR > Add manually the 3 "bb" JAR of the SDKArchive > Export > WAR file (notes: use in Eclipse the "JavaEE" view and if you do not see the "Outline" and "Console" mini-tabs, click on: Window > Show View > "Outline" and "Console").
8. How to use the Starting Block to deploy a Project
Double click on build.xml file > "package-war" and "deploy-b2" will appear
In the Outline view -> click deploy-b2 right click > Run As - "1 Ant Build"
-> In the console mini-tab: Your Building Block project will deploy itself automatically to your development server
-> If the Starting B2 does not upload the war, just upload it manually in the GUI.


ANT Deploy script

- Deploy script: the April release VM defaults to SSL, however, the deploy script uses http, so there is a manual set up process to get it ready for using with the Starting Block
  1. download latest binaries file of ant form
  2. Unzip and place your workstation
  3. Create a new environment variable called ANT_HOME = E:\apache-ant-1.8.2
  4. Add E:\apache-ant-1.8.2\bin in PATH in environment variable
  5. check on cmd ant -version

Importing WAR files

  1. Select File > Import .
  2. In the Import dialog, select WAR file and then click Next.
  3. Locate the WAR file that you want to import using the Browse button.
  4. The wizard assumes you want to create a new Web project with the same name as the WAR file. If you accept this choice, the project will be created with the same servlet version as specified by the WAR file and in the same location. If you want to override these settings, you can click New and specify your new settings in the Dynamic Web Project wizard.
  5. Click Finish to populate the Web project.

Archiving your Project

In Eclipse:
1. File > Export
2. Select the General > Archive File export wizard.
3. Select the project(s) to be exported.
4. Choose the archive file type (ZIP or TAR), and other options.
5. Enter the archive file name
6. Click Finish.
This gives you an archive file containing the project complete with the Eclipse project metadata, settings, etc.
(You can deselect any bits you don't want at this stage, or when you Import the project into the target Eclipse workspace.)

Recommended articles


More articles

- (URL)