|
34 | 34 | import java.util.Collection;
|
35 | 35 | import java.util.Collections;
|
36 | 36 | import java.util.HashMap;
|
| 37 | +import java.util.HashSet; |
37 | 38 | import java.util.List;
|
38 | 39 | import java.util.Map;
|
39 | 40 | import java.util.Optional;
|
40 | 41 | import java.util.Properties;
|
| 42 | +import java.util.Set; |
41 | 43 | import java.util.jar.JarOutputStream;
|
42 | 44 | import java.util.zip.ZipEntry;
|
43 | 45 | import java.util.zip.ZipFile;
|
@@ -108,6 +110,11 @@ public class MetadataAggregationMojo extends AbstractMojo {
|
108 | 110 |
|
109 | 111 | static final String SPRING_CLOUD_DATAFLOW_OPTION_GROUPS_PROPERTIES = "dataflow-configuration-option-groups.properties";
|
110 | 112 |
|
| 113 | + private static final Set<String> KNOWN_PROBLEMATIC_ENUMS = new HashSet<>(); |
| 114 | + static { |
| 115 | + KNOWN_PROBLEMATIC_ENUMS.add("org.springframework.boot.autoconfigure.data.jdbc.JdbcDatabaseDialect"); |
| 116 | + } |
| 117 | + |
111 | 118 | @Parameter(defaultValue = "${project}")
|
112 | 119 | private MavenProject mavenProject;
|
113 | 120 |
|
@@ -527,8 +534,13 @@ void addEnumHints(ConfigurationMetadata configurationMetadata, ClassLoader class
|
527 | 534 | enumConstants = clazz.getEnumConstants();
|
528 | 535 | }
|
529 | 536 | catch (NoClassDefFoundError ex) {
|
530 |
| - getLog().error("Failed to resolve enum constants for property = " + property + " and class = " + clazz, ex); |
531 |
| - continue; |
| 537 | + String enumClass = clazz.getName(); |
| 538 | + if (KNOWN_PROBLEMATIC_ENUMS.contains(enumClass)) { |
| 539 | + getLog().info("[EXPECTED] Failed to resolve enum constants for property = " + property + " and class = " + clazz); |
| 540 | + continue; |
| 541 | + } |
| 542 | + getLog().error("[UNEXPECTED] Failed to resolve enum constants for property = " + property + " and class = " + clazz, ex); |
| 543 | + throw ex; |
532 | 544 | }
|
533 | 545 | for (Object enumConstant : enumConstants) {
|
534 | 546 | valueHints.add(new ValueHint(enumConstant, null));
|
|
0 commit comments