From 502b16a0e7c7a899a45706e557dbafb3b5fe472a Mon Sep 17 00:00:00 2001 From: juanmuscaria Date: Tue, 14 Sep 2021 12:12:04 -0300 Subject: [PATCH] Fill all plugin metadata properly. --- velocity/pom.xml | 13 +++++++++++++ .../github/games647/fastlogin/velocity/PomData.java | 9 +++++++++ .../fastlogin/velocity/FastLoginVelocity.java | 6 +++--- 3 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 velocity/src/main/java-templates/com/github/games647/fastlogin/velocity/PomData.java diff --git a/velocity/pom.xml b/velocity/pom.xml index b81284af..8352c2a1 100644 --- a/velocity/pom.xml +++ b/velocity/pom.xml @@ -45,6 +45,19 @@ + + org.codehaus.mojo + templating-maven-plugin + 1.0.0 + + + filter-src + + filter-sources + + + + org.apache.maven.plugins maven-shade-plugin diff --git a/velocity/src/main/java-templates/com/github/games647/fastlogin/velocity/PomData.java b/velocity/src/main/java-templates/com/github/games647/fastlogin/velocity/PomData.java new file mode 100644 index 00000000..340e0ea7 --- /dev/null +++ b/velocity/src/main/java-templates/com/github/games647/fastlogin/velocity/PomData.java @@ -0,0 +1,9 @@ +package com.github.games647.fastlogin.velocity; + +public class PomData { + public static final String DISPLAY_NAME = "${project.name}"; + public static final String NAME = "${project.parent.artifactId}"; + public static final String VERSION = "${project.version}-${git.commit.id.abbrev}"; + public static final String DESCRIPTION = "${project.parent.description}"; + public static final String URL = "${project.parent.url}"; +} diff --git a/velocity/src/main/java/com/github/games647/fastlogin/velocity/FastLoginVelocity.java b/velocity/src/main/java/com/github/games647/fastlogin/velocity/FastLoginVelocity.java index abab6c1b..888ed008 100644 --- a/velocity/src/main/java/com/github/games647/fastlogin/velocity/FastLoginVelocity.java +++ b/velocity/src/main/java/com/github/games647/fastlogin/velocity/FastLoginVelocity.java @@ -61,7 +61,8 @@ import com.velocitypowered.api.proxy.server.RegisteredServer; import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer; import org.slf4j.Logger; -@Plugin(id = "fastlogin") +@Plugin(id = PomData.NAME, name = PomData.DISPLAY_NAME, description = PomData.DESCRIPTION, url = PomData.URL, + version = PomData.VERSION, authors = {"games647", "https://github.com/games647/FastLogin/graphs/contributors"}) public class FastLoginVelocity implements PlatformPlugin { private final ProxyServer server; private final Path dataDirectory; @@ -96,8 +97,7 @@ public class FastLoginVelocity implements PlatformPlugin { @Override public String getName() { - //FIXME: some dynamic way to get it? - return "fastlogin"; + return PomData.NAME; } @Override