fix: CDK, Maven and GraalVM Not supported
* fix: CDK, Maven and GraalVM Not supported
See:
* and not or
@@ -17,8 +17,10 @@ package io.micronaut.starter.feature.graalvm;
import io.micronaut.starter.application.ApplicationType;
import io.micronaut.starter.feature.Feature;
+import io.micronaut.starter.feature.aws.Cdk;
import io.micronaut.starter.feature.github.workflows.docker.GraalVMDockerRegistryWorkflow;
import io.micronaut.starter.feature.validation.FeatureValidator;
+import io.micronaut.starter.options.BuildTool;
import io.micronaut.starter.options.JdkVersion;
import io.micronaut.starter.options.Language;
import io.micronaut.starter.options.Options;
@@ -44,6 +46,11 @@ public class GraalVMFeatureValidator implements FeatureValidator {
if (options.getJavaVersion().majorVersion() > JdkVersion.JDK_17.majorVersion()) {
throw new IllegalArgumentException("GraalVM with native image only supports up to JDK 17");
}
+
+ // See https://github.com/micronaut-projects/micronaut-maven-plugin/issues/373
+ if (options.getBuildTool() == BuildTool.MAVEN && features.stream().anyMatch(Cdk.class::isInstance)) {
+ throw new IllegalArgumentException("Maven, CDK and GraalVM are not yet supporteds");
+ }
}
}
}
