Closed pith closed 8 years ago
A new param param("scan.warn.disable", true)
(false by default) should be added.
scan.warn.disable
should be introduced. rootPackage(String ...)
rather than packageRoot(String...)
Plugin
interface, the name of the method String pluginPackageRoot();
should be in fact String pluginRootPackage();
in order to clean this feature everywhere in the code, if you see others you can fix them the correct form is rootPackage
The warning message should be updated like this
================================ WARNING ================================
You're actually scanning the WHOLE classpath , this can be time consuming.
Please update your application configuration, to narrow the scan to your application.
1) You can update /nuun.conf in the classpath with the following content
rootPackage = com.acme1, com.acme2
where com.acme1 and com.acme2 are your root packages.
2) You can programmatically use KernelConfiguration.rootPackage("com.acme1" , "com.acme2")
Same as above
3) You can programmatically use KernelConfiguration.param("scan.warn.disable" , "true")
This will disable the warning. It implies, you know what you are doing.
========================================================================
So you want to deprecate the pluginPackageRoot()
method ?
BTW maybe rootPackages()
with an S would be better
Yes deprecate it in order to have the clean api for the 1.0.
Yes rootPackages()
is better.
Ok I started a branch: https://github.com/nuun-io/kernel/tree/fix-59-rootPackages
Add a
packageRoot(String...)
method onKernelConfiguration
. It will be easier to discover than with the curentparam()
method.Also add a warn when no packageRoot is specified.
See #58 for previous discussion.