Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,6 @@ protected void init() throws MojoExecutionException {
}

super.init();
// Ensure server dir exists to generate features to the $serverDirectory/configDropins/overrides/generated-features.xml
if (!generateToSrc && !serverDirectory.exists()) {
throw new MojoExecutionException("The 'generate-features' goal requires an existing Liberty server in directory " + serverDirectory.getPath() + ". Please run the 'liberty:create' goal before 'generate-features'.");
}
}

@Override
Expand Down Expand Up @@ -182,7 +178,7 @@ private void generateFeatures() throws MojoExecutionException, PluginExecutionEx
getLog().info("\nSkipping module " + project.getArtifactId() + " which is not configured for the generate-features goal.\n");
return;
}

List<MavenProject> downstreamProjects = graph.getDownstreamProjects(project, true);
if (!downstreamProjects.isEmpty()) {
getLog().debug("Downstream projects: " + downstreamProjects);
Expand All @@ -209,6 +205,10 @@ private void generateFeatures() throws MojoExecutionException, PluginExecutionEx
return;
}
}
// Ensure server dir exists to generate features to the $serverDirectory/configDropins/overrides/generated-features.xml
if (!generateToSrc && !serverDirectory.exists()) {
throw new MojoExecutionException("The 'generate-features' goal requires an existing Liberty server in directory " + serverDirectory.getPath() + ". Please run the 'liberty:create' goal before 'generate-features'.");
}

if (useTempDirAsContext) {
// When this parameter is true it is required that the caller has copied the config into this dir.
Expand Down