Community
Participate
Working Groups
We are using xtext-maven-plugin in version 2.6.1. Some of the model files are provided from external sources via a ZIP file. After migrating from 2.4.3 to 2.6.1 org.eclipse.xtext.builder.standalone.StandaloneBuilder fails within registerCurrentSource(). The snippet val absoluteSource = sourceDirs .map[new File(it).absolutePath.createFileURI.toString] .filter[resource.URI.toString.startsWith(it)] .reduce[longest, current| if(current.length > longest.length) current else longest] ?.createFileURI Fails when doing the startsWith filtering, due to the fact that the source folder starts with file:/a/b/c and the toString on the zip file resource results in archive:file:/a/b/c After patching the StandaloneBuilder to handle the archive: from zip files, generation works as expected.
<plugin> <groupId>org.eclipse.xtext</groupId> <artifactId>xtext-maven-plugin</artifactId> <executions> <execution> <goals> <goal>generate</goal> </goals> </execution> </executions> <configuration> <sourceRoots> <sourceRoot>${basedir}/src/main/model</sourceRoot> <sourceRoot>${project.build.directory}/xtext-temp/models/business-models.zip</sourceRoot> </sourceRoots> <languages> <language> <setup>...</setup> </language> </languages> </configuration> <dependencies> ... </dependencies> </plugin>
still valid