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 @@ -29,10 +29,15 @@ public void execute() throws MojoExecutionException {
throw new MojoExecutionException("Cannot relocate super-sources if moduleName is not specified");
}
String targetPath = moduleName.replace('.', '/');
// Keep only package name
targetPath = targetPath.substring(0, targetPath.lastIndexOf('/'));
// Keep only package name (if there is one)
int lastTrailingSlash = targetPath.lastIndexOf('/');
if (lastTrailingSlash > 0) {
targetPath = targetPath.substring(0, lastTrailingSlash + 1);
} else {
targetPath = "";
}
// Relocate into 'super' subfolder
targetPath = ensureTrailingSlash(targetPath) + "super/";
targetPath += "super/";
resource.setTargetPath(targetPath);
}
addResource(resource);
Expand Down