lastCacheUpdate = System.currentTimeMillis();
return cachedRoot;
}
private FlatComponentTaskModel getOptions() {
FlatComponentTaskModel options = new FlatComponentTaskModel();
//Participants produce IFlatResources[]
//TODO Maybe deal with the inclusion/exclusion stuff on the participant level (using an Adapter or a Callback pattern)
IFlattenParticipant[] participants = new IFlattenParticipant[] {
new SingleRootExportParticipant(new JavaEESingleRootCallback()),
//JEEHeirarchyExportParticipant doesn't deploy utility java projects
//if JEEHeirarchyExportParticipant is skipped, utility java projects are deployed as exploded folders,
//only the sources, not classes; Should be deployed as zips.
new JEEHeirarchyExportParticipant() {
@Override
protected boolean isApprovedNesting(String parentType,
String childType, boolean binary) {
if( childType == null )
return false;
if( IJ2EEFacetConstants.UTILITY.equals(childType) && binary)
return false; // child utility project
if( IJ2EEFacetConstants.WEBFRAGMENT.equals(childType) && binary)
return false; // child utility project
return true;
}
},
new AddClasspathLibReferencesParticipant(),
new AddClasspathFoldersParticipant(),
new AddMappedOutputFoldersParticipant(),
new IgnoreJavaInSourceFolderParticipant()
};
options.put(FlatVirtualComponent.PARTICIPANT_LIST, Arrays.asList(participants));
return options;
}