You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Carpentier Xavier (GreenIvory)" <x....@greenivory.com> on 2011/01/07 10:49:41 UTC

Diff JUnit eclipse and maven, UTF-8 ?

Hi,

Some differences occur when executing JUnit test between maven 3 in eclipse (fail) and JUnit embedded eclipse, hudson maven 2 (ok). Maybe because it's an UTF-8 problem.

Has somebody heard about that ?

Twitter @xcapetir
mail@xavier-carpentier.fr

Re: Diff JUnit eclipse and maven, UTF-8 ?

Posted by Wayne Fay <wa...@gmail.com>.
> "France3 Franche-Comt?" != "France3 Franche-Comté" only when it is maven 3.
> Not in maven 2 on Hudson, why ?
>
> With JUnit : ok no message

At least in Gmail, those characters come through differently. Are you
sure that they are the same in your tests?

I'm seeing Comt? and Comté. Perhaps Maven3 is the only one that is
properly alerting you of a problem?? Check the unicode/ascii character
index values and see if they match or not.

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Diff JUnit eclipse and maven, UTF-8 ?

Posted by Greg Akins <an...@gmail.com>.
Sorry.. I'm out of suggestions then.. Hopefully someone else has an idea

On Fri, Jan 7, 2011 at 10:54 AM, Carpentier Xavier (GreenIvory) <
x.carpentier@greenivory.com> wrote:

> Yes I do :
>        <properties>
> <maven.compiler.source>1.6</maven.compiler.source>
> <maven.compiler.target>1.6</maven.compiler.target>
> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
> </properties>
>
> --
> Carpentier Xavier
> Ingénieur Développement - x.carpentier@greenivory.com -
> http://www.greenivory.com
> *GreenIvory Europe*
> 10 rue Saint Wendelin
> 67500 Haguenau
> France*GreenIvory America*
> Suite 200
> 3608 Shannon Road
> Durham NC 27707
> USATél.+33 9 50 53 10 34Tel.+1 (617) 862-2319
>
> Fax+1 (919) 493-8837GSM+33 6 68 81 87 68
>
> Consider the environment. Don’t print this e-mail unless you need to.
> To avoid excessive data transfer, we’ve removed our logo.
>
> On Jan 7, 2011, at 4:45 PM, Greg Akins wrote:
>
> On Fri, Jan 7, 2011 at 10:12 AM, Carpentier Xavier (GreenIvory)
> <x....@greenivory.com> wrote:
>
> "France3 Franche-Comt?" != "France3 Franche-Comté" only when it is maven 3.
>
> Not in maven 2 on Hudson, why ?
>
>
> With JUnit : ok no message
>
>
> I'm not sure that this is the issue, but have you set
> project.build.sourceEncoding in your pom?
>
> --
> Greg Akins
>
> http://insomnia-consulting.org
> http://www.pghcodingdojo.org
> http://pittjug.dev.java.net
> http://twitter.com/akinsgre
> http://www.linkedin.com/in/akinsgre
>
>
>


-- 
Greg Akins

http://insomnia-consulting.org
http://www.pghcodingdojo.org
http://pittjug.dev.java.net
http://twitter.com/akinsgre
http://www.linkedin.com/in/akinsgre

Re: Diff JUnit eclipse and maven, UTF-8 ?

Posted by "Carpentier Xavier (GreenIvory)" <x....@greenivory.com>.
"France3 Franche-Comt?" != "France3 Franche-Comté" only when it is maven 3. Not in maven 2 on Hudson, why ?


With JUnit : ok no message



With maven3 :

-------------------------------------------------------------------------------
Test set: com.greenivory.redlion.commons.utils.ProjectConverterTest
-------------------------------------------------------------------------------
Tests run: 8, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.134 sec <<< FAILURE!
testXmlToEntity(com.greenivory.redlion.commons.utils.ProjectConverterTest)  Time elapsed: 0.095 sec  <<< FAILURE!
java.lang.AssertionError: 
Expected: is "France3 Franche-Comt?"
     got: "France3 Franche-Comté"

	at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:21)
	at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:8)
	at com.greenivory.redlion.commons.utils.ProjectConverterTest.testXmlToEntity(ProjectConverterTest.java:451)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at junit.framework.TestCase.runTest(TestCase.java:168)
	at junit.framework.TestCase.runBare(TestCase.java:134)
	at junit.framework.TestResult$1.protect(TestResult.java:110)
	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at junit.framework.TestResult.run(TestResult.java:113)
	at junit.framework.TestCase.run(TestCase.java:124)
	at junit.framework.TestSuite.runTest(TestSuite.java:243)
	at junit.framework.TestSuite.run(TestSuite.java:238)
	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
	at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:146)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
	at $Proxy0.invoke(Unknown Source)
	at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:145)
	at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:87)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)


On Jan 7, 2011, at 1:09 PM, Greg Akins wrote:

> On Fri, Jan 7, 2011 at 4:49 AM, Carpentier Xavier (GreenIvory)
> <x....@greenivory.com> wrote:
>> Hi,
>> 
>> Some differences occur when executing JUnit test between maven 3 in eclipse (fail) and JUnit embedded eclipse, hudson maven 2 (ok). Maybe because it's an UTF-8 problem.
> 
> Could be, I supposed.. Can you share the error message, or the
> differing results?
> 
> Is it that a JUnit test failed in Maven3, but didn't fail in Eclipse?
> I've had this happen because of dependencies, artifacts not being
> cleaned and (the strangest one, but it wasn't Maven's fault or
> Eclipse/JUnit) files weren't read from the same order from the file
> system
> 
>> 
>> Has somebody heard about that ?
>> 
>> Twitter @xcapetir
>> mail@xavier-carpentier.fr
> 
> 
> 
> -- 
> Greg Akins
> 
> http://insomnia-consulting.org
> http://www.pghcodingdojo.org
> http://pittjug.dev.java.net
> http://twitter.com/akinsgre
> http://www.linkedin.com/in/akinsgre
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 


Re: Diff JUnit eclipse and maven, UTF-8 ?

Posted by Greg Akins <an...@gmail.com>.
On Fri, Jan 7, 2011 at 4:49 AM, Carpentier Xavier (GreenIvory)
<x....@greenivory.com> wrote:
> Hi,
>
> Some differences occur when executing JUnit test between maven 3 in eclipse (fail) and JUnit embedded eclipse, hudson maven 2 (ok). Maybe because it's an UTF-8 problem.

Could be, I supposed.. Can you share the error message, or the
differing results?

Is it that a JUnit test failed in Maven3, but didn't fail in Eclipse?
I've had this happen because of dependencies, artifacts not being
cleaned and (the strangest one, but it wasn't Maven's fault or
Eclipse/JUnit) files weren't read from the same order from the file
system

>
> Has somebody heard about that ?
>
> Twitter @xcapetir
> mail@xavier-carpentier.fr



-- 
Greg Akins

http://insomnia-consulting.org
http://www.pghcodingdojo.org
http://pittjug.dev.java.net
http://twitter.com/akinsgre
http://www.linkedin.com/in/akinsgre

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org