public List<FileEntry> getLibAndResourceEntries(User user, FileEntry scriptEntry, long revision) {
List<FileEntry> fileList = newArrayList();
String basePath = getBasePath(scriptEntry);
FileEntryRepository fileEntryRepository = getFileEntryRepository();
for (FileEntry eachFileEntry : fileEntryRepository.findAll(user, basePath + RESOURCES, revision, true)) {
FileType fileType = eachFileEntry.getFileType();
if (fileType.isResourceDistributable()) {
fileList.add(eachFileEntry);
}
}
for (FileEntry eachFileEntry : fileEntryRepository.findAll(user, basePath + JAVA, revision, true)) {
FileType fileType = eachFileEntry.getFileType();
if (fileType.isLibDistributable() && !eachFileEntry.getPath().equals(scriptEntry.getPath())) {
fileList.add(eachFileEntry);
}
}
for (FileEntry eachFileEntry : fileEntryRepository.findAll(user, basePath + GROOVY, revision, true)) {
FileType fileType = eachFileEntry.getFileType();
if (fileType.isLibDistributable() && !eachFileEntry.getPath().equals(scriptEntry.getPath())) {
fileList.add(eachFileEntry);
}
}
for (FileEntry eachFileEntry : fileEntryRepository.findAll(user, basePath + LIB, revision, true)) {
FileType fileType = eachFileEntry.getFileType();
if (fileType.isLibDistributable()) {
fileList.add(eachFileEntry);
}
}
fileList.add(fileEntryRepository.findOne(user, basePath + "/pom.xml", SVNRevision.create(revision)));
return fileList;