fix: 移除 antrun 插件

This commit is contained in:
Coldsmile_7
2026-04-15 01:48:31 +08:00
parent 298c14e706
commit 9ba475f9eb

46
pom.xml
View File

@@ -42,54 +42,8 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>copy-to-test-server</id>
<phase>package</phase>
<configuration>
<target>
<!-- 仅在 test-server 目录存在时执行 -->
<available file="${test.server.path}" property="test.server.exists"/>
<antcall target="copy-if-exists"/>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<!-- Ant 目标定义 -->
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<target>
<target name="copy-if-exists" if="test.server.exists">
<echo message="Cleaning old plugin files..."/>
<delete>
<fileset dir="${test.server.path}" includes="essentialsc-*.jar"/>
</delete>
<echo message="Copying plugin to test server..."/>
<copy file="${project.build.directory}/${project.build.finalName}.jar"
tofile="${test.server.path}/${project.build.finalName}.jar"
overwrite="true"/>
<echo message="Plugin copied successfully!"/>
</target>
</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<resources>
<resource>
<directory>src/main/resources</directory>