Skip to content

About

A collection of Xtext sample projects for build integration tests

Resources

Stars

8 stars

Watchers

12 watching

Forks

Repository files navigation

xtext-reference-projects

A collection of Xtext sample projects that are built on every push and on a daily schedule to catch build-integration regressions.

Only recent Xtext releases are kept here; reference projects for versions older than 2.41 are dropped.

Repository layout

Path Content
greetings-gradle/, greetings-maven/, greetings-tycho/ The same small greetings DSL, generated by the Xtext project wizard for each supported build system. Projects live in `[-J21
domainmodel/ A complete Eclipse/Tycho example (domain model language with UI, tests, feature and update site) used to test the Tycho target-platform and p2 build. It has no Java suffix; it is built for the Java version required by the Xtext release (17 for 2.41/2.42, 21 for 2.43/2.44, 25 for 2.45).
scripts/ One shell script per project and version, named `[-J21
launch/ Eclipse launch configurations that run the wizard's CliProjectsCreatorMain to regenerate the greetings projects, plus update-version.sh, which bumps the launch configurations and creates the scripts for a new release.
integrationtests/ SWTBot UI tests that create Xtext projects through the new-project wizard and check the Xtext/Xtend examples.
settings.xml Maven settings with the tycho_snapshots profile, passed to Maven with -s by the scripts.

CI build

  • .github/workflows/build.yml builds the reference projects, currently for the latest release (2.45) on Java 21 and Java 25. The Tycho jobs use Maven 3.9.16 and xvfb-run; four jobs additionally build against the Tycho snapshot repository via EXTRA_ARGS (2.45 greetings and domainmodel with Tycho 5.0.5-SNAPSHOT, and greetings and domainmodel with 6.0.0-SNAPSHOT).
  • .github/workflows/build-integtests-wizard.yml, build-integtests-xtext.yml and build-integtests-xtend.yml run the SWTBot integration tests on Java 25 under xvfb-run and archive screenshots on failure.

Creating or updating a project

  • regenerate the greetings projects with the launch configurations in launch/ (all-refprojects.launch runs all of them); the project name, build system, Java version and wizard settings are stored in the launch file itself
  • for a new Xtext version, run launch/update-version.sh <version> and commit the updated launch files and new scripts; the script does not update the workflows
  • do not commit generated sources: src-gen, xtext-gen, xtend-gen, emf-gen and generated are gitignored and produced by the builds
  • add the new latest version to .github/workflows/build.yml (JDK, Maven and xvfb-run for Tycho) and, for integration tests, to the matching build-integtests-*.yml workflow
  • add the wizard configuration used to generate the project to this README file

Wizard configuration

greetings-gradle greetings-maven greetings-tycho
Eclipse plug-in NO NO YES
Create Feature NO NO YES
Create Update Site NO NO YES
IntelliJ IDEA plug-in NO NO NO
Web Integration NO NO NO
Generic IDE Support YES YES YES
Testing Support YES YES YES
Preferred Build System Gradle Maven Maven
Build Language Server Fat Jar Fat Jar App
Source Layout Maven/Gradle Maven/Gradle Plain

Troubleshooting

If the build of a gradle project fails with the output "./gradlew: Permission denied", it is possible that the execution rights for "gradlew" are not set correctly. To fix this, run "git update-index --chmod=+x gradlew" in the root folder of the project.

with-Eclipse logo

About

A collection of Xtext sample projects for build integration tests

Resources

Stars

8 stars

Watchers

12 watching

Forks

Releases

Packages

Used by

Contributors

Languages