Maven and Encoding ?

How to set a specific encoding against the default one ?

Just add the following configuration lines into your pom.xml:

<plugin>    <groupId>org.apache.maven.plugins</groupId>    <artifactId>maven-compiler-plugin</artifactId>    <configuration>        <encoding>ISO-8859-1</encoding>        <source>1.5</source>        <target>1.5</target>    </configuration></plugin><plugin>    <groupId>org.apache.maven.plugins</groupId>    <artifactId>maven-resources-plugin</artifactId>    <configuration>        <encoding>ISO-8859-1</encoding>    </configuration></plugin>

The <encoding> tag specify the one needed.
Can be applied on the compiler plugin and on the resource plugin.

The <source> and <target> tags can be set to specify Java version compatibility of source and target.
Can be applied on the compiler plugin.

McG.

Publicités

Les commentaires sont fermés.

Créez un site Web ou un blog gratuitement sur WordPress.com.

Retour en haut ↑

%d blogueurs aiment cette page :