Note that there are some explanatory texts on larger screens.

plurals
  1. POMaven JBehave : encoding stories UTF8
    text
    copied!<p>We managed to create and run tests with internationalized stories using JBehave within eclipse. Everything went fine.</p> <p>But when we tried to run them using the maven plug-in, we cannot get rud of the encoding problem (for example, instead of reading "scénario" from the story, it gets "Scénario" : clearly an UTF8 encoding problem).</p> <p>Does someone have found a way to get JBehave to read the stories in UTF8 using the maven plug-in ?</p> <p>What we already tried :</p> <ul> <li>adding -Dfile.encoding=UTF-8 option</li> <li>changing keyword file using UTF8</li> <li>changing the whole project encoding in ISO => which works but isn't suitable for production part that need to display messages in UTF8</li> </ul> <p>our Pom.xml</p> <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt; ... &lt;properties&gt; &lt;jbehave.version&gt;3.6.5&lt;/jbehave.version&gt; &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt; &lt;resource.encoding&gt;UTF-8&lt;/resource.encoding&gt; &lt;/properties&gt; &lt;build&gt; &lt;testOutputDirectory&gt;target/classes&lt;/testOutputDirectory&gt; &lt;testResources&gt; &lt;testResource&gt; &lt;directory&gt;src/test/resources&lt;/directory&gt; &lt;/testResource&gt; &lt;testResource&gt; &lt;directory&gt;src/test/story&lt;/directory&gt; &lt;/testResource&gt; &lt;/testResources&gt; &lt;plugins&gt; ... &lt;plugin&gt; &lt;artifactId&gt;maven-eclipse-plugin&lt;/artifactId&gt; &lt;version&gt;2.8&lt;/version&gt; &lt;configuration&gt; &lt;downloadSources&gt;true&lt;/downloadSources&gt; &lt;downloadJavadocs&gt;true&lt;/downloadJavadocs&gt; &lt;additionalBuildcommands&gt; &lt;buildcommand&gt;com.google.gdt.eclipse.core.webAppProjectValidator&lt;/buildcommand&gt; &lt;/additionalBuildcommands&gt; &lt;additionalProjectnatures&gt; &lt;projectnature&gt;com.google.gwt.eclipse.core.gwtNature&lt;/projectnature&gt; &lt;/additionalProjectnatures&gt; &lt;classpathContainers&gt; &lt;classpathContainer&gt;org.eclipse.jdt.launching.JRE_CONTAINER&lt;/classpathContainer&gt; &lt;/classpathContainers&gt; &lt;additionalConfig&gt; &lt;file&gt; &lt;name&gt;.settings/org.eclipse.core.resources.prefs&lt;/name&gt; &lt;content&gt; &lt;![CDATA[eclipse.preferences.version=1 encoding/&lt;project&gt;=UTF-8]]&gt; &lt;/content&gt; &lt;/file&gt; &lt;/additionalConfig&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;groupId&gt;org.jbehave&lt;/groupId&gt; &lt;artifactId&gt;jbehave-maven-plugin&lt;/artifactId&gt; &lt;version&gt;${jbehave.version}&lt;/version&gt; &lt;executions&gt; &lt;execution&gt; &lt;id&gt;run-stories-as-embeddables&lt;/id&gt; &lt;phase&gt;test&lt;/phase&gt; &lt;configuration&gt; &lt;scope&gt;test&lt;/scope&gt; &lt;includes&gt; &lt;include&gt;**/*Story.java&lt;/include&gt; &lt;/includes&gt; &lt;ignoreFailureInStories&gt;true&lt;/ignoreFailureInStories&gt; &lt;ignoreFailureInView&gt;false&lt;/ignoreFailureInView&gt; &lt;/configuration&gt; &lt;goals&gt; &lt;goal&gt;run-stories-as-embeddables&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt; &lt;executions&gt; &lt;execution&gt; &lt;id&gt;unpack-jbehave-site-resources&lt;/id&gt; &lt;phase&gt;generate-resources&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;unpack&lt;/goal&gt; &lt;/goals&gt; &lt;configuration&gt; &lt;overwriteReleases&gt;false&lt;/overwriteReleases&gt; &lt;overwriteSnapshots&gt;true&lt;/overwriteSnapshots&gt; &lt;artifactItems&gt; &lt;artifactItem&gt; &lt;groupId&gt;org.jbehave.site&lt;/groupId&gt; &lt;artifactId&gt;jbehave-site-resources&lt;/artifactId&gt; &lt;version&gt;3.1.1&lt;/version&gt; &lt;type&gt;zip&lt;/type&gt; &lt;outputDirectory&gt; ${project.build.directory}/jbehave/view &lt;/outputDirectory&gt; &lt;/artifactItem&gt; &lt;/artifactItems&gt; &lt;/configuration&gt; &lt;/execution&gt; &lt;execution&gt; &lt;id&gt;unpack-jbehave-reports-resources&lt;/id&gt; &lt;phase&gt;generate-resources&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;unpack&lt;/goal&gt; &lt;/goals&gt; &lt;configuration&gt; &lt;overwriteReleases&gt;false&lt;/overwriteReleases&gt; &lt;overwriteSnapshots&gt;true&lt;/overwriteSnapshots&gt; &lt;artifactItems&gt; &lt;artifactItem&gt; &lt;groupId&gt;org.jbehave&lt;/groupId&gt; &lt;artifactId&gt;jbehave-core&lt;/artifactId&gt; &lt;version&gt;${jbehave.version}&lt;/version&gt; &lt;outputDirectory&gt; ${project.build.directory}/jbehave/view &lt;/outputDirectory&gt; &lt;includes&gt; **\/*.css,**\/*.ftl,**\/*.js &lt;/includes&gt; &lt;/artifactItem&gt; &lt;/artifactItems&gt; &lt;/configuration&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/build&gt; &lt;dependencies&gt; ... &lt;!-- JBehave Dependencies --&gt; &lt;dependency&gt; &lt;groupId&gt;org.jbehave&lt;/groupId&gt; &lt;artifactId&gt;jbehave-core&lt;/artifactId&gt; &lt;version&gt;${jbehave.version}&lt;/version&gt; &lt;/dependency&gt; &lt;!-- Test Frameworks Dependencies --&gt; &lt;dependency&gt; &lt;groupId&gt;junit&lt;/groupId&gt; &lt;artifactId&gt;junit&lt;/artifactId&gt; &lt;version&gt;4.8.2&lt;/version&gt; &lt;scope&gt;test&lt;/scope&gt; &lt;/dependency&gt; &lt;dependency&gt; &lt;groupId&gt;org.mockito&lt;/groupId&gt; &lt;artifactId&gt;mockito-all&lt;/artifactId&gt; &lt;version&gt;1.8.4&lt;/version&gt; &lt;scope&gt;test&lt;/scope&gt; &lt;/dependency&gt; &lt;/dependencies&gt; </code></pre> <p></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload