1028

1.maven本地包的配置

  1. pom文件的配置
        <!--geoserver restful-->
        <dependency>
            <groupId>it.geosolutions</groupId>
            <artifactId>geoserver-manager</artifactId>
            <version>1.7-SNAPSHOT</version>
            <!--这里使用的是本地jar包集成,远程的环境拉不下来-->
            <scope>system</scope>
            <systemPath>${basedir}/lib/geoserver-manager-1.7.0.jar</systemPath>
        </dependency>
    <build>
        <resources>
            <!--在lib目录下存放着因为网络原因无法拉取到本地的jar包-->
            <!--maven默认打包时不会包含这些jar包,所以需要单独进行配置-->
            <!--包含本地jar包的配置-->
            <resource>
                <directory>${project.basedir}/lib</directory>
                <targetPath>BOOT-INF/lib/</targetPath>
                <includes>
                    <include>**/*.jar</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <targetPath>BOOT-INF/classes/</targetPath>
            </resource>
        </resources>
    </build>
  1. 根目录下创建lib文件夹,并且把所需要的jar包放入到文件夹中

2.maven配置的若干问题

  1. 不要使用3.6.1以上版本的maven;
  2. 其他相关问题的参考解决办法:
https://blog.csdn.net/ashleyjun/article/details/101106810
https://blog.csdn.net/Certain_/article/details/90745360

3.idea与蓝灯配置的方法

http://www.itzhai.com/intellij-idea-proxy-settings.html

4.maven仓库地址的配置

<mirror>
    <id>alimaven</id>
    <name>aliyun maven</name>
    <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
    <mirrorOf>*,!osgeo,!maven2-repository.dev.java.net,!boundless</mirrorOf> 
</mirror>

1031

1.maven忽略测试进行打包

mvn clean package -Dmaven.test.skip=true