Migrating OAW 4.3.1 to Eclipse Galileo
We recently decided to migrate our eclipse environment as soon as possible to Galileo. This implied that we had to migrate our openarchitectureware projects as well.
We are using OAW since 2006 in many projects. Most of them are still running and we moved them periodically to current OAW releases. So the task for today was to migrate OAW 4.3.1 to the Galileo release.
The migration was not really painful, but I had to collect hints from several sources and it took me some time, to get running workflows again.
Therefor I decided to write down once the neccessary migration steps.
Relationship between OAW modules and Galileo
It is not easy to find understandable facts about the current relation between openarchitectureware and eclipse, but it seems that Xpand, XTend, XText, Check and the Workflow engine became part of the eclipse modeling tools (EMT) project.
I haven’t fully understood whether there are still modules of openarchitectureware left that are not part of eclipse, but the major subprojects seems to have been moved.
The second remarkable aspect of the new version is that XText seems to be now the primus inter pares. Most current writings from oaws folks concentrate on XText, while the other technologies are left out and find notion only when their relationship to XText is discussed.
Galileo distribution
I installed Galileo with the distribution from Itemis
http://oaw.itemis.de/openarchitectureware/language=de/660/downloads
which includes all necessary OAW packages.
Migration
1. Package names did change
Since Xpand, XTend XText and Check became part of the eclipse framework they got new package names.
In general you can simply change “org.openarchitextureware” to “org.eclipse” and you are done. In addition I found the following exceptions:
org.openarchitectureware.type.emf.EmfMetaModel moved to org.eclipse.xtend.typesystem.emf.EmfMetaModel
org.eclipse.xsd.XMLBeautifier moved to org.eclipse.xtend.typesystem.xsd.XMLBeautifier
org.openarchitectureware.util.stdlib.ExtIssueReporter moved to org.eclipse.xtend.util.stdlib.ExtIssueReporter
I changed the package names in custom java classes and in all workflow and XTend files.
2. Adding dependencies
The quiet comfortable bundle with all oaw 4.3.1 relevant dependencies has not been updated for the new version. At least, I can not find it.
In my old Manifest.mf the “Require Bundle”-Section looked like this
Require-Bundle: ‘org.openarchitectureware.dependencies;bundle-version=“4.3.1
while the new one looks like this:
Require-Bundle: org.eclipse.xtend;bundle-version=“0.7.0“,
org.eclipse.xtend.check.ui;bundle-version=“0.7.0“,
org.eclipse.xtend.shared.ui;bundle-version=“0.7.0“,
org.eclipse.xtend.source;bundle-version=“0.7.0“,
org.eclipse.xtend.typesystem.emf;bundle-version=“0.7.0“,
org.eclipse.xtend.typesystem.emf.ui;bundle-version=“0.7.0“,
org.eclipse.xtend.typesystem.uml2;bundle-version=“0.7.0“,
org.eclipse.xtend.typesystem.uml2.source;bundle-version=“0.7.0“,
org.eclipse.xtend.typesystem.uml2.ui;bundle-version=“0.7.0“,
org.eclipse.xtend.typesystem.xsd;bundle-version=“0.7.0“,
org.eclipse.xtend.typesystem.xsd.source;bundle-version=“0.7.0“,
org.eclipse.xtend.typesystem.xsd.ui;bundle-version=“0.7.0“,
org.eclipse.xtend.ui;bundle-version=“0.7.0“,
org.eclipse.xtend.ui.source;bundle-version=“0.7.0“,
org.eclipse.xtend.util.stdlib;bundle-version=“0.7.0“,
org.eclipse.xtext;bundle-version=“0.7.0“,
org.eclipse.xtext.activities;bundle-version=“0.7.0“,
org.eclipse.xtext.bootstrap;bundle-version=“0.7.0“,
org.eclipse.xtext.doc;bundle-version=“0.7.0“,
org.eclipse.xtext.example.domainmodel;bundle-version=“0.7.0“,
org.eclipse.xtext.example.domainmodel.ui;bundle-version=“0.7.0“,
org.eclipse.xtext.example.ecoredsl;bundle-version=“0.7.0“,
org.eclipse.xtext.example.ecoredsl.ui;bundle-version=“0.7.0“,
org.eclipse.xtext.example.fowlerdsl;bundle-version=“0.7.0“,
org.eclipse.xtext.example.fowlerdsl.ui;bundle-version=“0.7.0“,
org.eclipse.xtext.examples.source;bundle-version=“0.7.0“,
org.eclipse.xtext.generator;bundle-version=“0.7.0“,
org.eclipse.xtext.log4j;bundle-version=“1.2.15“,
org.eclipse.xtext.logging;bundle-version=“0.7.0“,
org.eclipse.xtext.reference;bundle-version=“0.7.0“,
org.eclipse.xtext.reference.ui;bundle-version=“0.7.0“,
org.eclipse.xtext.runtime.source;bundle-version=“0.7.0“,
org.eclipse.xtext.sdk.source;bundle-version=“0.7.0“,
org.eclipse.xtext.ui.common;bundle-version=“0.7.0“,
org.eclipse.xtext.ui.core;bundle-version=“0.7.0“,
org.eclipse.xtext.ui.source;bundle-version=“0.7.0“,
org.eclipse.xtext.util;bundle-version=“0.7.0“,
org.eclipse.xtext.xtend;bundle-version=“0.7.0“,
org.eclipse.xtext.xtext.ui;bundle-version=“0.7.0“,
org.eclipse.jdt.core;bundle-version=“3.5.0“,
org.eclipse.emf;bundle-version=“2.5.0“,
org.eclipse.emf.ecore.xmi;bundle-version=“2.5.0“,
org.eclipse.emf.mwe.core;bundle-version=“0.7.0“,
org.eclipse.emf.mwe.utils;bundle-version=“0.7.0“,
com.ibm.icu;bundle-version=“4.0.1“
I’m quite sure, that I do not really need all of them, but at least our projects work with that setup
3. Workflow files
The Workflow files are now called “MWE workflow” since they are part of the eclipse modeling workflow engine.
Sometimes I had issues when executing the workflow with Java 1.5. The workflow execution stops silently in the middle of the process. I did not find out what triggers theese issues, but they went away when running the workflow with Java 1.6
3.1 XmiReader is gone
XmiReader, which we did use to import our models, is gone and you have to use “org.eclipse.emf.mwe.utils.Reader”.
This class works the same way as XmiReader, but some property names did change.
The properties, that are relevant for us are “modelFile” which is now “uri” and “outputSlot” which is now “modelSlot”.
So the new model parser component looks like this
<component id=“xmiParser“ class=“org.eclipse.emf.mwe.utils.Reader“>
<uri value=“${dbmodel.modelFile}“/>
<modelSlot value=“model“/>
<!–<modelFile value=“${dbmodel.modelFile}“/>
<metaModelPackage value=“${dbmodel.metamodel.package}“/>
<outputSlot value=“model“/>–><firstElementOnly value=“true“/>
</component>
3.2 XMLBeautifier has moved
We used “org.eclipse.xsd.XMLBeautifier” but this one has moved to “org.eclipse.xtend.typesystem.xsd.XMLBeautifier”
So our new beautifier configuration looks like this
<!–<beautifier class=“org.eclipse.xsd.XMLBeautifier“ fileExtensions=“.xml, .html“ />–>
<beautifier class=“org.eclipse.xtend.typesystem.xsd.XMLBeautifier“>
<maxLineWidth value=“120“ />
<formatComments value=“true“ />
<fileExtensions value=“.xml, .html“ />
</beautifier>
3.3 Change package names
all remaining occurrences of “org.openarchitectureware” in the workflow files were changed to “org.eclipse”
3.4 Configuring the metamodel
While I was working on the workflow files, I decided to change the way the metamodels are configured. We now use a bean at the beginning of the workflow file and reference that bean in the latter components. The availability of beans is not new to the galileo-version of OWA (at least as far as I know ) but I document the change here for completeness:
<bean id=“mm“ class=“org.eclipse.xtend.typesystem.emf.EmfMetaModel“>
<metaModelPackage value=“${dbmodel.metamodel.package}“/>
</bean><component
…
<metaModel idRef=“mm“/>
…
</component>
3.5. Including com.ibm.icu
The class “org.eclipse.internal.xtend.util.StringHelper” needed com.ibm.icu. You have to add this dependency to the required bundles.
That’s it. After doing theese changes, our workflows were executing like before.
Debugging the workflow
I never debugged a workflow before, but i turned out to be really simple. Just set a breakpoint in “org.eclipse.emf.mwe.core.WorkflowRunner.executeWorkflow(Map<?, ?>, Issues)” and use “debug as…” on the workflow file instead of “run as…”
At last some useful links:
- The workflow description in eclipse wiki. MWE indicates that it is about the new version. 4.3 may indicate that it is not really up to date. I’m confused :)
- XPand/Xtend/Check – Documentation is now part of eclipse: http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.xpand.doc/help/index.html
- XText project lead Sven Efftinge about XText and Galileo (German)
geschrieben am 05.07.2009 um 20:07 in Netzgedanken von cf · RSS 2.0 feed.
Pings setzen ist zur Zeit nicht erlaubt.