Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Jenkins唯一ID和maven依赖插件-如何删除唯一ID_Java_Maven_Jenkins - Fatal编程技术网

Java Jenkins唯一ID和maven依赖插件-如何删除唯一ID

Java Jenkins唯一ID和maven依赖插件-如何删除唯一ID,java,maven,jenkins,Java,Maven,Jenkins,大家好,问题很简单,我使用maven来处理资源: <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <executions&

大家好,问题很简单,我使用maven来处理资源:

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
                <execution>
                    <id>get-test</id>
                    <phase>process-resources</phase>
                    <goals>
                        <goal>copy</goal>
                    </goals>
                    <configuration>
                        <artifactItems>
                            <artifactItem>
                                <groupId>com.some.test</groupId>
                                <artifactId>test-webapp</artifactId>
                                <version>0.0.1-SNAPSHOT</version>
                                <type>jar</type>
                                <outputDirectory>/testPath</outputDirectory>
                                <destFileName>test.jar</destFileName>
                            </artifactItem>
                        </artifactItems>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

org.apache.maven.plugins
maven依赖插件
接受测试
过程资源
复制
com.some.test
测试webapp
0.0.1-快照
罐子
/测试路径
test.jar
将artifactID测试webapp放置在某个路径中非常简单。问题是,当我在存储库中手动检查时,工件名称如下所示:

test-webapp-0.0.1-20160310.192210-35.jar


我认为问题在于这个时间戳。有没有办法自动删除它?也许Maven有我不知道的事

您是否尝试在没有时间戳的情况下发布到存储库?默认情况下,时间戳包含在快照工件中。以及,使用process resources复制的文件是否存在问题?首先,在maven构建期间,将process resources阶段的jar文件复制到aboslute路径看起来是错误的。此外,您应该检查是否设置了
覆盖快照
等,并且您似乎遗漏了
覆盖
等。检查文档..@khmarbaise路径是唯一的例子我要找的是简单的我不想有这样的东西:D:\test\test-webapp-0.0.1-20160311.090400-36.jar但像我提到的D:\test\test-webapp.jar一样,请检查文档,你可以使用
stripVersion
…在大多数情况下,maven构建中的复制目标没有意义。。。