Closed karrayhamdi closed 5 years ago
In a multi-module project, the jar is not always installed in .m2. So it can not be referenced. Specifically, catalogBuilder uses maven classpath construction, and maven choose to use the one that is closest to project.
Oxygen doesn't release the jar, as the path described in catalog is `file:jar:/' which make loading it in the classpath, and JVM doesn't free classpath entries.
To avoid this problem, last release (3.1.0) of catalogBuilder has a new configuration parameter : generateOxygenCatalog
which is a boolean, false
by default. When true, it generates a catalog-oxygen.xml
, which uses zip protocol, instead of jar. This allows to avoid loading the jar in classpath, but works only with Oxygen.
Then, in oxygen, instead of defining ${pdu}/catalog.xml
as global catalog, use ${pdu}/oxygen-catalog.xml
, and jar file will not be lock anymore.
Hi @cmarchand , In a multi module project, the catalog make reference to the jar relating to the project and not to the .m2 directory. This let Oxygen locking the jar in submodule and then the clean maven will fail always. Perhaps best solution is to make catalog entry reference the submodule jar in .m2 directory .