gpt4 book ai didi

java - Maven 部署 > 上传的文件名

转载 作者:行者123 更新时间:2023-11-29 08:30:51 25 4
gpt4 key购买 nike

当我部署我的项目 (IntelliJ) 时。

file list

我看到文件名包含一些数字。这是为什么?为什么不是简单的TryAPI-2.0.jar

我的pom:

    <groupId>de.trymc.api</groupId>
<artifactId>TryAPI</artifactId>
<version>2.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>TryAPI</name>

<!--<distributionManagement>
<repository>
<id>trymc</id>
<url>http://132121212u/nexus/content/repositories/trymc</url>
<uniqueVersion>false</uniqueVersion>
</repository>
</distributionManagement>-->
<distributionManagement>
<snapshotRepository>
<id>snapshots</id>
<name>vps348-jycjf-snapshots</name>
<url>http://121251^515:8040/artifactory/trymc</url>
</snapshotRepository>
</distributionManagement>

<repositories>
<!-- CloudNet Repository -->
<repository>
<id>cloudnet-repo</id>
<url>http://^25522525.de/repositories/</url>
</repository>

</repositories>
<dependencies>
<!-- Lombok Dependency -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.16.16</version>
<scope>provided</scope>
</dependency>
<!-- HikariCP Dependency -->
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>2.7.4</version>
<scope>compile</scope>
</dependency>
<!-- Apache Commons Lang Dependency -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.0</version>
<scope>provided</scope>
</dependency>
<!-- Spigot / Bukkit -->
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.8.8</version>
<scope>provided</scope>
</dependency>

<!--- CloudNet-API for Bukkit and BungeeCord -->
<dependency>
<groupId>de.dytanic.cloudnet</groupId>
<artifactId>cloudnet-api</artifactId>
<version>2.1.PXVI</version>
<scope>provided</scope>
</dependency>

<!--- For Modules -->
<dependency>
<groupId>de.dytanic.cloudnet</groupId>
<artifactId>cloudnet-core</artifactId>
<version>2.1.PXVI</version>
<scope>provided</scope>
</dependency>
</dependencies>

<!-- Maven Compiler -->
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>

<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<outputDirectory>D:\Development\TryMC.de</outputDirectory>
<archive>
<manifest>
<mainClass>de.trymc.api.TryApiPlugin</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

最佳答案

Maven SNAPSHOT Artifact 存储有一个时间戳,存储库使用该时间戳来识别哪个是所有快照中的最新快照。

这是因为快照 Artifact 可以在存储库中被覆盖。

要制作稳定版本,即 TryAPI-2.0,您需要发布 Artifact ,使其成为稳定版本。已发布的 Artifact 不能在存储库中被覆盖,因此不需要时间戳。已发布的 Artifact 通常会转到单独的存储库。

检查有关 Maven release plugin here 的信息

关于java - Maven 部署 > 上传的文件名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48348413/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com