4040public class ApplicationDeploymentClasspathBuilder {
4141
4242 public static final String QUARKUS_BOOTSTRAP_RESOLVER_CONFIGURATION = "quarkusBootstrapResolverConfiguration" ;
43+ private static final String ON = "on" ;
4344
4445 public static String getLaunchModeAlias (LaunchMode mode ) {
4546 if (mode == LaunchMode .DEVELOPMENT ) {
@@ -86,15 +87,15 @@ public static void initConfigurations(Project project) {
8687 config .extendsFrom (configContainer .getByName (JavaPlugin .TEST_RUNTIME_CLASSPATH_CONFIGURATION_NAME ));
8788 config .setCanBeConsumed (false );
8889 config .attributes (attrs -> attrs .attribute (ConditionalDependencyResolver
89- .getQuarkusConditionalDependencyAttribute (project .getName (), LaunchMode .TEST ), "on" ));
90+ .getQuarkusConditionalDependencyAttribute (project .getName (), LaunchMode .TEST ), ON ));
9091 });
9192
9293 configContainer
9394 .register (ApplicationDeploymentClasspathBuilder .getBaseRuntimeConfigName (LaunchMode .NORMAL ), config -> {
9495 config .extendsFrom (configContainer .getByName (JavaPlugin .RUNTIME_CLASSPATH_CONFIGURATION_NAME ));
9596 config .setCanBeConsumed (false );
9697 config .attributes (attrs -> attrs .attribute (ConditionalDependencyResolver
97- .getQuarkusConditionalDependencyAttribute (project .getName (), LaunchMode .NORMAL ), "on" ));
98+ .getQuarkusConditionalDependencyAttribute (project .getName (), LaunchMode .NORMAL ), ON ));
9899 });
99100
100101 configContainer
@@ -105,36 +106,8 @@ public static void initConfigurations(Project project) {
105106 configContainer .getByName (JavaPlugin .RUNTIME_CLASSPATH_CONFIGURATION_NAME ));
106107 config .setCanBeConsumed (false );
107108 config .attributes (attrs -> attrs .attribute (ConditionalDependencyResolver
108- .getQuarkusConditionalDependencyAttribute (project .getName (), LaunchMode .DEVELOPMENT ), "on" ));
109+ .getQuarkusConditionalDependencyAttribute (project .getName (), LaunchMode .DEVELOPMENT ), ON ));
109110 });
110- /* @formatter:off
111- var quarkusDepsAttr = Attribute.of("quarkus.deps", String.class);
112- project.getDependencies().getComponents().all(compDetails -> {
113- if (compDetails.getId().getName().equals("xercesImpl")) {
114- System.out.println("Component: " + compDetails.getId());
115- compDetails.addVariant("custom", "compile", variant -> {
116- variant.attributes(attrs -> {
117- attrs.attribute(quarkusDepsAttr, "custom");
118- });
119- variant.withDependencies(directDeps -> {
120- for (var directDep : directDeps) {
121- System.out.println("- " + directDep.getModule());
122- }
123- directDeps.add("ai.active:webhook-sdk:1.0.7");
124- });
125- });
126- }
127- });
128- configContainer.register("quarkusWip", config -> {
129- config.withDependencies(deps -> {
130- deps.add(project.getDependencies().create("xom:xom:1.3.9"));
131- });
132- config.attributes(attrs -> {
133- attrs.attribute(quarkusDepsAttr, "custom");
134- });
135- });
136- @formatter:on
137- */
138111 }
139112
140113 private static Configuration [] getOriginalRuntimeClasspaths (Project project , LaunchMode mode ) {
0 commit comments