OpenArbor Maintenance Upgrade to 2020-12-R
Introduction
For development of OpenArbor, developers need an Eclipse environment that contains all the third-party plugins, as well as the preferences and launch configurations to build and launch the OA plugins properly. To that end, we've come up with a "DevKit". Once created, it can be given to an OA developer. To make a new DevKit, start here: Make the DevKit
For the deployment of OpenArbor to be included in a DDS, we use the third-party tool "maven" to build the 32bit and 64bit Eclipse RCPs (branded with OpenArbor) and the OA plugins. The workspace/Makefile handles this. To prepare the build resources required for the deployment of OA, see the information here: Building OA for Customer Delivery
Make the DevKit
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
- Eclipse E4
- Apache Commons Net
- Subclipse
- Maven
At the time of the writing of this wiki page, we are migrating from Eclipse 2019-12-R to Eclipse 2020-12-R DDCI_PCR:4126. 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. The downloaded items listed below are stored here: \\nx3000\openarbor\Downloads\Eclipse\2020-12-R
Important Note
Eclipse 2020-12-R ships with a new plugin for XML called Wild Web Developer. (https://projects.eclipse.org/proposals/eclipse-wild-web-developer)
In our RCP, we use the Eclipse Web Tools Platform for our XML support, and these two do not work together. (https://github.com/eclipse/wildwebdeveloper/issues/557). So, to solve this problem we've removed the new Wild Web Developer plugin from our RCP, and will continue to use the Web Tools platform.
To remove it, the plugin 'org.eclipse.wildwebdeveloper.xml_0.10.0.202011132012.jar' is removed from the installed Eclipse plugin directory prior to making the Dev Kit, and removed from the maven repo.
| Product | Product Website | Eclipse Update Site | Product Version | Downloaded Filename | Comments |
|---|---|---|---|---|---|
| Eclipse for RCP and RAP Developers | www.eclipse.org | https://download.eclipse.org/eclipse/updates/4.18/ | 2019-R-12 | eclipse-rcp-2020-12-R-win32-x86_64.zip eclipse-rcp-2020-12-R-linux-gtk-x86_64.tar.gz eclipse-rcp-2020-12-R-macosx-cocoa-x86_64.dmg |
Windows,Linux and Cocoa versions are stored at \\nx3000\openarbor\Downloads\Eclipse\2020-12-R\Eclipse for RCP and RAP Developers |
| Java 11 JDK | https://www.oracle.com/java/technologies/javase-jdk11-downloads.html | n/a | 11 | jdk-11.0.9_windows-x64_bin.zip jdk-11.0.9_linux-x64_bin.tar.gz |
The OA Makefile requires these to be in a zip file. Convert to zip The files are store here: \\nx3000\openarbor\Downloads\Eclipse\2019-12-R\Java\JDK |
| Java 11 JRE | https://www.oracle.com/java/technologies/javase/jdk-11-relnote.html | n/a | |||
| Maven | http://maven.apache.org/ | n/a | 3.6.3 | apache-maven-3.6.3-bin.zip apache-maven-3.6.3-bin.tar.gz |
Copy this file to the BuildResources directory. It is the maven tool installation (mvn) used by our Makefile to build the RCPs and plugins. The files are store here: \\nx3000\openarbor\Downloads\Eclipse\2019-12-R\Maven |
| CDT 10.1 for Eclipse 2020-R-12 | http://www.eclipse.org/cdt/ | http://download.eclipse.org/tools/cdt/releases/10.1 | 9.10.0 | eclipse-cpp-2020-12-R-win32-x86_64.zip eclipse-cpp-2020-12-R-linux-gtk-x86_64.tar.gz eclipse-cpp-2020-12-R-macosx-cocoa-x86_64.dmg |
The files are store here: \\nx3000\openarbor\Downloads\Eclipse\2020-12-R\CDT |
| SWTBot | http://eclipse.org/swtbot/ | https://download.eclipse.org/technology/swtbot/releases/3.0.0/ https://download.eclipse.org/technology/swtbot/releases/latest/ |
3.0.0 | repository.zip | I downloaded the zip, but used the update site to install |
| Apache Commons Net | http://commons.apache.org/proper/commons-net/ | http://commons.apache.org/proper/commons-net/download_net.cgi | 3.6 | commons-net-3.6-bin.zip | Copy "commons-net-3.6.jar" and "commons-net-3.6-sources.jar" from the zip file to the Eclipse 2019-R-12 plugin dir |
| Subclipse | http://marketplace.eclipse.org/content/subclipse | Subclipse Latest 4.3.x Release - https://dl.bintray.com/subclipse/releases/subclipse/4.3.x/ | 4.2 | This site has drag/drop button onto the workspace. We do not deliver this to customers. Only used by us for CM | |
| E4 | https://www.vogella.com/tutorials/EclipseRCP/article.html | https://download.eclipse.org/releases/2020-12/ | |||
| tycho | https://projects.eclipse.org/projects/technology.tycho | 1.3.0 | Used to update the top-level pom.xml file, and build-utils/generate_build_numbers.py |
Installation Choices
CDT Installation Choices
SWTBot Installation Choices
Subclipse Installation Choices
E4 Installation Choices
Creating Java JDK and JRE Zip/Tar Files
With the changes implemented for DDCI_PCR:3525, the dev kit is based on 64bit Eclipse, and the 64bit java compiler is used to build the plugins. Eclipse 2019-R-12+ no longer supports 32bit.
2020-12-R requires Java 11+ which no longer provides a JRE.
- JDK = Installed in C:\Eclipse\2020-12-R\windows\eclipse\jre (confusing, I know but the jdk is installed here for plugin development) Also used by mvn when building OpenArbor from the Makefile.
The OpenArbor Makefile requires that the JDK be in a zip file format. To convert what is downloaded from Oracle to the required zip (or tar) file for OpenArbor's Makefile, do the following:
Windows
Java JDK
64bit Java JDK:
- Run the Java JDK installer executable that was downloaded (jdk-11.0.9-windows-x64_bin.zip)
- Using 7zip, zip up the contents of the resulting installation at : C:\Program Files\Java\jdk11.0.9
- Name the resulting zip file: jdk-11.0.9-windows-x64_bin.zip
Clean up any temporary files/folders. It is not required that the Java JDK be installed on your system.
Linux
Java JDK
64bit Java JDK:
- Copy the Java JDK tar file that was downloaded (jdk-11.0.9_linux-x64_bin.tar.gz) to a location on the ubuntu vm (/home/lisa/JavaJDK)
- Using tar, extract the contents to /home/lisa/JavaJDK
- tar xvfz jdk-11.0.9_linux-x64_bin.tar.gz
- Using tar, compress the contents of the resulting installation at : /home/lisa/JavaJDK/jdk11.0.9
- Name the resulting zip file: jdk-11.0.9_linux-x64_bin.tar.gz
- cd /home/lisa/Java/jdk11.0.9
- tar cvzf jdk-11.0.9_linux-x64_bin.tar.gz *
Clean up any temporary files/folders. It is not required that the Java JDK be installed on your system.
Release Java for Distribution
With the changes implemented for DDCI_PCR:4107, the OpenArbor distribution is not longer providing the Java JDK or Flexnet files. The JDKs for release to customers is done by including them in the openarbor-product/jre package on our ftp server.
In deosftp:pub/openarbor-products/jre, create a versioned directory for the jdks (e.g. 11.0.9)
- ssh -l deosftp deos.ddci.com -p 47734
- cd /ftp/pub/openarbor-products/jre
- mkdir 11.0.9
- rm stable
- ln -s 11.0.9 stable
- exit
Copy the newly created jre zip/tar files to the jre package:
- rsync jdk-11.0.9_linux-x64.tar.gz deosftp:pub/openarbor-products/jre/11.0.9/
- rsync jdk-11.0.9-windows-x64_bin.zip deosftp:pub/openarbor-products/jre/11.0.9/
Flexnet Supporting Executables
Windows
See this wikiFlexnet_64_Bit_License_Vendor_Daemon_Development to build FLEXnet items for a DDS release.
Zip up the following files to flexnet-windows-<n>.0.zip:
- checkout_10_1_3_Feature.exe
- checkout_10_8_Feature.exe
- checkout_11_15_1_Feature.exe
- lmborrow.exe
Linux
See this wikiFlexnet_64_Bit_License_Vendor_Daemon_Development_(Ubuntu) to build FLEXnet items for a DDS release.
Tar up the following files to flexnet-linux-<n>.0.zip:
- checkout_11_15_1_Feature
- lmborrow (symbolic link to lmutil)
- lmutil
Release new Flexnet Supporting Executables for Distribution
With the changes implemented for DDCI_PCR:4107, the OpenArbor distribution is not longer providing the Java JRE or Flexnet files. The Flexnet content for release to customers is done by including them in the openarbor-product/flexnet package on our ftp server.
- Open a terminal and do the following
- ssh -l deosftp deos.ddci.com -p 47734
- ./disableBuild.sh lcj
- cd pub/openarbor-products/flexnet
In deosftp:pub/openarbor-products/flexnet, create a versioned directory for the flexnet zip files (e.g. 1.0)
- mkdir 1.0
- rm stable
- ln -s 1.0 stable
- Open a second terminal and to the following:
Copy the newly created flexnet zip files to the flexnet package:
- cd to the location of the zip file to be uploaded to the server
- rsync flexnet-windows-1.0.zip deosftp:pub/openarbor-products/flexnet/1.0/
- rsync flexnet-linux-1.0.zip deosftp:pub/openarbor-products/flexnet/1.0/
- ftp password is here: https://deos.ddci.com/scm/Deos/maintainer-tools/admin/passwords
- cd /ftp
- cd deos2cygwin
- ./deos2cygwin.py
- cd ..
- rm ~/deos2cygwin_build_failed
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
- Windows: C:\Eclipse\2019-R-12\
- Linux:Using mkdir (from an ubuntu vm terminal) sudo mkdir /Eclipse/2019-R-12
- Extract the files from the Eclipse RCP zip/tar
- Windows:Using 7zip, extract the files from the eclipse-rcp-2019-12-R-win32-x86_64.zip file to the C:\Eclipse\2019-R-12\ directory.
- Linux:Using tar (from an ubuntu vm terminal), extract the files from the eclipse-rcp-2019-12-R-linux-gtk-x86_64.tar.gz file to the /Eclipse/2019-R-12 directory.
- cd /Eclipse/2019-R-12
- tar xvfz eclipse-rcp-2019-12-R-linux-gtk-x86_64.tar.gz
- Create a desktop shortcut, called "OA Dev" to
- Windows: C:\Eclipse\2019-R-12\eclipse\eclipse.exe
- Target: C:\cygwin64\bin\run.exe /bin/python /desk/desk-environment.py C:\Eclipse\2019-R-12\windows\eclipse\eclipse.exe
- Start in: C:\Eclipse\2019-R-12\windows\eclipse
- Linux:/Eclipse/2019-R-12/eclipse
- TBD
- Windows: C:\Eclipse\2019-R-12\eclipse\eclipse.exe
- Create a JRE folder in 2019-R-12
- cd 2019-R12
- mkdir jre
- Extract the contents of JDK tar/zip to JRE dir
- Windows: Using 7zip extract the contents of jdk-1.8.0.241-win32.win32.x86_64.zip to the jre directory created above
- Linux: Using tar (from and ubuntu vm) extract the contents of jdk-1.8.0.241-linux.gtk.x86.tar.gz to the jre directory created above
- tar xvfz jdk-1.8.0.241-linux.gtk.x86.tar.gz
- Create a new milestone (i.e. 9.0.0) in the Bugzilla database. When upgrading eclipse, the major version for OA is increased. Use this milestone when creating the PCR for the feature branch in the next step.
- Create a feature branch of the OpenArbor workspace (ie. eclipse_r12)
- Open Eclipse 2020-12-R on C:\ddci_eclipse\workspace-windows-eclipse_r12 (or from ubuntu: /home/lisa/ddci_eclipse/workspace-linux-eclipse_r12)
- Check the Window | Preferences | Java | Installed JREs correctly points to the Eclipse jre directory created above.
- 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. Use the installation choices to properly install the third-party plugins.
- Restart Eclipse as required.
- Linux: When installing subclipse on Linux dev env, I ran into the problem "Failed to load JavaHL Library" documented here: https://myotragusbalearicus.wordpress.com/2011/11/25/subclipsesubversion-error-on-ubuntu-failed-to-load-javahl-library/
- To resolve the issue, I did the following:
- sudo apt-get install libsvn-java
- added to eclipse.in: -Djava.library.path=/usr/lib/x86_64-linux-gnu/jni (just after -vmargs)
- added to DDS Dev Launch Configuration | Arguments | vmargs -Djava.library.path=/usr/lib/x86_64-linux-gnu/jni
- Linux: When installing subclipse on Linux dev env, I ran into the problem "Failed to load JavaHL Library" documented here: https://myotragusbalearicus.wordpress.com/2011/11/25/subclipsesubversion-error-on-ubuntu-failed-to-load-javahl-library/
- Import the existing OpenArbor projects into the workspace
- Edit the .classpath file for the com.ddci.openarbor.application project to point to the new e4.ui.workbench jar provided by eclipse. Open the Plug-Registry view and find the org.eclipse.e4.ui.workbench, expand it to get the Location. In the com.ddci.openarbor.application project, right click on JRE System Library | Build Path | Configure Build Path to update the location.
- Open the Plug-ins view, select All, right-click "Add to Java Workspace Scope"
Development Environment Setup
- Linux only: create /home/<username>/oaTestHarness/workspace dir
- cd home
- mkdir oaTestHarness
- cd oaTestHarness
- mkdir workspace
- 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,
- If Eclipse repeatedly asks for your password, and won't save it, try changing the SVN Interface: to SVNKit
- Windows | Preferences | Version Control (Team) | SVN
- Maven->Errors/Warnings
- Set "Plugin execution not covered by lifecycle configuration" to Warning (or Ignore)
- 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.
- Delete the workspace history. This is in two places.
Create Launch Configurations
Windows
- Create seven variables
- Window | Preferences | Run/Debug | String Substitution
- Add "ddsName", the name of the dds you are using
- Add "oaTestHarnessWorkspace", the location of all test harness data, e.g. "C:\oaTestHarness\workspace"
- Add "ddsBranchName", the name of the svn branch being tested
- 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/${ddsBranchName} --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}"
- Add "deskRootLocation", the location of the desk maintainer env, e.g. "C:\cygwin64" (used by test harness dev launch)
- 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...->Eclipse Application
- Name it DDS <product> Launch Test Harness
- Main Tab
- Workspace Data: Location
- Use variables defined above to define workspace location - ${workspace_loc}/../runtime-New_configuration
- Program to Run->Run a product: com.ddci.dds.manager.product
- Workspace Data: Location
- Arguments Tab
- At the end of the arguments, add --deskRoot ${deskRootLocation} -clearPersistedState
- 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.
- Remove org.eclipse.pde.core/workspace_target_handle=local\:1581019407152.target This causes the Target Platform to "disappear"
- C:\Eclipse\2019-R-12\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\downloads\oadevkit_windows_2020-12-R.zip
Linux
- Create seven variables
- Window | Preferences | Run/Debug | String Substitution
- Add "username", the name of the user defined in the linux vm.
- Add "ddsName", the name of the dds you are using
- Add "oaTestHarnessWorkspace", the location of all test harness data, e.g. "/home/${username}/oaTestHarness/workspace"
- Add "ddsBranchName", the name of the svn branch being tested
- 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. "/"
- Add "testSystemInvocation", the arguments the test system needs to run, e.g. "--installationRoot ${deosInstallDir} --branchRoot ${oaTestHarnessWorkspace}/branches/${ddsBranchName}"
- 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}"
- Add "deskRootLocation", the location of the desk maintainer env, e.g. "C:\cygwin64" (used by test harness dev launch)
- [TBD] Will linux users have a global environment variable pointing to your all products license file, named "DDCIFLEX_LICENSE_FILE", e.g. "/home/lisa/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...->Eclipse Application
- Name it DDS <product> Launch Test Harness
- Main Tab
- Workspace Data: Location
- Use variables defined above to define workspace location - ${workspace_loc}/../runtime-New_configuration
- Program to Run->Run a product: com.ddci.dds.manager.product
- Workspace Data: Location
- Arguments Tab
- At the end of the arguments, add --deskRoot ${deskRootLocation} -clearPersistedState
- 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.
- Remove org.eclipse.pde.core/workspace_target_handle=local\:1581019407152.target This causes the Target Platform to "disappear"
- /Eclipse/2020-12-R/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 tar up Eclipse installation.
- cd /Eclipse
- sudo tar cvzf oadevkit_linux_2020-12_R.tar.gz 2020-12-R/
- Put new devkit here: \\nx3000\openarbor\downloads\oadevkit_linux_2020-12_R.tar.gz
- copy the dev kit to the shared drive: (vm -> laptop)
- sudo cp oadevkit_linux_2020-12_R.tar.gz /media/sf_C_DRIVE
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.
- Remove org.eclipse.pde.core/workspace_target_handle=local\:1581019407152.target <- This causes the default Target Platform to disappear.
- 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 oaDevPreferences.epf and put it into your eclipse directory.
- Edit your eclipse.ini so that the -pluginCustomization parameter points to your new .epf 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.
Deploying the DevKit
- Unzip the devkit file
- 64bit Windows: oadevkit_windows_2020-12-R.zip into C:\Eclipse
- 64bit Linux: oadevkit_linux_2020-12_R.tar.gz into /Eclipse
- or use the linux installer: apt-get install openarbormaintainertools
- Import the launch configurations
- Import the OA plugin workspace
- On Windows, create a new desktop shortcut for OADev
- On Windows, update the desktop shortcut, to setup env for gdb. Shortcut tab | Target: C:\cygwin64\bin\run.exe /bin/python /desk/desk-environment.py C:\Eclipse\2020-12-R\eclipse\eclipse.exe
- On Linux, open a terminal
- sudo bash -c "echo '$USER ALL = (ALL) NOPASSWD: ALL' >> /etc/sudoers" (allow the OA make install commands to update /OpenArbor/plugins or features dir without asking for a linux password
- cd /Eclipse/2020-12-R/eclipse
- /bin/python /desk/desk-environment.py ./eclipse
- sudo apt-get install rename maven xsltproc docbook-xsl xdotool subversion libsvn-java
Building OA for Customer Delivery
The workspace/Makefile has targets for building and deploying OA. For details about the available build commands, look here: OpenArbor_Build
The tycho/maven build uses the information in the workspace/com/ddci.openarbor.product/com.ddci.openarbor.product.product file and the pom.xml file
there to determine what Eclipse plugins to include in the RCPs.
The workspace/build directory contains the resulting deployable OA. The downloads directory contains what is copied from BuildResources and then maven is installed.
We use tycho (which uses maven) to build the OpenArbor branded Eclipse RCPs (32bit and 64bit), and the OpenArbor plugins.
| Make Command | Description |
|---|---|
| make clean | Removes the workspace/build directory. |
| make kindaclean | Leaves the workspace/build/downloads directory, but removes everything else from workspace/build |
| make MAVEN_OFFLINE="" | When the pom file(s) are updated to point to a new update site, running make with maven in online mode (MAVEN_OFFLINE="") will cause any new third-party plugins to be downloaded from the third-party tool's update site and be placed in the maven-repo/p2/osgi/bundle dir. |
| make mavenresolve | This will instruct maven to resolve the dependencies of any plugins in the product. |
- Make a new BuildResources directory in the branch: New Build Resources Directory
- update the Makefile, pom.xml, and generate_build_numbers.py, about.properties (see DDCI_PCR:3430 for details about changes needed)
- make mavenresolve
- make MAVEN_OFFLINE=""
This will force the download of components (see note below):
- In the maven-repo directory (ie workspace\build\downloads\maven-repo), and zip up everything except
com/and.timestamp. Name it appropriately (ie maven-repo-swtbotn.n.n.zip) and put it inhttps://deos.ddci.com/svn/DDCI/products/openarbor/BuildResources/<Eclipse Name (i.e. Eclipse_2019_12R)>. - Update the makefile with the new repo name, if necessary.
- In the maven tmp directory (ie workspace\build\downloads\tmp), and zip up the p2 directory. Name it appropriately (ie maven-tmp.zip) and put it in
https://deos.ddci.com/svn/DDCI/products/openarbor/BuildResources/<Eclipse Name (i.e. Eclipse_2019_12R)>.
Note: You will likely need to execute the Makefile using the -MAVEN_OFFLINE="" at least once to force the download of any new plugins etc. By default, the Makefile is set to only download from the local maven repository in the BuildResources directory.
Tycho documentation:
https://eclipse.org/tycho
http://www.vogella.com/tutorials/EclipseTycho/article.html
Eclipse Update sites:
https://wiki.eclipse.org/Eclipse_Project_Update_Sites
Build Resources
To successfully build OpenArbor, the following files must exist in the https://deos.ddci.com/svn/DDCI/products/openarbor/BuildResources/<Eclipse Name (i.e. Eclipse_2019_12R)>. directory 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 |
| jdk-11.0.9_windows-x64_bin.zip jdk-11.0.9_linux-x64.tar.gz |
Java zip files, used for compiling plugins and the JDKs are shipped with the RCPs |
| maven_tmp.zip maven-repo-swtbot3.0.0.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.
New Build Resources Directory
- svn co
https://deos.ddci.com/svn/DDCI/products/openarbor/BuildResources/ - mkdir Eclipse_2020_12_R
- put files listed in the above table into the directory
- svn add Eclipse_2020_12_R(and it's contents)
- check in the new directory using the upgrade PCR
Deploy New Build Resources Directory
Once the new BuildResources directory is ready for daily use for OA builds, update the BuildResources "externals" directory to point to the new BuildResources directory for the new Eclipse version.
- cd to
https://deos.ddci.com/svn/DDCI/products/openarbor/openarbor/branches/mainline/ - to see the existing externals definition: svn propget svn:externals BuildResources
- create t.t file containing: /svn/DDCI/products/openarbor/BuildResources/Eclipse_2020_12_R@head Eclipse_2020_12_R
- svn propset --file=t.t svn:externals BuildResources/
- svn up
- commit changes to propset using upgrade PCR
Note: If it's required to do OA builds against more than one Eclipse version, you can have a reference to more than one BuildResources directory by just specifying one per line
create t.t file containing:
/svn/DDCI/products/openarbor/BuildResources/Eclipse_2019_12R@head Eclipse_2019_12R
/svn/DDCI/products/openarbor/BuildResources/Eclipse_2020_12_R@head Eclipse_2020_12_R
Notes
Updating ALL the pom.xml files (and other files) for both the oaplugins and oatestharness should be done BEFORE making the maven-repo and maven tmp zip files.
Viewing the product file in an Eclipse development environment may display "errors" for the architecture specific files. DO NOT delete these files, they are needed for building the architecture specific RCP.
Building OA for Linux
From the ubuntu vm:
- make unreleased
This will copy the Linux RCP package to host laptop /home/lisa/cdrive/ddci_eclipse/linux_built_RCP. Running make unreleased on windows will package both the linux and windows RCP up to the ftp server. This is a work-around for the installer's requirement that both linux and window's RCP's be in the openarborEclipse_64 package.
Using Linux VM
This section is just some notes I've kept doing various things on a vm.
Running a docker image
- ./run-docker -it --tty --rm dds-docker-celestial-deos-jupiter-20210809
Installing on Ubuntu Virtual Machine (vm)
Run a postinstall script
- sudo /etc/postinstall/openarbor-install-plugins.sh
Run a preremove script
- sudo /etc/preremove/openarbor-uninstall-plugins.sh
Setup for licensing
- edit /home/lisa/.bashrc to add the following line
- DDCIFLEX_LICENSE_FILE=/home/lisa/all_prods.lic; export DDCIFLEX_LICENSE_FILE
Launch OpenArbor
- open a new terminal
- /desk/desk-environment.py bash -i
- /bin/python /desk/desk-environment.py /OpenArbor/OpenArbor
To list all packages:
- dpkg-query -l
To list a specific package:
- dpkg-query -l <package name>
- apt-cache search rtems
- apt search rtems
To install OA on the vm:
- sudo apt-get install openarboreclipse-64
- sudo apt-get install openarborcommon
To force OA to reinstall on the vm:
- sudo apt-get install --reinstall openarboreclipse-64
- sudo apt-get install --reinstall openarborcommon
Build Test Harness
Go to the test harness development location
- make directory C:\ddci_eclipse_test_harness_dev
- cd to the above directory and use svn to checkout a fresh copy of: https://deos.ddci.com/svn/DDCI/products/openarbor/utils/dds-manager/dds-manager-e4/
- svn co --username=<username> --password=<password> --no-auth-cache https://deos.ddci.com/svn/DDCI/products/openarbor/utils/dds-manager/dds-manager-e4/ dds-manager
Update the svn externals directory.
- The dds-manager directory has an svn:external property set. To see the existing externals definition: svn propget svn:externals dds-manager-e4
- create t.t file containing:/svn/DDCI/products/openarbor/BuildResources/Eclipse_2019_12R@head BuildResources/Eclipse_2019_12R
- svn propset --file=t.t svn:externals dds-manager-e4/
- cd dds-manager-e4
- svn up
- commit changes to propset using upgrade PCR
Update the test harness workspace files
- open the dds-manager-e4 directory as the "workspace"
- import existing projects into workspace (com.ddci.dds.manager is a project)
- import launch configurations from the C:\Eclipse\2020-12-R\launches dir
- review/fix any build errors and/or warnings.
- update BOTH pom.xml files for new tycho version, if applicable
- update AboutHandler.java to indicate the new Eclipse version
- edit the .product file (Add Required Plug-ins, Remove invalid ones)
- Update the Makefile to reference new BuildResources\Eclipse_12_R dir, new apache-maven zip, maven-repo, etc
- commit changes using upgrade PCR
- make MAVEN_OFFLINE=""
- ./oatestharness



