Lines 185-196
Link Here
|
185 |
List<URL> list = new ArrayList<URL>(); |
185 |
List<URL> list = new ArrayList<URL>(); |
186 |
try { |
186 |
try { |
187 |
File rootDir = getRootDir(); |
187 |
File rootDir = getRootDir(); |
188 |
File serverDir = getServerDir(); |
188 |
File serverDir = getServerDir(); |
|
|
189 |
File commonLibDir = new File(rootDir, "common" + File.separator + "lib"); |
189 |
|
190 |
|
190 |
File javaEE = new File(rootDir, "client/jboss-j2ee.jar"); // NOI18N |
191 |
File javaEE = new File(commonLibDir, "jboss-javaee.jar"); |
191 |
if (!javaEE.exists()) { |
192 |
if(!javaEE.exists()) { |
192 |
// jboss 5 |
193 |
javaEE = new File(rootDir, "client/jboss-j2ee.jar"); // NOI18N |
193 |
javaEE = new File(rootDir, "client/jboss-javaee.jar"); // NOI18N |
194 |
if (!javaEE.exists()) { |
|
|
195 |
// jboss 5 |
196 |
javaEE = new File(rootDir, "client/jboss-javaee.jar"); // NOI18N |
197 |
} |
194 |
} |
198 |
} |
195 |
|
199 |
|
196 |
if (javaEE.exists()) { |
200 |
if (javaEE.exists()) { |
Lines 209-222
Link Here
|
209 |
|
213 |
|
210 |
addFiles(new File(rootDir, "lib"), list); // NOI18N |
214 |
addFiles(new File(rootDir, "lib"), list); // NOI18N |
211 |
addFiles(new File(serverDir, "lib"), list); // NOI18N |
215 |
addFiles(new File(serverDir, "lib"), list); // NOI18N |
|
|
216 |
|
217 |
// Add common libs for JBoss 5.x |
218 |
String[] commonLibs = {"servlet-api.jar", |
219 |
"jsp-api.jar", "el-api.jar", "mail.jar", "jboss-jsr77.jar", |
220 |
"ejb3-persistence.jar", "jbossws-native-jaxws.jar", |
221 |
"jbossws-native-jaxws-ext.jar", "jbossws-native-jaxrpc.jar", |
222 |
"jbossws-native-saaj.jar"}; |
212 |
|
223 |
|
213 |
// FIXME shouldn't we use whole cmmon in JB5 |
224 |
for(int i = 0; i < commonLibs.length; i++) { |
214 |
File jspAPI = new File(rootDir, "common" + File.separator + "lib" + File.separator + "jsp-api.jar"); |
225 |
File libJar = new File(commonLibDir, commonLibs[i]); |
215 |
if (jspAPI.exists()) { |
226 |
|
216 |
list.add(fileToUrl(jspAPI)); |
227 |
if(libJar.exists()) { |
|
|
228 |
list.add(fileToUrl(libJar)); |
229 |
} |
217 |
} |
230 |
} |
218 |
|
231 |
|
219 |
|
|
|
220 |
if (supportsJavaEE5ejb3()) { |
232 |
if (supportsJavaEE5ejb3()) { |
221 |
File ejb3deployer = new File(serverDir, "/deploy/ejb3.deployer/"); // NOI18N |
233 |
File ejb3deployer = new File(serverDir, "/deploy/ejb3.deployer/"); // NOI18N |
222 |
if (ejb3deployer.exists()) { |
234 |
if (ejb3deployer.exists()) { |
Lines 266-271
Link Here
|
266 |
} catch (MalformedURLException e) { |
278 |
} catch (MalformedURLException e) { |
267 |
LOGGER.log(Level.INFO, null, e); |
279 |
LOGGER.log(Level.INFO, null, e); |
268 |
} |
280 |
} |
|
|
281 |
} |
282 |
|
283 |
File jstlImpl = new File(serverDir, "/deploy/jbossweb.sar/jstl.jar"); // NOI18N |
284 |
if (jstlImpl.exists()) { |
285 |
try { |
286 |
list.add(fileToUrl(jstlImpl)); |
287 |
} catch (MalformedURLException e) { |
288 |
LOGGER.log(Level.INFO, null, e); |
289 |
} |
290 |
} else if ((jstlImpl = new File(serverDir, "/deploy/jboss-web.deployer/jstl.jar")).exists()) { // NOI18N |
291 |
try { |
292 |
list.add(fileToUrl(jstlImpl)); |
293 |
} catch (MalformedURLException e) { |
294 |
LOGGER.log(Level.INFO, null, e); |
295 |
} |
296 |
} else if ((jstlImpl = new File(serverDir, "/deploy/jbossweb-tomcat55.sar/jsf-libs/jstl.jar")).exists()) { // NOI18N |
297 |
try { |
298 |
list.add(fileToUrl(jstlImpl)); |
299 |
} catch (MalformedURLException e) { |
300 |
LOGGER.log(Level.INFO, null, e); |
301 |
} |
269 |
} |
302 |
} |
270 |
} catch (MalformedURLException e) { |
303 |
} catch (MalformedURLException e) { |
271 |
LOGGER.log(Level.INFO, null, e); |
304 |
LOGGER.log(Level.INFO, null, e); |
Lines 277-284
Link Here
|
277 |
public boolean accept(File dir, String name) { |
310 |
public boolean accept(File dir, String name) { |
278 |
return name.endsWith(".jar") || new File(dir, name).isDirectory(); // NOI18N |
311 |
return name.endsWith(".jar") || new File(dir, name).isDirectory(); // NOI18N |
279 |
} |
312 |
} |
280 |
} |
313 |
} |
281 |
|
314 |
|
282 |
private void addFiles(File folder, List l) { |
315 |
private void addFiles(File folder, List l) { |
283 |
File files [] = folder.listFiles(new FF()); |
316 |
File files [] = folder.listFiles(new FF()); |
284 |
if (files == null) |
317 |
if (files == null) |