Author: slaurent Date: Fri Dec 2 22:16:33 2011 New Revision: 1209731 URL: http://svn.apache.org/viewvc?rev=1209731&view=rev Log: bug 51741: Eclipse WTP "Serve modules without publishing" broken with tc7, needs patch in tomcat https://issues.apache.org/bugzilla/show_bug.cgi?id=51741
fixed checkstyle problems + missing files in "target" directories because it was in gitignore Added: tomcat/trunk/test/webapp-3.0-virtual-library/ tomcat/trunk/test/webapp-3.0-virtual-library/target/ tomcat/trunk/test/webapp-3.0-virtual-library/target/classes/ tomcat/trunk/test/webapp-3.0-virtual-library/target/classes/META-INF/ tomcat/trunk/test/webapp-3.0-virtual-library/target/classes/META-INF/C.tld - copied, changed from r1209694, tomcat/trunk/test/webapp-3.0-virtual-webapp/src/main/webapp/WEB-INF/web.xml tomcat/trunk/test/webapp-3.0-virtual-library/target/classes/META-INF/resources/ tomcat/trunk/test/webapp-3.0-virtual-library/target/classes/META-INF/resources/rsrc/ tomcat/trunk/test/webapp-3.0-virtual-library/target/classes/META-INF/resources/rsrc/resourceE.properties - copied, changed from r1209694, tomcat/trunk/test/webapp-3.0-virtual-webapp/src/main/webapp2/rsrc/resourceF.properties tomcat/trunk/test/webapp-3.0-virtual-library/target/classes/rsrc/ tomcat/trunk/test/webapp-3.0-virtual-library/target/classes/rsrc/resourceC.properties - copied, changed from r1209694, tomcat/trunk/test/webapp-3.0-virtual-webapp/src/main/webapp2/rsrc/resourceF.properties tomcat/trunk/test/webapp-3.0-virtual-webapp/target/ tomcat/trunk/test/webapp-3.0-virtual-webapp/target/classes/ tomcat/trunk/test/webapp-3.0-virtual-webapp/target/classes/rsrc/ tomcat/trunk/test/webapp-3.0-virtual-webapp/target/classes/rsrc/resourceB.properties - copied, changed from r1209694, tomcat/trunk/test/webapp-3.0-virtual-webapp/src/main/webapp2/rsrc/resourceF.properties Removed: tomcat/trunk/test/webapp-3.0-virtual-webapp/src/main/webapp/META-INF/context.xml Modified: tomcat/trunk/.gitignore tomcat/trunk/test/org/apache/catalina/loader/TestVirtualContext.java tomcat/trunk/test/webapp-3.0-virtual-webapp/src/main/webapp/WEB-INF/web.xml tomcat/trunk/test/webapp-3.0-virtual-webapp/src/main/webapp/contextGetResource.jsp tomcat/trunk/test/webapp-3.0-virtual-webapp/src/main/webapp/contextGetResourcePaths.jsp tomcat/trunk/test/webapp-3.0-virtual-webapp/src/main/webapp2/rsrc/resourceF.properties tomcat/trunk/webapps/docs/config/context.xml tomcat/trunk/webapps/docs/config/resources.xml Modified: tomcat/trunk/.gitignore URL: http://svn.apache.org/viewvc/tomcat/trunk/.gitignore?rev=1209731&r1=1209730&r2=1209731&view=diff ============================================================================== --- tomcat/trunk/.gitignore (original) +++ tomcat/trunk/.gitignore Fri Dec 2 22:16:33 2011 @@ -14,7 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # ----------------------------------------------------------------------------- -target output logs work Modified: tomcat/trunk/test/org/apache/catalina/loader/TestVirtualContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/loader/TestVirtualContext.java?rev=1209731&r1=1209730&r2=1209731&view=diff ============================================================================== --- tomcat/trunk/test/org/apache/catalina/loader/TestVirtualContext.java (original) +++ tomcat/trunk/test/org/apache/catalina/loader/TestVirtualContext.java Fri Dec 2 22:16:33 2011 @@ -25,10 +25,10 @@ import java.io.InputStream; import java.util.Arrays; import java.util.HashSet; -import junit.framework.Assert; - import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; + +import org.junit.Assert; import org.junit.Test; import org.apache.catalina.core.JreMemoryLeakPreventionListener; Copied: tomcat/trunk/test/webapp-3.0-virtual-library/target/classes/META-INF/C.tld (from r1209694, tomcat/trunk/test/webapp-3.0-virtual-webapp/src/main/webapp/WEB-INF/web.xml) URL: http://svn.apache.org/viewvc/tomcat/trunk/test/webapp-3.0-virtual-library/target/classes/META-INF/C.tld?p2=tomcat/trunk/test/webapp-3.0-virtual-library/target/classes/META-INF/C.tld&p1=tomcat/trunk/test/webapp-3.0-virtual-webapp/src/main/webapp/WEB-INF/web.xml&r1=1209694&r2=1209731&rev=1209731&view=diff ============================================================================== --- tomcat/trunk/test/webapp-3.0-virtual-webapp/src/main/webapp/WEB-INF/web.xml (original) +++ tomcat/trunk/test/webapp-3.0-virtual-library/target/classes/META-INF/C.tld Fri Dec 2 22:16:33 2011 @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> +<?xml version="1.0" encoding="ISO-8859-1" ?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with @@ -14,11 +14,24 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ---> -<web-app xmlns="http://java.sun.com/xml/ns/javaee" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://java.sun.com/xml/ns/javaee - http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" - version="3.0" - metadata-complete="false"> -</web-app> \ No newline at end of file +--><taglib xmlns="http://java.sun.com/xml/ns/javaee" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee + http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd" + version="2.1"> + <tlib-version>1.0</tlib-version> + <short-name>C</short-name> + <uri>http://tomcat.apache.org/C</uri> + + <tag> + <name>Echo</name> + <tag-class>org.apache.jasper.compiler.TestValidator$Echo</tag-class> + <body-content>empty</body-content> + <attribute> + <name>echo</name> + <required>yes</required> + <rtexprvalue>true</rtexprvalue> + </attribute> + </tag> + +</taglib> \ No newline at end of file Copied: tomcat/trunk/test/webapp-3.0-virtual-library/target/classes/META-INF/resources/rsrc/resourceE.properties (from r1209694, tomcat/trunk/test/webapp-3.0-virtual-webapp/src/main/webapp2/rsrc/resourceF.properties) URL: http://svn.apache.org/viewvc/tomcat/trunk/test/webapp-3.0-virtual-library/target/classes/META-INF/resources/rsrc/resourceE.properties?p2=tomcat/trunk/test/webapp-3.0-virtual-library/target/classes/META-INF/resources/rsrc/resourceE.properties&p1=tomcat/trunk/test/webapp-3.0-virtual-webapp/src/main/webapp2/rsrc/resourceF.properties&r1=1209694&r2=1209731&rev=1209731&view=diff ============================================================================== --- tomcat/trunk/test/webapp-3.0-virtual-webapp/src/main/webapp2/rsrc/resourceF.properties (original) +++ tomcat/trunk/test/webapp-3.0-virtual-library/target/classes/META-INF/resources/rsrc/resourceE.properties Fri Dec 2 22:16:33 2011 @@ -13,5 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -This file should not be served, it is masked by'[ -/test/webapp-3.0-virtual-webapp/src/main/webapp/rsrc/resourceF.properties \ No newline at end of file +resourceEInDependentLibraryTargetClasses=true Copied: tomcat/trunk/test/webapp-3.0-virtual-library/target/classes/rsrc/resourceC.properties (from r1209694, tomcat/trunk/test/webapp-3.0-virtual-webapp/src/main/webapp2/rsrc/resourceF.properties) URL: http://svn.apache.org/viewvc/tomcat/trunk/test/webapp-3.0-virtual-library/target/classes/rsrc/resourceC.properties?p2=tomcat/trunk/test/webapp-3.0-virtual-library/target/classes/rsrc/resourceC.properties&p1=tomcat/trunk/test/webapp-3.0-virtual-webapp/src/main/webapp2/rsrc/resourceF.properties&r1=1209694&r2=1209731&rev=1209731&view=diff ============================================================================== --- tomcat/trunk/test/webapp-3.0-virtual-webapp/src/main/webapp2/rsrc/resourceF.properties (original) +++ tomcat/trunk/test/webapp-3.0-virtual-library/target/classes/rsrc/resourceC.properties Fri Dec 2 22:16:33 2011 @@ -13,5 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -This file should not be served, it is masked by'[ -/test/webapp-3.0-virtual-webapp/src/main/webapp/rsrc/resourceF.properties \ No newline at end of file +resourceCInDependentLibraryTargetClasses=true Modified: tomcat/trunk/test/webapp-3.0-virtual-webapp/src/main/webapp/WEB-INF/web.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/test/webapp-3.0-virtual-webapp/src/main/webapp/WEB-INF/web.xml?rev=1209731&r1=1209730&r2=1209731&view=diff ============================================================================== --- tomcat/trunk/test/webapp-3.0-virtual-webapp/src/main/webapp/WEB-INF/web.xml (original) +++ tomcat/trunk/test/webapp-3.0-virtual-webapp/src/main/webapp/WEB-INF/web.xml Fri Dec 2 22:16:33 2011 @@ -20,5 +20,5 @@ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0" - metadata-complete="false"> + metadata-complete="false"> </web-app> \ No newline at end of file Modified: tomcat/trunk/test/webapp-3.0-virtual-webapp/src/main/webapp/contextGetResource.jsp URL: http://svn.apache.org/viewvc/tomcat/trunk/test/webapp-3.0-virtual-webapp/src/main/webapp/contextGetResource.jsp?rev=1209731&r1=1209730&r2=1209731&view=diff ============================================================================== --- tomcat/trunk/test/webapp-3.0-virtual-webapp/src/main/webapp/contextGetResource.jsp (original) +++ tomcat/trunk/test/webapp-3.0-virtual-webapp/src/main/webapp/contextGetResource.jsp Fri Dec 2 22:16:33 2011 @@ -26,10 +26,10 @@ if(url==null) { } java.io.InputStream is = url.openStream(); try { - int b; - while((b=is.read()) != -1){ - out.write(b); - } + int b; + while((b=is.read()) != -1){ + out.write(b); + } } finally { is.close(); } Modified: tomcat/trunk/test/webapp-3.0-virtual-webapp/src/main/webapp/contextGetResourcePaths.jsp URL: http://svn.apache.org/viewvc/tomcat/trunk/test/webapp-3.0-virtual-webapp/src/main/webapp/contextGetResourcePaths.jsp?rev=1209731&r1=1209730&r2=1209731&view=diff ============================================================================== --- tomcat/trunk/test/webapp-3.0-virtual-webapp/src/main/webapp/contextGetResourcePaths.jsp (original) +++ tomcat/trunk/test/webapp-3.0-virtual-webapp/src/main/webapp/contextGetResourcePaths.jsp Fri Dec 2 22:16:33 2011 @@ -20,8 +20,8 @@ response.setContentType("text/plain"); String path = request.getParameter("path"); java.util.Set<String> paths = application.getResourcePaths(path); if(paths!=null){ - for(String p : paths) { - out.println(p); - } + for(String p : paths) { + out.println(p); + } } -%> \ No newline at end of file +%> Modified: tomcat/trunk/test/webapp-3.0-virtual-webapp/src/main/webapp2/rsrc/resourceF.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/test/webapp-3.0-virtual-webapp/src/main/webapp2/rsrc/resourceF.properties?rev=1209731&r1=1209730&r2=1209731&view=diff ============================================================================== --- tomcat/trunk/test/webapp-3.0-virtual-webapp/src/main/webapp2/rsrc/resourceF.properties (original) +++ tomcat/trunk/test/webapp-3.0-virtual-webapp/src/main/webapp2/rsrc/resourceF.properties Fri Dec 2 22:16:33 2011 @@ -13,5 +13,5 @@ # See the License for the specific language governing permissions and # limitations under the License. -This file should not be served, it is masked by'[ +This file should not be served, it is masked by /test/webapp-3.0-virtual-webapp/src/main/webapp/rsrc/resourceF.properties \ No newline at end of file Copied: tomcat/trunk/test/webapp-3.0-virtual-webapp/target/classes/rsrc/resourceB.properties (from r1209694, tomcat/trunk/test/webapp-3.0-virtual-webapp/src/main/webapp2/rsrc/resourceF.properties) URL: http://svn.apache.org/viewvc/tomcat/trunk/test/webapp-3.0-virtual-webapp/target/classes/rsrc/resourceB.properties?p2=tomcat/trunk/test/webapp-3.0-virtual-webapp/target/classes/rsrc/resourceB.properties&p1=tomcat/trunk/test/webapp-3.0-virtual-webapp/src/main/webapp2/rsrc/resourceF.properties&r1=1209694&r2=1209731&rev=1209731&view=diff ============================================================================== --- tomcat/trunk/test/webapp-3.0-virtual-webapp/src/main/webapp2/rsrc/resourceF.properties (original) +++ tomcat/trunk/test/webapp-3.0-virtual-webapp/target/classes/rsrc/resourceB.properties Fri Dec 2 22:16:33 2011 @@ -13,5 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -This file should not be served, it is masked by'[ -/test/webapp-3.0-virtual-webapp/src/main/webapp/rsrc/resourceF.properties \ No newline at end of file +resourceBInTargetClasses=true Modified: tomcat/trunk/webapps/docs/config/context.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/context.xml?rev=1209731&r1=1209730&r2=1209731&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/config/context.xml (original) +++ tomcat/trunk/webapps/docs/config/context.xml Fri Dec 2 22:16:33 2011 @@ -539,7 +539,7 @@ <code>docBase</code> instead.</p> <p>These external locations will not be emptied if the context is un-deployed.</p> - <p>A more powerful feature (for development only) is + <p>A more powerful feature (for development only) is <a href="#Virtual_webapp">Virtual webapp</a>.</p> </attribute> @@ -1254,14 +1254,14 @@ </subsection> <subsection name="Virtual webapp"> - <p>During development it may be more productive to avoid copying files (static + <p>During development it may be more productive to avoid copying files (static resources, JSPs, classes, jars...) and configure tomcat to use files from their - source locations. To do that, several customisations of the context configuration are + source locations. To do that, several customisations of the context configuration are required:</p> <ul> - <li>The <code>VirtualDirContext</code> implementation of + <li>The <code>VirtualDirContext</code> implementation of <a href="resources.html">Resources</a></li> - <li>The <code>VirtualWebappLoader</code> implementation of + <li>The <code>VirtualWebappLoader</code> implementation of <a href="loader.html">Loader</a></li> <li><code>scanAllDirectories="true"</code> on the <a href="jar-scanner.html">JarScanner</a></li> </ul> @@ -1278,11 +1278,11 @@ mywebapp/ target/ classes/ </source> - <p>To deploy such an application (assuming it also uses the log4j maven artefact), + <p>To deploy such an application (assuming it also uses the log4j maven artefact), the context configuration looks like:</p> <source> <Context path="/mywebapp" docBase="/Users/theuser/mywebapp/src/main/webapp" > - <Resources className="org.apache.naming.resources.VirtualDirContext" + <Resources className="org.apache.naming.resources.VirtualDirContext" extraResourcePaths="/WEB-INF/classes=/Users/theuser/mywebapp/target/classes" /> <Loader className="org.apache.catalina.loader.VirtualWebappLoader" virtualClasspath="/Users/theuser/mywebapp/target/classes;/Users/theuser/.m2/repository/log4j/log4j/1.2.15/log4j-1.2.15.jar" /> @@ -1291,7 +1291,7 @@ mywebapp/ </source> <p>Here is another example where the webapp serves pictures under /pictures and movies - under /movies and also depends on another maven project mylib that would normally + under /movies and also depends on another maven project mylib that would normally produce a jar to be packaged in WEB-INF/lib:</p> <source> mylib/ Modified: tomcat/trunk/webapps/docs/config/resources.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/resources.xml?rev=1209731&r1=1209730&r2=1209731&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/config/resources.xml (original) +++ tomcat/trunk/webapps/docs/config/resources.xml Fri Dec 2 22:16:33 2011 @@ -93,7 +93,7 @@ is configured by its parent Context element.</p> </subsection> - + <subsection name="VirtualDirContext implementation"> <p>This implementation of <strong>Resources</strong> is <strong>org.apache.naming.resources.VirtualDirContext</strong> and is aimed to be used @@ -101,7 +101,7 @@ directory structure. It extends <code>FileDirContext</code> and supports the following additional attributes</p> - + <attributes> <attribute name="extraResourcePaths" required="false"> <p>Allows to map a path of the filesystem to a path in the webapp. Multiple --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org