Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How can I setup xtend-maven-plugin encode for Xtend2 generation?
How can I setup xtend-maven-plugin encode for Xtend2 generation? [message #902488] Fri, 17 August 2012 21:35 Go to next message
Cristiano Gavião is currently offline Cristiano GaviãoFriend
Messages: 279
Registered: July 2009
Senior Member
Hi,

I have a test class defined in Xtend and using utf-8.
One of the sentence is this:
		assertEquals(person1.lastName, "Gavião")		


That is being translated to this:
    Assert.assertEquals(_lastName, "Gavi\u00E3o");


Well, at test execution I'm getting a error for this assert:

org.junit.ComparisonFailure: expected:<Gavi[√£]o> but was:<Gavi[ã]o>
	at org.junit.Assert.assertEquals(Assert.java:125)


Could someone explain me how can I setup xtend-maven-plugin to use utf-8 ?

thanks.

Cristiano
Re: How can I setup xtend-maven-plugin encode for Xtend2 generation? [message #902492 is a reply to message #902488] Fri, 17 August 2012 22:16 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13591
Registered: July 2009
Senior Member
Hi setting the property encoding in the configuration of the plugin doesnt work?

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: How can I setup xtend-maven-plugin encode for Xtend2 generation? [message #902572 is a reply to message #902492] Sat, 18 August 2012 14:02 Go to previous message
Cristiano Gavião is currently offline Cristiano GaviãoFriend
Messages: 279
Registered: July 2009
Senior Member
Problem solved...

The culprit was in tycho-surefire-plugin setup. after I have add appArgLine configuration in the root POM, things starts to work:

<pluginManagement>
    <plugin>
                    <groupId>org.eclipse.tycho</groupId>
                    <artifactId>tycho-surefire-plugin</artifactId>
                    <version>${tycho-version}</version>
                    <configuration>
                        <appArgLine>-Dfile.encoding=UTF-8</appArgLine>
                    </configuration>
 </plugin>


Now my xtext projects and xtend tests are running well with tycho 0.15.

regards,

Cristiano
Previous Topic:Formatter indentation Increment/Decrement
Next Topic:handle editor crashes on opening
Goto Forum:
  


Current Time: Sun Sep 20 17:26:30 GMT 2020

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

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

Back to the top