OpenArbor Maintenance Upgrade to Luna
Downloading Required Products
Download the new version of Eclipse and all the new products/plugins to put together a development environment that will allow for a successful build of the OpenArbor plugins. For OpenArbor development, the following products/plugins are required:
- Eclipse
- Java JDK and JRE
- SWTBot
- CDT
- Eclipse TM Project
- Subclipse
- Maven
- Apache Commons Net
At the time of the writing of this wiki page, we are migrating from Eclipse 3.7 (Indigo) to Eclipse 4.4 (Luna) DDCI_PCR:3005. All of the information recorded here is from that work. But, it should provide good information for future migrations to later versions of Eclipse when they are available.
After transitioning to Luna, several tests were failing in trying to select from a context menu (see DDCI_PCR:3039. SWTBot released a bug fix in v2.2.2, which did allow some of the failing tests to pass.
| Product | Product Website | Eclipse Update Site | Product Version | Downloaded Filename | Comments |
|---|---|---|---|---|---|
| Eclipse for RCP and RAP Developers | www.eclipse.org | n/a | 4.4 (Luna) Windows 32 Bit | eclipse-rcp-luna-R-win32.zip | |
| Apache Commons Net | http://commons.apache.org/proper/commons-net/ | http://commons.apache.org/proper/commons-net/download_net.cgi | 3.3 | commons-net-3.3-bin.zip | Copy "commons-net-3.3.jar" and "commons-net-3.3-sources.jar" from the zip file to the Eclipse Luna plugin dir |
| Java 8 JDK | http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html | n/a | 8 | jdk-8u20-windows-i586.exe | The OA Makefile requires this to be in a zip file. Convert to zip |
| Java 8 JRE | http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html | n/a | 8 | jre-8u20-windows-i586.tar.gz | The OA Makefile requires this to be in a zip file. Convert to zip |
| Maven | http://maven.apache.org/ | n/a | 3.2.3 | aparch-maven-3.2.3-bin.zip | |
| CDT 8.4.0 for Eclipse Luna | http://www.eclipse.org/cdt/ | http://download.eclipse.org/tools/cdt/releases/8.4 | 8.4.0 | ||
| SWTBot | http://eclipse.org/swtbot/ | http://download.eclipse.org/technology/swtbot/releases/latest/ (2.2.1) | 2.2.2 | repository.zip | I renamed this zip file to swtbot2.2.2.zip |
| Eclipse TM Project | https://projects.eclipse.org/projects/tools.tm | http://download.eclipse.org/tm/updates/3.5/ | |||
| Subclipse | http://marketplace.eclipse.org/content/subclipse#.VBn8EhZWIjw | http://subclipse.tigris.org/update_1.10.x | 1.10.5 |
CDT Installation Choices
Creating Java JDK and JRE Zip Files
The OpenArbor Makefile requires that the JDK and JRE be in a zip file format. To convert what is downloaded from Oracle to the required zip file for OpenArbor's Makefile, do the following:
Java JDK
- Run the Java JDK installer executable that was downloaded (jdk-8u20-windows-i586.exe)
- Using 7zip, zip up the resulting installation at : C:\Program Files (x86)\Java\jdk1.8.0_20
- Name the resulting zip file: jdk-1.8-win32.win32.x86.zip
Java JRE
- Using 7zip, unzip the jre-8u20-windows-i586.tar.gz file to some temporary location
- Using 7zip, unzip the jre-8u20-windows-i586.tar file to some temporary location
- Using 7zip, zip up the contents of the jre1.8.0_20 folder
- Name the resulting zip file: jre-1.8-win32.win32.x86.zip
Clean up any temporary files/folders. It is not required that the Java JDK or JRE be installed on your system.
Install Eclipse and Add 3rd Party Plugins
To build the OpenArbor plugins, the Eclipse development environment must have all the required products/plugins it uses. The Eclipse for RCP and RAP Developers comes with most needed plugins, but not all.
- Create a directory for the new Eclipse (ie. C:\EclipseLuna)
- Using 7zip, extract the files from the eclipse-rcp-luna-R-win32.zip file to this directory.
- Create a desktop shortcut, called "OA Dev Luna" to C:\EclipseLuna\eclipse\eclipse.exe
- make a folder "jre" in the C:\EclipseLuna\eclipse directory
- extract the contents of jre-1.8-win32.win32.x86.zip to the jre directory created above
- Checkout a development branch of the OpenArbor workspace (ie. mainline)
mkdir -p /cygdrive/c/ddci_eclipse4 svn co https://deos.ddci.com/svn/DDCI/products/openarbor/openarbor/branches/mainline /cygdrive/c/ddci_eclipse4/branches/mainline
- Open EclipseLuna on the ddci_eclipse4/branches/mainline/workspace
- Use the "Help | Install New Software" Install dialog to install CDT, SWTBot, Subclipse and the Eclipse TM plugins. Use the Table to cut/paste update sites to the dialog for each product.
- Restart Eclipse as required.
- Import the existing OpenArbor project into the workspace
Development Environment Setup
- Define workpace preferences:
- Set Plugin Development -> API Baselines -> Missing API Baseline to Warning
- Java->Compiler->Errors/Warnings
- Potential Programming Problems->Serializable class without serialVersionUID: Ignore
- Unnecessary Code
- Value of parameter is not used: Warning
- Null analysis
- Redundant null check: Warning
- Annotations->Missing '@Override' annotation: Warning
- Java->Code Style->Formatter->Import...
- Check out (Preferences|Java|Editor|Save Actions) and enable it.
- Set the workspace to refresh automatically, and configure format source/organize imports to run on save
- Settings > General > Workspace > Refresh On Access (aka Lightweight Refresh).
- Check out
Preferences|Java|Editor|Save Actionsand enable it. - Fix auto-props for both environments.
- In your desk maintainer environment,
./etc/subversion/, edit the config file and change the line that saysenable-auto-props = notoenable-auto-props = yes. - In Eclipse, go to
Preferences|Team|SVNand change the configuration location at the bottom to point to the./etc/subversion/location of your maintainer environment.
- In your desk maintainer environment,
- Configure any other preferences you want, then export them (see #Making preferences apply to all workspaces below).
- You might want to add -clean to eclipse.ini as well, since Eclipse tends to corrupt itself.
- Add a JDK. It goes in the jre folder in the eclipse directory. This improves portability. Unzip the JDK zip file into the JRE folder.
- If you're making this for everyone:
- Delete the workspace history. This is in two places.
- In configuration/config.ini, delete the line for osgi.instance.area.default. This is the last used workspace that Eclipse suggests when it prompts for a workspace.
- In configuration/.settings/org.eclipse.ui.ide.prefs, delete the line for RECENT_WORKSPACES. This is the full workspace history.
- Zip it all up and stick it on \\nx3000\OpenArbor\Downloads
- Delete the workspace history. This is in two places.
Create two launch configurations
- Create six variables
- Window | Preferences | Run/Debug | String Substitutions
- Add "oaTestHarnessWorkspace", the location of all test harness data, e.g. "C:\oaTestHarness\workspace"
- Add "ddsName", the name of the dds you are using
- Add "ddsConfigName", the name of the dds configuration you are using
- Add "deosInstallDir", e.g. "${oaTestHarnessWorkspace}\DDS-list\${ddsName}"
- Add "testSystemInvocation", the arguments the test system needs to run, e.g. "--installationRoot ${deosInstallDir} --branchRoot ${oaTestHarnessWorkspace}/branches/mainline --enableDebugLog --buildLog C:\TEMP\BuildLog.txt --mldCommandQueueLogger C:\TEMP\MldCommandQueueLog.txt"
- You may want to change the branchRoot, for example when you are working on a release branch, or to use your development checkout instead
- Add "testWorkspacePrefix", where the workspaces will be located, e.g. "${oaTestHarnessWorkspace}\ddses\${ddsName}"
- In Windows, you should have a global environment variable pointing to your all products license file, named "DDCIFLEX_LICENSE_FILE", e.g. "C:\oaTestHarness\workspace\ddses\<ddsName>\License.lic"
- Run->Debug Configurations...->Eclipse Application
- Name it DDS <product> Dev Launch
- Main Tab
- Workspace Data: Location
- Use variables defined above to define workspace location - ${testWorkspacePrefix}\${ddsConfigName}\workspace
- Program to Run->Run a product: com.ddci.openarbor.application.product
- Workspace Data: Location
- Plugins Tab
- Select the appropriate plugins for the product being tested!
- Make sure that the activated plugins match the DDC-I features you have installed
- Don't forget that the CDT plugins need to be activated as well
- Environment Tab
- Create two environment variables
- Name: DDCIINSTALLLOC
- Value: ${deosInstallDir}
- Name: DDCIFLEX_LICENSE_FILE
- Value: ${testWorkspacePrefix}\license.lic
- Create two environment variables
- Run->Debug Configurations...->SWTBot Launch
- Name it DDS <product> Test Launch
- Test Tab
- Change Test Runner: to JUnit4 <-- Important to do this first!
- Run a Single Test
- Project: com.ddci.openarbortests
- Test Class: com.ddci.openarbortests.Launcher
- Main Tab
- Workspace Data: Location
- Use variables defined above to define workspace location - ${testWorkspacePrefix}\${ddsConfigName}\workspace
- Uncheck the "Clear" button!
- Program to Run->Run a product: com.ddci.openarbor.application.product
- Workspace Data: Location
- Arguments Tab
- Add ${testSystemInvocation} at the end of the arguments
- Plugins Tab
- Select the appropriate plugins for the product being tested!
- Make sure that the activated plugins match the DDC-I features you have installed
- Don't forget that the CDT plugins need to be activated as well
- There is an additional gotcha here involving the run/debug context menu. If you get "Failed to find menuitem &1 Debug Deos Executable in path &Debug As->&1 Debug Deos Executable" while testing you can solve it by: (1) enable all the plugins, then (2) deselect all the jpt, jst, and wst plugins, then (3) click add required.
- Environment Tab
- Create two environment variables
- Name: DDCIINSTALLLOC
- Value: ${deosInstallDir}
- Name: DDCIFLEX_LICENSE_FILE
- Value: ${testWorkspacePrefix}\license.lic
- Create two environment variables
- Export these launch configurations via File->Export... and put them in eclipse/launches if you are making a devkit.
- C:\Eclipse\Luna\eclipse\configuration\.settings\org.eclipse.ui.ide.prefs (has list of recent workspaces)
- replace prefs.ini from previous dev kit
- To make the devkit, close Eclipse and zip up Eclipse installation.
- Put new devkit here: \\nx3000\openarbor\oadevkit_luna.zip
Making preferences apply to all workspaces
- Configure all your preferences the way you want them.
- Export all preferences to an epf file.
- Hack the resulting epf to remove the /instance/ prefix from all the property names.
- But wait, Eclipse won't export everything. You may have to go digging in
$workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/ <filename>.prefsfor the bits in the .prefs files that you need. It's the same syntax, so just bodge them into export from above. - Rename the epf to whatever.ini and put it into your eclipse directory.
- Edit your eclipse.ini so that the -pluginCustomization parameter points to your new ini file.
At this point there will likely be build errors that you will need to figure out how to resolve. Once all the build errors are resolved and you can successfully launch a new OpenArbor from a self-hosted new Eclipse, you are ready to move on to build the plugins "headless"ly using the Makefile to produce a release.
Build Resources
To successfully build OpenArbor, the following files must exist in the BuildResources directory (\\nx3000\openarbor\Downloads\BuildResources) used by the Makefile. A brief description of each file is in the table below, and more details about these files follow later in this document.
| Filename | Description |
|---|---|
| apache-maven-n.n.n-bin.zip | Maven is the eclipse build mechanism |
| checkout_10_1_3_Feature.exe checkout_10_8_Feature.exe checkout_11_9_1_Feature.exe lmborrow.exe |
These are executables that are required for license borrowing. The are generated by a separate process, described here: Flexnet_License_Vendor_Daemon_Development |
| jdk-1.8-win32.win32.x86.zip jre-1.8-win32.win32.x86.zip |
Java zip files. |
| maven_tmp.zip maven-repo-swtbot2.2.1.zip |
Maven repository (a.k.a. maven repo) |
The BuildResources directory has a lot more file in it than what is described above you say? You are right. All of the "other" files are remnants that are required by previous versions of OpenArbor. So, they are left here for good reason. If we ever need to go back to build a previous version of OpenArbor, all the required build resources files are here waiting.
