Unofficial release 2.2.2 of the Xtend Maven Plugin

In my previous post I showed how to use the maven-xtend-plugin to compile Xtend sources within a Maven build. This worked fine in simple cases, but there was a limitation of only one supported source directory (the one configured by build/sourceDirectory property), see Bug#367914. Unfortunately already each Xtext project has already 2 source folders (src and src-gen), so this made the plugin unusable for Xtext projects and forced checking in the generated Java files. This causes terrible problems with version control, especially when working on a team.

In the meantime Bug#367914 was resolved, but only for the upcoming Xtend 2.3 (Eclipse Juno) version. This urgent bugfix was not available on a Maven repository. But I needed it for project Spray to finally get rid of the merge conflicts and delete the generated sources from the repository (issue#94). Spray is still using Xtext/Xtend version 2.2.1 and depends on public available Maven artifacts. Since the bugfix won’t be available from the Xtend project for the 2.2.1 release and Eclipse Juno is still some way to go I decided to backport the current 2.3.0 M6 sources of the Xtend Maven Plugin to 2.2.x and create an unofficial version 2.2.2. This plugin I have deployed to the Fornax Repository to make it public available.

For an usage example refer to the POMs of project Spray: pom.xml, parent pom.xml.

15 thoughts on “Unofficial release 2.2.2 of the Xtend Maven Plugin

  1. Pingback: Xtext 2.2 finally brings Maven support for Xtend « Karsten's Blog

  2. Hi, maybe I’m saying something silly since I don’t use Xtend, but can’t you use the following mojo to handle multiple source folders? http://mojo.codehaus.org/build-helper-maven-plugin/add-source-mojo.html and then play with maven lifecycle and phases to bind the generation of java from xtend to a phase and the build helper to a later one?

    Anyway, I’m willing to use xtend to a personal project. Keep the good job! (in spray too!)

    Regards,

    Xavier

    • @Xavier: Sadly, no. I tried it, and looked at the code in the Maven compiler plug-in, and it was really a bug in Xtend 2.2 – it always expected a single source folder. So this backporting is nice to have (in our project we have simply updated the dependencies to Xtend 2.3, as we have not done a release yet, but this one would work as well).

  3. Great plugin! And great timing too: I only migrated a project to Eclispe 4.2/Xtext 2.3 today. Thank you very much for the plugin and for making it available!
    Two questions:

    1) org.eclipse.emf.mwe2.launch is declared optional by default (I figure since it is a pure build dependency and not required later on). The plugin/Maven requires it to be declared non-optional. Is it possible to force the plugin/Maven to use load launch even it is declared optional?

    2) I have a custom fragment (a scoping fragment), its Java code is found in the src folder of the project. In order to run the workflow, this fragment has to be compiled. Do you have any experiences / hints how to to that? (I admit to be a Maven rookie).

    Cheers,
    Jens

    • Hi Jens,
      1) Did not try that, but usually you can declare additional dependencies in the plugin configuration. Therefore you would have to provide a dependency to mwe2.launch. You could try to declare the dependency with <type>eclipse-plugin</type>
      2) The code must be in a seperate plugin on which the plugin itself is dependent. This way it is compiled and jarred before it used. That’s the typical way.

      Note that the published plugin compiles with Xtext/Xtend 2.2.1, not 2.3.0. The plugin will be published officially with 2.3.0 somewhere.

      Best wishes,
      ~Karsten

  4. I’m currently trying to use xtend 2.3 via maven.
    Since I couldn’t find version 2.3 of the xtend-maven-plugin I boldly tried to rewire the 2.3.0-M6 plugin via my pom:

                    <plugin>
    	                <groupId>org.eclipse.xtend</groupId>
    	                <artifactId>xtend-maven-plugin</artifactId>
    	                <version>2.3.0-M6</version>
    			<dependencies>
    				<dependency>
    					<groupId>org.eclipse.xtend</groupId>
    					<artifactId>org.eclipse.xtend.standalone</artifactId>
    					<version>2.3.0</version>
    				</dependency>	
    			</dependencies>
                    </plugin>
    

    Actually this works 🙂

    I just looks a bit shaky to use that combination of versions. Are there any plans to release a new version of the maven plugin?

    thanks,
    Stephan

  5. Do you mind if I quote a few of your articles as long as I provide credit and sources back to your webpage?
    My blog site is in the very same niche as yours and
    my users would really benefit from some of the information you provide here.
    Please let me know if this alright with you. Thank you!

  6. If it is not on the home page of their website, then it is a rip-off seeking to get away with your identity.
    Protecting your home and valuables is a must for any
    homeowner or tenant, but how do you make sure that you get
    the best home insurance policy without paying over the odds.
    There are personal websites from these companies from where
    you can pick your quotes.

  7. Okay, you wouldnt have been in a position for getting
    some home insurance quotes online back then however it actually does appear to be the foundation of insurance.

    It is always in the best interest of the person to timely get
    the desirable home insurance policy. Exactly
    why should you get a great deal of quotes why don’t you just pick randomly.

  8. It is important to compare insurance policies before opting for them.

    Free comparison for cheap auto, low cost health insurance, affordable home insurance quotes.

    The thing that matters the most is the cover
    you will receive, so this should always be at the forefront of your mind.

  9. Excellent pieces. Keep writing such kind of information on your site.
    Im really impressed by your site.
    Hi there, You’ve performed a great job. I will definitely digg it and individually suggest to my friends. I am sure they will be benefited from this web site.

  10. The Customers are happy to use the facility of internet
    and phone to make their insurance payments at the selected insurers website.
    Protecting your home and valuables is a must for any homeowner or tenant, but how do you make sure that you
    get the best home insurance policy without paying over
    the odds. Here are a few helpful ideas to get low Home Insurance rates.

Leave a reply to bleacherreport.com Cancel reply