Hello,
as you might know parancoe is used in jugevents.
In jugevents version 3, hereafter named JE3, I am trying to separate the core part composed by BO, PO, DAO from the web part, the first being in the jugevents-core module.
The POs used in jugevents refer to some POs of the plugins spring-securityevolution and world, therefore I have to define the lambico lambico:discover-persistent-classe and lambico:define-daos for these two plugins in the test spring configuration file.
These 2 plugins, as all the other parancoe plugins, have all the classes in the same package with this convention org.parancoe.plugins.<plugin-name>
Unfortunately in this package there are not only POs and DAOs but also listener components which require the parancoe-web dependency.
Because of this situation when I execute the test in jugevents-core I get this exception:
Caused by: java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
In jugevents-core, of course, I don't want to have the parancoe-web dependency, just the parancoe-core.
After having debugged the code, I found out that this class is required by the plugin listener which is loaded, due to the situation previously described, in the org.lambico.spring.xml.ContextUtils class.
I've identified two possible solutions:
1) To have specific sub-packages for dao and po in the plugins in order to avoid this conflict, names should be org.parancoe.plugins.<plugin>.dao and org.parancoe.plugins.<plugin>.po
2) Explicitly declaring each single plugin dao and po in the test configuration file, giving up to the benefit of the lambico lambico:discover-persistent-classe and lambico:define-daos
What do you think?
Cheers,
Enrico.