diff --git a/agent-module/plugins-test-module/plugins-test/pom.xml b/agent-module/plugins-test-module/plugins-test/pom.xml index c4a8a7b108ed..1b71bd83a5be 100644 --- a/agent-module/plugins-test-module/plugins-test/pom.xml +++ b/agent-module/plugins-test-module/plugins-test/pom.xml @@ -201,6 +201,11 @@ true - + + + org.codehaus.mojo + templating-maven-plugin + + diff --git a/agent-module/plugins-test-module/plugins-test/src/main/java-templates/com/navercorp/pinpoint/test/plugin/Log4j2VersionTemplate.java b/agent-module/plugins-test-module/plugins-test/src/main/java-templates/com/navercorp/pinpoint/test/plugin/Log4j2VersionTemplate.java new file mode 100644 index 000000000000..c2948bbe9590 --- /dev/null +++ b/agent-module/plugins-test-module/plugins-test/src/main/java-templates/com/navercorp/pinpoint/test/plugin/Log4j2VersionTemplate.java @@ -0,0 +1,8 @@ +package com.navercorp.pinpoint.test.plugin; + +class Log4j2VersionTemplate { + private Log4j2VersionTemplate() { + } + + static final String VERSION = "${log4j2.version}"; +} diff --git a/agent-module/plugins-test-module/plugins-test/src/main/java/com/navercorp/pinpoint/test/plugin/PluginClassLoading.java b/agent-module/plugins-test-module/plugins-test/src/main/java/com/navercorp/pinpoint/test/plugin/PluginClassLoading.java index b6b08a97d9b3..2f42fd91c05a 100644 --- a/agent-module/plugins-test-module/plugins-test/src/main/java/com/navercorp/pinpoint/test/plugin/PluginClassLoading.java +++ b/agent-module/plugins-test-module/plugins-test/src/main/java/com/navercorp/pinpoint/test/plugin/PluginClassLoading.java @@ -84,7 +84,7 @@ public static String[] getGlobMatchesCheckClassPath() { "slf4j-tinylog" }; - private static final String LOG4J2_VERSION = "2.12.1"; + private static final String LOG4J2_VERSION = Log4j2VersionTemplate.VERSION; private static final String[] LOGGER_DEPENDENCY_ID = new String[]{ "org.apache.logging.log4j:log4j-api:%s", "org.apache.logging.log4j:log4j-core:%s",