One of the features of our plugin relies on the dashboard-view plugin. (it extends hudson.plugins.view.dashboard.DashboardPortlet).
It seems that the dashboard-view plugin is incompatible with CloudBees CI HA/HS. Although our plugin can still offer most of its benefits without the dashboard table, it has become ineffective because, when the dashboard-view plugin is removed, our plugin fails to load due to a dependency error.
Is there a way to declare that a dependency is “optional”? Will adding <optional>true</optional> to the pom.xml is a legit workaround?
Thanks,
However, this means that it will shows an exception in the stdout each time Jenkins starts. Is there any way to catch this exception and printout something more informative to the end user?
You have a class that extends something from dashboard-view plugin. This class has a descriptor that already is annotated with @Extension. For this class you need to add the optional=true to that annotation.