Skip to content

Commit

Permalink
Merge pull request #12657 from aloubyansky/12528
Browse files Browse the repository at this point in the history
Devmode: throw an error if a hot-reloadable module hasn't been compiled before the launch
  • Loading branch information
stuartwdouglas authored Oct 12, 2020
2 parents 9d5f822 + 22f583f commit 6ee64ae
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ private String getSourceEncoding() {
return null;
}

private void addProject(DevModeContext devModeContext, LocalProject localProject, boolean root) {
private void addProject(DevModeContext devModeContext, LocalProject localProject, boolean root) throws Exception {

String projectDirectory = null;
Set<String> sourcePaths = null;
Expand Down Expand Up @@ -557,6 +557,11 @@ private void addProject(DevModeContext devModeContext, LocalProject localProject
resourcePath = resourcesSourcesDir.toAbsolutePath().toString();
}

if (classesPath == null && (!sourcePaths.isEmpty() || resourcePath != null)) {
throw new MojoExecutionException("Hot reloadable dependency " + localProject.getAppArtifact()
+ " has not been compiled yet (the classes directory " + classesDir + " does not exist)");
}

Path targetDir = Paths.get(project.getBuild().getDirectory());

DevModeContext.ModuleInfo moduleInfo = new DevModeContext.ModuleInfo(localProject.getKey(),
Expand Down

0 comments on commit 6ee64ae

Please sign in to comment.