Author: rob.stryker(a)jboss.com
Date: 2007-08-06 15:21:37 -0400 (Mon, 06 Aug 2007)
New Revision: 2921
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/internal/WebtoolsProjectJBossClasspathContainerInitializer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
Log:
jsf jars added to web projects bc jsf facet does not tell people it is being added
plugin.xml updated to support newest facets
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/internal/WebtoolsProjectJBossClasspathContainerInitializer.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/internal/WebtoolsProjectJBossClasspathContainerInitializer.java 2007-08-06
16:10:46 UTC (rev 2920)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/runtime/internal/WebtoolsProjectJBossClasspathContainerInitializer.java 2007-08-06
19:21:37 UTC (rev 2921)
@@ -22,6 +22,7 @@
package org.jboss.ide.eclipse.as.core.runtime.internal;
import java.util.ArrayList;
+import java.util.Arrays;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
@@ -150,7 +151,16 @@
protected IClasspathEntry getEntry(IPath path) {
return JavaRuntime.newArchiveRuntimeClasspathEntry(path).getClasspathEntry();
}
-
+ protected IClasspathEntry[] getEntries(IPath folder) {
+ String[] files = folder.toFile().list();
+ ArrayList list = new ArrayList();
+ for( int i = 0; i < files.length; i++ ) {
+ if( files[i].endsWith(".jar")) {
+ list.add(getEntry(folder.append(files[i])));
+ }
+ }
+ return (IClasspathEntry[]) list.toArray(new IClasspathEntry[list.size()]);
+ }
protected IClasspathEntry[] loadJREClasspathEntries(AbstractJBossServerRuntime
jbsRuntime) {
IVMInstall vmInstall = jbsRuntime.getVM();
if (vmInstall != null) {
@@ -166,8 +176,11 @@
IPath configPath = homePath.append("server").append(configName);
ArrayList list = new ArrayList();
if (facetId.equals(WEB_FACET.getId())) {
+ IPath jsfDir =
configPath.append("deploy").append("jboss-web.deployer").append("jsf-libs");
list.add(getEntry(configPath.append("lib").append("jsp-api.jar")));
list.add(getEntry(homePath.append("client").append("servlet-api.jar")));
+ list.add(getEntry(jsfDir.append("jsf-api.jar")));
+ list.add(getEntry(jsfDir.append("jsf-impl.jar")));
} else if( facetId.equals(EJB_FACET.getId()) && !isEjb30(facetId,
facetVersion)) {
list.add(getEntry(homePath.append("client").append("jboss-j2ee.jar")));
} else if( isEjb30(facetId, facetVersion)) {
@@ -204,8 +217,10 @@
IPath configPath = homePath.append("server").append(configName);
ArrayList list = new ArrayList();
if (facetId.equals(WEB_FACET.getId())) {
+ IPath jsfDir =
configPath.append("deploy").append("jbossweb-tomcat55.sar").append("jsf-libs");
list.add(getEntry(configPath.append("lib").append("javax.servlet.jsp.jar")));
list.add(getEntry(homePath.append("client").append("javax.servlet.jar")));
+ list.addAll(Arrays.asList(getEntries(jsfDir)));
} else if( facetId.equals(EJB_FACET.getId()) && !isEjb30(facetId,
facetVersion)) {
list.add(getEntry(homePath.append("client").append("jboss-j2ee.jar")));
} else if( isEjb30(facetId, facetVersion)) {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2007-08-06 16:10:46 UTC (rev
2920)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2007-08-06 19:21:37 UTC (rev
2921)
@@ -108,10 +108,10 @@
version="4.0">
<moduleType
types="jst.web"
- versions="2.2, 2.3, 2.4"/>
+ versions="2.2, 2.3, 2.4, 2.5"/>
<moduleType
types="jst.ejb"
- versions="1.0, 1.1, 2.0, 2.1"/>
+ versions="1.0, 1.1, 2.0, 2.1, 3.0"/>
<moduleType
types="jst.ear"
versions="1.2, 1.3, 1.4"/>
@@ -151,13 +151,13 @@
version="1.0">
<moduleType
types="jst.web"
- versions="2.2, 2.3, 2.4"/>
+ versions="2.2, 2.3, 2.4, 2.5"/>
<moduleType
types="jst.ejb"
- versions="1.0, 1.1, 2.0, 2.1"/>
+ versions="1.0, 1.1, 2.0, 2.1, 3.0"/>
<moduleType
types="jst.ear"
- versions="1.2, 1.3, 1.4"/>
+ versions="1.2, 1.3, 1.4, 1.5"/>
<moduleType
types="jboss.package"
versions="1.0"/>
@@ -319,46 +319,24 @@
<runtime-component
id="org.jboss.ide.eclipse.as.runtime.component.40"
version="4.0"/>
- <facet
- id="jst.web"
- version="2.2,2.3,2.4"/>
+ <facet id="jst.web" version="2.2,2.3,2.4,2.5"/>
<facet id="jst.java" version="1.3,1.4,5.0"/>
- <facet
- id="jst.utility"
- version="1.0"/>
- <facet
- id="jst.ejb"
- version="2.0,2.1"/>
- <facet
- id="jst.ear"
- version="1.2,1.3,1.4"/>
- <facet
- id="jst.appclient"
- version="1.2,1.3,1.4"/>
+ <facet id="jst.utility" version="1.0"/>
+ <facet id="jst.ejb" version="2.0,2.1,3.0"/>
+ <facet id="jst.ear" version="1.2,1.3,1.4"/>
+ <facet id="jst.appclient" version="1.2,1.3,1.4"/>
</supported>
<supported>
<runtime-component
id="org.jboss.ide.eclipse.as.runtime.component.42"
version="4.2"/>
- <facet
- id="jst.web"
- version="2.2,2.3,2.4,2.5"/>
- <facet
- id="jst.java"
- version="1.3,1.4,5.0"/>
- <facet
- id="jst.utility"
- version="1.0"/>
- <facet
- id="jst.ejb"
- version="1.0,1.1,2.0,2.1,3.0"/>
- <facet
- id="jst.ear"
- version="1.2,1.3,1.4,5.0"/>
- <facet
- id="jst.appclient"
- version="1.2,1.3,1.4"/>
+ <facet id="jst.web" version="2.2,2.3,2.4,2.5"/>
+ <facet id="jst.java" version="1.3,1.4,5.0"/>
+ <facet id="jst.utility" version="1.0"/>
+ <facet id="jst.ejb" version="2.0,2.1,3.0"/>
+ <facet id="jst.ear" version="1.2,1.3,1.4"/>
+ <facet id="jst.appclient" version="1.2,1.3,1.4"/>
</supported>
<adapter>