Lines 50-55
Link Here
|
50 |
import java.util.logging.Logger; |
50 |
import java.util.logging.Logger; |
51 |
import javax.enterprise.deploy.spi.status.ProgressObject; |
51 |
import javax.enterprise.deploy.spi.status.ProgressObject; |
52 |
import org.netbeans.modules.j2ee.deployment.common.api.ConfigurationException; |
52 |
import org.netbeans.modules.j2ee.deployment.common.api.ConfigurationException; |
|
|
53 |
import org.netbeans.modules.j2ee.deployment.common.api.Version; |
53 |
import org.netbeans.modules.j2ee.deployment.plugins.api.ServerLibrary; |
54 |
import org.netbeans.modules.j2ee.deployment.plugins.api.ServerLibrary; |
54 |
import org.netbeans.modules.j2ee.deployment.plugins.api.ServerLibraryDependency; |
55 |
import org.netbeans.modules.j2ee.deployment.plugins.api.ServerLibraryDependency; |
55 |
import org.netbeans.modules.j2ee.deployment.plugins.spi.ServerLibraryFactory; |
56 |
import org.netbeans.modules.j2ee.deployment.plugins.spi.ServerLibraryFactory; |
Lines 68-73
Link Here
|
68 |
|
69 |
|
69 |
private static final Logger LOGGER = Logger.getLogger(WLServerLibraryManager.class.getName()); |
70 |
private static final Logger LOGGER = Logger.getLogger(WLServerLibraryManager.class.getName()); |
70 |
|
71 |
|
|
|
72 |
private static final String DWP_JSF_SPEC_TITLE = "JavaServer Faces"; // NOI18N |
73 |
|
74 |
private static final Version DWP_JSF_SPEC_VERSION = Version.fromJsr277OrDottedNotationWithFallback("2.0"); // NOI18N |
75 |
|
71 |
private final WLDeploymentManager manager; |
76 |
private final WLDeploymentManager manager; |
72 |
|
77 |
|
73 |
private final WLServerLibrarySupport support; |
78 |
private final WLServerLibrarySupport support; |
Lines 112-117
Link Here
|
112 |
// this handles only archives |
117 |
// this handles only archives |
113 |
@Override |
118 |
@Override |
114 |
public Set<ServerLibrary> getDeployableLibraries() { |
119 |
public Set<ServerLibrary> getDeployableLibraries() { |
|
|
120 |
if (manager.isWebProfile()) { |
121 |
// we are handling jsf in DWP here - it should not be offered via this |
122 |
// API method, but for legacy apps the missing/deploy machinery has to |
123 |
// be available |
124 |
Map<ServerLibrary, File> deployable = support.getDeployableFiles(); |
125 |
for (Iterator<Map.Entry<ServerLibrary, File>> it = deployable.entrySet().iterator(); it.hasNext();) { |
126 |
Map.Entry<ServerLibrary, File> entry = it.next(); |
127 |
ServerLibrary lib = entry.getKey(); |
128 |
if (DWP_JSF_SPEC_TITLE.equals(lib.getSpecificationTitle()) |
129 |
&& DWP_JSF_SPEC_VERSION.equals(lib.getSpecificationVersion()) |
130 |
// defensive check on size |
131 |
&& entry.getValue().length() < 10240) { |
132 |
it.remove(); |
133 |
break; |
134 |
} |
135 |
} |
136 |
return deployable.keySet(); |
137 |
} |
115 |
return support.getDeployableFiles().keySet(); |
138 |
return support.getDeployableFiles().keySet(); |
116 |
} |
139 |
} |
117 |
|
140 |
|