While working on CLI tools patch
OPENNLP-402<https://issues.apache.org/jira/browse/OPENNLP-402> the
following proposal came to my mind:

I would like to propose moving CLI tools out of the tool package into
separate module and jar. Motivation: as was mentioned earlier, OpenNLP is a
library, therefore it would be nice to keep extra stuff in separate jars,
because many people who use the library might never need CLI tools. But
since this is a bigger refactoring than the patch I've sent, I'd like to
discuss it first.

I see the following advantages:

* Proper modularization. Everybody gets what's needed and no extra stuff.
This leads to
* Smaller jars, fewer classes on the classpath, which comes in handy when
you use classpath search tools, like those in Spring.

Dealing with the dependency side of this (one more dependency) I see the
following:

* New CLI jar will not be added to the classpath anyway (it's used only
from "opennlp" command-line scripts), so there is no extra dependency to
manage for those using the library and those using CLI have it handled
already by the command-line scripts. The dependencies become: CLI  ->
OpenNLP Tools -> MaxEnt.

As an extra option to answer "jar multiplication problem" for those outside
of Maven, if I'm not mistaken, there is a possibility to roll as many jars
as one wants into one during the build. Which turns this into a build
option, rather than project structure option question.

Aliaksandr

Reply via email to