ramanathan1504 commented on code in PR #397:
URL:
https://github.com/apache/logging-log4j-samples/pull/397#discussion_r3264197524
##########
log4j-samples-jlink/pom.xml:
##########
@@ -30,129 +28,87 @@
<name>Apache Log4j Samples: JLink custom JRE</name>
<properties>
- <!-- Plugin version -->
<maven-jlink-plugin.version>3.2.0</maven-jlink-plugin.version>
-
- <!-- OS-specific launcher suffix -->
- <jlink.launcher.suffix />
-
- <!-- Optional readability improvement -->
-
<jlink.launcher.path>${project.build.directory}/maven-jlink/default/bin/${project.artifactId}${jlink.launcher.suffix}</jlink.launcher.path>
+ <!-- Base path for the launcher created by jlink -->
+
<jlink.launcher.path>${project.build.directory}/maven-jlink/default/bin/log4j-samples-jlink</jlink.launcher.path>
+ <!-- Defaults for Unix/macOS -->
+ <exec.launcher.cmd>${jlink.launcher.path}</exec.launcher.cmd>
+ <exec.launcher.arg0 />
+ <exec.launcher.arg1 />
</properties>
<dependencies>
-
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</dependency>
-
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
+ <scope>runtime</scope>
</dependency>
-
<dependency>
<groupId>org.apache.logging.log4j.samples</groupId>
<artifactId>log4j-samples-configuration</artifactId>
<scope>runtime</scope>
</dependency>
-
- <!-- TEST -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
-
</dependencies>
<build>
<plugins>
-
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>prepare-integration-test-logs</id>
- <goals>
- <goal>run</goal>
- </goals>
- <phase>pre-integration-test</phase>
- <configuration>
- <target>
- <mkdir dir="${project.build.directory}/logs" />
- <delete file="${project.build.directory}/logs/out.log" />
- </target>
- </configuration>
- </execution>
- </executions>
+ <artifactId>maven-jlink-plugin</artifactId>
+ <version>${maven-jlink-plugin.version}</version>
+ <extensions>true</extensions>
+ <configuration>
+
<launcher>log4j-samples-jlink=org.apache.logging.log4j.samples.jlink/org.apache.logging.log4j.samples.jlink.Main</launcher>
+ </configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
- <version>${exec-maven-plugin.version}</version>
Review Comment:
I accidentally removed it while I was debugging the MojoExecutionException
that was happening on Windows. I was changing configurations trying to fix the
build crash, and I forgot to restore the version tag after I finally fixed the
root cause (which was the missing cmd /c and .bat execution on Windows). I will
add the <version> tag back right now and push the update!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]