Details
-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
2.5.0, 2.6.0
-
None
Description
Commit 8c081131 "get grouper ui dev env working" added a new method
GrouperUtil.fileCopyExampleResourceIfNotExist(String exampleResource, String resource)
|
The only place this is called is the first time GrouperUtil.getLog() is called by any class that does logging. It is called with parameters "log4j2.example.xml" and "log4j2.xml". The method itself checks whether log4j2.xml already exists before copying, which contradicts the purpose suggested by the "IfNotExist" method name. This is what causes the JUnit errors, since log4j2.xml is not packaged with the Grouper artifacts. Also, log4j2.example.xml is not packaged in the grouper jar. Since both the example and the target need to already exist as files in the filesystem for a successful startup, the fileCopyExampleResourceIfNotExist() method is pretty much superfluous.
A normal Grouper startup already has a CheckConfig step to verify log4j2.xml exists. There is no danger of a container running while missing the file.
I haven't yet figured out how log4j2.example.xml gets into the image. It's not packaged in the grouper jar, is not handled by the installer, and doesn't exist in the Git repo for the docker build. I must be missing something.