The JetspeedSerializer is a monolitic component which depends on all other components for which it performs data serialization: capabilities, security, profiler and registry.
This makes setting up a proper test environment without circular dependencies in the build impossible.
Furthermore, extending/improving upon the JetspeedSerializer is very difficult and cumbersome to do right now.
So, I'll turn the JetspeedSerializer "inside out", making it a "normal" Spring component by itself, and breaking out the large serialization code in "pluggable" JetspeedComponentSerializer classes.
Then, each component for which serialization is needed, can provide its own (part of the) serialization with a JetspeedComponentSerializer implementation scoped at the component itself.
Furthermore, and most important, because the main JetspeedSerializer(Impl) then can be configured with one or more component serializers, and it no longer will depend on any of them,
it can be used for seeding test data for a specific component (only).
For the tests, I will also add a deleteData method to JetspeedComponentSerializer which can be used for cleaning out (component specific) data before/after a test case run.
One last remark:
The current usage of the jetspeedSerializer is command line based through the JetspeedSerializerApplication.
For now, I will remove the implementation code from this class because the new setup requires a complete rehaul for it.
Once we get all the database related components tests working properly again, this class will need to be reimplemented.