Skip to content
This repository has been archived by the owner on Jun 7, 2021. It is now read-only.

Commit

Permalink
Ensure content in WEB-INF under src/main/resources gets picked up
Browse files Browse the repository at this point in the history
  • Loading branch information
bbrowning committed Nov 18, 2015
1 parent 700a809 commit 7500db5
Showing 1 changed file with 8 additions and 0 deletions.
Expand Up @@ -132,6 +132,14 @@ protected static boolean setupUsingMaven(DependenciesContainer<?> archive) throw
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
Path simple = classes.relativize(file);
archive.add(new FileAsset(file.toFile()), "WEB-INF/classes/" + convertSeparators(simple));
// If the user's maven output is a jar then they may place
// static content under src/main/resources, in which case
// we need to hoist anything under WEB-INF out of there
// and put it into the root of this archive instead of
// under WEB-INF/classes/WEB-INF/foo
if (simple.toString().contains("WEB-INF")) {
archive.add(new FileAsset(file.toFile()), convertSeparators(simple));
}
return super.visitFile(file, attrs);
}
});
Expand Down

0 comments on commit 7500db5

Please sign in to comment.