我想將專案的人工制品 .jar 發布到我的 nexus 存盤庫。但是,mavendeploy插件始終包含已部署工件的時間戳后綴。我按照檔案省略了后綴,但沒有任何效果 - 它仍在添加它。
檔案說明<uniqueVersion></uniqueVersion>應該設定為false我在pom.xml每個存盤庫配置中所做的設定,并且我也將它用作這樣的標志mvn deploy -DuniqueVersion=false。但是沒有任何效果。
Nexus 中的結果總是有提到的后綴

這是我的pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.company.tools</groupId>
<artifactId>com.company.tools.myTool</artifactId>
<version>1.3-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.1</version>
<executions>
<execution>
<id>default-deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.6</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.10</version>
</dependency>
<dependency>
<groupId>net.sf.jt400</groupId>
<artifactId>jt400</artifactId>
<version>9.4</version>
</dependency>
</dependencies>
<distributionManagement>
<repository>
<uniqueVersion>false</uniqueVersion>
<id>nexus</id>
<name>Corporate Repository</name>
<url>http://192.168.141.10:8081/repository/maven-releases/</url>
<layout>default</layout>
</repository>
<snapshotRepository>
<uniqueVersion>false</uniqueVersion>
<id>nexus</id>
<name>Corporate Snapshots</name>
<url>http://192.168.141.10:8081/repository/maven-snapshots/</url>
<layout>legacy</layout>
</snapshotRepository>
</distributionManagement>
</project>
知道我在這里遺漏或誤解了什么嗎?
uj5u.com熱心網友回復:
對 Maven 2.x 的支持已<uniqueVersion></uniqueVersion>被棄用,并在 Maven 3 中完全洗掉。因此,除非您使用 EOL Maven 2,否則這不會起作用。請參閱此處的“主要版本升級到 3.0 版”:
https://maven.apache.org/plugins/maven-deploy-plugin/
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/410280.html
標籤:
上一篇:openapi-generator-maven-plugin將openapi規范升級到3.1.0
下一篇:SpringMVC中的垂直分離
