1 Reply Latest reply on Oct 9, 2009 3:19 AM by Manik Surtani

    Maven Encoding in compiler plugin

    John Prince Newbie

      Hi,

      A small point - on Windows, mvn is barfing on the czech (?) text in one of the test cases because the encoding is not explicitly set and maven/java takes platform encoding by default. This fixes it (in parent/pom.xml):

      <plugin>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-compiler-plugin</artifactId>
       <configuration>
       <source>1.6</source>
       <target>1.6</target>
       <encoding>UTF-8</encoding>
       </configuration>
      </plugin>
      


      FWIW, I always set the encoding of the resource plugin as well, just in case...

      <plugin>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-resources-plugin</artifactId>
       <configuration>
       <encoding>UTF-8</encoding>
       </configuration>
      </plugin>
      


      Best wishes

      John