Repository: quarkusio/quarkus
Issue: re-augmentation causes information to get lost in 2.0.0.CR2

## Describe the bug
Some of the generated code in `/quarkus-app/quarkus/generated-bytecode.jar` gets lost if the project is re-augmented after the build.

### Expected behavior
I can run re-augmentation any number of time and will always get the original if no build time properties have changed.

### Actual behavior
The augmentation output after re-augmentation is reduced and leads to a different runtime behavior.

## To Reproduce

* Checkout `https://github.com/renegrob/reproducer-base/tree/reaugmentation-issue`
* build project with `./gradlew clean :app:quarkusBuild -Dquarkus.package.type=mutable-jar`
* Copy the augmentation output in `app/build/quarkus-app/quarkus/` away.
* Run re-augmentation without changing the configuation: `java -jar -Dquarkus.launch.rebuild=true app/build/quarkus-app/quarkus-run.jar`

If you compare the initial augmentation output and the one after re-augmentation you notice that:
* open-api-doc is empty after re-augmentation: `reproducer-base/app/build/quarkus-app/quarkus/generated-bytecode.jar!/META-INF/quarkus-generated-openapi-doc.YAML`

(See also https://quarkusio.zulipchat.com/#narrow/stream/187030-users/topic/2.2E0.2E0.2ECR2.20NullPointerExceptions.20after.20Reagumentation)


Link to a small reproducer (preferably a Maven project if the issue is not Gradle-specific).
https://github.com/renegrob/reproducer-base/tree/reaugmentation-issue

Or attach an archive containing the reproducer to the issue.
## Environment (please complete the following information):

### Output of `uname -a` or `ver`
`Linux automatix 5.8.0-53-generic #60~20.04.1-Ubuntu`

### Output of `java -version`
```
openjdk version "11.0.11" 2021-04-20 LTS
OpenJDK Runtime Environment Zulu11.48+21-CA (build 11.0.11+9-LTS)
OpenJDK 64-Bit Server VM Zulu11.48+21-CA (build 11.0.11+9-LTS, mixed mode)
```

### GraalVM version (if different from Java)
n/a

### Quarkus version or git rev
`2.0.0.CR2`

### Build tool (ie. output of `mvnw --version` or `gradlew --version`)
```
------------------------------------------------------------
Gradle 6.5.1
------------------------------------------------------------

Build time:   2020-06-30 06:32:47 UTC
Revision:     66bc713f7169626a7f0134bf452abde51550ea0a

Kotlin:       1.3.72
Groovy:       2.5.11
Ant:          Apache Ant(TM) version 1.10.7 compiled on September 1 2019
JVM:          11.0.11 (Azul Systems, Inc. 11.0.11+9-LTS)
OS:           Linux 5.8.0-53-generic amd64
```

## Additional context
n/a


Changed files:
independent-projects/bootstrap/app-model/src/main/java/io/quarkus/bootstrap/model/PersistentAppModel.java
independent-projects/bootstrap/app-model/src/main/java/io/quarkus/bootstrap/model/AppModel.java

diff --git a/independent-projects/bootstrap/app-model/src/main/java/io/quarkus/bootstrap/model/AppModel.java b/independent-projects/bootstrap/app-model/src/main/java/io/quarkus/bootstrap/model/AppModel.java
index 453258db877..67983300d10 100644
--- a/independent-projects/bootstrap/app-model/src/main/java/io/quarkus/bootstrap/model/AppModel.java
+++ b/independent-projects/bootstrap/app-model/src/main/java/io/quarkus/bootstrap/model/AppModel.java
@@ -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 {
diff --git a/independent-projects/bootstrap/app-model/src/main/java/io/quarkus/bootstrap/model/PersistentAppModel.java b/independent-projects/bootstrap/app-model/src/main/java/io/quarkus/bootstrap/model/PersistentAppModel.java
index 203276a5731..8d027a545b4 100644
--- a/independent-projects/bootstrap/app-model/src/main/java/io/quarkus/bootstrap/model/PersistentAppModel.java
+++ b/independent-projects/bootstrap/app-model/src/main/java/io/quarkus/bootstrap/model/PersistentAppModel.java
@@ -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);