Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Feature Model Analyser 1.3.8
-
None
Description
Currently, an analyser task just reports a string (either as error or warning) - we should add new methods to AnalyserTaskContext for reporting error/warning.
These methods should take an ArtifactId and a string or an extension name and a string (something like reportArtifactError(ArtifactId, String)...reportExtensionError(String, String) )
This way the analysers can provide more context about a warning/error and we can display them later per artifact instead of a long list. With that we have three types of errors: global (just the string), per artifact id, per extension name - the analyser tasks could be updated to use the new methods where appropriate. Similar, we add new methods to AnalyserResult getting those three types of errors/warnings - and deprecate the two existing ones. They would be changed to return all errors/warnings - so everything would be compatible.
The final piece is ignoring errors/warnings for certain artifacts. If we do the changes as mentioned above - the scanner/analyser does not need to know anything about whether something is ignored. We can handle this in the maven plugin.
We have two options here: either we make this a configuration of the plugin - or we allow that metadata property is added to an artifact in the feature model telling the plugin to not report errors/warnings for this artifact.