private void getFilesForFeature ( File installRoot , final Set < String > absPathsForLibertyContent , final Set < String > absPathsForLibertyBundles , final Set < String > absPathsForLibertyLocalizations , final Set < String > absPathsForLibertyIcons , final ProvisioningFeatureDefinition fd , final ContentBasedLocalBundleRepository br ) { Collection < FeatureResource > frs = fd . getConstituents ( null ) ; for ( FeatureResource fr : frs ) { switch ( fr . getType ( ) ) { case FEATURE_TYPE : { // No resource for this feature break ; } case BUNDLE_TYPE : case BOOT_JAR_TYPE : { // Add to the list of bundle files addJarResource ( absPathsForLibertyBundles , fd , br , fr ) ; break ; } case JAR_TYPE : { // Add to the list of normal files addJarResource ( absPathsForLibertyContent , fd , br , fr ) ; break ; } case FILE_TYPE : { // file uses loc as a relative path from install root. String locString = fr . getLocation ( ) ; if ( locString != null ) { addFileResource ( installRoot , absPathsForLibertyContent , locString ) ; } else { // a file type without a loc is bad, means misuse of the // type. throw new BuildException ( "No location on file type for resource " + fr . getSymbolicName ( ) + " in feature " + fd . getFeatureName ( ) ) ; } break ; } case UNKNOWN : { // if its not jar,bundle,feature, or file.. then something // is wrong. log ( "Unknown feature resource for " + fr . getSymbolicName ( ) + " in feature " + fd . getFeatureName ( ) + ". The type is: " + fr . getRawType ( ) , Project . MSG_ERR ) ; // we assume that other types will use the location field as // something useful. String locString = fr . getLocation ( ) ; if ( locString != null ) { addFileResource ( installRoot , absPathsForLibertyContent , locString ) ; } } } } // add in (all) the NLS files for this featuredef.. if any.. for ( File nls : fd . getLocalizationFiles ( ) ) { if ( nls . exists ( ) ) { absPathsForLibertyLocalizations . add ( nls . getAbsolutePath ( ) ) ; } } for ( String icon : fd . getIcons ( ) ) { File iconFile = new File ( fd . getFeatureDefinitionFile ( ) . getParentFile ( ) , "icons/" + fd . getSymbolicName ( ) + "/" + icon ) ; if ( iconFile . exists ( ) ) { absPathsForLibertyIcons . add ( iconFile . getAbsolutePath ( ) ) ; } else { throw new BuildException ( "Icon file " + iconFile . getAbsolutePath ( ) + " doesn't exist" ) ; } } }
as we have a complete build we don t need