Maven没有复制子项目依赖项

时间:2016-06-13 00:24:12

标签: java maven build

我在父项目和子项目中都配置了以下插件。子项目最终将构建JAR复制到“target”目录,并将所有第三方库复制到“target / lib”目录。父母pom也没有发生同样的情况。我该如何设置?

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-dependency-plugin</artifactId>
    <version>2.10</version>
    <executions>
        <execution>
            <id>copy-dependencies</id>
            <phase>package</phase>
            <goals>
                <goal>copy-dependencies</goal>
            </goals>
            <configuration>
                <!-- <overWriteReleases>false</overWriteReleases>
                    <overWriteSnapshots>false</overWriteSnapshots>
                    <overWriteIfNewer>true</overWriteIfNewer> -->   
                <outputDirectory>${project.build.directory}/lib</outputDirectory>
            </configuration>
        </execution>
    </executions>
</plugin>

0 个答案:

没有答案