Xtext 2.0 / Xpand 1.1 plugins available as Maven artifacts

It’s now one week after release of Eclipse Indigo, and with that Xtext 2.0 and Xpand 1.1. For those who use Maven without Tycho to build projects using these frameworks it is of course necessary to have all related plugins available in some Maven repository.

With the help of the osgi-to-maven2 project I was now able with some tweaks to create the necessary POMs and deploy scripts for the plugins. What osgi-to-maven2 basically does is to analyze the plugin manifests and create POMs for them including dependencies. The project is not maintained at the moment and has a problem especially with the parsing of the plugins org.eclipse.ui.views and org.eclipse.ui.workbench, which have some strange directives in the Export-Package section where I could not find documentation about. The underlying manifest parser from Springsource (com.springsource.util.osgi) vomits when parsing those manifests, and also upgrading to the latest release does not help. Time to open a bug.


Export-Package: org.eclipse.ui;mandatory:="ui.workb
ench",org.eclipse.ui.about,org.eclipse.ui.actions;ui.workbench=split;
mandatory:="ui.workbench",org.eclipse.ui.activities,org.eclipse.ui.ap
plication,org.eclipse.ui.branding,org.eclipse.ui.browser;ui.workbench
=split
;mandatory:="ui.workbench",org.eclipse.ui.commands,org.eclipse.

Also the osgi-to-maven2 tool does not handle absent optional libraries so far.

The Xtext 2.0, Xpand 1.1 and dependent plugins are available at the Fornax Platform’s repository http://fornax-platform.org/nexus/content/groups/public/ under the groupId org.eclipse.plugins.

Based on the deployed plugins it should be possible to setup a plain Maven build for Xtext 2 based projects.

Advertisements

8 thoughts on “Xtext 2.0 / Xpand 1.1 plugins available as Maven artifacts

  1. Hi

    Thanks a lot for this post..

    Is there anyway you could share the pom.xml used for running for mwe2 workflow.

    I tried to come up with one and seem to be hitting dependency issues resolving artifacts from fornax-platform.org repo.

  2. Hi Karsten,

    the Fornax Repository is inconsistent by setup a new Maven module adding the the dependencies

    org.eclipse.xtext:org.eclipse.xtext:2.0.0
    org.eclipse.xtext:org.eclipse.xtext.ui:2.0.0

    failed dependencies

    org.eclipse.core:org.eclipse.core.runtime:jar:3.4.0
    available version: 3.2.0, 3.7.0
    replaced version 3.7.0

    org.eclipse.core:org.eclipse.core.resources:jar:3.4.0
    available version: 3.2.0, 3.2.1, 3.6.0.v20100526-0737
    replaced version: 3.6.0.v20100526-0737

    org.eclipse.ui:org.eclipse.ui:jar:3.4.0
    available version: 3.2.1, 3.7.0
    replaced version: 3.7.0

    org.eclipse.ui:org.eclipse.ui.editors:jar:3.4.0
    available version: 3.2.1, 3.7.0
    replaced version: 3.7.0

    org.eclipse.emf:org.eclipse.emf.ecore:jar:2.5.0
    available version: 2.2.0, 2.6.1
    replaced version: 2.6.1

    org.eclipse.ui:org.eclipse.ui.views:jar:3.3.0

    available version: 3.2.1, 3.6.0
    replaced version: 3.6.0

    org.eclipse.emf:org.eclipse.emf.ecore.edit:jar:2.3.1
    available version: 2.6.0
    replaced version: 2.6.0

    org.eclipse.emf:org.eclipse.emf.edit.ui:jar:2.3.1
    available version: 2.6.0
    replaced version: 2.6.0

    finally asked pom files by Maven, but the build doesn’t stopps

    org.eclipse.jface:org.eclipse.jface.text:jar:3.4.0
    org.eclipse.ui:org.eclipse.ui.ide:jar:3.4.0
    org.eclipse.ui:org.eclipse.ui.workbench.texteditor:jar:3.4.0

    Ciao, Micha

  3. @Micha: I, too, had problems with dependencies, but while this doesn’t work:

    org.eclipse.xtext:org.eclipse.xtext:2.0.0

    this seems to resolve OK:

    org.eclipse.plugins:org.eclipse.xtext:2.0.0.v201106070531

    The number of different versions on fornax with different naming schemes is a bit confusing, I’d say.

    Anyway, many thanks, Karsten!
    Stephan

  4. Karsten,

    it seems the versions you uploaded are not consistent/complete: When only using maven dependencies from the fornax server I get Xtext 2.0 but I only get EMF 2.6.1, which produces compile errors because the Xtext generator inserts “extend Switch” meaning org.eclipse.emf.ecore.util.Switch, which, however, is new in 2.7.

    Any hints on how I could get a consistent set of maven dependencies for working with Xtext 2.0?

    thanks,
    Stephan

    • Hi Stephan,

      The installed plugins are those from the itemis Xtext distribution (precisely eclipse-SDK-3.7-Xtext-2.0.0-macosx-cocoa-x86_64.tar.gz from xtext.itemis.de). This distro comes and works fine with EMF 2.6. Use this distribution as a base and you don’t have that problem. Or create your own repository with osgi2maven2 or the M4E tools.

      Regards,
      ~Karsten

      • Hi Karsten,

        indeed, after wiping target/generated-sources/xtext and re-generating all references to the new Switch class are gone.

        In the IDE building using only Maven dependencies now works; lets see, what Jenkins has to say 🙂

        thanks,
        Stephan

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s