diff -r 1a3e3fb27c10 web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/facelets/DefaultFaceletLibraries.java --- a/web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/facelets/DefaultFaceletLibraries.java Wed Apr 20 19:34:18 2011 -0400 +++ b/web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/facelets/DefaultFaceletLibraries.java Thu Apr 21 09:22:16 2011 +0200 @@ -80,7 +80,7 @@ private void init() { File jsfImplJar = InstalledFileLocator.getDefault().locate( - "modules/ext/jsf-2_0/jsf-impl.jar", //NOI18N + "modules/ext/jsf-2_1/jsf-impl.jar", //NOI18N "org.netbeans.modules.web.jsf20", false); //NOI18N assert jsfImplJar != null; diff -r 1a3e3fb27c10 web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/facelets/FaceletsLibrarySupport.java --- a/web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/facelets/FaceletsLibrarySupport.java Wed Apr 20 19:34:18 2011 -0400 +++ b/web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/facelets/FaceletsLibrarySupport.java Thu Apr 21 09:22:16 2011 +0200 @@ -46,6 +46,8 @@ import org.netbeans.modules.web.jsf.editor.facelets.mojarra.FaceletsTaglibConfigProcessor; import com.sun.faces.config.DocumentInfo; import com.sun.faces.spi.ConfigurationResourceProvider; +import java.net.URI; +import java.net.URISyntaxException; import java.net.URL; import java.net.URLClassLoader; import java.util.ArrayList; @@ -300,17 +302,21 @@ //WEB-INF/web.xml javax.faces.FACELETS_LIBRARIES context param provider faceletTaglibProviders.add(new WebFaceletTaglibResourceProvider(getJsfSupport().getWebModule())); - //2. second add a provider returning URLs of library descriptors found during indexing - // the URLs points to both source roots and binary roots of dependent libraries. - final Collection urls = new ArrayList(); + //2. second add a provider returning URIs of library descriptors found during indexing + // the URIs points to both source roots and binary roots of dependent libraries. + final Collection uris = new ArrayList(); for (IndexedFile file : getJsfSupport().getIndex().getAllFaceletsLibraryDescriptors()) { - urls.add(URLMapper.findURL(file.getFile(), URLMapper.EXTERNAL)); + try { + uris.add(URLMapper.findURL(file.getFile(), URLMapper.EXTERNAL).toURI()); + } catch (URISyntaxException ex) { + LOGGER.log(Level.INFO, null, ex); + } } faceletTaglibProviders.add(new ConfigurationResourceProvider() { @Override - public Collection getResources(ServletContext sc) { - return urls; + public Collection getResources(ServletContext sc) { + return uris; } }); @@ -328,18 +334,20 @@ //be overridden if the descriptors are found in any of the jars //on compile classpath. Collection libraryDescriptorFiles = DefaultFaceletLibraries.getInstance().getLibrariesDescriptorsFiles(); - final Collection libraryURLs = new ArrayList(); + final Collection libraryURIs = new ArrayList(); for(FileObject fo : libraryDescriptorFiles) { try { - libraryURLs.add(fo.getURL()); + libraryURIs.add(fo.getURL().toURI()); } catch (FileStateInvalidException ex) { LOGGER.log(Level.INFO, null, ex); + } catch (URISyntaxException ex) { + LOGGER.log(Level.INFO, null, ex); } } faceletTaglibProviders.add(new ConfigurationResourceProvider() { @Override - public Collection getResources(ServletContext sc) { - return libraryURLs; + public Collection getResources(ServletContext sc) { + return libraryURIs; } }); diff -r 1a3e3fb27c10 web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/facelets/WebFaceletTaglibResourceProvider.java --- a/web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/facelets/WebFaceletTaglibResourceProvider.java Wed Apr 20 19:34:18 2011 -0400 +++ b/web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/facelets/WebFaceletTaglibResourceProvider.java Thu Apr 21 09:22:16 2011 +0200 @@ -43,10 +43,14 @@ import com.sun.faces.spi.ConfigurationResourceProvider; import java.io.IOException; +import java.net.URI; +import java.net.URISyntaxException; import java.net.URL; import java.util.ArrayList; import java.util.Collection; import java.util.StringTokenizer; +import java.util.logging.Level; +import java.util.logging.Logger; import javax.servlet.ServletContext; import org.netbeans.modules.j2ee.dd.api.common.InitParam; import org.netbeans.modules.j2ee.dd.api.web.WebApp; @@ -75,7 +79,7 @@ this.wm = wm; } - public Collection getResources(ServletContext ignored) { + public Collection getResources(ServletContext ignored) { try { MetadataModel model = wm.getMetadataModel(); String faceletsLibrariesList = null; @@ -100,7 +104,7 @@ FileObject webModuleRoot = wm.getDocumentBase(); FileObject webInfBase = wm.getWebInf() == null ? null : wm.getWebInf().getParent(); - Collection librariesURLs = new ArrayList(); + Collection librariesURIs = new ArrayList(); if(faceletsLibrariesList != null) { StringTokenizer st = new StringTokenizer(faceletsLibrariesList, ";"); while(st.hasMoreTokens()) { @@ -119,12 +123,16 @@ if(libraryFO != null) { URL url = URLMapper.findURL(libraryFO, URLMapper.INTERNAL); if(url != null) { - librariesURLs.add(url); + try { + librariesURIs.add(new URI(url.toExternalForm())); + } catch (URISyntaxException ex) { + Logger.getLogger(WebFaceletTaglibResourceProvider.class.getName()).log(Level.INFO, null, ex); + } } } } } - return librariesURLs; + return librariesURIs; } catch (MetadataModelException ex) { Exceptions.printStackTrace(ex); diff -r 1a3e3fb27c10 web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/facelets/mojarra/ConfigManager.java --- a/web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/facelets/mojarra/ConfigManager.java Wed Apr 20 19:34:18 2011 -0400 +++ b/web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/facelets/mojarra/ConfigManager.java Thu Apr 21 09:22:16 2011 +0200 @@ -119,6 +119,8 @@ import java.util.logging.Level; import java.util.logging.Logger; import java.lang.annotation.Annotation; +import java.net.MalformedURLException; +import java.net.URI; import org.w3c.dom.*; @@ -327,14 +329,14 @@ isFaceletsDisabled(webConfig, webInfFacesConfigInfo); if (!webInfFacesConfigInfo.isWebInfFacesConfig() || !webInfFacesConfigInfo.isMetadataComplete()) { // execute the Task responsible for finding annotation classes - Set scanUrls = getAnnotationScanURLs(facesDocuments); + Set scanUris = getAnnotationScanURIs(facesDocuments); Future,Set>>> annotationScan; if (executor != null) { - annotationScan = executor.submit(new AnnotationScanTask(sc, scanUrls)); + annotationScan = executor.submit(new AnnotationScanTask(sc, scanUris)); pushTaskToContext(sc, annotationScan); } else { annotationScan = - new FutureTask,Set>>>(new AnnotationScanTask(sc, scanUrls)); + new FutureTask,Set>>>(new AnnotationScanTask(sc, scanUris)); ((FutureTask) annotationScan).run(); } pushTaskToContext(sc, annotationScan); @@ -426,25 +428,25 @@ // --------------------------------------------------------- Private Methods - private static Set getAnnotationScanURLs(DocumentInfo[] documentInfos) { + private static Set getAnnotationScanURIs(DocumentInfo[] documentInfos) { - Set urls = new HashSet(documentInfos.length); + Set uris = new HashSet(documentInfos.length); Set jarNames = new HashSet(documentInfos.length); for (DocumentInfo docInfo : documentInfos) { - Matcher m = JAR_PATTERN.matcher(docInfo.getSourceURL().toString()); + Matcher m = JAR_PATTERN.matcher(docInfo.getSourceURI().toString()); if (m.matches()) { String jarName = m.group(2); if (!jarNames.contains(jarName)) { FacesConfigInfo configInfo = new FacesConfigInfo(docInfo); if (!configInfo.isMetadataComplete()) { - urls.add(docInfo.getSourceURL()); + uris.add(docInfo.getSourceURI()); jarNames.add(jarName); } } } } - return urls; + return uris; } @@ -624,7 +626,7 @@ * @param sc the ServletContext for the application to be * processed * @param providers List of ConfigurationResourceProvider - * instances that provide the URL of the documents to parse. + * instances that provide the URI of the documents to parse. * @param executor the ExecutorService used to dispatch parse * request to * @param validating flag indicating whether or not the documents @@ -636,12 +638,12 @@ ExecutorService executor, boolean validating) { - List>> urlTasks = - new ArrayList>>(providers.size()); + List>> uriTasks = + new ArrayList>>(providers.size()); for (ConfigurationResourceProvider p : providers) { - FutureTask> t = - new FutureTask>(new URLTask(p, sc)); - urlTasks.add(t); + FutureTask> t = + new FutureTask>(new URITask(p, sc)); + uriTasks.add(t); if (executor != null) { executor.execute(t); } else { @@ -652,12 +654,12 @@ List> docTasks = new ArrayList>(providers.size() << 1); - for (FutureTask> t : urlTasks) { + for (FutureTask> t : uriTasks) { try { - Collection l = t.get(); - for (URL u : l) { + Collection l = t.get(); + for (URI u : l) { FutureTask d = - new FutureTask(new ParseTask(validating, u)); + new FutureTask(new ParseTask(validating, u.toURL())); docTasks.add(d); if (executor != null) { executor.execute(d); @@ -748,16 +750,16 @@ private static class AnnotationScanTask implements Callable,Set>>> { private ServletContext sc; - private Set urls; + private Set uris; // -------------------------------------------------------- Constructors - public AnnotationScanTask(ServletContext sc, Set urls) { + public AnnotationScanTask(ServletContext sc, Set uris) { this.sc = sc; - this.urls = urls; + this.uris = uris; } @@ -775,7 +777,7 @@ //AnnotationScanner scanner = new AnnotationScanner(sc); AnnotationProvider provider = AnnotationProviderFactory.createAnnotationProvider(sc); Map,Set>> annotatedClasses = - provider.getAnnotatedClasses(urls); + provider.getAnnotatedClasses(uris); if (t != null) { t.stopTiming(); @@ -847,7 +849,7 @@ timer.logResult("Parse " + documentURL.toExternalForm()); } - return new DocumentInfo(d, documentURL); + return new DocumentInfo(d, new URI(documentURL.toExternalForm())); } catch (Exception e) { throw new ConfigurationException(MessageFormat.format( "Unable to parse document ''{0}'': {1}", @@ -1027,11 +1029,11 @@ /** *

* This Callable will be used by {@link ConfigManager#getConfigDocuments(javax.servlet.ServletContext, java.util.List, java.util.concurrent.ExecutorService, boolean)}. - * It represents one or more URLs to configuration resources that require + * It represents one or more URIs to configuration resources that require * processing. *

*/ - private static class URLTask implements Callable> { + private static class URITask implements Callable> { private ConfigurationResourceProvider provider; private ServletContext sc; @@ -1041,12 +1043,12 @@ /** - * Constructs a new URLTask instance. + * Constructs a new URITask instance. * @param provider the ConfigurationResourceProvider from - * which zero or more URLs will be returned + * which zero or more URIs will be returned * @param sc the ServletContext of the current application */ - public URLTask(ConfigurationResourceProvider provider, + public URITask(ConfigurationResourceProvider provider, ServletContext sc) { this.provider = provider; this.sc = sc; @@ -1057,11 +1059,11 @@ /** - * @return zero or more URL instances + * @return zero or more URI instances * @throws Exception if an Exception is thrown by the underlying * ConfigurationResourceProvider */ - public Collection call() throws Exception { + public Collection call() throws Exception { return provider.getResources(sc); } diff -r 1a3e3fb27c10 web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/facelets/mojarra/FaceletsTaglibConfigProcessor.java --- a/web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/facelets/mojarra/FaceletsTaglibConfigProcessor.java Wed Apr 20 19:34:18 2011 -0400 +++ b/web.jsf.editor/src/org/netbeans/modules/web/jsf/editor/facelets/mojarra/FaceletsTaglibConfigProcessor.java Thu Apr 21 09:22:16 2011 +0200 @@ -273,11 +273,19 @@ } } + URL sourceUrl; + try { + sourceUrl = info.getSourceURI().toURL(); + } catch (MalformedURLException ex) { + LOGGER.log(Level.INFO, null, ex); + return; + } + if (compositeLibraryName != null) { //nothing to process inside the library definition AFAIR... - compiler.addTagLibrary(new CompositeComponentLibrary(support, compositeLibraryName, taglibNamespace, info.getSourceURL())); + compiler.addTagLibrary(new CompositeComponentLibrary(support, compositeLibraryName, taglibNamespace, sourceUrl)); } else { - ClassBasedFaceletsLibrary taglibrary = new ClassBasedFaceletsLibrary(info.getSourceURL(), support, taglibNamespace); + ClassBasedFaceletsLibrary taglibrary = new ClassBasedFaceletsLibrary(sourceUrl, support, taglibNamespace); //process the library content NodeList tags = documentElement.getElementsByTagNameNS(namespace, TAG); diff -r 1a3e3fb27c10 web.jsf20/external/binaries-list --- a/web.jsf20/external/binaries-list Wed Apr 20 19:34:18 2011 -0400 +++ b/web.jsf20/external/binaries-list Thu Apr 21 09:22:16 2011 +0200 @@ -1,1 +1,1 @@ -6B90A110E1B1503C4623B13D3BB536212F1BF3DB jsf-2.0.zip +1D74DA79DC71C52D1B7916853BDD51F346A85359 jsf-2.1.zip diff -r 1a3e3fb27c10 web.jsf20/nbproject/project.properties --- a/web.jsf20/nbproject/project.properties Wed Apr 20 19:34:18 2011 -0400 +++ b/web.jsf20/nbproject/project.properties Thu Apr 21 09:22:16 2011 +0200 @@ -40,9 +40,9 @@ # Version 2 license, then the option applies only if the new code is # made subject to such option by the copyright holder. -release.external/jsf-2.0.zip!/jsf-2.0/jsf-api.jar=modules/ext/jsf-2_0/jsf-api.jar -release.external/jsf-2.0.zip!/jsf-2.0/jsf-impl.jar=modules/ext/jsf-2_0/jsf-impl.jar -release.external/jsf-2.0.zip!/jsf-2.0/LICENSE-APACHE.txt=modules/ext/jsf-2_0/LICENSE-APACHE.txt -release.external/jsf-2.0.zip!/jsf-2.0/LICENSE.TXT=modules/ext/jsf-2_0/LICENSE.TXT -release.external/jsf-2.0.zip!/jsf-2.0/THIRDPARTYLICENSEREADME.txt=modules/ext/jsf-2_0/THIRDPARTYLICENSEREADME.txt +release.external/jsf-2.1.zip!/jsf-2.1/jsf-api.jar=modules/ext/jsf-2_1/jsf-api.jar +release.external/jsf-2.1.zip!/jsf-2.1/jsf-impl.jar=modules/ext/jsf-2_1/jsf-impl.jar +release.external/jsf-2.1.zip!/jsf-2.1/LICENSE-APACHE.txt=modules/ext/jsf-2_1/LICENSE-APACHE.txt +release.external/jsf-2.1.zip!/jsf-2.1/LICENSE.TXT=modules/ext/jsf-2_1/LICENSE.TXT +release.external/jsf-2.1.zip!/jsf-2.1/THIRDPARTYLICENSEREADME.txt=modules/ext/jsf-2_1/THIRDPARTYLICENSEREADME.txt spec.version.base=1.7.0 diff -r 1a3e3fb27c10 web.jsf20/nbproject/project.xml --- a/web.jsf20/nbproject/project.xml Wed Apr 20 19:34:18 2011 -0400 +++ b/web.jsf20/nbproject/project.xml Thu Apr 21 09:22:16 2011 +0200 @@ -64,10 +64,10 @@ com.sun.faces - ext/jsf-2_0/jsf-api.jar + ext/jsf-2_1/jsf-api.jar - ext/jsf-2_0/jsf-impl.jar + ext/jsf-2_1/jsf-impl.jar diff -r 1a3e3fb27c10 web.jsf20/src/org/netbeans/modules/web/jsf20/Bundle.properties --- a/web.jsf20/src/org/netbeans/modules/web/jsf20/Bundle.properties Wed Apr 20 19:34:18 2011 -0400 +++ b/web.jsf20/src/org/netbeans/modules/web/jsf20/Bundle.properties Thu Apr 21 09:22:16 2011 +0200 @@ -41,11 +41,11 @@ # made subject to such option by the copyright holder. # module descritpion -OpenIDE-Module-Name=JavaServer Faces 2.0 Library +OpenIDE-Module-Name=JavaServer Faces 2.1 Library OpenIDE-Module-Display-Category=Web -OpenIDE-Module-Short-Description=Installs the JavaServer Faces 2.0 Library -OpenIDE-Module-Long-Description=Installs the JavaServer Faces 2.0 Library +OpenIDE-Module-Short-Description=Installs the JavaServer Faces 2.1 Library +OpenIDE-Module-Long-Description=Installs the JavaServer Faces 2.1 Library # library display name -jsf20=JSF 2.0 -jsf20ri=JSF 2.0 RI +jsf20=JSF 2.1 +jsf20ri=JSF 2.1 RI diff -r 1a3e3fb27c10 web.jsf20/src/org/netbeans/modules/web/jsf20/jsf20.xml --- a/web.jsf20/src/org/netbeans/modules/web/jsf20/jsf20.xml Wed Apr 20 19:34:18 2011 -0400 +++ b/web.jsf20/src/org/netbeans/modules/web/jsf20/jsf20.xml Thu Apr 21 09:22:16 2011 +0200 @@ -51,8 +51,8 @@ org/netbeans/modules/web/jsf20/Bundle classpath - jar:nbinst://org.netbeans.modules.web.jsf20/modules/ext/jsf-2_0/jsf-api.jar!/ - jar:nbinst://org.netbeans.modules.web.jsf20/modules/ext/jsf-2_0/jsf-impl.jar!/ + jar:nbinst://org.netbeans.modules.web.jsf20/modules/ext/jsf-2_1/jsf-api.jar!/ + jar:nbinst://org.netbeans.modules.web.jsf20/modules/ext/jsf-2_1/jsf-impl.jar!/ javadoc @@ -61,7 +61,7 @@ maven-pom - http://download.java.net/maven/2/com/sun/faces/jsf-api/2.0.4-b09/jsf-api-2.0.4-b09.pom - http://download.java.net/maven/2/com/sun/faces/jsf-impl/2.0.4-b09/jsf-impl-2.0.4-b09.pom + http://download.java.net/maven/2/com/sun/faces/jsf-api/2.1.1-b04/jsf-api-2.1.1-b04.pom + http://download.java.net/maven/2/com/sun/faces/jsf-impl/2.1.1-b04/jsf-impl-2.1.1-b04.pom diff -r 1a3e3fb27c10 web.jsf20/src/org/netbeans/modules/web/jsf20/jsf20ri.xml --- a/web.jsf20/src/org/netbeans/modules/web/jsf20/jsf20ri.xml Wed Apr 20 19:34:18 2011 -0400 +++ b/web.jsf20/src/org/netbeans/modules/web/jsf20/jsf20ri.xml Thu Apr 21 09:22:16 2011 +0200 @@ -51,7 +51,7 @@ org/netbeans/modules/web/jsf20/Bundle classpath - jar:nbinst://org.netbeans.modules.web.jsf20ri/modules/ext/jsf-2_0/jsf-impl.jar!/ + jar:nbinst://org.netbeans.modules.web.jsf20ri/modules/ext/jsf-2_1/jsf-impl.jar!/ javadoc @@ -60,6 +60,6 @@ maven-pom - http://download.java.net/maven/2/com/sun/faces/jsf-impl/2.0.4-b09/jsf-impl-2.0.4-b09.pom + http://download.java.net/maven/2/com/sun/faces/jsf-impl/2.1.1-b04/jsf-impl-2.1.1-b04.pom \ No newline at end of file