Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Invalid
-
Log4j-Audit 1.0.0
-
None
-
None
Description
I have a module that packages various audit related classes and I want to make some tests for them and I thought of defining a test catalog in src/test/resources and the tests would use the generated audit event classes.
The problem is that the generated audit classes always end up in target/classes and in the packaged jar.
I've tried to define a separate execution, similar to this example, but it doesn't help.
The log4j-audit-maven-plugin doesn't see the configuration if it's defined inside an execution section and it always invokes project.addCompileSourceRoot, no matter which phase.
<plugin> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-audit-maven-plugin</artifactId> <executions> <execution> <id>generate-test-sources</id> <phase>generate-test-sources</phase> <!-- a configuration section defined here is not recognized 😢--> </execution> </executions> <configuration> <packageName>test</packageName> <outputDirectory>${project.build.directory}/generated-test-sources/log4j-audit</outputDirectory> <catalogReaderAttributes> <catalogFile>src/test/resources/audit-catalog.json</catalogFile> </catalogReaderAttributes> </configuration> </plugin>