Created
August 8, 2012 19:44
-
-
Save gastaldi/3298000 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Override | |
| public DirectoryResource getSourceFolder() | |
| { | |
| MavenCoreFacet mavenFacet = project.getFacet(MavenCoreFacet.class); | |
| Build build = mavenFacet.getPOM().getBuild(); | |
| String srcFolderName; | |
| if (build != null && build.getSourceDirectory() != null) { | |
| srcFolderName = build.getSourceDirectory(); | |
| } else { | |
| srcFolderName = "src" + File.separator + "main" + File.separator + "java"; | |
| } | |
| DirectoryResource projectRoot = project.getProjectRoot(); | |
| return projectRoot.getChildDirectory(srcFolderName); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment