maven-assembly打包问题

DanieLong 发布于 09/29 11:04
阅读 27
收藏 0

maven-assembly-pluginp配置后个别依赖打包降级问题。。。

我的项目是spring boot项目配置了maven-assembly插件后,进行打包,在运行assembly插件时发现复制出来的依赖包个别被降级了,请问这是什么问题。如何解决?assembly配置如下:

<?xml version="1.0" encoding="UTF-8"?>
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd">
    <id>package</id>
    <formats>
        <format>tar.gz</format>
    </formats>
    <includeBaseDirectory>true</includeBaseDirectory>
    <fileSets>
        <fileSet>
            <directory>bin</directory>
            <outputDirectory>/</outputDirectory>
        </fileSet>
        <fileSet>
            <directory>src/main/resources</directory>
            <outputDirectory>/config</outputDirectory>
        </fileSet>
        <fileSet>
            <directory>${project.build.directory}</directory>
            <outputDirectory>/</outputDirectory>
            <includes>
                <include>*.jar</include>
            </includes>
        </fileSet>
    </fileSets>
    <dependencySets>
        <dependencySet>
            <useProjectArtifact>true</useProjectArtifact>
            <outputDirectory>lib</outputDirectory>
            <!--            <scope>runtime</scope>-->
            <scope>runtime</scope>
            <!--<unpack>false</unpack> -->
            <!--            <excludes>-->
            <!--                <exclude>${project.name}-${project.version}</exclude> -->
            <!--                <exclude>${groupId}:${artifactId}</exclude>-->
            <!--            </excludes>-->
        </dependencySet>


        <dependencySet>
            <useProjectArtifact>true</useProjectArtifact>
            <outputDirectory>lib</outputDirectory>
            <!-- 将scope为runtime的依赖包打包到lib目录下。 -->
            <scope>system</scope>
            <includes>
                <include>*:jar</include>
            </includes>
        </dependencySet>


    </dependencySets>
</assembly>
加载中
返回顶部
顶部
天津时时彩