This issue has come to the fore for me because the Maven tooling tests
require Junit5 patterns with annotations. This means that the full layout
of the test cases have to be defined before the code compiles. This is in
direct conflict with the current strategy of building test cases by adding
minor functionality to existing tests. The new solution requires that the
test cases be generated as code and then compiled.
I am proposing that we restructure RAT in an attempt to reduce the
complexity of the build and the size of the resulting jar as well as
supporting Junit5 style tests in the UIs that can be driven by test data
and algorithms from the the core.
Currently RAT has 6 modules: rat, rat-core, rat-plugin, rat-tasks,
rat-testdat, and rat-tools.
- rat: builds the final packaging.
- rat-core: the core code and CLI UI.
- rat-plugin: the Maven UI.
- rat-tasks: the Ant UI.
- rat-testdata: the test data to ensure that tests are consistent.
- rat-tools: tools to help generate documentation and UIs.
I would like to restructure this to:
- rat-core: the core code without UI.
- Test code to provide tools to build and test UI and to generate
documentation.
- This code contains the apache commons cli option generation and
list of functionality. The UIs will utilize this information to generate
their UI to support the core functionality.
- packaged as a jar, test-jar, source-jar, test-source-jar
- rat-test.jar contains test code and code to assist in generating UI
test code.
- rat-plugin: (perhaps renamed to rat-maven) the Maven UI.
- Probably 2 parts: a sub-module to generate specific Maven test code
from the UI test data, and a UI module that generates the maven
plugin and
tests it using the tools from the first sub-module.
- Uses rat.jar and rat-test.jar.
- packaged as Maven plugin jar, test-jar, source-jar, test-source-jar
- rat-tasks (perhaps renamed to rat-ant) the Ant UI. May require 2
sub-modules like Maven.
- packaged as an Ant task library jar, test-jar, source-jar,
test-source.jar
- rat-cli: The rat command line UI. Extracted from current rat-core.
- packaged as an executable jar, test-jar, source-jar,
test-source.jar, and tar file containing executable jar and scripts to
easily run it.
- rat-site: project to specifically generate the rat web site.
- packaged as a source-jar, test-source.jar
- Used to generate the site.
- May have scripts to help with deployment.
For the time being all projects would share the same version number. We
can discuss different cadences later.
The Maven and Ant UI may be able to use something like Velocity to generate
some testing source without creating custom tools. The rat-core tooling
will try to emphasize and support this.
Using this structure should make the build simpler as we will be able use
earlier packages to generate the code in later testing.
This should provide us a clean separation of the various UIs.
This should reduce the size of the deployed jar regardless of the UI that
is being used.
If there is no objection I would like to start a feature branch to do this
work on.
Anybody who is interested in building a UI or maintaining one of the
current UIs is welcome to work on the feature branch.
This will mean extra work as we will have to keep the feature branch
reasonably aligned with the fixes.
Please comment.
Claude