forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request quarkusio#17252 from aloubyansky/new-platform-model
- Loading branch information
Showing
69 changed files
with
1,669 additions
and
226 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
core/deployment/src/main/java/io/quarkus/deployment/builditem/AppModelProviderBuildItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package io.quarkus.deployment.builditem; | ||
|
||
import org.jboss.logging.Logger; | ||
|
||
import io.quarkus.bootstrap.model.AppModel; | ||
import io.quarkus.bootstrap.model.PlatformImports; | ||
import io.quarkus.builder.item.SimpleBuildItem; | ||
import io.quarkus.deployment.BootstrapConfig; | ||
|
||
public final class AppModelProviderBuildItem extends SimpleBuildItem { | ||
|
||
private static final Logger log = Logger.getLogger(AppModelProviderBuildItem.class); | ||
|
||
private final AppModel appModel; | ||
|
||
public AppModelProviderBuildItem(AppModel appModel) { | ||
this.appModel = appModel; | ||
} | ||
|
||
public AppModel validateAndGet(BootstrapConfig config) { | ||
final PlatformImports platforms = appModel.getPlatforms(); | ||
if (platforms != null && !BootstrapConfig.MisalignedPlatformImports.IGNORE.equals(config.misalignedPlatformImports) | ||
&& !platforms.isAligned()) { | ||
switch (config.misalignedPlatformImports) { | ||
case ERROR: | ||
throw new RuntimeException(platforms.getMisalignmentReport()); | ||
case WARN: | ||
log.warn(platforms.getMisalignmentReport()); | ||
break; | ||
default: | ||
throw new RuntimeException("Unrecognized option for quarkus.bootstrap.misaligned-platform-imports: " | ||
+ config.misalignedPlatformImports); | ||
} | ||
} | ||
return appModel; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
core/deployment/src/main/java/io/quarkus/deployment/steps/CurateOutcomeBuildStep.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package io.quarkus.deployment.steps; | ||
|
||
import io.quarkus.deployment.BootstrapConfig; | ||
import io.quarkus.deployment.annotations.BuildStep; | ||
import io.quarkus.deployment.builditem.AppModelProviderBuildItem; | ||
import io.quarkus.deployment.pkg.builditem.CurateOutcomeBuildItem; | ||
|
||
public class CurateOutcomeBuildStep { | ||
|
||
BootstrapConfig config; | ||
|
||
@BuildStep | ||
CurateOutcomeBuildItem curateOutcome(AppModelProviderBuildItem appModelProvider) { | ||
return new CurateOutcomeBuildItem(appModelProvider.validateAndGet(config)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.