Skip to content

Commit

Permalink
Capabilities are not persisted
Browse files Browse the repository at this point in the history
Fixes #17592
  • Loading branch information
stuartwdouglas committed Jun 4, 2021
1 parent 2c069ce commit 2e28b51
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -16,6 +16,8 @@
/**
* A representation of the Quarkus dependency model for a given application.
*
* Changes made to this class should also be reflected in {@link PersistentAppModel}
*
* @author Alexey Loubyansky
*/
public class AppModel implements Serializable {
Original file line number Diff line number Diff line change
@@ -29,6 +29,7 @@ public class PersistentAppModel implements Serializable {
private Set<AppArtifactKey> lesserPriorityArtifacts;
private Set<AppArtifactKey> localProjectArtifacts;
private Map<String, String> platformProperties;
private Map<String, CapabilityContract> capabilitiesContracts;
private String userProvidersDirectory;

public PersistentAppModel(String baseName, Map<AppArtifactKey, List<String>> paths, AppModel appModel,
@@ -54,6 +55,7 @@ public PersistentAppModel(String baseName, Map<AppArtifactKey, List<String>> pat
parentFirstArtifacts = new HashSet<>(appModel.getParentFirstArtifacts());
runnerParentFirstArtifacts = new HashSet<>(appModel.getRunnerParentFirstArtifacts());
lesserPriorityArtifacts = new HashSet<>(appModel.getLesserPriorityArtifacts());
capabilitiesContracts = new HashMap<>(appModel.getCapabilityContracts());
}

public String getUserProvidersDirectory() {
@@ -85,6 +87,7 @@ public AppModel getAppModel(Path root) {
for (AppArtifactKey i : localProjectArtifacts) {
model.addLocalProjectArtifact(i);
}
model.setCapabilitiesContracts(capabilitiesContracts);
final PlatformImportsImpl pi = new PlatformImportsImpl();
pi.setPlatformProperties(platformProperties);
model.setPlatformImports(pi);

0 comments on commit 2e28b51

Please sign in to comment.