{"id":15532721,"url":"https://github.com/hypery2k/xtext-maven-buildexample","last_synced_at":"2026-06-25T05:31:08.713Z","repository":{"id":4968060,"uuid":"6125771","full_name":"hypery2k/Xtext-Maven-BuildExample","owner":"hypery2k","description":"Showing howto build Xtext projects with Maven","archived":false,"fork":false,"pushed_at":"2023-12-15T15:12:43.000Z","size":48,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-14T11:10:15.944Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hypery2k.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-10-08T14:33:52.000Z","updated_at":"2024-05-30T05:07:37.393Z","dependencies_parsed_at":"2024-05-30T05:17:36.501Z","dependency_job_id":null,"html_url":"https://github.com/hypery2k/Xtext-Maven-BuildExample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hypery2k%2FXtext-Maven-BuildExample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hypery2k%2FXtext-Maven-BuildExample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hypery2k%2FXtext-Maven-BuildExample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hypery2k%2FXtext-Maven-BuildExample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hypery2k","download_url":"https://codeload.github.com/hypery2k/Xtext-Maven-BuildExample/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240093148,"owners_count":19746777,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T11:32:40.464Z","updated_at":"2026-05-06T02:30:20.769Z","avatar_url":"https://github.com/hypery2k.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Xtext-Maven-BuildExample\n========================\n\nShowing howto build Xtext projects with Maven\nA few simple examples to show how to build XText projects with Maven / Tycho plugins.\n\n\n# Overview\n\nThese projects have been created with the simple XText DSL Project from within Eclipse.  File -\u003e New -\u003e Other -\u003e XText 2.2.1 \u0026 XText 2.3.0\nThe main point is to show how to package and build an XText DSL project with Maven and is more or less an updated version of Karsten's Blog\nentry - http://kekz-box.de/?p=734\n\nThese examples now use the xtend-maven-plugin to call the XTend generator, which as I understand are now part of the latest XText versions.\n\nAnother really good project to look at for an XText maven examples can be found here (https://github.com/ckulla/xtext-tycho-example).  Unfortunately\nI couldn't actually make this example work due to some issue resolving from the maven relative path local repository.\n\n\n## An explanation and building the examples\n\nActually this is the main point of the example and despite a few examples on the web, it still took quite some time to understand how to \nget the Maven build working.\n\n\n### Launching the build\n\nExecute Maven command as normal.\n\n  $ cd org.xtext.example.mydsl.parent\n\t$ mvn package\n\t\nClean target will clean all the generated source (which is nice as Eclipse won't)\n\n\t$ mvn clean\n\t\n\t\n### Tycho moved to Eclipse\n\nThe Tycho plugin is used to build Eclipse plugins with Maven.  It has moved to an Eclipse project and as such Karsten's example needed a few\nchanges to the plugin definitions.\n\thttp://wiki.eclipse.org/Tycho/Reference_Card\n\thttp://wiki.eclipse.org/Tycho_Release_Notes/0.12\n\n\n### Issue while resolving dependencies\n\nResolving dependencies for mwe generator from maven exposes Java 7 issue:\n\thttp://dev.eclipse.org/mhonarc/lists/egit-dev/msg02554.html\n\nEither downgrade to Java 1.6 or set the Java options to maven:\n\tSET MAVEN_OPTS=-Djava.util.Arrays.useLegacyMergeSort=true\n\nThe error you would see:\n\u003cpre\u003e\n[ERROR] Internal error: java.lang.IllegalArgumentException: Comparison method violates its general contract! -\u003e [Help 1]\norg.apache.maven.InternalErrorException: Internal error: java.lang.IllegalArgumentException: Comparison method violates its general con\ntract!\n        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)\n        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)\n        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)\n        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)\n        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\n        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n        at java.lang.reflect.Method.invoke(Method.java:601)\n        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)\n        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)\n        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)\n        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)\nCaused by: java.lang.IllegalArgumentException: Comparison method violates its general contract!\n        at java.util.ComparableTimSort.mergeLo(ComparableTimSort.java:714)\n        at java.util.ComparableTimSort.mergeAt(ComparableTimSort.java:451)\n        at java.util.ComparableTimSort.mergeCollapse(ComparableTimSort.java:376)\n        at java.util.ComparableTimSort.sort(ComparableTimSort.java:182)\n        at java.util.ComparableTimSort.sort(ComparableTimSort.java:146)\n        at java.util.Arrays.sort(Arrays.java:472)\n        at org.eclipse.equinox.internal.p2.artifact.repository.MirrorSelector.hasValidMirror(MirrorSelector.java:317)\n\u003c/pre\u003e\n\n### CI - Jenkins\n\nAn example can be found on [https://hypery2k.ci.cloudbees.com/job/Xtext%20Maven%20Sample/] (Cloudbees)\n### OSGi issues\n\nThe generated project from XText 2.2.1 has a number of bundle imports that need to be made available via OSGi.  By far the easiest method\nis to use the Tycho 'target-platform-configuration' plugin.  It can take all your defined P2 repositories (an Eclipse update site) and make \nthose OSGi bundles available to your project.\n\nIf you just build without making these depdencies available to OSGi you should get an error similar to the following:\n\u003cpre\u003e\n[ERROR] Cannot resolve project dependencies:\n[ERROR]   Software being installed: org.xtext.example.mydsl 1.0.0\n[ERROR]   Missing requirement: org.xtext.example.mydsl 1.0.0 requires 'bundle org.eclipse.xtext 2.1.0' but it could not be found\n[ERROR]\n[ERROR] Internal error: java.lang.RuntimeException: \"No solution found because the problem is unsatisfiable.\": [\"Unable to satisfy depe\nndency from org.eclipse.jdt.core 3.7.0.v_OTDT_r200_201106070730 to org.eclipse.objectteams.otdt.core.patch.feature.group [2.0.0,3.0.0).\n\", \"Unable to satisfy dependency from org.eclipse.jdt.core 3.7.1.v_OTDT_r201_201109101025 to org.eclipse.objectteams.otdt.core.patch.fe\nature.group [2.0.0,3.0.0).\", \"Unable to satisfy dependency from org.eclipse.jdt.core 3.7.3.v_OTDT_r202_201202051448 to org.eclipse.obje\nctteams.otdt.core.patch.feature.group [2.0.0,3.0.0).\", \"Unable to satisfy dependency from org.xtext.example.mydsl 1.0.0 to bundle org.e\nclipse.xtext 2.1.0.\", \"Unable to satisfy dependency from org.xtext.example.mydsl 1.0.0 to bundle org.eclipse.xtext.xbase 2.1.0.\", \"No s\nolution found because the problem is unsatisfiable.\"] -\u003e [Help 1]\norg.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: \"No solution found because the problem is unsatisf\niable.\": [\"Unable to satisfy dependency from org.eclipse.jdt.core 3.7.0.v_OTDT_r200_201106070730 to org.eclipse.objectteams.otdt.core.p\natch.feature.group [2.0.0,3.0.0).\", \"Unable to satisfy dependency from org.eclipse.jdt.core 3.7.1.v_OTDT_r201_201109101025 to org.eclip\nse.objectteams.otdt.core.patch.feature.group [2.0.0,3.0.0).\", \"Unable to satisfy dependency from org.eclipse.jdt.core 3.7.3.v_OTDT_r202\n_201202051448 to org.eclipse.objectteams.otdt.core.patch.feature.group [2.0.0,3.0.0).\", \"Unable to satisfy dependency from org.xtext.ex\nample.mydsl 1.0.0 to bundle org.eclipse.xtext 2.1.0.\", \"Unable to satisfy dependency from org.xtext.example.mydsl 1.0.0 to bundle org.e\nclipse.xtext.xbase 2.1.0.\", \"No solution found because the problem is unsatisfiable.\"]\n        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)\n        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)\n        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)\n        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)\n        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\n        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n        at java.lang.reflect.Method.invoke(Method.java:601)\n        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)\n        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)\n        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)\n        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)\n\u003c/pre\u003e\n\n\n### Fornax plugin repository\n\nThe fornax-oaw-m2-plugin is used to run the mwe2 workflow.  Karsten's example can now use a released version (3.3.0) from the following\nrepository:\n\nhttp://www.fornax-platform.org/m2/repository\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhypery2k%2Fxtext-maven-buildexample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhypery2k%2Fxtext-maven-buildexample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhypery2k%2Fxtext-maven-buildexample/lists"}