Got an iPhone or iPad? We have a brand new Pastebin App for both devices, and it's totally free! Click here to download the new Pastebin App for iOS.
Guest

Define Eclipse project encoding as UTF-8 from Maven

By: a guest on Feb 23rd, 2012  |  syntax: None  |  size: 0.71 KB  |  hits: 18  |  expires: Never
download  |  raw  |  embed  |  report abuse
Copied
  1. <properties>
  2.     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  3.   </properties>
  4.   <build>
  5.     <plugins>
  6.       <plugin>
  7.         <groupId>org.apache.maven.plugins</groupId>
  8.         <artifactId>maven-eclipse-plugin</artifactId>
  9.         <version>2.6</version>
  10.         <configuration>
  11.           <additionalConfig>
  12.             <file>
  13.               <name>.settings/org.eclipse.core.resources.prefs</name>
  14.               <content>
  15.                 <![CDATA[eclipse.preferences.version=1${line.separator}encoding/<project>=${project.build.sourceEncoding}${line.separator}]]>
  16.               </content>
  17.             </file>
  18.           </additionalConfig>
  19.         </configuration>
  20.       </plugin>
  21.     </plugins>
  22.   </build>