Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Maven Xtend compiler - file encoding
Maven Xtend compiler - file encoding [message #764207] Sun, 11 December 2011 17:03 Go to next message
Matthijs  is currently offline Matthijs Friend
Messages: 11
Registered: August 2011
Junior Member
There is probably an issue with file encoding in the maven-xtend-compiler.

Because xtext uses guillemot brackets («»), all my xtend files are in ISO-8859-1 encoding. Running the maven-xtend-compiler on Windows works fine, but on the Linux build the guillemot characters are not recognized. I think the xtend-compiler on Linux should be forced to read the files in ISO-8859-1 encoding.

This can be solved by calling the compiler (org.eclipse.xtext.xtend2.compiler.batch.Main) with a jvm parameter for the encoding, e.g. -Dfile.encoding=ISO-8859-1.

Regards
Matthijs
Re: Maven Xtend compiler - file encoding [message #764234 is a reply to message #764207] Sun, 11 December 2011 18:11 Go to previous messageGo to next message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
Please file a bugzilla. I don't think we want to enforce an encoding
(And if it would be UTF-8). But it should be simple to configure the
encoding just for the Xtend compiler.

Am 12/11/11 6:03 PM, schrieb Matthijs:
> There is probably an issue with file encoding in the maven-xtend-compiler.
> Because xtext uses guillemot brackets («»), all my xtend files are in
> ISO-8859-1 encoding. Running the maven-xtend-compiler on Windows works
> fine, but on the Linux build the guillemot characters are not
> recognized. I think the xtend-compiler on Linux should be forced to read
> the files in ISO-8859-1 encoding.
>
> This can be solved by calling the compiler
> (org.eclipse.xtext.xtend2.compiler.batch.Main) with a jvm parameter for
> the encoding, e.g. -Dfile.encoding=ISO-8859-1.
> Regards
> Matthijs


--
Need professional support for Xtext or other Eclipse Modeling technologies?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : http://blog.efftinge.de
Re: Maven Xtend compiler - file encoding [message #992431 is a reply to message #764207] Fri, 21 December 2012 16:07 Go to previous message
Solomon Obi is currently offline Solomon ObiFriend
Messages: 1
Registered: December 2012
Junior Member
I am running the batch compiler through maven using the tend-maven-plugin. Below an excerpt from my pom
What do I use in configuration to ensure the right file encoding

<plugin>
<groupId>org.eclipse.xtend</groupId>
<artifactId>xtend-maven-plugin</artifactId>
<version>2.3.1</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
<configuration>
<outputDirectory>${basedir}/xtend-gen</outputDirectory>

</configuration>
Previous Topic:Unexpected error when parsing input
Next Topic:External dependencies with Xtext builder
Goto Forum:
  


Current Time: Fri Apr 26 22:14:29 GMT 2024

Powered by FUDForum. Page generated in 0.02786 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top