zoukankan      html  css  js  c++  java
  • 使用maven打包的注意事项

    maven编译项目的时候,默认使用的GBK,而目前大部分代码都使用的UTF-8的方式,所以这时候打出来的包容易出现乱码。

    解决方式:

                <!-- compiler插件, 设定JDK版本 -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.1</version>
                    <configuration>
                        <encoding>UTF-8</encoding>
                        <source>${java.version}</source>
                        <target>${java.version}</target>
                        <showWarnings>true</showWarnings>
                    </configuration>
                </plugin>

     打包的bat文件

    @echo off
    echo [INFO] Install the jar to local
    
    cd %~dp0
    cd ..
    call mvn clean install -Dmaven.test.skip=true
    pause
  • 相关阅读:
    2019.8.8 python day03
    2019.8.7 python进阶day02
    2019.8.6(python day01)
    2019.8.5
    2019.8.2
    2019.8.1
    2019.7.31
    2019.7.30
    面向对象进阶
    访问可见性问题和@property装饰器
  • 原文地址:https://www.cnblogs.com/kzfy/p/5527412.html
Copyright © 2011-2022 走看看