Skip to content

Instantly share code, notes, and snippets.

@sarxos
Created March 19, 2020 14:49
Show Gist options
  • Select an option

  • Save sarxos/832e9080a73b533d0a4dd14a43002bef to your computer and use it in GitHub Desktop.

Select an option

Save sarxos/832e9080a73b533d0a4dd14a43002bef to your computer and use it in GitHub Desktop.
A @ BuildStep to register files as hot deployment resources
@BuildStep
List<HotDeploymentWatchedFileBuildItem> hotDeploymentWatchedFiles(LaunchModeBuildItem launchMode) {
List<HotDeploymentWatchedFileBuildItem> watchedFiles = new ArrayList<>();
watchedFiles.add(new HotDeploymentWatchedFileBuildItem("META-INF/persistence.xml"));
watchedFiles.add(new HotDeploymentWatchedFileBuildItem(INTEGRATOR_SERVICE_FILE));
watchedFiles.add(new HotDeploymentWatchedFileBuildItem(SERVICE_CONTRIBUTOR_SERVICE_FILE));
getSqlLoadScript(launchMode.getLaunchMode()).ifPresent(script -> {
watchedFiles.add(new HotDeploymentWatchedFileBuildItem(script));
});
return watchedFiles;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment