diff --git a/pom.xml b/pom.xml
index 8345849..5bc828f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -63,6 +63,7 @@
org.jenkins-ci.plugins
matrix-project
+ true
org.jenkins-ci.plugins.workflow
diff --git a/src/main/java/htmlpublisher/HtmlPublisher.java b/src/main/java/htmlpublisher/HtmlPublisher.java
index 8245f0b..396f7bb 100644
--- a/src/main/java/htmlpublisher/HtmlPublisher.java
+++ b/src/main/java/htmlpublisher/HtmlPublisher.java
@@ -390,21 +390,26 @@ public Collection extends Action> getProjectActions(AbstractProject, ?> proj
List actions = new ArrayList<>();
for (HtmlPublisherTarget target : this.reportTargets) {
actions.add(target.getProjectAction(project));
- if (project instanceof MatrixProject && ((MatrixProject) project).getActiveConfigurations() != null){
- for (MatrixConfiguration mc : ((MatrixProject) project).getActiveConfigurations()){
- try {
- mc.onLoad(mc.getParent(), mc.getName());
- }
- catch (IOException e){
- //Could not reload the configuration.
- }
- }
+ if (project.getClass().getName().equals("hudson.matrix.MatrixProject")) {
+ adjustMatrixProject(project);
}
}
return actions;
}
}
+ private static void adjustMatrixProject(AbstractProject, ?> project) {
+ MatrixProject mp = (MatrixProject) project;
+ if (mp.getActiveConfigurations() != null) {
+ for (MatrixConfiguration mc : mp.getActiveConfigurations()) {
+ try {
+ mc.onLoad(mc.getParent(), mc.getName());
+ } catch (IOException e) {
+ //Could not reload the configuration.
+ }
+ }
+ }
+ }
@SuppressRestrictedWarnings(NoExternalUse.class)
public static DirScanner dirScannerGlob(String includes, String excludes, boolean useDefaultExcludes, OpenOption... openOptions) throws Exception {