2005wind

导航

maven 编码 UTF-8 的不可映射字符

maven编译时报错,后面发现代码是用GBK编码编写,maven默认是用utf-8来编译。修改pom.xml

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                    <encoding>GBK</encoding>
                </configuration>
            </plugin>
        </plugins>
    </build>

<encoding>GBK</encoding>

posted on 2015-10-22 10:19  2005wind  阅读(13630)  评论(0编辑  收藏  举报