From 9443e15d612dcc5ccc9e964ce8cac0cecd19e5d4 Mon Sep 17 00:00:00 2001 From: HaHaWTH Date: Wed, 17 Apr 2024 15:45:38 +0800 Subject: [PATCH] Template --- pom.xml | 27 ++++++++++++++----- .../AdvancedSensitiveWordsVelocity.java | 3 ++- .../wdsj/asw/velocity/template/PomData.java | 5 ++++ 3 files changed, 27 insertions(+), 8 deletions(-) create mode 100644 src/main/java/io/wdsj/asw/velocity/template/PomData.java diff --git a/pom.xml b/pom.xml index b57c966..29a8aa6 100644 --- a/pom.xml +++ b/pom.xml @@ -18,6 +18,23 @@ + + org.codehaus.mojo + templating-maven-plugin + 3.0.0 + + + filter-src + + filter-sources + + + ${project.build.directory}/generated-sources/java + src/main/java/io/wdsj/asw/velocity/template + + + + org.apache.maven.plugins maven-javadoc-plugin @@ -52,17 +69,13 @@ compile - - testCompile - test-compile - - testCompile - - ${java.version} ${java.version} + + **/io/wdsj/asw/velocity/template/** + diff --git a/src/main/java/io/wdsj/asw/velocity/AdvancedSensitiveWordsVelocity.java b/src/main/java/io/wdsj/asw/velocity/AdvancedSensitiveWordsVelocity.java index f085fc5..c92c1d9 100644 --- a/src/main/java/io/wdsj/asw/velocity/AdvancedSensitiveWordsVelocity.java +++ b/src/main/java/io/wdsj/asw/velocity/AdvancedSensitiveWordsVelocity.java @@ -12,6 +12,7 @@ import com.velocitypowered.api.proxy.messages.ChannelIdentifier; import com.velocitypowered.api.proxy.messages.LegacyChannelIdentifier; import com.velocitypowered.api.proxy.messages.MinecraftChannelIdentifier; +import io.wdsj.asw.velocity.template.PomData; import org.slf4j.Logger; import java.util.Optional; @@ -19,7 +20,7 @@ @Plugin( id = "advancedsensitivewords", name = "AdvancedSensitiveWordsVelocity", - version = "Crystal", + version = PomData.VERSION, authors = {"HaHaWTH"} ) public class AdvancedSensitiveWordsVelocity { diff --git a/src/main/java/io/wdsj/asw/velocity/template/PomData.java b/src/main/java/io/wdsj/asw/velocity/template/PomData.java new file mode 100644 index 0000000..3fc9d07 --- /dev/null +++ b/src/main/java/io/wdsj/asw/velocity/template/PomData.java @@ -0,0 +1,5 @@ +package io.wdsj.asw.velocity.template; + +public class PomData { + public static final String VERSION = "${project.version}"; +} \ No newline at end of file