部署项目时(IntelliJ)。
我看到文件名包含一些数字。这是为什么?为什么不简单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>
答案 0 :(得分:3)
Maven SNAPSHOT工件存储有一个时间戳,存储库使用该时间戳来识别哪一个是最新的快照。
这是因为可以在存储库中覆盖快照工件。
要制作稳定版本,即TryAPI-2.0
,您需要释放该工件,以使其成为稳定版本。发布的工件不能在存储库中覆盖,因此不需要时间戳。发布的工件通常会转到单独的存储库。