Skip to content

Commit

Permalink
Merge pull request #3220 from gwenneg/issue-3218-cors-in-generated-ap…
Browse files Browse the repository at this point in the history
…plication-properties

Add ConfigPhase.BUILD_AND_RUN_TIME_FIXED values to example config file
  • Loading branch information
stuartwdouglas authored Jul 14, 2019
2 parents 4e5409d + 7c11227 commit 08fe2d3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ private void doProcess(CurateOutcome appState) throws AppCreatorException {
runnerClassLoader = new URLClassLoader(cpUrls.toArray(new URL[cpUrls.size()]), getClass().getClassLoader());

ClassLoader old = Thread.currentThread().getContextClassLoader();
BuildResult result;
try {
Thread.currentThread().setContextClassLoader(runnerClassLoader);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.builditem.BuildTimeConfigurationBuildItem;
import io.quarkus.deployment.builditem.BuildTimeRunTimeFixedConfigurationBuildItem;
import io.quarkus.deployment.builditem.ConfigDescriptionBuildItem;
import io.quarkus.deployment.builditem.RunTimeConfigurationBuildItem;
import io.quarkus.deployment.configuration.ConfigDefinition;
Expand All @@ -20,7 +21,8 @@ public class ConfigDescriptionBuildStep {
@BuildStep
List<ConfigDescriptionBuildItem> createConfigDescriptions(
RunTimeConfigurationBuildItem runtimeConfig,
BuildTimeConfigurationBuildItem buildTimeConfig) throws Exception {
BuildTimeConfigurationBuildItem buildTimeConfig,
BuildTimeRunTimeFixedConfigurationBuildItem buildTimeRuntimeConfig) throws Exception {
Properties javadoc = new Properties();
Enumeration<URL> resources = Thread.currentThread().getContextClassLoader()
.getResources("META-INF/quarkus-javadoc.properties");
Expand All @@ -32,6 +34,7 @@ List<ConfigDescriptionBuildItem> createConfigDescriptions(
List<ConfigDescriptionBuildItem> ret = new ArrayList<>();
processConfig(runtimeConfig.getConfigDefinition(), ret, javadoc);
processConfig(buildTimeConfig.getConfigDefinition(), ret, javadoc);
processConfig(buildTimeRuntimeConfig.getConfigDefinition(), ret, javadoc);
return ret;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
public class HttpBuildConfig {

/**
* The CORS config
* Enable the CORS filter.
*/
@ConfigItem(name = "cors")
public boolean corsEnabled = false;
Expand Down

0 comments on commit 08fe2d3

Please sign in to comment.