@Override
public LibraryImplementation[] getLibraries() {
LibraryImplementation[] libraries = new LibraryImplementation[1] ;
LibraryImplementation library = new J2eeLibraryTypeProvider().
createLibrary() ;
library.setName(NbBundle.getMessage(GeronimoJ2eePlatformFactory.class,
"TXT_libraryName")) ;
String serverRoot = dm.getHost() ;
HashSet<URL> librarySet = new HashSet<URL>() ;
for(int i = 0; i < GERONIMO2_JAVAEE_JARS_LENGTH; i++)
{
try
{
librarySet.add(fileToUrl(new File(serverRoot,
GERONIMO2_JAVAEE_JARS[i])));
}
catch(MalformedURLException e)
{
Logger.getLogger("global").log(Level.WARNING, null, e) ;
}
}
ArrayList<URL> libraryList = new ArrayList<URL>(librarySet) ;
library.setContent(J2eeLibraryTypeProvider.VOLUME_TYPE_CLASSPATH,
libraryList) ;
libraries[0] = library ;
return libraries ;