9

使用依赖插件复制它们时,快照 jar 以时间戳为后缀。

有谁知道出了什么问题?

[INFO] --- maven-dependency-plugin:2.5.1:copy-dependencies (copy-dependencies) @ pdfsec ---
[INFO] Copying test-3.5.9-SNAPSHOT.jar to test-3.5.9-20130726.002521-6.jar

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <version>2.5.1</version>
            <executions>
                <execution>
                    <id>copy-dependencies</id>
                    <phase>initialize</phase>
                    <goals>
                        <goal>copy-dependencies</goal>
                    </goals>
                    <configuration>
                        <useSubDirectoryPerScope>true</useSubDirectoryPerScope>
                        <overWriteSnapshots>true</overWriteSnapshots>
                        <overWriteIfNewer>true</overWriteIfNewer>
                        <excludeArtifactIds>unboundid-ldapsdk</excludeArtifactIds>
                    </configuration>
                </execution>
            </executions>
        </plugin>
4

2 回答 2

13

更新到插件的 2.8 版并将选项useBaseVersion设置为true.

从命令行:

mvn dependency:copy -Dmdep.useBaseVersion=true -Dartifact=x:y:z:p:c ...

(向Jens Kreidler 致敬

于 2013-07-26T08:49:40.597 回答
1

<uniqueVersion>false</uniqueVersion>在那里。

于 2013-07-26T08:07:59.380 回答