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 12:03 Go to next message
Matthijs  is currently offline Matthijs
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 13:11 Go to previous messageGo to next message
Sven Efftinge is currently offline Sven Efftinge
Messages: 1759
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


--
Need professional support on Xtext or Xtend?
Mail to: xtext (at) itemis.com
Twitter : @svenefftinge
Blog : blog.efftinge.de
Re: Maven Xtend compiler - file encoding [message #992431 is a reply to message #764207] Fri, 21 December 2012 11:07 Go to previous message
Solomon Obi is currently offline Solomon Obi
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: Wed Jul 23 14:16:09 EDT 2014

Powered by FUDForum. Page generated in 0.01593 seconds