[jira] [Reopened] (MTOMCAT-84) tomcat:reload logs the wrong message
[ https://issues.apache.org/jira/browse/MTOMCAT-84?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Osipov reopened MTOMCAT-84: --- [~olamy], I don't think so. [~kkolinko], I have reuploaded the patch. I have signed ASF license months ago. > tomcat:reload logs the wrong message > > > Key: MTOMCAT-84 > URL: https://issues.apache.org/jira/browse/MTOMCAT-84 > Project: Apache Tomcat Maven Plugin > Issue Type: Bug >Affects Versions: 1.1 >Reporter: Michael Osipov >Assignee: Olivier Lamy (*$^¨%`£) >Priority: Minor > Attachments: ASF.LICENSE.NOT.GRANTED--MTOMCAT-84.patch > > > Instead of emitting "Reloading app", it emits "Redeploying app". I have > patched the issue. -- This message was sent by Atlassian JIRA (v6.1#6144) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Updated] (MTOMCAT-84) tomcat:reload logs the wrong message
[ https://issues.apache.org/jira/browse/MTOMCAT-84?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Osipov updated MTOMCAT-84: -- Attachment: MTOMCAT-84.patch > tomcat:reload logs the wrong message > > > Key: MTOMCAT-84 > URL: https://issues.apache.org/jira/browse/MTOMCAT-84 > Project: Apache Tomcat Maven Plugin > Issue Type: Bug >Affects Versions: 1.1 >Reporter: Michael Osipov >Assignee: Olivier Lamy (*$^¨%`£) >Priority: Minor > Attachments: ASF.LICENSE.NOT.GRANTED--MTOMCAT-84.patch, > MTOMCAT-84.patch > > > Instead of emitting "Reloading app", it emits "Redeploying app". I have > patched the issue. -- This message was sent by Atlassian JIRA (v6.1#6144) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Commented] (MTOMCAT-79) Running "package" before tomcat:deploy breaks build
[ https://issues.apache.org/jira/browse/MTOMCAT-79?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13813809#comment-13813809 ] Michael Osipov commented on MTOMCAT-79: --- Why was that closed as "Not a Problem"? > Running "package" before tomcat:deploy breaks build > --- > > Key: MTOMCAT-79 > URL: https://issues.apache.org/jira/browse/MTOMCAT-79 > Project: Apache Tomcat Maven Plugin > Issue Type: Bug >Affects Versions: 1.1 > Environment: Maven 2.2.11 >Reporter: Michael Osipov >Assignee: Olivier Lamy (*$^¨%`£) >Priority: Blocker > Fix For: 1.1 > > > @execute="package" breaks multi-module builds with overlays. > I have this situation: > {noformat} > parent > |-war1 > |-war2 (overlayed with war1) > {noformat} > To have war2 overlayed with war1 from reactor, I have to build from parent. > I.e., to deploy a correctly overlayed war2, I have to have to go from parent. > Otherwise overlay happens from local repo which is incorrect. So, because > tomcat-maven-p invokes "package" at war2 and only at war2, the overlay war1 > is taken from local repo. The overlayed WAR is incorrect. I explicitly have > to call "package" from parent. > I have logs available which prove the issue but cannot make them public. I > can send them privately. > All this means, that the automatic execution of package needs to be removed. > If there is no warFile to deploy, exit with build failure and tell that > package has to run first. > Remove this line: > http://mojo.codehaus.org/tomcat-maven-plugin/xref/org/codehaus/mojo/tomcat/DeployMojo.html#26 -- This message was sent by Atlassian JIRA (v6.1#6144) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1538921 - /tomcat/trunk/BUILDING.txt
Author: markt Date: Tue Nov 5 09:57:38 2013 New Revision: 1538921 URL: http://svn.apache.org/r1538921 Log: Document how to enable Cobertura code coverage Modified: tomcat/trunk/BUILDING.txt Modified: tomcat/trunk/BUILDING.txt URL: http://svn.apache.org/viewvc/tomcat/trunk/BUILDING.txt?rev=1538921&r1=1538920&r2=1538921&view=diff == --- tomcat/trunk/BUILDING.txt (original) +++ tomcat/trunk/BUILDING.txt Tue Nov 5 09:57:38 2013 @@ -362,6 +362,11 @@ For example: junit.formatter.usefile=false + 4. Optional support is provided for the Cobertura code ocverage tool. It can be + enabled using the following property: + +test.cobertura=true + (8) Source code checks - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1538924 - /tomcat/trunk/conf/catalina.properties
Author: markt Date: Tue Nov 5 10:07:11 2013 New Revision: 1538924 URL: http://svn.apache.org/r1538924 Log: Skip the Cobertura JARs Modified: tomcat/trunk/conf/catalina.properties Modified: tomcat/trunk/conf/catalina.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/conf/catalina.properties?rev=1538924&r1=1538923&r2=1538924&view=diff == --- tomcat/trunk/conf/catalina.properties (original) +++ tomcat/trunk/conf/catalina.properties Tue Nov 5 10:07:11 2013 @@ -91,6 +91,7 @@ shared.loader= # - Jasper JARs # - Tomcat JARs # - Common non-Tomcat JARs +# - Test JARs (JUnit, Cobertura and dependencies) tomcat.util.scan.StandardJarScanFilter.jarsToSkip=\ bootstrap.jar,commons-daemon.jar,tomcat-juli.jar,\ annotations-api.jar,el-api.jar,jsp-api.jar,servlet-api.jar,websocket-api.jar,\ @@ -112,7 +113,10 @@ geronimo-spec-jaxrpc*.jar,wsdl4j*.jar,\ ant.jar,ant-junit*.jar,aspectj*.jar,jmx.jar,h2*.jar,hibernate*.jar,httpclient*.jar,\ jmx-tools.jar,jta*.jar,log4j*.jar,mail*.jar,slf4j*.jar,\ xercesImpl.jar,xmlParserAPIs.jar,xml-apis.jar,\ -junit.jar,junit-*.jar,ant-launcher.jar +junit.jar,junit-*.jar,ant-launcher.jar,\ +cobertura-*.jar,asm-*.jar,dom4j-*.jar,icu4j-*.jar,jaxen-*.jar,jdom-*.jar,\ +jetty-*.jar,oro-*.jar,servlet-api-*.jar,tagsoup-*.jar,xmlParserAPIs-*.jar,\ +xom-*.jar # Default list of JAR files that should be scanned that overrides the default # jarsToSkip list above. This is typically used to include a specific JAR that - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1538923 - /tomcat/trunk/build.xml
Author: markt Date: Tue Nov 5 10:06:48 2013 New Revision: 1538923 URL: http://svn.apache.org/r1538923 Log: Move the Cobertura output up a level Modified: tomcat/trunk/build.xml Modified: tomcat/trunk/build.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=1538923&r1=1538922&r2=1538923&view=diff == --- tomcat/trunk/build.xml (original) +++ tomcat/trunk/build.xml Tue Nov 5 10:06:48 2013 @@ -166,7 +166,7 @@ - + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 52323] Cobertura test code coverage support for build.xml and build.properties.default
https://issues.apache.org/bugzilla/show_bug.cgi?id=52323 --- Comment #9 from Mark Thomas --- (In reply to Christopher Schultz from comment #6) > > So... what does our code-coverage look like? Is there a CC-report available > through Jenkins? Tomcat doesn't use the ASF's Jenkins server for CI, it uses Buildbot. I've just enabled Cobertura for the trunk build. If I have got it right, something should appear here in the next few hours: http://ci.apache.org/projects/tomcat/tomcat8/coverage -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 52323] Cobertura test code coverage support for build.xml and build.properties.default
https://issues.apache.org/bugzilla/show_bug.cgi?id=52323 Mark Thomas changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|--- |FIXED --- Comment #10 from Mark Thomas --- 1. & 3. have also been fixed in trunk and 7.0.x -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1538926 - in /tomcat/tc7.0.x/trunk: ./ BUILDING.txt build.xml conf/catalina.properties
Author: markt Date: Tue Nov 5 10:17:15 2013 New Revision: 1538926 URL: http://svn.apache.org/r1538926 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52323 Follow up to r1538534 kkolinko review comments Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/BUILDING.txt tomcat/tc7.0.x/trunk/build.xml tomcat/tc7.0.x/trunk/conf/catalina.properties Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1538921,1538923-1538924 Modified: tomcat/tc7.0.x/trunk/BUILDING.txt URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/BUILDING.txt?rev=1538926&r1=1538925&r2=1538926&view=diff == --- tomcat/tc7.0.x/trunk/BUILDING.txt (original) +++ tomcat/tc7.0.x/trunk/BUILDING.txt Tue Nov 5 10:17:15 2013 @@ -374,6 +374,11 @@ For example: junit.formatter.usefile=false + 4. Optional support is provided for the Cobertura code ocverage tool. It can be + enabled using the following property: + +test.cobertura=true + (8) Source code checks Modified: tomcat/tc7.0.x/trunk/build.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/build.xml?rev=1538926&r1=1538925&r2=1538926&view=diff == --- tomcat/tc7.0.x/trunk/build.xml (original) +++ tomcat/tc7.0.x/trunk/build.xml Tue Nov 5 10:17:15 2013 @@ -166,7 +166,7 @@ - + Modified: tomcat/tc7.0.x/trunk/conf/catalina.properties URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/conf/catalina.properties?rev=1538926&r1=1538925&r2=1538926&view=diff == --- tomcat/tc7.0.x/trunk/conf/catalina.properties (original) +++ tomcat/tc7.0.x/trunk/conf/catalina.properties Tue Nov 5 10:17:15 2013 @@ -87,6 +87,7 @@ shared.loader= # - Jasper JARs # - Tomcat JARs # - Common non-Tomcat JARs +# - Test JARs (JUnit, Cobertura and dependencies) tomcat.util.scan.DefaultJarScanner.jarsToSkip=\ bootstrap.jar,commons-daemon.jar,tomcat-juli.jar,\ annotations-api.jar,el-api.jar,jsp-api.jar,servlet-api.jar,websocket-api.jar,\ @@ -107,7 +108,10 @@ geronimo-spec-jaxrpc*.jar,wsdl4j*.jar,\ ant.jar,ant-junit*.jar,aspectj*.jar,jmx.jar,h2*.jar,hibernate*.jar,httpclient*.jar,\ jmx-tools.jar,jta*.jar,log4j.jar,log4j-1*.jar,mail*.jar,slf4j*.jar,\ xercesImpl.jar,xmlParserAPIs.jar,xml-apis.jar,\ -junit.jar,junit-*.jar,hamcrest*.jar,org.hamcrest*.jar,ant-launcher.jar +junit.jar,junit-*.jar,hamcrest*.jar,org.hamcrest*.jar,ant-launcher.jar,\ +cobertura-*.jar,asm-*.jar,dom4j-*.jar,icu4j-*.jar,jaxen-*.jar,jdom-*.jar,\ +jetty-*.jar,oro-*.jar,servlet-api-*.jar,tagsoup-*.jar,xmlParserAPIs-*.jar,\ +xom-*.jar # Additional JARs (over and above the default JARs listed above) to skip when # scanning for Servlet 3.0 pluggability features. These features include web - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55719] WAR's deployed via Tomcat Manager using Cargo deployer are getting corrupted.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55719 --- Comment #7 from Mark Thomas --- I been through the code and if the upload fails there should be something logged to $CATALINA_BASE/logs/manager-.log Do you still have those logs? If so, could you check to see if anything was logged? -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55743] New: Shutdown script broken on linux when only using PID-File
https://issues.apache.org/bugzilla/show_bug.cgi?id=55743 Bug ID: 55743 Summary: Shutdown script broken on linux when only using PID-File Product: Tomcat 7 Version: unspecified Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P2 Component: Packaging Assignee: dev@tomcat.apache.org Reporter: f.bec...@douglas.de I disabled the tomcat shutdown port on my production systems for sanity and security reasons. I'm only using the CATALINA_PID mechanism. When shutting down the the tomcat server with ./shutdown.sh, nothing happens. I always have to use ./shutdown.sh -force which triggers an kill -9 internally. When using "kill ", the tomcat is shutting down cleanly. In the catalina.sh i can only find kill -0 and kill -9, but no normal kill (SIGTERM). I would expect, that the ./shutdown.sh / catalina.sh script at first sends a normal kill (15, SIGTERM), and, if the -force parameter is set, sends an kill -9 after a small timeout - but that never happens. This problem exists with all tomcat 7 versions on 32 / 64 bit linux. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot failure in ASF Buildbot on tomcat-trunk
The Buildbot has detected a new failure on builder tomcat-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-trunk/builds/5174 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1538924 Blamelist: markt BUILD FAILED: failed compile_1 sincerely, -The Buildbot
svn commit: r1538949 - in /tomcat/trunk/java/org/apache/tomcat/util/scan: FileUrlJar.java FileUrlNestedJar.java JarFactory.java JarFileUrlJar.java JarFileUrlNestedJar.java
Author: markt Date: Tue Nov 5 11:39:25 2013 New Revision: 1538949 URL: http://svn.apache.org/r1538949 Log: Better names Added: tomcat/trunk/java/org/apache/tomcat/util/scan/JarFileUrlJar.java - copied, changed from r1538919, tomcat/trunk/java/org/apache/tomcat/util/scan/FileUrlJar.java tomcat/trunk/java/org/apache/tomcat/util/scan/JarFileUrlNestedJar.java - copied, changed from r1538919, tomcat/trunk/java/org/apache/tomcat/util/scan/FileUrlNestedJar.java Removed: tomcat/trunk/java/org/apache/tomcat/util/scan/FileUrlJar.java tomcat/trunk/java/org/apache/tomcat/util/scan/FileUrlNestedJar.java Modified: tomcat/trunk/java/org/apache/tomcat/util/scan/JarFactory.java Modified: tomcat/trunk/java/org/apache/tomcat/util/scan/JarFactory.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/scan/JarFactory.java?rev=1538949&r1=1538948&r2=1538949&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/scan/JarFactory.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/scan/JarFactory.java Tue Nov 5 11:39:25 2013 @@ -33,9 +33,9 @@ public class JarFactory { String jarUrl = url.toString(); if (jarUrl.startsWith("jar:file:")) { if (jarUrl.endsWith("!/")) { -return new FileUrlJar(url); +return new JarFileUrlJar(url); } else { -return new FileUrlNestedJar(url); +return new JarFileUrlNestedJar(url); } } else { return new UrlJar(url); Copied: tomcat/trunk/java/org/apache/tomcat/util/scan/JarFileUrlJar.java (from r1538919, tomcat/trunk/java/org/apache/tomcat/util/scan/FileUrlJar.java) URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/scan/JarFileUrlJar.java?p2=tomcat/trunk/java/org/apache/tomcat/util/scan/JarFileUrlJar.java&p1=tomcat/trunk/java/org/apache/tomcat/util/scan/FileUrlJar.java&r1=1538919&r2=1538949&rev=1538949&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/scan/FileUrlJar.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/scan/JarFileUrlJar.java Tue Nov 5 11:39:25 2013 @@ -29,14 +29,14 @@ import java.util.zip.ZipEntry; * Implementation of {@link Jar} that is optimised for file based JAR URLs that * refer directly to a JAR file (e.g URLs of the form jar:file: ... .jar!/) . */ -public class FileUrlJar implements Jar { +public class JarFileUrlJar implements Jar { private final JarFile jarFile; private final URL jarFileURL; private Enumeration entries; private JarEntry entry = null; -public FileUrlJar(URL url) throws IOException { +public JarFileUrlJar(URL url) throws IOException { JarURLConnection jarConn = (JarURLConnection) url.openConnection(); jarConn.setUseCaches(false); jarFile = jarConn.getJarFile(); Copied: tomcat/trunk/java/org/apache/tomcat/util/scan/JarFileUrlNestedJar.java (from r1538919, tomcat/trunk/java/org/apache/tomcat/util/scan/FileUrlNestedJar.java) URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/scan/JarFileUrlNestedJar.java?p2=tomcat/trunk/java/org/apache/tomcat/util/scan/JarFileUrlNestedJar.java&p1=tomcat/trunk/java/org/apache/tomcat/util/scan/FileUrlNestedJar.java&r1=1538919&r2=1538949&rev=1538949&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/scan/FileUrlNestedJar.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/scan/JarFileUrlNestedJar.java Tue Nov 5 11:39:25 2013 @@ -29,7 +29,7 @@ import java.util.jar.JarFile; * refer to a JAR file nested inside a WAR * (e.g URLs of the form jar:file: ... .war!/ ... .jar). */ -public class FileUrlNestedJar implements Jar { +public class JarFileUrlNestedJar implements Jar { private final URL jarFileURL; private final JarFile warFile; @@ -37,7 +37,7 @@ public class FileUrlNestedJar implements private NonClosingJarInputStream jarInputStream = null; private JarEntry entry = null; -public FileUrlNestedJar(URL url) throws IOException { +public JarFileUrlNestedJar(URL url) throws IOException { jarFileURL = url; JarURLConnection jarConn = (JarURLConnection) url.openConnection(); jarConn.setUseCaches(false); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: buildbot failure in ASF Buildbot on tomcat-trunk
2013/11/5 : > The Buildbot has detected a new failure on builder tomcat-trunk while > building ASF Buildbot. > Full details are available at: > http://ci.apache.org/builders/tomcat-trunk/builds/5174 > > Buildbot URL: http://ci.apache.org/ > > Buildslave for this Build: bb-vm_ubuntu > > Build Reason: scheduler > Build Source Stamp: [branch tomcat/trunk] 1538924 > Blamelist: markt > > BUILD FAILED: failed compile_1 > It is the first run after resource refactorings in trunk (r1538805 - r1538839). There such errors in stdio log: [junit] Caused by: java.lang.ClassCastException: sun.net.www.protocol.file.FileURLConnection cannot be cast to java.net.JarURLConnection [junit] at org.apache.tomcat.util.scan.UrlJar.createJarInputStream(UrlJar.java:115) [junit] at org.apache.tomcat.util.scan.UrlJar.(UrlJar.java:38) [junit] at org.apache.tomcat.util.scan.JarFactory.newInstance(JarFactory.java:41) [junit] at org.apache.jasper.compiler.TldLocation.(TldLocation.java:37) [junit] at org.apache.jasper.compiler.TldLocationsCache.(TldLocationsCache.java:80) [junit] at org.apache.jasper.servlet.JasperInitializer.onStartup(JasperInitializer.java:69) [junit] at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5232) [junit] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [junit] ... 7 more which prevents Tomcat in the tests from starting. There are no new files at http://ci.apache.org/projects/tomcat/tomcat8/ Best regards, Konstantin Kolinko - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1538960 - in /tomcat/trunk/java/org/apache/tomcat/util/scan: JarFactory.java JarFileUrlJar.java
Author: markt Date: Tue Nov 5 12:07:03 2013 New Revision: 1538960 URL: http://svn.apache.org/r1538960 Log: Fix failing unit tests after refactoring of Jasper to use the JAR abstraction from the JAR scanner. Modified: tomcat/trunk/java/org/apache/tomcat/util/scan/JarFactory.java tomcat/trunk/java/org/apache/tomcat/util/scan/JarFileUrlJar.java Modified: tomcat/trunk/java/org/apache/tomcat/util/scan/JarFactory.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/scan/JarFactory.java?rev=1538960&r1=1538959&r2=1538960&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/scan/JarFactory.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/scan/JarFactory.java Tue Nov 5 12:07:03 2013 @@ -33,10 +33,12 @@ public class JarFactory { String jarUrl = url.toString(); if (jarUrl.startsWith("jar:file:")) { if (jarUrl.endsWith("!/")) { -return new JarFileUrlJar(url); +return new JarFileUrlJar(url, true); } else { return new JarFileUrlNestedJar(url); } +} else if (jarUrl.startsWith("file:")) { +return new JarFileUrlJar(url, false); } else { return new UrlJar(url); } Modified: tomcat/trunk/java/org/apache/tomcat/util/scan/JarFileUrlJar.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/scan/JarFileUrlJar.java?rev=1538960&r1=1538959&r2=1538960&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/scan/JarFileUrlJar.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/scan/JarFileUrlJar.java Tue Nov 5 12:07:03 2013 @@ -16,9 +16,11 @@ */ package org.apache.tomcat.util.scan; +import java.io.File; import java.io.IOException; import java.io.InputStream; import java.net.JarURLConnection; +import java.net.URISyntaxException; import java.net.URL; import java.util.Enumeration; import java.util.jar.JarEntry; @@ -27,7 +29,8 @@ import java.util.zip.ZipEntry; /** * Implementation of {@link Jar} that is optimised for file based JAR URLs that - * refer directly to a JAR file (e.g URLs of the form jar:file: ... .jar!/) . + * refer directly to a JAR file (e.g URLs of the form jar:file: ... .jar!/ or + * file:... .jar) . */ public class JarFileUrlJar implements Jar { @@ -36,11 +39,24 @@ public class JarFileUrlJar implements Ja private Enumeration entries; private JarEntry entry = null; -public JarFileUrlJar(URL url) throws IOException { -JarURLConnection jarConn = (JarURLConnection) url.openConnection(); -jarConn.setUseCaches(false); -jarFile = jarConn.getJarFile(); -jarFileURL = jarConn.getJarFileURL(); +public JarFileUrlJar(URL url, boolean startsWithJar) throws IOException { +if (startsWithJar) { +// jar:file:... +JarURLConnection jarConn = (JarURLConnection) url.openConnection(); +jarConn.setUseCaches(false); +jarFile = jarConn.getJarFile(); +jarFileURL = jarConn.getJarFileURL(); +} else { +// file:... +File f; +try { +f = new File(url.toURI()); +} catch (URISyntaxException e) { +throw new IOException(e); +} +jarFile = new JarFile(f); +jarFileURL = url; +} } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: buildbot failure in ASF Buildbot on tomcat-trunk
On 05/11/2013 11:40, Konstantin Kolinko wrote: > 2013/11/5 : >> The Buildbot has detected a new failure on builder tomcat-trunk while >> building ASF Buildbot. >> Full details are available at: >> http://ci.apache.org/builders/tomcat-trunk/builds/5174 >> >> Buildbot URL: http://ci.apache.org/ >> >> Buildslave for this Build: bb-vm_ubuntu >> >> Build Reason: scheduler >> Build Source Stamp: [branch tomcat/trunk] 1538924 >> Blamelist: markt >> >> BUILD FAILED: failed compile_1 >> > > > It is the first run after resource refactorings in trunk (r1538805 - > r1538839). It was the refactoring of the JAR abstraction used by Jasper that triggered those failures. I've fixed at least some and hopefully all of those now. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55588] Tomcat randomly crashes with [libtcnative-1.so+0x12e39] Java_org_apache_tomcat_jni_Socket_sendbb+0x59
https://issues.apache.org/bugzilla/show_bug.cgi?id=55588 --- Comment #4 from Nitinb --- What could be side effects of running tomcat with 'ulimit -c unlimited' during the test? -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55588] Tomcat randomly crashes with [libtcnative-1.so+0x12e39] Java_org_apache_tomcat_jni_Socket_sendbb+0x59
https://issues.apache.org/bugzilla/show_bug.cgi?id=55588 Nitinb changed: What|Removed |Added Status|NEEDINFO|NEW -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Buildbot is now generated Cobertura reports for trunk
http://ci.apache.org/projects/tomcat/tomcat8/coverage/ Enjoy - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55588] Tomcat randomly crashes with [libtcnative-1.so+0x12e39] Java_org_apache_tomcat_jni_Socket_sendbb+0x59
https://issues.apache.org/bugzilla/show_bug.cgi?id=55588 Nitinb changed: What|Removed |Added CC||nitinvbhav...@yahoo.com --- Comment #5 from Nitinb --- Created attachment 31011 --> https://issues.apache.org/bugzilla/attachment.cgi?id=31011&action=edit Another crash with same error There was another crash and I have attached the crash report file hs_err_pid12092.log. There is no change to any of the versions/component/system/environment etc. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55743] Shutdown script broken on linux when only using PID-File
https://issues.apache.org/bugzilla/show_bug.cgi?id=55743 Christopher Schultz changed: What|Removed |Added Severity|normal |enhancement --- Comment #1 from Christopher Schultz --- Though I don't disagree that use of CATALINA_PID should allow a normal shutdown of Tomcat when the shutdown port has been disabled (which I assume it has been in your case, even though you don't exactly say how you did it), I don't see anything in the documentation that suggests that CATALINA_PID is used to stop Tomcat under these conditions. I'm therefore marking this as an enhancement. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55588] Tomcat randomly crashes with [libtcnative-1.so+0x12e39] Java_org_apache_tomcat_jni_Socket_sendbb+0x59
https://issues.apache.org/bugzilla/show_bug.cgi?id=55588 Christopher Schultz changed: What|Removed |Added Attachment #31011|text/x-log |text/plain mime type|| -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55588] Tomcat randomly crashes with [libtcnative-1.so+0x12e39] Java_org_apache_tomcat_jni_Socket_sendbb+0x59
https://issues.apache.org/bugzilla/show_bug.cgi?id=55588 --- Comment #6 from Christopher Schultz --- (In reply to Nitinb from comment #4) > What could be side effects of running tomcat with 'ulimit -c unlimited' > during the test? You might get a very large core file (roughly the size of your JVM process). -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55743] Shutdown script broken on linux when only using PID-File
https://issues.apache.org/bugzilla/show_bug.cgi?id=55743 --- Comment #2 from Felix Becker --- Hi, http://tomcat.apache.org/tomcat-7.0-doc/config/server.html === Quote Note: Disabling the shutdown port works well when Tomcat is started using Apache Commons Daemon (running as a service on Windows or with jsvc on un*xes). It cannot be used when running Tomcat with the standard shell scripts though, as it will prevent shutdown.bat|.sh and catalina.bat|.sh from stopping it gracefully. === End quote Okay, the "It cannot be used when running Tomcat with the standard shell scripts though, as it will prevent shutdown.bat|.sh and catalina.bat|.sh from stopping it gracefully." describes my situation correctly. But I'm wondering why that is implemented in this way because a normal SIGTERM causes a graceful shutdown - is there any reason why the catalina.sh doesn't send this SIGTERM? Is there a chance that this improvement will be added to the stable line of TC7? If not i'll try to patch my catalina.sh by myself. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1539036 - in /tomcat/trunk: java/org/apache/catalina/loader/WebappLoader.java test/org/apache/catalina/loader/TestVirtualWebappLoader.java test/org/apache/catalina/loader/TestWebappClassL
Author: markt Date: Tue Nov 5 15:41:53 2013 New Revision: 1539036 URL: http://svn.apache.org/r1539036 Log: Fix remainder of failing tests and a related TODO spotted in the tests as well. Modified: tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java tomcat/trunk/test/org/apache/catalina/loader/TestVirtualWebappLoader.java tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderWeaving.java Modified: tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java?rev=1539036&r1=1539035&r2=1539036&view=diff == --- tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java (original) +++ tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java Tue Nov 5 15:41:53 2013 @@ -305,6 +305,9 @@ public class WebappLoader extends Lifecy public String[] getLoaderRepositories() { +if (classLoader == null) { +return new String[0]; +} URL[] urls = classLoader.getURLs(); String[] result = new String[urls.length]; for (int i = 0; i < urls.length; i++) { Modified: tomcat/trunk/test/org/apache/catalina/loader/TestVirtualWebappLoader.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/loader/TestVirtualWebappLoader.java?rev=1539036&r1=1539035&r2=1539036&view=diff == --- tomcat/trunk/test/org/apache/catalina/loader/TestVirtualWebappLoader.java (original) +++ tomcat/trunk/test/org/apache/catalina/loader/TestVirtualWebappLoader.java Tue Nov 5 15:41:53 2013 @@ -65,9 +65,9 @@ public class TestVirtualWebappLoader ext String[] repos = loader.getLoaderRepositories(); assertEquals(3,repos.length); loader.stop(); -// ToDo: Why doesn't remove repositories? + repos = loader.getLoaderRepositories(); -assertEquals(3, repos.length); +assertEquals(0, repos.length); // no leak loader.start(); Modified: tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderWeaving.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderWeaving.java?rev=1539036&r1=1539035&r2=1539036&view=diff == --- tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderWeaving.java (original) +++ tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderWeaving.java Tue Nov 5 15:41:53 2013 @@ -251,6 +251,8 @@ public class TestWebappClassLoaderWeavin assertEquals("The second result is not correct.", "Hello, Weaver #2!", result); WebappClassLoader copiedLoader = this.loader.copyWithoutTransformers(); +// class loader needs to be started to populate URLs +copiedLoader.start(); result = invokeDoMethodOnClass(copiedLoader, "TesterNeverWeavedClass"); assertEquals("The third result is not correct.", "This will never be weaved.", result); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1539036 - in /tomcat/trunk: java/org/apache/catalina/loader/WebappLoader.java test/org/apache/catalina/loader/TestVirtualWebappLoader.java test/org/apache/catalina/loader/TestWebappCl
On Nov 5, 2013, at 9:41 AM, ma...@apache.org wrote: > Author: markt > Date: Tue Nov 5 15:41:53 2013 > New Revision: 1539036 > > URL: http://svn.apache.org/r1539036 > Log: > Fix remainder of failing tests and a related TODO spotted in the tests as > well. > > > > Modified: > tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderWeaving.java > URL: > http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderWeaving.java?rev=1539036&r1=1539035&r2=1539036&view=diff > == > --- > tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderWeaving.java > (original) > +++ > tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderWeaving.java > Tue Nov 5 15:41:53 2013 > @@ -251,6 +251,8 @@ public class TestWebappClassLoaderWeavin > assertEquals("The second result is not correct.", "Hello, Weaver > #2!", result); > > WebappClassLoader copiedLoader = > this.loader.copyWithoutTransformers(); > +// class loader needs to be started to populate URLs > +copiedLoader.start(); > > result = invokeDoMethodOnClass(copiedLoader, > "TesterNeverWeavedClass"); > assertEquals("The third result is not correct.", "This will never be > weaved.", result); copyWithoutTransformers(), as defined in the interface InstrumentableClassLoader, returns a ClassLoader. The start() method is not defined in ClassLoader, it is specific to WebappClassLoader. Furthermore, code calling copyWithoutTransformers() won't have access to WebappClassLoader to call start() reflectively if a SecurityManager is enabled. So, the copyWithoutTransformers() method needs to call start() before it returns the copied class loader. Otherwise, it will be useless to JPA providers and the like. Nick - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55588] Tomcat randomly crashes with [libtcnative-1.so+0x12e39] Java_org_apache_tomcat_jni_Socket_sendbb+0x59
https://issues.apache.org/bugzilla/show_bug.cgi?id=55588 --- Comment #7 from Christopher Schultz --- (In reply to Nitinb from comment #5) > Created attachment 31011 [details] > Another crash with same error > > There was another crash and I have attached the crash report file > hs_err_pid12092.log. There is no change to any of the > versions/component/system/environment etc. Exactly what version of tcnative were you running at the time? I've already mentioned that both your Tomcat and tcnative are out of date, and I believe this issue to have been resolved as bug #51813. The reason why that other bug is related to this one is because the output stream is stale and the sendbb function doesn't check for that case. There have been many patches to both Tomcat and tcnative that should handle the issue you describe here. Please upgrade to new versions of both components and re-test. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 52153] periodic JVM crash (access violation) on buffer flush
https://issues.apache.org/bugzilla/show_bug.cgi?id=52153 Christopher Schultz changed: What|Removed |Added Status|NEW |NEEDINFO --- Comment #8 from Christopher Schultz --- Possible dupe of bug #51813? It looks like an OutputStream is being retained by some component and used after it should no longer be used (i.e. MessageFeedServiceThread). Please re-try with latest Tomcat and tcnative. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot success in ASF Buildbot on tomcat-trunk
The Buildbot has detected a restored build on builder tomcat-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-trunk/builds/5177 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1539036 Blamelist: markt Build succeeded! sincerely, -The Buildbot
[Bug 55743] Shutdown script broken on linux when only using PID-File
https://issues.apache.org/bugzilla/show_bug.cgi?id=55743 --- Comment #3 from Christopher Schultz --- I wasn't objecting to you having filed this BZ issue: I was just changing the classification from BUG to ENHANCEMENT. I don't see why it couldn't be added. Did you want to propose a patch? They are of course always welcome. There is no good way that I know of for the Tomcat script(s) to check for a disabled shutdown in server.xml, so perhaps having another environment variable to control that behavior is appropriate. For instance, using CATALINA_PID can be reasonably used without asking catalina.sh to send a 'kill' signal to terminate the process. So, maybe a new CATALINA_KILL_TO_SHUTDOWN env var would be appropriate. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55383] Improve markup and design of Tomcat's HTML pages
https://issues.apache.org/bugzilla/show_bug.cgi?id=55383 --- Comment #49 from Konstantin Preißer --- Hi, I'd like to switch the font used for the Tomcat Website and Docs (currently "Lucida Sans Unicode") to "Open Sans" [1] which is released by Google using a Apache 2.0 Licence. This also means that the font can be displayed on every platform like Windows, Mac and Linux. I plan to add the Font files (.woff) (the variant which contains only the Latin characters) directly instead of using a CSS link to Google, so that the Site and the Docs (which may be viewed offline) don't depend on external Google resources. Is it OK to commit? [1] http://www.google.com/fonts/specimen/Open+Sans -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55383] Improve markup and design of Tomcat's HTML pages
https://issues.apache.org/bugzilla/show_bug.cgi?id=55383 --- Comment #50 from Christopher Schultz --- (In reply to Konstantin Preißer from comment #49) > I'd like to switch the font used for the Tomcat Website and Docs (currently > "Lucida Sans Unicode") to "Open Sans" [1] which is released by Google using > a Apache 2.0 Licence. This also means that the font can be displayed on > every platform like Windows, Mac and Linux. It's worth noting that the current CSS for font-family is just a suggestion to the browser. The font you get depends very heavily on the environment where the pages are being viewed. > I plan to add the Font files (.woff) (the variant which contains only the > Latin characters) directly instead of using a CSS link to Google, so that > the Site and the Docs (which may be viewed offline) don't depend on external > Google resources. I'm not a huge fan of WOFF for a few reasons: 1. It requires yet another file to download, and font files tend to be big (I couldn't find a download link so I don't know the exact size of the Open Sans font). 2. Most browsers I've seen tend to render the page as quickly as possible, and then apply the custom-font afterward, which results in a weird post-adjustment of the font, even for fonts that are already downloaded. I haven't done extensive testing recently, so it's possible that this is no longer an issue. 3. Ultimately, the font choice is up to the browser, anyway, so you can't really "force" them to use Open Sans. Given the above, why bother with a change at all? I know designers get all hot and bothered by things like kerning, serif angles, etc. but I'm not sure that adding another font-choice here really adds anything. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55383] Improve markup and design of Tomcat's HTML pages
https://issues.apache.org/bugzilla/show_bug.cgi?id=55383 --- Comment #51 from Konstantin Preißer --- Hi Christopher, thanks for your comments. (In reply to Christopher Schultz from comment #50) > (In reply to Konstantin Preißer from comment #49) > > I'd like to switch the font used for the Tomcat Website and Docs (currently > > "Lucida Sans Unicode") to "Open Sans" [1] which is released by Google using > > a Apache 2.0 Licence. This also means that the font can be displayed on > > every platform like Windows, Mac and Linux. > > It's worth noting that the current CSS for font-family is just a suggestion > to the browser. The font you get depends very heavily on the environment > where the pages are being viewed. > > > I plan to add the Font files (.woff) (the variant which contains only the > > Latin characters) directly instead of using a CSS link to Google, so that > > the Site and the Docs (which may be viewed offline) don't depend on external > > Google resources. > > I'm not a huge fan of WOFF for a few reasons: > > 1. It requires yet another file to download, and font files tend to be big > (I couldn't find a download link so I don't know the exact size of the Open > Sans font). Google Fonts allows to explicitely select the charsets which should be included in the Font, to keep the file sizes down. E.g. in this case it would be (400, 400 italics, 600, 600 italics): 84 KB, which should be an acceptable size in today's relations (e.g. the ASF feather PNG image (asf-feather.png) has 40 KB). > 2. Most browsers I've seen tend to render the page as quickly as possible, > and then apply the custom-font afterward, which results in a weird > post-adjustment of the font, even for fonts that are already downloaded. I > haven't done extensive testing recently, so it's possible that this is no > longer an issue. This applies if you visit the page the first time: Some browsers (Firefox) will display the page with an alternate font until the WOFF is downloaded, then switch to the WOFF. Other browsers (Chrome) will display spaces until the WOFF is loaded. However, after that if you browse on other pages then the WOFF is already in the cache and the browser will use it immediately (at least this is the case with Firefox, IE and Chrome), so there should be no issues when browsing through various links on the site. > 3. Ultimately, the font choice is up to the browser, anyway, so you can't > really "force" them to use Open Sans. Yes (but this should also be the case with local fonts). > > Given the above, why bother with a change at all? I know designers get all > hot and bothered by things like kerning, serif angles, etc. but I'm not sure > that adding another font-choice here really adds anything. I'm also not a designer but I think it looks a bit more modern than the currently used Lucida Sans Console (and as it is a platform-independent format, other platforms will be able to use the font). I use it on my own websites and e.g. this site uses it: http://www.html5rocks.com/en/tutorials/websockets/basics/ -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1539133 - /tomcat/trunk/java/org/apache/jasper/compiler/ELNode.java
Author: markt Date: Tue Nov 5 21:22:25 2013 New Revision: 1539133 URL: http://svn.apache.org/r1539133 Log: Fix indent Modified: tomcat/trunk/java/org/apache/jasper/compiler/ELNode.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/ELNode.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/ELNode.java?rev=1539133&r1=1539132&r2=1539133&view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/ELNode.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/ELNode.java Tue Nov 5 21:22:25 2013 @@ -65,9 +65,9 @@ abstract class ELNode { return expr; } -public char getType() { -return type; -} +public char getType() { +return type; +} } /** - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1539157 - in /tomcat/trunk: java/org/apache/jasper/compiler/ELParser.java test/org/apache/jasper/compiler/TestELParser.java
Author: markt Date: Tue Nov 5 22:13:37 2013 New Revision: 1539157 URL: http://svn.apache.org/r1539157 Log: Fix various bugs in Jasper's simplified EL parser and add the test case that found them. This is a precursor to fixing BZ55198 / BZ55735 since that is going to require separating an attribute value into EL and non-EL components Added: tomcat/trunk/test/org/apache/jasper/compiler/TestELParser.java (with props) Modified: tomcat/trunk/java/org/apache/jasper/compiler/ELParser.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/ELParser.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/ELParser.java?rev=1539157&r1=1539156&r2=1539157&view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/ELParser.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/ELParser.java Tue Nov 5 22:13:37 2013 @@ -17,6 +17,12 @@ package org.apache.jasper.compiler; +import org.apache.jasper.JasperException; +import org.apache.jasper.compiler.ELNode.ELText; +import org.apache.jasper.compiler.ELNode.Function; +import org.apache.jasper.compiler.ELNode.Root; +import org.apache.jasper.compiler.ELNode.Text; + /** * This class implements a parser for EL expressions. * @@ -106,6 +112,7 @@ public class ELParser { // Output whatever is in buffer if (buf.length() > 0) { ELexpr.add(new ELNode.ELText(buf.toString())); +buf = new StringBuilder(); } if (!parseFunction()) { ELexpr.add(new ELNode.ELText(curToken.toString())); @@ -131,8 +138,8 @@ public class ELParser { } String s1 = null; // Function prefix String s2 = curToken.toString(); // Function name -int mark = getIndex(); if (hasNext()) { +int mark = getIndex(); curToken = nextToken(); if (curToken.toChar() == ':') { if (hasNext()) { @@ -150,8 +157,9 @@ public class ELParser { ELexpr.add(new ELNode.Function(s1, s2)); return true; } +curToken = prevToken; +setIndex(mark); } -setIndex(mark); return false; } @@ -389,4 +397,42 @@ public class ELParser { public char getType() { return type; } + + +protected static class TextBuilder extends ELNode.Visitor { + +protected StringBuilder output = new StringBuilder(); + +public String getText() { +return output.toString(); +} + +@Override +public void visit(Root n) throws JasperException { +output.append(n.getType()); +output.append('{'); +n.getExpression().visit(this); +output.append('}'); +} + +@Override +public void visit(Function n) throws JasperException { +if (n.getPrefix() != null) { +output.append(n.getPrefix()); +output.append(':'); +} +output.append(n.getName()); +output.append('('); +} + +@Override +public void visit(Text n) throws JasperException { +output.append(n.getText()); +} + +@Override +public void visit(ELText n) throws JasperException { +output.append(n.getText()); +} +} } Added: tomcat/trunk/test/org/apache/jasper/compiler/TestELParser.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/jasper/compiler/TestELParser.java?rev=1539157&view=auto == --- tomcat/trunk/test/org/apache/jasper/compiler/TestELParser.java (added) +++ tomcat/trunk/test/org/apache/jasper/compiler/TestELParser.java Tue Nov 5 22:13:37 2013 @@ -0,0 +1,97 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * 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. + */ +package org.apache.jasper.compiler; + +import org.junit.Assert; +import org.junit.Test; + +import org.apache.jasper.JasperException; +import org.apache.jasper.compiler.ELNode.Nodes; +import org.apache.jasper.compiler
svn commit: r1539173 - in /tomcat/trunk: java/org/apache/jasper/compiler/ java/org/apache/jasper/runtime/ test/org/apache/jasper/compiler/ test/org/apache/jasper/runtime/ test/webapp/WEB-INF/tags/ tes
Author: markt Date: Tue Nov 5 22:46:35 2013 New Revision: 1539173 URL: http://svn.apache.org/r1539173 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55735 This fixes a regression caused by the fix to https://issues.apache.org/bugzilla/show_bug.cgi?id=55198 When processing JSP documents, attributes in UninterpretedTag nodes that contain EL should have the the non-EL components XML escaped and the output of the EL components should not be escaped. Added: tomcat/trunk/test/org/apache/jasper/compiler/TesterValidator.java - copied, changed from r1538919, tomcat/trunk/test/org/apache/jasper/runtime/TesterPageContextImpl.java Removed: tomcat/trunk/test/org/apache/jasper/runtime/TesterPageContextImpl.java Modified: tomcat/trunk/java/org/apache/jasper/compiler/Validator.java tomcat/trunk/java/org/apache/jasper/runtime/PageContextImpl.java tomcat/trunk/test/org/apache/jasper/compiler/TestParser.java tomcat/trunk/test/webapp/WEB-INF/tags/bug55198.tagx tomcat/trunk/test/webapp/bug5/bug55198.jsp Modified: tomcat/trunk/java/org/apache/jasper/compiler/Validator.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Validator.java?rev=1539173&r1=1539172&r2=1539173&view=diff == --- tomcat/trunk/java/org/apache/jasper/compiler/Validator.java (original) +++ tomcat/trunk/java/org/apache/jasper/compiler/Validator.java Tue Nov 5 22:46:35 2013 @@ -38,6 +38,7 @@ import javax.servlet.jsp.tagext.TagLibra import javax.servlet.jsp.tagext.ValidationMessage; import org.apache.jasper.JasperException; +import org.apache.jasper.compiler.ELNode.Text; import org.apache.jasper.el.ELContextImpl; import org.xml.sax.Attributes; @@ -1375,8 +1376,16 @@ class Validator { validateFunctions(el, n); -result = new Node.JspAttribute(tai, qName, uri, -localName, value, false, el, dynamic); +if (n.getRoot().isXmlSyntax()) { +// The non-EL elements need to be XML escaped +XmlEscapeNonELVisitor v = new XmlEscapeNonELVisitor(); +el.visit(v); +result = new Node.JspAttribute(tai, qName, uri, +localName, v.getText(), false, el, dynamic); +} else { +result = new Node.JspAttribute(tai, qName, uri, +localName, value, false, el, dynamic); +} ELContextImpl ctx = new ELContextImpl(expressionFactory); @@ -1412,6 +1421,16 @@ class Validator { return result; } + +private static class XmlEscapeNonELVisitor extends ELParser.TextBuilder { + +@Override +public void visit(Text n) throws JasperException { +output.append(xmlEscape(n.getText())); +} +} + + /* * Return an empty StringBuilder [not thread-safe] */ @@ -1860,4 +1879,67 @@ class Validator { errDisp.jspError(errMsg.toString()); } } + +protected static String xmlEscape(String s) { +if (s == null) { +return null; +} +int len = s.length(); + +/* + * Look for any "bad" characters, Escape "bad" character was found + */ +// ASCII " 34 & 38 ' 39 < 60 > 62 +for (int i = 0; i < len; i++) { +char c = s.charAt(i); +if (c >= '\"' && c <= '>' && +(c == '<' || c == '>' || c == '\'' || c == '&' || c == '"')) { +// need to escape them and then quote the whole string +StringBuilder sb = new StringBuilder((int) (len * 1.2)); +sb.append(s, 0, i); +int pos = i + 1; +for (int j = i; j < len; j++) { +c = s.charAt(j); +if (c >= '\"' && c <= '>') { +if (c == '<') { +if (j > pos) { +sb.append(s, pos, j); +} +sb.append("<"); +pos = j + 1; +} else if (c == '>') { +if (j > pos) { +sb.append(s, pos, j); +} +sb.append(">"); +pos = j + 1; +} else if (c == '\'') { +if (j > pos) { +sb.append(s, pos, j); +} +sb.append("'"); // ' +pos = j + 1; +} else i
svn commit: r1539174 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/jasper/compiler/ELNode.java
Author: markt Date: Tue Nov 5 22:50:21 2013 New Revision: 1539174 URL: http://svn.apache.org/r1539174 Log: Fix indent Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELNode.java Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1539133 Modified: tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELNode.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELNode.java?rev=1539174&r1=1539173&r2=1539174&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELNode.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELNode.java Tue Nov 5 22:50:21 2013 @@ -65,9 +65,9 @@ abstract class ELNode { return expr; } -public char getType() { -return type; -} +public char getType() { +return type; +} } /** - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1539176 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/jasper/compiler/ELParser.java test/org/apache/jasper/compiler/TestELParser.java
Author: markt Date: Tue Nov 5 22:51:30 2013 New Revision: 1539176 URL: http://svn.apache.org/r1539176 Log: Fix various bugs in Jasper's simplified EL parser and add the test case that found them. This is a precursor to fixing BZ55198 / BZ55735 since that is going to require separating an attribute value into EL and non-EL components Added: tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestELParser.java - copied unchanged from r1539157, tomcat/trunk/test/org/apache/jasper/compiler/TestELParser.java Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELParser.java Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1539157 Modified: tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELParser.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELParser.java?rev=1539176&r1=1539175&r2=1539176&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELParser.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/ELParser.java Tue Nov 5 22:51:30 2013 @@ -17,6 +17,12 @@ package org.apache.jasper.compiler; +import org.apache.jasper.JasperException; +import org.apache.jasper.compiler.ELNode.ELText; +import org.apache.jasper.compiler.ELNode.Function; +import org.apache.jasper.compiler.ELNode.Root; +import org.apache.jasper.compiler.ELNode.Text; + /** * This class implements a parser for EL expressions. * @@ -108,6 +114,7 @@ public class ELParser { // Output whatever is in buffer if (buf.length() > 0) { ELexpr.add(new ELNode.ELText(buf.toString())); +buf = new StringBuilder(); } if (!parseFunction()) { ELexpr.add(new ELNode.ELText(curToken.toString())); @@ -133,8 +140,8 @@ public class ELParser { } String s1 = null; // Function prefix String s2 = curToken.toString(); // Function name -int mark = getIndex(); if (hasNext()) { +int mark = getIndex(); curToken = nextToken(); if (curToken.toChar() == ':') { if (hasNext()) { @@ -152,8 +159,9 @@ public class ELParser { ELexpr.add(new ELNode.Function(s1, s2)); return true; } +curToken = prevToken; +setIndex(mark); } -setIndex(mark); return false; } @@ -398,4 +406,42 @@ public class ELParser { public char getType() { return type; } + + +protected static class TextBuilder extends ELNode.Visitor { + +protected StringBuilder output = new StringBuilder(); + +public String getText() { +return output.toString(); +} + +@Override +public void visit(Root n) throws JasperException { +output.append(n.getType()); +output.append('{'); +n.getExpression().visit(this); +output.append('}'); +} + +@Override +public void visit(Function n) throws JasperException { +if (n.getPrefix() != null) { +output.append(n.getPrefix()); +output.append(':'); +} +output.append(n.getName()); +output.append('('); +} + +@Override +public void visit(Text n) throws JasperException { +output.append(n.getText()); +} + +@Override +public void visit(ELText n) throws JasperException { +output.append(n.getText()); +} +} } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1539177 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/jasper/compiler/ java/org/apache/jasper/runtime/ test/org/apache/jasper/compiler/ test/org/apache/jasper/runtime/ test/webapp-3.0/WE
Author: markt Date: Tue Nov 5 22:56:44 2013 New Revision: 1539177 URL: http://svn.apache.org/r1539177 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55735 This fixes a regression caused by the fix to https://issues.apache.org/bugzilla/show_bug.cgi?id=55198 When processing JSP documents, attributes in UninterpretedTag nodes that contain EL should have the the non-EL components XML escaped and the output of the EL components should not be escaped. Added: tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TesterValidator.java - copied unchanged from r1539173, tomcat/trunk/test/org/apache/jasper/compiler/TesterValidator.java Removed: tomcat/tc7.0.x/trunk/test/org/apache/jasper/runtime/TesterPageContextImpl.java Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/Validator.java tomcat/tc7.0.x/trunk/java/org/apache/jasper/runtime/PageContextImpl.java tomcat/tc7.0.x/trunk/test/org/apache/jasper/compiler/TestParser.java tomcat/tc7.0.x/trunk/test/webapp-3.0/WEB-INF/tags/bug55198.tagx tomcat/tc7.0.x/trunk/test/webapp-3.0/bug5/bug55198.jsp Propchange: tomcat/tc7.0.x/trunk/ -- Merged /tomcat/trunk:r1539173 Modified: tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/Validator.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/Validator.java?rev=1539177&r1=1539176&r2=1539177&view=diff == --- tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/Validator.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/jasper/compiler/Validator.java Tue Nov 5 22:56:44 2013 @@ -38,6 +38,7 @@ import javax.servlet.jsp.tagext.TagLibra import javax.servlet.jsp.tagext.ValidationMessage; import org.apache.jasper.JasperException; +import org.apache.jasper.compiler.ELNode.Text; import org.apache.jasper.el.ELContextImpl; import org.xml.sax.Attributes; @@ -1377,8 +1378,16 @@ class Validator { validateFunctions(el, n); -result = new Node.JspAttribute(tai, qName, uri, -localName, value, false, el, dynamic); +if (n.getRoot().isXmlSyntax()) { +// The non-EL elements need to be XML escaped +XmlEscapeNonELVisitor v = new XmlEscapeNonELVisitor(); +el.visit(v); +result = new Node.JspAttribute(tai, qName, uri, +localName, v.getText(), false, el, dynamic); +} else { +result = new Node.JspAttribute(tai, qName, uri, +localName, value, false, el, dynamic); +} ELContextImpl ctx = new ELContextImpl(); ctx.setFunctionMapper(getFunctionMapper(el)); @@ -1413,6 +1422,16 @@ class Validator { return result; } + +private static class XmlEscapeNonELVisitor extends ELParser.TextBuilder { + +@Override +public void visit(Text n) throws JasperException { +output.append(xmlEscape(n.getText())); +} +} + + /* * Return an empty StringBuilder [not thread-safe] */ @@ -1858,4 +1877,67 @@ class Validator { errDisp.jspError(errMsg.toString()); } } + +protected static String xmlEscape(String s) { +if (s == null) { +return null; +} +int len = s.length(); + +/* + * Look for any "bad" characters, Escape "bad" character was found + */ +// ASCII " 34 & 38 ' 39 < 60 > 62 +for (int i = 0; i < len; i++) { +char c = s.charAt(i); +if (c >= '\"' && c <= '>' && +(c == '<' || c == '>' || c == '\'' || c == '&' || c == '"')) { +// need to escape them and then quote the whole string +StringBuilder sb = new StringBuilder((int) (len * 1.2)); +sb.append(s, 0, i); +int pos = i + 1; +for (int j = i; j < len; j++) { +c = s.charAt(j); +if (c >= '\"' && c <= '>') { +if (c == '<') { +if (j > pos) { +sb.append(s, pos, j); +} +sb.append("<"); +pos = j + 1; +} else if (c == '>') { +if (j > pos) { +sb.append(s, pos, j); +} +sb.append(">"); +pos = j + 1;
[Bug 55735] Additional quote entity in html element attribute evaluated in tagx if attribute contains EL expression
https://issues.apache.org/bugzilla/show_bug.cgi?id=55735 Mark Thomas changed: What|Removed |Added Component|Jasper |Jasper Version|7.0.47 |unspecified Product|Tomcat 7|Tomcat 6 Target Milestone|--- |default Severity|critical|normal --- Comment #3 from Mark Thomas --- Thanks for the report. This was a regression in the fix for bug55198. This has been fixed in trunk for 8.0.0-RC6 onwards. This has been fixed in 7.0.x for 7.0.48 onwards. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1539179 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: markt Date: Tue Nov 5 23:01:15 2013 New Revision: 1539179 URL: http://svn.apache.org/r1539179 Log: Update the BZ 55198 proposal with the fixes for the regression. Remove Chris's vote as the patch proposal has changed. Modified: tomcat/tc6.0.x/trunk/STATUS.txt Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1539179&r1=1539178&r2=1539179&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Tue Nov 5 23:01:15 2013 @@ -34,8 +34,10 @@ PATCHES PROPOSED TO BACKPORT: * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55198 Correctly escape XML output from tagx files. - http://svn.apache.org/r1500065 (excluding tests) - +1: markt, schultz + http://svn.apache.org/r1500065 (excluding tests) - original fix + http://svn.apache.org/r1539176 (excluding tests) - required for following fix + http://svn.apache.org/r1539177 (excluding tests) - fixes regression in original + +1: markt -1: * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=55268 - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55735] Additional quote entity in html element attribute evaluated in tagx if attribute contains EL expression
https://issues.apache.org/bugzilla/show_bug.cgi?id=55735 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #4 from Mark Thomas --- I've updated the back-port proposal for 55198 to include the fix for this regression so there is no need to keep this bug open. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 55198] Quote entity in html element attribute evaluated in tagx if attribute contains EL expression
https://issues.apache.org/bugzilla/show_bug.cgi?id=55198 --- Comment #6 from Mark Thomas --- I've updated the back-port proposal to include a fix for the regression identified in bug 55735. Regarding theissue, I have a fix for that but it strikes me as the sort of thing that could break lots of stuff. I suggest opening a new issue for that against Tomcat 8, fixing it there and seeing what feedback we get before we back-port it. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1539036 - in /tomcat/trunk: java/org/apache/catalina/loader/WebappLoader.java test/org/apache/catalina/loader/TestVirtualWebappLoader.java test/org/apache/catalina/loader/TestWebappCl
On 05/11/2013 16:47, Nick Williams wrote: > copyWithoutTransformers(), as defined in the interface > InstrumentableClassLoader, returns a ClassLoader. The start() method is not > defined in ClassLoader, it is specific to WebappClassLoader. Furthermore, > code calling copyWithoutTransformers() won't have access to WebappClassLoader > to call start() reflectively if a SecurityManager is enabled. > > So, the copyWithoutTransformers() method needs to call start() before it > returns the copied class loader. Otherwise, it will be useless to JPA > providers and the like. Fixed. Thanks. Mark - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1539180 - in /tomcat/trunk: java/org/apache/catalina/loader/WebappClassLoader.java test/org/apache/catalina/loader/TestWebappClassLoaderWeaving.java
Author: markt Date: Tue Nov 5 23:06:33 2013 New Revision: 1539180 URL: http://svn.apache.org/r1539180 Log: Review of r1539036 by Nick Williams. copyWithoutTransformers(), as defined in the interface InstrumentableClassLoader, returns a ClassLoader. The start() method is not defined in ClassLoader, it is specific to WebappClassLoader. Furthermore, code calling copyWithoutTransformers() won't have access to WebappClassLoader to call start() reflectively if a SecurityManager is enabled. So, the copyWithoutTransformers() method needs to call start() before it returns the copied class loader. Otherwise, it will be useless to JPA providers and the like. Modified: tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderWeaving.java Modified: tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java?rev=1539180&r1=1539179&r2=1539180&view=diff == --- tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java (original) +++ tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java Tue Nov 5 23:06:33 2013 @@ -700,6 +700,12 @@ public class WebappClassLoader extends U result.permissionList.addAll(this.permissionList); result.loaderPC.putAll(this.loaderPC); +try { +result.start(); +} catch (LifecycleException e) { +throw new IllegalStateException(e); +} + return result; } Modified: tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderWeaving.java URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderWeaving.java?rev=1539180&r1=1539179&r2=1539180&view=diff == --- tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderWeaving.java (original) +++ tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderWeaving.java Tue Nov 5 23:06:33 2013 @@ -251,8 +251,6 @@ public class TestWebappClassLoaderWeavin assertEquals("The second result is not correct.", "Hello, Weaver #2!", result); WebappClassLoader copiedLoader = this.loader.copyWithoutTransformers(); -// class loader needs to be started to populate URLs -copiedLoader.start(); result = invokeDoMethodOnClass(copiedLoader, "TesterNeverWeavedClass"); assertEquals("The third result is not correct.", "This will never be weaved.", result); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1538502 - in /tomcat/maven-plugin/trunk: tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractRunMojo.java tomcat7-maven-plugin/src/main/java/org/apache/t
On 5 November 2013 07:42, Konstantin Kolinko wrote: > 2013/11/4 : >> Author: olamy >> Date: Mon Nov 4 04:12:13 2013 >> New Revision: 1538502 >> >> URL: http://svn.apache.org/r1538502 >> Log: >> [MTOMCAT-92] Bind tomcat to a self-chosen network interface >> >> Modified: >> >> tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractRunMojo.java >> >> tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractRunMojo.java >> >> Modified: >> tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractRunMojo.java >> URL: >> http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractRunMojo.java?rev=1538502&r1=1538501&r2=1538502&view=diff >> == >> --- >> tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractRunMojo.java >> (original) >> +++ >> tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractRunMojo.java >> Mon Nov 4 04:12:13 2013 >> @@ -136,6 +136,16 @@ public abstract class AbstractRunMojo >> private int port; >> >> /** >> + * >> + * For servers with more than one IP address, this attribute specifies >> which address >> + * will be used for listening on the specified port. >> + * By default, this port will be used on all IP addresses associated >> with the server. > > 1. The other way, > "this IP address will be used on all ports" ? Ok I changed. I have to admit I was lazy :-) and simply copy the documentation from http://tomcat.apache.org/tomcat-7.0-doc/config/http.html > > 2. You code sets the address on HTTP connector. What about HTTPS and AJP ones? Good catch fixed. > >> + * @since 2.2 >> + */ >> +@Parameter( property = "maven.tomcat.address") >> +private String address; >> + >> +/** >> * The AJP port to run the Tomcat server on. >> * By default it's 0 this means won't be started. >> * The ajp connector will be started only for value > 0. >> @@ -909,6 +919,13 @@ public abstract class AbstractRunMojo >> } >> httpConnector.setURIEncoding( uriEncoding ); >> httpConnector.setUseBodyEncodingForURI( >> this.useBodyEncodingForURI ); >> + >> +if ( address !=null) >> +{ >> +//ici >> +httpConnector.setAttribute( "address", address ); >> +} > > 3. (Specific to Tomcat 6 part of this commit): It would be a bit > easier to pass the address to Embedded.createConnector(String, int, > String) as called few lines above. There is a variant of that method > that accepts String as the address argument > >> + >> container.addConnector( httpConnector ); >> >> // create https connector >> >> Modified: >> tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractRunMojo.java >> URL: >> http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractRunMojo.java?rev=1538502&r1=1538501&r2=1538502&view=diff >> == >> --- >> tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractRunMojo.java >> (original) >> +++ >> tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractRunMojo.java >> Mon Nov 4 04:12:13 2013 >>... > > The same for Tomcat 7. > > Best regards, > Konstantin Kolinko > > - > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > -- Olivier Lamy Ecetera: http://ecetera.com.au http://twitter.com/olamy | http://linkedin.com/in/olamy - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1539187 - in /tomcat/maven-plugin/trunk: tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractRunMojo.java tomcat7-maven-plugin/src/main/java/org/apache/tomca
Author: olamy Date: Tue Nov 5 23:18:57 2013 New Revision: 1539187 URL: http://svn.apache.org/r1539187 Log: fix javadoc Modified: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractRunMojo.java tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractRunMojo.java Modified: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractRunMojo.java URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractRunMojo.java?rev=1539187&r1=1539186&r2=1539187&view=diff == --- tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractRunMojo.java (original) +++ tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractRunMojo.java Tue Nov 5 23:18:57 2013 @@ -137,9 +137,7 @@ public abstract class AbstractRunMojo /** * - * For servers with more than one IP address, this attribute specifies which address - * will be used for listening on the specified port. - * By default, this port will be used on all IP addresses associated with the server. + * this IP address will be used on all ports. * @since 2.2 */ @Parameter( property = "maven.tomcat.address") Modified: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractRunMojo.java URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractRunMojo.java?rev=1539187&r1=1539186&r2=1539187&view=diff == --- tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractRunMojo.java (original) +++ tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractRunMojo.java Tue Nov 5 23:18:57 2013 @@ -152,9 +152,7 @@ public abstract class AbstractRunMojo /** * - * For servers with more than one IP address, this attribute specifies which address - * will be used for listening on the specified port. - * By default, this port will be used on all IP addresses associated with the server. + * this IP address will be used on all ports * @since 2.2 */ @Parameter( property = "maven.tomcat.address") - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1539186 - in /tomcat/maven-plugin/trunk: tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractRunMojo.java tomcat7-maven-plugin/src/main/java/org/apache/tomca
Author: olamy Date: Tue Nov 5 23:18:27 2013 New Revision: 1539186 URL: http://svn.apache.org/r1539186 Log: [MTOMCAT-92] setup for https and ajp connectors too Modified: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractRunMojo.java tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractRunMojo.java Modified: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractRunMojo.java URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractRunMojo.java?rev=1539186&r1=1539185&r2=1539186&view=diff == --- tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractRunMojo.java (original) +++ tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractRunMojo.java Tue Nov 5 23:18:27 2013 @@ -920,9 +920,8 @@ public abstract class AbstractRunMojo httpConnector.setURIEncoding( uriEncoding ); httpConnector.setUseBodyEncodingForURI( this.useBodyEncodingForURI ); -if ( address !=null) +if ( address != null) { -//ici httpConnector.setAttribute( "address", address ); } @@ -971,6 +970,11 @@ public abstract class AbstractRunMojo httpsConnector.setUseBodyEncodingForURI( this.useBodyEncodingForURI ); +if ( address != null) +{ +httpsConnector.setAttribute( "address", address ); +} + container.addConnector( httpsConnector ); } @@ -981,6 +985,10 @@ public abstract class AbstractRunMojo Connector ajpConnector = container.createConnector( (InetAddress) null, ajpPort, ajpProtocol ); ajpConnector.setURIEncoding( uriEncoding ); ajpConnector.setUseBodyEncodingForURI( this.useBodyEncodingForURI ); +if ( address != null) +{ +ajpConnector.setAttribute( "address", address ); +} container.addConnector( ajpConnector ); } if ( useSeparateTomcatClassLoader ) Modified: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractRunMojo.java URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractRunMojo.java?rev=1539186&r1=1539185&r2=1539186&view=diff == --- tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractRunMojo.java (original) +++ tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractRunMojo.java Tue Nov 5 23:18:27 2013 @@ -1121,7 +1121,7 @@ public abstract class AbstractRunMojo connector.setRedirectPort( httpsPort ); } -if ( address !=null) +if ( address != null) { connector.setAttribute( "address", address ); } @@ -1202,6 +1202,11 @@ public abstract class AbstractRunMojo httpsConnector.setUseBodyEncodingForURI( this.useBodyEncodingForURI ); +if ( address != null) +{ +httpsConnector.setAttribute( "address", address ); +} + embeddedTomcat.getEngine().getService().addConnector( httpsConnector ); } @@ -1214,6 +1219,10 @@ public abstract class AbstractRunMojo ajpConnector.setPort( ajpPort ); ajpConnector.setURIEncoding( uriEncoding ); ajpConnector.setUseBodyEncodingForURI( this.useBodyEncodingForURI ); +if ( address != null) +{ +ajpConnector.setAttribute( "address", address ); +} embeddedTomcat.getEngine().getService().addConnector( ajpConnector ); } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1539191 - /tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/ReloadMojo.java
Author: olamy Date: Tue Nov 5 23:23:29 2013 New Revision: 1539191 URL: http://svn.apache.org/r1539191 Log: [MTOMCAT-84] tomcat:reload logs the wrong message Submitted by Michael Osipov. Modified: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/ReloadMojo.java Modified: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/ReloadMojo.java URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/ReloadMojo.java?rev=1539191&r1=1539190&r2=1539191&view=diff == --- tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/ReloadMojo.java (original) +++ tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/ReloadMojo.java Tue Nov 5 23:23:29 2013 @@ -46,7 +46,7 @@ public class ReloadMojo protected void invokeManager() throws MojoExecutionException, TomcatManagerException, IOException { -getLog().info( messagesProvider.getMessage( "RedeployMojo.redeployApp", getDeployedURL() ) ); +getLog().info( messagesProvider.getMessage( "ReloadMojo.reloadingApp", getDeployedURL() ) ); TomcatManagerResponse tomcatResponse = getManager().reload( getPath() ); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1539192 - /tomcat/maven-plugin/trunk/pom.xml
Author: olamy Date: Tue Nov 5 23:23:41 2013 New Revision: 1539192 URL: http://svn.apache.org/r1539192 Log: add contributor Modified: tomcat/maven-plugin/trunk/pom.xml Modified: tomcat/maven-plugin/trunk/pom.xml URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/pom.xml?rev=1539192&r1=1539191&r2=1539192&view=diff == --- tomcat/maven-plugin/trunk/pom.xml (original) +++ tomcat/maven-plugin/trunk/pom.xml Tue Nov 5 23:23:41 2013 @@ -173,6 +173,9 @@ Robert Hollencamp + + Michael Osipov + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Closed] (MTOMCAT-84) tomcat:reload logs the wrong message
[ https://issues.apache.org/jira/browse/MTOMCAT-84?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Olivier Lamy (*$^¨%`£) closed MTOMCAT-84. - Resolution: Fixed Fix Version/s: 2.2 patch applied. Thanks > tomcat:reload logs the wrong message > > > Key: MTOMCAT-84 > URL: https://issues.apache.org/jira/browse/MTOMCAT-84 > Project: Apache Tomcat Maven Plugin > Issue Type: Bug >Affects Versions: 1.1 >Reporter: Michael Osipov >Assignee: Olivier Lamy (*$^¨%`£) >Priority: Minor > Fix For: 2.2 > > Attachments: ASF.LICENSE.NOT.GRANTED--MTOMCAT-84.patch, > MTOMCAT-84.patch > > > Instead of emitting "Reloading app", it emits "Redeploying app". I have > patched the issue. -- This message was sent by Atlassian JIRA (v6.1#6144) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Commented] (MTOMCAT-79) Running "package" before tomcat:deploy breaks build
[ https://issues.apache.org/jira/browse/MTOMCAT-79?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13814395#comment-13814395 ] Olivier Lamy (*$^¨%`£) commented on MTOMCAT-79: --- you should be able to use deploy-only for that? > Running "package" before tomcat:deploy breaks build > --- > > Key: MTOMCAT-79 > URL: https://issues.apache.org/jira/browse/MTOMCAT-79 > Project: Apache Tomcat Maven Plugin > Issue Type: Bug >Affects Versions: 1.1 > Environment: Maven 2.2.11 >Reporter: Michael Osipov >Assignee: Olivier Lamy (*$^¨%`£) >Priority: Blocker > Fix For: 1.1 > > > @execute="package" breaks multi-module builds with overlays. > I have this situation: > {noformat} > parent > |-war1 > |-war2 (overlayed with war1) > {noformat} > To have war2 overlayed with war1 from reactor, I have to build from parent. > I.e., to deploy a correctly overlayed war2, I have to have to go from parent. > Otherwise overlay happens from local repo which is incorrect. So, because > tomcat-maven-p invokes "package" at war2 and only at war2, the overlay war1 > is taken from local repo. The overlayed WAR is incorrect. I explicitly have > to call "package" from parent. > I have logs available which prove the issue but cannot make them public. I > can send them privately. > All this means, that the automatic execution of package needs to be removed. > If there is no warFile to deploy, exit with build failure and tell that > package has to run first. > Remove this line: > http://mojo.codehaus.org/tomcat-maven-plugin/xref/org/codehaus/mojo/tomcat/DeployMojo.html#26 -- This message was sent by Atlassian JIRA (v6.1#6144) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[Bug 49134] Server.stop() doesn't unregister all MBeans
https://issues.apache.org/bugzilla/show_bug.cgi?id=49134 Mark Thomas changed: What|Removed |Added Status|NEEDINFO|RESOLVED Resolution|--- |FIXED --- Comment #7 from Mark Thomas --- A month has gone by with no further information provided. The issue I could repeat has been fixed in trunk and 7.0.x so I am resolving this as fixed. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: svn commit: r1539180 - in /tomcat/trunk: java/org/apache/catalina/loader/WebappClassLoader.java test/org/apache/catalina/loader/TestWebappClassLoaderWeaving.java
2013/11/6 : > Author: markt > Date: Tue Nov 5 23:06:33 2013 > New Revision: 1539180 > > URL: http://svn.apache.org/r1539180 > Log: > Review of r1539036 by Nick Williams. > > copyWithoutTransformers(), as defined in the interface > InstrumentableClassLoader, returns a ClassLoader. The start() method is not > defined in ClassLoader, it is specific to WebappClassLoader. Furthermore, > code calling copyWithoutTransformers() won't have access to WebappClassLoader > to call start() reflectively if a SecurityManager is enabled. > > So, the copyWithoutTransformers() method needs to call start() before it > returns the copied class loader. Otherwise, it will be useless to JPA > providers and the like. > > Modified: > tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java > > tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderWeaving.java > > Modified: tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java > URL: > http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java?rev=1539180&r1=1539179&r2=1539180&view=diff > == > --- tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java > (original) > +++ tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java Tue > Nov 5 23:06:33 2013 > @@ -700,6 +700,12 @@ public class WebappClassLoader extends U > result.permissionList.addAll(this.permissionList); > result.loaderPC.putAll(this.loaderPC); > > +try { > +result.start(); > +} catch (LifecycleException e) { > +throw new IllegalStateException(e); > +} There is "result.started = this.started;" assignment a few lines above. Shouldn't the above call be wrapped into if(!started){ ... } ? LifecycleBase.start() logs an INFO message if start() is called repeatedly. WebappClassLoader implements start() by itself and does some work without checking for the "started" flag. There might be observable consequences of that. > return result; > } > >(...) > Best regards, Konstantin Kolinko - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Commented] (MTOMCAT-92) Bind tomcat to a self-chosen network interface
[ https://issues.apache.org/jira/browse/MTOMCAT-92?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13814469#comment-13814469 ] Hudson commented on MTOMCAT-92: --- SUCCESS: Integrated in TomcatMavenPlugin-mvn3.x #267 (See [https://builds.apache.org/job/TomcatMavenPlugin-mvn3.x/267/]) [MTOMCAT-92] setup for https and ajp connectors too (olamy: http://svn.apache.org/viewvc/?view=rev&rev=1539186) * /tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractRunMojo.java * /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractRunMojo.java > Bind tomcat to a self-chosen network interface > -- > > Key: MTOMCAT-92 > URL: https://issues.apache.org/jira/browse/MTOMCAT-92 > Project: Apache Tomcat Maven Plugin > Issue Type: Bug >Affects Versions: 1.1 >Reporter: Björn Michael >Assignee: Olivier Lamy (*$^¨%`£) > Fix For: 2.2 > > > Tomcat is bound to 0.0.0.0 (all interfaces) by default. I feel the need to > change this binding to e.g. localhost (127.0.0.1) or another interface by > adding a 127.0.0.1 to plugin configuration in pom.xml. This is > often necessary for security or firewall reasons during the development of > web applications. > Thanks in advance. -- This message was sent by Atlassian JIRA (v6.1#6144) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot failure in ASF Buildbot on tomcat-7-trunk
The Buildbot has detected a new failure on builder tomcat-7-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-7-trunk/builds/1534 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1539177 Blamelist: markt BUILD FAILED: failed compile_1 sincerely, -The Buildbot
[jira] [Commented] (MTOMCAT-84) tomcat:reload logs the wrong message
[ https://issues.apache.org/jira/browse/MTOMCAT-84?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13814470#comment-13814470 ] Hudson commented on MTOMCAT-84: --- SUCCESS: Integrated in TomcatMavenPlugin-mvn3.x #267 (See [https://builds.apache.org/job/TomcatMavenPlugin-mvn3.x/267/]) [MTOMCAT-84] tomcat:reload logs the wrong message Submitted by Michael Osipov. (olamy: http://svn.apache.org/viewvc/?view=rev&rev=1539191) * /tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/ReloadMojo.java > tomcat:reload logs the wrong message > > > Key: MTOMCAT-84 > URL: https://issues.apache.org/jira/browse/MTOMCAT-84 > Project: Apache Tomcat Maven Plugin > Issue Type: Bug >Affects Versions: 1.1 >Reporter: Michael Osipov >Assignee: Olivier Lamy (*$^¨%`£) >Priority: Minor > Fix For: 2.2 > > Attachments: ASF.LICENSE.NOT.GRANTED--MTOMCAT-84.patch, > MTOMCAT-84.patch > > > Instead of emitting "Reloading app", it emits "Redeploying app". I have > patched the issue. -- This message was sent by Atlassian JIRA (v6.1#6144) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1539209 - /tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7Runner.java
Author: olamy Date: Wed Nov 6 01:31:25 2013 New Revision: 1539209 URL: http://svn.apache.org/r1539209 Log: [MTOMCAT-211] The .war file is not extracted from executable war Modified: tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7Runner.java Modified: tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7Runner.java URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7Runner.java?rev=1539209&r1=1539208&r2=1539209&view=diff == --- tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7Runner.java (original) +++ tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7Runner.java Wed Nov 6 01:31:25 2013 @@ -560,28 +560,35 @@ public class Tomcat7Runner InputStream inputStream = null; try { +File expandFile = null; inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream( entry.getValue() ); if ( !useServerXml() ) { if ( entry.getKey().equals( "/" ) ) { -File expandFile = new File( extractDirectory, "webapps/ROOT.war" ); -debugMessage( "expand to file:" + expandFile.getPath() ); -expand( inputStream, expandFile ); +expandFile = new File( extractDirectory, "webapps/ROOT.war" ); } else { -File expandFile = new File( extractDirectory, "webapps/" + entry.getValue() ); -debugMessage( "expand to file:" + expandFile.getPath() ); -expand( inputStream, expandFile ); +expandFile = new File( extractDirectory, "webapps/" + entry.getValue() ); } } else { -File expandFile = new File( extractDirectory, "webapps/" + entry.getValue() ); -debugMessage( "expand to file:" + expandFile.getPath() ); -expand( inputStream, new File( extractDirectory, "webapps/" + entry.getValue() ) ); +expandFile = new File( extractDirectory, "webapps/" + entry.getValue() ); } + +debugMessage( "expand to file:" + expandFile.getPath() ); + +// MTOMCAT-211 ensure parent directories created + +if ( !expandFile.getParentFile().mkdirs() ) +{ +throw new Exception( "FATAL: impossible to create directories:" + expandFile.getParentFile() ); +} + +expand( inputStream, expandFile ); + } finally { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Closed] (MTOMCAT-211) The .war file is not extracted from executable war
[ https://issues.apache.org/jira/browse/MTOMCAT-211?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Olivier Lamy (*$^¨%`£) closed MTOMCAT-211. -- Resolution: Fixed > The .war file is not extracted from executable war > -- > > Key: MTOMCAT-211 > URL: https://issues.apache.org/jira/browse/MTOMCAT-211 > Project: Apache Tomcat Maven Plugin > Issue Type: Bug > Components: tomcat7 >Affects Versions: 2.2 > Environment: Windows 7 64bit, Oracle JDK-1.7.0.11, Maven-2.2 >Reporter: Petr Novak >Assignee: Olivier Lamy (*$^¨%`£) > Fix For: 2.2 > > Attachments: maven-tomcat-test-0.0.1-SNAPSHOT-war-exec.jar, > maven-tomcat-test.zip > > > I create simple web-app project, build it by mvn clean package. > Than I try to execute the created JAR, but the following exception was thrown: > java -jar maven-tomcat-test-0.0.1-SNAPSHOT-war-exec.jar > Exception in thread "main" java.io.FileNotFoundException: > .extract\webapps\ctx\test.war (The system cannot find the path specified) > at java.io.FileOutputStream.open(Native Method) > at java.io.FileOutputStream.(FileOutputStream.java:212) > at java.io.FileOutputStream.(FileOutputStream.java:165) > at > org.apache.tomcat.maven.runner.Tomcat7Runner.expand(Tomcat7Runner.java:680) > at > org.apache.tomcat.maven.runner.Tomcat7Runner.extract(Tomcat7Runner.java:555) > at > org.apache.tomcat.maven.runner.Tomcat7Runner.run(Tomcat7Runner.java:200) > at > org.apache.tomcat.maven.runner.Tomcat7RunnerCli.main(Tomcat7RunnerCli.java:204) > When I look at ".extract\webapps\ctx\" , the folder is empty. -- This message was sent by Atlassian JIRA (v6.1#6144) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Closed] (MTOMCAT-233) 404 links at http://tomcat.apache.org/maven-plugin-2.0/modules.html
[ https://issues.apache.org/jira/browse/MTOMCAT-233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Olivier Lamy (*$^¨%`£) closed MTOMCAT-233. -- Resolution: Fixed fixed using last maven site plugin. So will be available with 2.2 version. > 404 links at http://tomcat.apache.org/maven-plugin-2.0/modules.html > --- > > Key: MTOMCAT-233 > URL: https://issues.apache.org/jira/browse/MTOMCAT-233 > Project: Apache Tomcat Maven Plugin > Issue Type: Bug > Components: tomcat7 >Reporter: Pavel Tarouts >Assignee: Olivier Lamy (*$^¨%`£) > Labels: documentation, maven > Fix For: 2.2 > > > All links at http://tomcat.apache.org/maven-plugin-2.0/modules.html that > should lead to modules' pages don't work > e.g. http://tomcat.apache.org/tomcat7-maven-plugin/index.html shows 404, > while > http://tomcat.apache.org/maven-plugin-2.0/tomcat7-maven-plugin/plugin-info.html > from by browser's bookmarks works -- This message was sent by Atlassian JIRA (v6.1#6144) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
buildbot failure in ASF Buildbot on tomcat-trunk
The Buildbot has detected a new failure on builder tomcat-trunk while building ASF Buildbot. Full details are available at: http://ci.apache.org/builders/tomcat-trunk/builds/5179 Buildbot URL: http://ci.apache.org/ Buildslave for this Build: bb-vm_ubuntu Build Reason: scheduler Build Source Stamp: [branch tomcat/trunk] 1539180 Blamelist: markt BUILD FAILED: failed compile_1 sincerely, -The Buildbot
svn commit: r1539210 [11/12] - in /tomcat/site/trunk/docs/maven-plugin-trunk: ./ apidocs/org/apache/tomcat/maven/plugin/tomcat7/run/ common-tomcat-maven-plugin/ common-tomcat-maven-plugin/xref/org/apa
Modified: tomcat/site/trunk/docs/maven-plugin-trunk/tomcat7-war-runner/checkstyle.html URL: http://svn.apache.org/viewvc/tomcat/site/trunk/docs/maven-plugin-trunk/tomcat7-war-runner/checkstyle.html?rev=1539210&r1=1539209&r2=1539210&view=diff == --- tomcat/site/trunk/docs/maven-plugin-trunk/tomcat7-war-runner/checkstyle.html (original) +++ tomcat/site/trunk/docs/maven-plugin-trunk/tomcat7-war-runner/checkstyle.html Wed Nov 6 01:39:41 2013 @@ -7,7 +7,7 @@ - + Apache Tomcat Maven Plugin :: Tomcat 7.x War Runner - Checkstyle Results @@ -156,7 +156,7 @@ - | Last Published: 03 November 2013 + | Last Published: 05 November 2013 Version: 2.2-SNAPSHOT @@ -689,43 +689,43 @@ Line is longer than 120 characters. -654 +661 '2048' is a magic number. -702 +709 Missing a Javadoc comment. -729 +736 Missing a Javadoc comment. -735 +742 Missing a Javadoc comment. -744 +751 'loggerName' hides a field. -749 +756 Redundant throws: 'SecurityException' is unchecked exception. -750 +757 Redundant throws: 'IllegalArgumentException' is unchecked exception. -750 +757 Redundant throws: 'FileNotFoundException' is subclass of 'IOException'. -783 +790 Redundant throws: 'FileNotFoundException' is subclass of 'IOException'. -804 +811 org/apache/tomcat/maven/runner/Tomcat7RunnerCli.java Modified: tomcat/site/trunk/docs/maven-plugin-trunk/tomcat7-war-runner/cpd.html URL: http://svn.apache.org/viewvc/tomcat/site/trunk/docs/maven-plugin-trunk/tomcat7-war-runner/cpd.html?rev=1539210&r1=1539209&r2=1539210&view=diff == --- tomcat/site/trunk/docs/maven-plugin-trunk/tomcat7-war-runner/cpd.html (original) +++ tomcat/site/trunk/docs/maven-plugin-trunk/tomcat7-war-runner/cpd.html Wed Nov 6 01:39:41 2013 @@ -7,7 +7,7 @@ - + Apache Tomcat Maven Plugin :: Tomcat 7.x War Runner - CPD Results @@ -156,7 +156,7 @@ - | Last Published: 03 November 2013 + | Last Published: 05 November 2013 Version: 2.2-SNAPSHOT Modified: tomcat/site/trunk/docs/maven-plugin-trunk/tomcat7-war-runner/dependencies.html URL: http://svn.apache.org/viewvc/tomcat/site/trunk/docs/maven-plugin-trunk/tomcat7-war-runner/dependencies.html?rev=1539210&r1=1539209&r2=1539210&view=diff == --- tomcat/site/trunk/docs/maven-plugin-trunk/tomcat7-war-runner/dependencies.html (original) +++ tomcat/site/trunk/docs/maven-plugin-trunk/tomcat7-war-runner/dependencies.html Wed Nov 6 01:39:41 2013 @@ -7,7 +7,7 @@ - + Apache Tomcat Maven Plugin :: Tomcat 7.x War Runner - Project Dependencies @@ -156,7 +156,7 @@ - | Last Published: 03 November 2013 + | Last Published: 05 November 2013 Version: 2.2-SNAPSHOT Modified: tomcat/site/trunk/docs/maven-plugin-trunk/tomcat7-war-runner/dependency-convergence.html URL: http://svn.apache.org/viewvc/tomcat/site/trunk/docs/maven-plugin-trunk/tomcat7-war-runner/dependency-convergence.html?rev=1539210&r1=1539209&r2=1539210&view=diff == --- tomcat/site/trunk/docs/maven-plugin-trunk/tomcat7-war-runner/dependency-convergence.html (original) +++ tomcat/site/trunk/docs/maven-plugin-trunk/tomcat7-war-runner/dependency-convergence.html Wed Nov 6 01:39:41 2013 @@ -7,7 +7,7 @@ - + Apache Tomcat Maven Plugin :: Tomcat 7.x War Runner - Reactor Dependency Convergence @@ -156,7 +156,7 @@ - | Last Published: 03 November 2013 + | Last Published: 05 November 2013 Version: 2.2-SNAPSHOT Modified: tomcat/site/trunk/docs/maven-plugin-trunk/tomcat7-war-runner/dependency-info.html URL: http://svn.apache.org/viewvc/tomcat/site/trunk/docs/maven-plugin-trunk/tomcat7-war-runner/dependency-info.html?rev=1539210&r1=1539209&r2=1539210&view=diff == --- tomcat/site/trunk/docs/maven-plugin-trunk/tomcat7-war-runner/dependency-info.html (original) +++ tomcat/site/trunk/docs/maven-plugin-trunk/tomcat7-war-runner/dependency-info.html Wed Nov 6 01:39:41 2013 @@ -7,7 +7,7 @@ - + Apache Tomcat Maven Plugin :: Tomcat 7.x War Runner - Dep
svn commit: r1539210 [1/12] - in /tomcat/site/trunk/docs/maven-plugin-trunk: ./ apidocs/org/apache/tomcat/maven/plugin/tomcat7/run/ common-tomcat-maven-plugin/ common-tomcat-maven-plugin/xref/org/apac
Author: olamy Date: Wed Nov 6 01:39:41 2013 New Revision: 1539210 URL: http://svn.apache.org/r1539210 Log: Apache Tomcat Maven Plugin site documentation for 2.2-SNAPSHOT Modified: tomcat/site/trunk/docs/maven-plugin-trunk/apidocs/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.html tomcat/site/trunk/docs/maven-plugin-trunk/archetype.html tomcat/site/trunk/docs/maven-plugin-trunk/checkstyle-aggregate.html tomcat/site/trunk/docs/maven-plugin-trunk/checkstyle.rss tomcat/site/trunk/docs/maven-plugin-trunk/common-tomcat-maven-plugin/checkstyle.html tomcat/site/trunk/docs/maven-plugin-trunk/common-tomcat-maven-plugin/checkstyle.rss tomcat/site/trunk/docs/maven-plugin-trunk/common-tomcat-maven-plugin/cpd.html tomcat/site/trunk/docs/maven-plugin-trunk/common-tomcat-maven-plugin/dependencies.html tomcat/site/trunk/docs/maven-plugin-trunk/common-tomcat-maven-plugin/dependency-convergence.html tomcat/site/trunk/docs/maven-plugin-trunk/common-tomcat-maven-plugin/dependency-info.html tomcat/site/trunk/docs/maven-plugin-trunk/common-tomcat-maven-plugin/dependency-management.html tomcat/site/trunk/docs/maven-plugin-trunk/common-tomcat-maven-plugin/distribution-management.html tomcat/site/trunk/docs/maven-plugin-trunk/common-tomcat-maven-plugin/index.html tomcat/site/trunk/docs/maven-plugin-trunk/common-tomcat-maven-plugin/integration.html tomcat/site/trunk/docs/maven-plugin-trunk/common-tomcat-maven-plugin/issue-tracking.html tomcat/site/trunk/docs/maven-plugin-trunk/common-tomcat-maven-plugin/license.html tomcat/site/trunk/docs/maven-plugin-trunk/common-tomcat-maven-plugin/mail-lists.html tomcat/site/trunk/docs/maven-plugin-trunk/common-tomcat-maven-plugin/plugin-management.html tomcat/site/trunk/docs/maven-plugin-trunk/common-tomcat-maven-plugin/plugins.html tomcat/site/trunk/docs/maven-plugin-trunk/common-tomcat-maven-plugin/pmd.html tomcat/site/trunk/docs/maven-plugin-trunk/common-tomcat-maven-plugin/pmd.xml tomcat/site/trunk/docs/maven-plugin-trunk/common-tomcat-maven-plugin/project-info.html tomcat/site/trunk/docs/maven-plugin-trunk/common-tomcat-maven-plugin/project-reports.html tomcat/site/trunk/docs/maven-plugin-trunk/common-tomcat-maven-plugin/project-summary.html tomcat/site/trunk/docs/maven-plugin-trunk/common-tomcat-maven-plugin/sonar.html tomcat/site/trunk/docs/maven-plugin-trunk/common-tomcat-maven-plugin/source-repository.html tomcat/site/trunk/docs/maven-plugin-trunk/common-tomcat-maven-plugin/team-list.html tomcat/site/trunk/docs/maven-plugin-trunk/common-tomcat-maven-plugin/xref/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.html tomcat/site/trunk/docs/maven-plugin-trunk/container-goals.html tomcat/site/trunk/docs/maven-plugin-trunk/context-goals.html tomcat/site/trunk/docs/maven-plugin-trunk/dependencies.html tomcat/site/trunk/docs/maven-plugin-trunk/dependency-convergence.html tomcat/site/trunk/docs/maven-plugin-trunk/dependency-info.html tomcat/site/trunk/docs/maven-plugin-trunk/dependency-management.html tomcat/site/trunk/docs/maven-plugin-trunk/distribution-management.html tomcat/site/trunk/docs/maven-plugin-trunk/executable-war-jar.html tomcat/site/trunk/docs/maven-plugin-trunk/how-to-contribute.html tomcat/site/trunk/docs/maven-plugin-trunk/index.html tomcat/site/trunk/docs/maven-plugin-trunk/integration.html tomcat/site/trunk/docs/maven-plugin-trunk/issue-tracking.html tomcat/site/trunk/docs/maven-plugin-trunk/jira-report.html tomcat/site/trunk/docs/maven-plugin-trunk/license.html tomcat/site/trunk/docs/maven-plugin-trunk/mail-lists.html tomcat/site/trunk/docs/maven-plugin-trunk/modules.html tomcat/site/trunk/docs/maven-plugin-trunk/plugin-management.html tomcat/site/trunk/docs/maven-plugin-trunk/plugins.html tomcat/site/trunk/docs/maven-plugin-trunk/project-info.html tomcat/site/trunk/docs/maven-plugin-trunk/project-reports.html tomcat/site/trunk/docs/maven-plugin-trunk/project-summary.html tomcat/site/trunk/docs/maven-plugin-trunk/run-mojo-features.html tomcat/site/trunk/docs/maven-plugin-trunk/snapshot-test.html tomcat/site/trunk/docs/maven-plugin-trunk/sonar.html tomcat/site/trunk/docs/maven-plugin-trunk/source-repository.html tomcat/site/trunk/docs/maven-plugin-trunk/team-list.html tomcat/site/trunk/docs/maven-plugin-trunk/tomcat-maven-archetype/cpd.html tomcat/site/trunk/docs/maven-plugin-trunk/tomcat-maven-archetype/dependencies.html tomcat/site/trunk/docs/maven-plugin-trunk/tomcat-maven-archetype/dependency-convergence.html tomcat/site/trunk/docs/maven-plugin-trunk/tomcat-maven-archetype/dependency-info.html tomcat/site/trunk/docs/maven-plugin-trunk/tomcat-maven-archetype/dependency-management.html tomcat/site/trunk/docs/maven-plugin-trunk/tomcat-maven-archetype/distribution-manage
svn commit: r1539210 [6/12] - in /tomcat/site/trunk/docs/maven-plugin-trunk: ./ apidocs/org/apache/tomcat/maven/plugin/tomcat7/run/ common-tomcat-maven-plugin/ common-tomcat-maven-plugin/xref/org/apac
Modified: tomcat/site/trunk/docs/maven-plugin-trunk/tomcat6-maven-plugin/run-war-only-mojo.html URL: http://svn.apache.org/viewvc/tomcat/site/trunk/docs/maven-plugin-trunk/tomcat6-maven-plugin/run-war-only-mojo.html?rev=1539210&r1=1539209&r2=1539210&view=diff == --- tomcat/site/trunk/docs/maven-plugin-trunk/tomcat6-maven-plugin/run-war-only-mojo.html (original) +++ tomcat/site/trunk/docs/maven-plugin-trunk/tomcat6-maven-plugin/run-war-only-mojo.html Wed Nov 6 01:39:41 2013 @@ -7,7 +7,7 @@ - + Apache Tomcat Maven Plugin :: Tomcat 6.x - tomcat6:run-war-only @@ -213,7 +213,7 @@ - | Last Published: 03 November 2013 + | Last Published: 05 November 2013 Version: 2.2-SNAPSHOT @@ -342,6 +342,17 @@ in the Tomcat conf Directory.De +address + +String + +2.2 + +this IP address will be used on all ports.User property is: maven.tomcat.address. + + + + ajpPort int @@ -353,7 +364,7 @@ means won't be started. The ajp connecto value > 0.Default value is: 0.User property is: maven.tomcat.ajp.port. - + ajpProtocol @@ -366,7 +377,7 @@ NOTE The ajp connector will be started o > 0.Default value is: ajp.User property is: maven.tomcat.ajp.protocol. - + aliases @@ -378,7 +389,7 @@ NOTE The ajp connector will be started o Name aliases - + backgroundProcessorDelay @@ -390,7 +401,7 @@ Name aliases change invocationDefault value is: -1.User property is: maven.tomcat.backgroundProcessorDelay. - + classLoaderClass @@ -401,7 +412,7 @@ change invocationDefault value Class loader class to set. - + configurationDir @@ -412,7 +423,7 @@ change invocationDefault value The directory to create the Tomcat server configuration under.Default value is: ${project.build.directory}/tomcat. - + contextFile @@ -423,7 +434,7 @@ change invocationDefault value The path of the Tomcat context XML file.Default value is: ${project.build.directory}/${project.build.finalName}/META-INF/context.xml. - + contextReloadable @@ -436,7 +447,7 @@ reloadable = "true". The other add attribute reloadable = "true" in your context file.Default value is: false.User property is: maven.tomcat.contextReloadable. - + fork @@ -448,7 +459,7 @@ add attribute reloadable = "true&qu invoking the run goal.Default value is: false.User property is: maven.tomcat.fork. - + hostName @@ -459,7 +470,7 @@ invoking the run goal.Default v configure host nameDefault value is: localhost.User property is: maven.tomcat.hostName. - + httpsPort @@ -472,7 +483,7 @@ means won't be started. The https connec for value > 0.Default value is: 0.User property is: maven.tomcat.httpsPort. - + ignorePackaging @@ -483,7 +494,7 @@ for value > 0.Default value If set to true ignore if packaging of project is not 'war'.Default value is: false.User property is: tomcat.ignorePackaging. - + keystoreFile @@ -495,7 +506,7 @@ for value > 0.Default value enabled) - + keystorePass @@ -507,7 +518,7 @@ enabled) enabled) - + keystoreType @@ -519,7 +530,7 @@ enabled) certificate. If not specified, the default value is "JKS".Default value is: JKS. - + managerWarPath @@ -530,7 +541,7 @@ certificate. If not specified, the defau to install a manager in your embeded tomcat - + port @@ -541,7 +552,7 @@ certificate. If not specified, the defau The port to run the Tomcat server on.Default value is: 8080.User property is: maven.tomcat.port. - + protocol @@ -554,7 +565,7 @@ See possible values + serverXml @@ -566,7 +577,7 @@ Connector protocol attribute.User property is: maven.tomcat.serverXml. - + skip @@ -577,7 +588,7 @@ this file your webapp paths.Skip executionDefault value is: false.User property is: maven.tomcat.skip. - + staticContextDocba
svn commit: r1539210 [12/12] - in /tomcat/site/trunk/docs/maven-plugin-trunk: ./ apidocs/org/apache/tomcat/maven/plugin/tomcat7/run/ common-tomcat-maven-plugin/ common-tomcat-maven-plugin/xref/org/apa
Modified: tomcat/site/trunk/docs/maven-plugin-trunk/tomcat7-war-runner/xref/org/apache/tomcat/maven/runner/Tomcat7Runner.html URL: http://svn.apache.org/viewvc/tomcat/site/trunk/docs/maven-plugin-trunk/tomcat7-war-runner/xref/org/apache/tomcat/maven/runner/Tomcat7Runner.html?rev=1539210&r1=1539209&r2=1539210&view=diff == --- tomcat/site/trunk/docs/maven-plugin-trunk/tomcat7-war-runner/xref/org/apache/tomcat/maven/runner/Tomcat7Runner.html (original) +++ tomcat/site/trunk/docs/maven-plugin-trunk/tomcat7-war-runner/xref/org/apache/tomcat/maven/runner/Tomcat7Runner.html Wed Nov 6 01:39:41 2013 @@ -570,260 +570,267 @@ 560 InputStream inputStream = null; 561 try 562 { -563 inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream( entry.getValue() ); -564 if ( !useServerXml() ) -565 { -566 if ( entry.getKey().equals( "/" ) ) -567 { -568 File expandFile = new File( extractDirectory, "webapps/ROOT.war" ); -569 debugMessage( "expand to file:" + expandFile.getPath() ); -570 expand( inputStream, expandFile ); -571 } -572 else -573 { -574 File expandFile = new File( extractDirectory, "webapps/" + entry.getValue() ); -575 debugMessage( "expand to file:" + expandFile.getPath() ); -576 expand( inputStream, expandFile ); -577 } -578 } -579 else -580 { -581 File expandFile = new File( extractDirectory, "webapps/" + entry.getValue() ); -582 debugMessage( "expand to file:" + expandFile.getPath() ); -583 expand( inputStream, new File( extractDirectory, "webapps/" + entry.getValue() ) ); -584 } -585 } -586 finally -587 { -588 if ( inputStream != null ) -589 { -590 inputStream.close(); -591 } +563 File expandFile = null; +564 inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream( entry.getValue() ); +565 if ( !useServerXml() ) +566 { +567 if ( entry.getKey().equals( "/" ) ) +568 { +569 expandFile = new File( extractDirectory, "webapps/ROOT.war" ); +570 } +571 else +572 { +573 expandFile = new File( extractDirectory, "webapps/" + entry.getValue() ); +574 } +575 } +576 else +577 { +578 expandFile = new File( extractDirectory, "webapps/" + entry.getValue() ); +579 } +580 +581 debugMessage( "expand to file:" + expandFile.getPath() ); +582 +583 // MTOMCAT-211 ensure parent directories created +584 +585 if ( !expandFile.getParentFile().mkdirs() ) +586 { +587 throw new Exception( "FATAL: impossible to create directories:" + expandFile.getParentFile() ); +588 } +589 +590 expand( inputStream, expandFile ); +591 592 } -593 } -594 -595 //Copy code source to webapps folder -596 if ( codeSourceWar != null ) -597 { -598 FileInputStream inputStream = null; -599 try -600 { -601 File expandFile = new File( extractDirectory, "webapps/" + codeSourceContextPath + ".war" ); -602 inputStream = new FileInputStream( codeSourceWar ); -603 debugMessage( "move code source to file:" + expandFile.getPath() ); -604 expand( inputStream, expandFile ); -605 } -606 finally +593 finally +594 { +595 if ( inputStream != null ) +596 { +597 inputStream.close(); +598 } +599 } +600 } +601 +602 //Copy code source to webapps folder +603 if ( codeSourceWar != null ) +604 { +605 FileInputStream inputStream = null; +606 try 607 { -608 if ( inputStream != null ) -609 { -610 inputStream.close(); -611 } +608 File expandFile = new File( extractDirectory, "webapps/" + codeSourceContextPath + ".war" ); +609 inputStream = new FileInputStream( codeSourc
[jira] [Closed] (MTOMCAT-161) Executable WAR: extraDependencies (JARs) should not be extracted but used directly
[ https://issues.apache.org/jira/browse/MTOMCAT-161?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Olivier Lamy (*$^¨%`£) closed MTOMCAT-161. -- Resolution: Fixed added an excludes field as it you can add some file patterns to exclude. > Executable WAR: extraDependencies (JARs) should not be extracted but used > directly > -- > > Key: MTOMCAT-161 > URL: https://issues.apache.org/jira/browse/MTOMCAT-161 > Project: Apache Tomcat Maven Plugin > Issue Type: Improvement > Components: tomcat6, tomcat7 >Affects Versions: 2.0-beta-1 > Environment: tomcat7, windows, maven3 >Reporter: Manuel Hartl >Assignee: Olivier Lamy (*$^¨%`£) > Fix For: 2.2 > > > When i create exec-war to create a a self-executable webapp, dependencies (at > least extraDependencies) war extracted and added directly to the resulting > JAR. > the resulting jar contains a META-INF with lots of duplicate MANIFEST files, > etc. > this at least breaks signed JARs (e.g. JCE providers) -- This message was sent by Atlassian JIRA (v6.1#6144) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1539219 - /tomcat/maven-plugin/trunk/pom.xml
Author: olamy Date: Wed Nov 6 02:54:45 2013 New Revision: 1539219 URL: http://svn.apache.org/r1539219 Log: plexus utils 3.0.15 Modified: tomcat/maven-plugin/trunk/pom.xml Modified: tomcat/maven-plugin/trunk/pom.xml URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/pom.xml?rev=1539219&r1=1539218&r2=1539219&view=diff == --- tomcat/maven-plugin/trunk/pom.xml (original) +++ tomcat/maven-plugin/trunk/pom.xml Wed Nov 6 02:54:45 2013 @@ -543,7 +543,7 @@ org.codehaus.plexus plexus-utils -3.0.8 +3.0.15 org.apache.maven.shared - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1539220 - in /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run: AbstractExecWarMojo.java AbstractStandaloneWarMojo.java
Author: olamy Date: Wed Nov 6 02:55:08 2013 New Revision: 1539220 URL: http://svn.apache.org/r1539220 Log: [MTOMCAT-161] add a filter to exclude some files from jars when building self executable war/jar Modified: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractStandaloneWarMojo.java Modified: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java?rev=1539220&r1=1539219&r2=1539220&view=diff == --- tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java (original) +++ tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java Wed Nov 6 02:55:08 2013 @@ -44,6 +44,7 @@ import org.apache.tomcat.maven.runner.To import org.codehaus.plexus.archiver.jar.Manifest; import org.codehaus.plexus.archiver.jar.ManifestException; import org.codehaus.plexus.util.DirectoryScanner; +import org.codehaus.plexus.util.SelectorUtils; import java.io.File; import java.io.FileInputStream; @@ -69,38 +70,38 @@ public abstract class AbstractExecWarMoj extends AbstractTomcat7Mojo { -@Parameter(defaultValue = "${project.artifact}", required = true, readonly = true) +@Parameter( defaultValue = "${project.artifact}", required = true, readonly = true ) protected Artifact projectArtifact; /** * The maven project. */ -@Parameter(defaultValue = "${project}", required = true, readonly = true) +@Parameter( defaultValue = "${project}", required = true, readonly = true ) protected MavenProject project; -@Parameter(defaultValue = "${plugin.artifacts}", required = true) +@Parameter( defaultValue = "${plugin.artifacts}", required = true ) protected List pluginArtifacts; -@Parameter(defaultValue = "${project.build.directory}") +@Parameter( defaultValue = "${project.build.directory}" ) protected File buildDirectory; /** * Path under {@link #buildDirectory} where this mojo may do temporary work. */ -@Parameter(defaultValue = "${project.build.directory}/tomcat7-maven-plugin-exec") +@Parameter( defaultValue = "${project.build.directory}/tomcat7-maven-plugin-exec" ) private File pluginWorkDirectory; -@Parameter(property = "maven.tomcat.exec.war.tomcatConf", defaultValue = "src/main/tomcatconf") +@Parameter( property = "maven.tomcat.exec.war.tomcatConf", defaultValue = "src/main/tomcatconf" ) protected File tomcatConfigurationFilesDirectory; -@Parameter(defaultValue = "src/main/tomcatconf/server.xml", property = "maven.tomcat.exec.war.serverXml") +@Parameter( defaultValue = "src/main/tomcatconf/server.xml", property = "maven.tomcat.exec.war.serverXml" ) protected File serverXml; /** * Name of the generated exec JAR. */ -@Parameter(property = "tomcat.jar.finalName", - defaultValue = "${project.artifactId}-${project.version}-war-exec.jar", required = true) +@Parameter( property = "tomcat.jar.finalName", +defaultValue = "${project.artifactId}-${project.version}-war-exec.jar", required = true ) protected String finalName; /** @@ -108,14 +109,14 @@ public abstract class AbstractExecWarMoj * * @since 2.2 */ -@Parameter(property = "maven.tomcat.skip", defaultValue = "false") +@Parameter( property = "maven.tomcat.skip", defaultValue = "false" ) private boolean skip; /** * The webapp context path to use for the web application being run. * The name to store webapp in exec jar. Do not use / */ -@Parameter(property = "maven.tomcat.path", defaultValue = "${project.artifactId}", required = true) +@Parameter( property = "maven.tomcat.path", defaultValue = "${project.artifactId}", required = true ) protected String path; @Parameter @@ -133,13 +134,13 @@ public abstract class AbstractExecWarMoj /** * Location of the local repository. */ -@Parameter(defaultValue = "${localRepository}", required = true, readonly = true) +@Parameter( defaultValue = "${localRepository}", required = true, readonly = true ) protected ArtifactRepository local; /** * List of Remote Repositories used by the resolver */ -@Parameter(defaultValue = "${project.remoteArtifactRepositories}", required = true, readonly = true) +@Parameter( defaultValue = "${project.remoteArtifactReposit
svn commit: r1539222 - in /tomcat/maven-plugin/trunk: tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/ tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/
Author: olamy Date: Wed Nov 6 02:56:29 2013 New Revision: 1539222 URL: http://svn.apache.org/r1539222 Log: cleanup unused dependencies Modified: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractStandaloneWarMojo.java tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7Runner.java Modified: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java?rev=1539222&r1=1539221&r2=1539222&view=diff == --- tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java (original) +++ tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java Wed Nov 6 02:56:29 2013 @@ -48,10 +48,8 @@ import org.codehaus.plexus.util.Selector import java.io.File; import java.io.FileInputStream; -import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; -import java.io.InputStream; import java.io.OutputStream; import java.io.PrintWriter; import java.util.ArrayList; Modified: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractStandaloneWarMojo.java URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractStandaloneWarMojo.java?rev=1539222&r1=1539221&r2=1539222&view=diff == --- tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractStandaloneWarMojo.java (original) +++ tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractStandaloneWarMojo.java Wed Nov 6 02:56:29 2013 @@ -18,14 +18,6 @@ package org.apache.tomcat.maven.plugin.t * under the License. */ -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.PrintWriter; -import java.util.Properties; -import java.util.jar.JarFile; - import org.apache.commons.compress.archivers.ArchiveException; import org.apache.commons.compress.archivers.ArchiveOutputStream; import org.apache.commons.compress.archivers.ArchiveStreamFactory; @@ -45,6 +37,14 @@ import org.codehaus.plexus.archiver.jar. import org.codehaus.plexus.archiver.jar.ManifestException; import org.codehaus.plexus.util.DirectoryScanner; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.Properties; +import java.util.jar.JarFile; + /** * Abstract Mojo for building deployable and executable war files * Modified: tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7Runner.java URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7Runner.java?rev=1539222&r1=1539221&r2=1539222&view=diff == --- tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7Runner.java (original) +++ tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7Runner.java Wed Nov 6 02:56:29 2013 @@ -29,7 +29,6 @@ import org.apache.catalina.valves.Access import org.apache.juli.ClassLoaderLogManager; import org.apache.tomcat.util.ExceptionUtils; import org.apache.tomcat.util.http.fileupload.FileUtils; -import org.apache.tomcat.util.http.fileupload.IOUtils; import java.io.BufferedOutputStream; import java.io.File; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Created] (MTOMCAT-247) refactor AbstractExecWarMojo and AbstractStandaloneWarMojo which contains duplicate code
Olivier Lamy (*$^¨%`£) created MTOMCAT-247: -- Summary: refactor AbstractExecWarMojo and AbstractStandaloneWarMojo which contains duplicate code Key: MTOMCAT-247 URL: https://issues.apache.org/jira/browse/MTOMCAT-247 Project: Apache Tomcat Maven Plugin Issue Type: Bug Reporter: Olivier Lamy (*$^¨%`£) Fix For: 3.0 -- This message was sent by Atlassian JIRA (v6.1#6144) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1539226 - /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java
Author: olamy Date: Wed Nov 6 03:21:36 2013 New Revision: 1539226 URL: http://svn.apache.org/r1539226 Log: [MTOMCAT-196] Add the possiblilty to search warRunDepencies and extraDependcies throug the dependencyManagement Modified: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java Modified: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java?rev=1539226&r1=1539225&r2=1539226&view=diff == --- tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java (original) +++ tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java Wed Nov 6 03:21:36 2013 @@ -389,11 +389,23 @@ public abstract class AbstractExecWarMoj { for ( Dependency dependency : extraDependencies ) { +String version = dependency.getVersion(); +if ( StringUtils.isEmpty( version ) ) +{ +version = findArtifactVersion( dependency ); +} + +if ( StringUtils.isEmpty( version ) ) +{ +throw new MojoExecutionException( +"Dependency '" + dependency.getGroupId() + "':'" + dependency.getArtifactId() ++ "' does not have version specified" ); +} + // String groupId, String artifactId, String version, String scope, String type Artifact artifact = -artifactFactory.createArtifact( dependency.getGroupId(), dependency.getArtifactId(), - dependency.getVersion(), dependency.getScope(), -dependency.getType() ); +artifactFactory.createArtifact( dependency.getGroupId(), dependency.getArtifactId(), version, +dependency.getScope(), dependency.getType() ); artifactResolver.resolve( artifact, this.remoteRepos, this.local ); JarFile jarFile = new JarFile( artifact.getFile() ); @@ -482,6 +494,35 @@ public abstract class AbstractExecWarMoj } } +protected String findArtifactVersion( Dependency dependency ) +{ +// search in project.dependencies +for ( Dependency projectDependency : (List) this.project.getDependencies() ) +{ +if ( sameDependencyWithoutVersion( dependency, projectDependency ) ) +{ +return projectDependency.getVersion(); +} +} + +// search in project.dependencies +for ( Dependency projectDependency : (List) this.project.getDependencyManagement().getDependencies() ) +{ +if ( sameDependencyWithoutVersion( dependency, projectDependency ) ) +{ +return projectDependency.getVersion(); +} +} + +return null; +} + +protected boolean sameDependencyWithoutVersion( Dependency that, Dependency dependency ) +{ +return StringUtils.equals( that.getGroupId(), dependency.getGroupId() ) && StringUtils.equals( +that.getArtifactId(), dependency.getArtifactId() ); +} + protected void copyDirectoryContentIntoArchive( File sourceFolder, String destinationPath, ArchiveOutputStream archiveOutputStream ) throws IOException - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1539227 - in /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run: AbstractExecWarMojo.java AbstractStandaloneWarMojo.java
Author: olamy Date: Wed Nov 6 03:22:00 2013 New Revision: 1539227 URL: http://svn.apache.org/r1539227 Log: [MTOMCAT-196] for warRunDependencies too Modified: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractStandaloneWarMojo.java Modified: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java?rev=1539227&r1=1539226&r2=1539227&view=diff == --- tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java (original) +++ tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java Wed Nov 6 03:22:00 2013 @@ -310,9 +310,21 @@ public abstract class AbstractExecWarMoj if ( warRunDependency.dependency != null ) { Dependency dependency = warRunDependency.dependency; +String version = dependency.getVersion(); +if ( StringUtils.isEmpty( version ) ) +{ +version = findArtifactVersion( dependency ); +} + +if ( StringUtils.isEmpty( version ) ) +{ +throw new MojoExecutionException( +"Dependency '" + dependency.getGroupId() + "':'" + dependency.getArtifactId() ++ "' does not have version specified" ); +} Artifact artifact = artifactFactory.createArtifactWithClassifier( dependency.getGroupId(), dependency.getArtifactId(), - dependency.getVersion(), + version, dependency.getType(), dependency.getClassifier() ); Modified: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractStandaloneWarMojo.java URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractStandaloneWarMojo.java?rev=1539227&r1=1539226&r2=1539227&view=diff == --- tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractStandaloneWarMojo.java (original) +++ tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractStandaloneWarMojo.java Wed Nov 6 03:22:00 2013 @@ -70,9 +70,10 @@ public abstract class AbstractStandalone /** * the type to use for the attached/generated artifact + * * @since 2.2 */ -@Parameter( property = "maven.tomcat.exec.war.attachArtifactType", defaultValue = "war", required = true ) +@Parameter(property = "maven.tomcat.exec.war.attachArtifactType", defaultValue = "war", required = true) protected String attachArtifactClassifierType; public void execute() @@ -190,11 +191,22 @@ public abstract class AbstractStandalone { for ( Dependency dependency : extraDependencies ) { +String version = dependency.getVersion(); +if ( StringUtils.isEmpty( version ) ) +{ +version = findArtifactVersion( dependency ); +} + +if ( StringUtils.isEmpty( version ) ) +{ +throw new MojoExecutionException( +"Dependency '" + dependency.getGroupId() + "':'" + dependency.getArtifactId() ++ "' does not have version specified" ); +} // String groupId, String artifactId, String version, String scope, String type Artifact artifact = -artifactFactory.createArtifact( dependency.getGroupId(), dependency.getArtifactId(), -
[jira] [Closed] (MTOMCAT-196) Add the possiblilty to search warRunDepencies and extraDependcies throug the dependencyManagement
[ https://issues.apache.org/jira/browse/MTOMCAT-196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Olivier Lamy (*$^¨%`£) closed MTOMCAT-196. -- Resolution: Fixed > Add the possiblilty to search warRunDepencies and extraDependcies throug the > dependencyManagement > - > > Key: MTOMCAT-196 > URL: https://issues.apache.org/jira/browse/MTOMCAT-196 > Project: Apache Tomcat Maven Plugin > Issue Type: Improvement > Components: tomcat7 >Affects Versions: 2.0 >Reporter: Guillaume Soing >Assignee: Olivier Lamy (*$^¨%`£) > Labels: features > Fix For: 2.2 > > > It wiil be nice to do not specify the version of the warRunDepency and > extraDependency, it will be easier to handle war version during the release > process. -- This message was sent by Atlassian JIRA (v6.1#6144) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Commented] (MTOMCAT-246) Allow for adding dirs/files to webapp classpath
[ https://issues.apache.org/jira/browse/MTOMCAT-246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13814572#comment-13814572 ] Olivier Lamy (*$^¨%`£) commented on MTOMCAT-246: I'm interested to have a project sample because that should work. Thanks! > Allow for adding dirs/files to webapp classpath > --- > > Key: MTOMCAT-246 > URL: https://issues.apache.org/jira/browse/MTOMCAT-246 > Project: Apache Tomcat Maven Plugin > Issue Type: Improvement > Components: tomcat7 >Reporter: Ondrej Burkert >Assignee: Olivier Lamy (*$^¨%`£) > > We have projects developed using Spring. Every project has a set of > configuration files (usually just logback configuration XML and a property > file). They are placed on the classpath and loaded from there by Spring app > context. > I don't see any way to put these on the classpath with current (we try 2.1 at > the moment) version of the plugin. Adding it using the > additionalClasspathDirs does not work as that is apparently Tomcat's not > application's classpath. It fails with FileNotFound exception. We place these > in the tomcat/lib folder for regular deployments. > Any workaround or preferably solution for the problem would be highly > appreciated. There are couple unanswered questions in this direction on > stackoverflow as well. > (http://stackoverflow.com/questions/18862237/tomcat7-maven-plugin-couldnt-locate-the-property-file-on-classpath, > > http://stackoverflow.com/questions/17962524/extending-classpath-and-tomcat-plugin) -- This message was sent by Atlassian JIRA (v6.1#6144) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Subject: Questions on Jasper's BodyContentImpl, bug #43925, and proposed solution
On Nov 1, 2013, at 6:23 AM, Scott Severtson wrote: > All, > > We've noticed that our Tomcat 6.0.37 instances have increasing overhead the > longer they stay up. We've captured some heap dumps, expecting to find memory > leaks within our code, but found something different instead. > > Jasper's BodyContentImpl is actually holding most of the non-collectible > garbage, in the internal char[] buffer. I've checked trunk of Tomcat 6, 7 and > 8, and see that the same implementation is still used, so this issue applies > to all currently supported versions. > > This issue appears to be well known: > * > http://stackoverflow.com/questions/10421908/is-there-a-fix-for-bodycontentimpl-jsp-tag-memory-leak-using-tomcat > * https://issues.apache.org/bugzilla/show_bug.cgi?id=43925 > > Specifically what we see happening is due to large pages being rendered in > JSPs - sometimes in the multi-megabyte range, especially for internal tools. > Apparently, some of the tags we use require buffering the output, versus > sending it directly to the Writer. > > Now, we certainly can simply set LIMIT_BUFFER and forget about it (throw away > any buffers larger than 8k), but this isn't optimal for our application. For > about 75% of our requests, ~8k is the baseline page size, with many larger > than that. So, depending how the data size, we could be reallocating multiple > times, only to throw away the buffer at the end. > > We'd like to propose a different behavior, and are wondering what others > think about it. If it sounds like a good idea, we're certainly willing to > submit patches to implement it. > > --Proposal-- > Instead of a hard-coded DEFAULT_TAG_BUFFER_SIZE of 8k, make it configurable. > In addition, if LIMIT_BUFFER is set, provide another configurable setting > called something like MAX_TAG_BUFFER_SIZE (if not set, defaults to > DEFAULT_TAG_BUFFER_SIZE). This would give applications a more predictable > *range* of memory allocated for tag buffers, while decreasing the frequency > of reallocation. > --/Proposal-- Allowing for a cap on growth and throwing an IOException when it is hit seems like a reasonable precaution to prevent more drastic OOM errors (I've been bitten by this too). Using a threshold rather than simple boolean to control recycling could be helpful. It could easily mimic the current functionality albeit at the cost of backward compatibility. However, I would expect see allocations gradually creep up to this limit across the board so it seems more predictable just to raise the default to that value. > We'd probably set DEFAULT_TAG_BUFFER_SIZE to 16k, and set MAX_TAG_BUFFER_SIZE > to either 64k or 128k, based on real-world performance testing. DEFAULT_TAG_BUFFER_SIZE is only 512 bytes and, AIUI, is set low-ish just to cover the common case where fragments generate small amounts of output. I don't think we should change the defaults for these. > One other, slightly less defined question - is there a reason we're managing > char arrays ourselves, instead of using something like Java's StringBuilder > or Javalution's TextBuilder? StringBuilder would reduce code maintenance, > while something like TextBuilder would also reduce array allocation. Patches are always welcome. Cheers Jeremy signature.asc Description: Message signed with OpenPGP using GPGMail
[Bug 55746] New: Add documentation for AllRolesMode for CombinedRealm
https://issues.apache.org/bugzilla/show_bug.cgi?id=55746 Bug ID: 55746 Summary: Add documentation for AllRolesMode for CombinedRealm Product: Tomcat 6 Version: unspecified Hardware: All OS: All Status: NEW Severity: minor Priority: P2 Component: Catalina Assignee: dev@tomcat.apache.org Reporter: cedric.coura...@gmail.com Created attachment 31012 --> https://issues.apache.org/bugzilla/attachment.cgi?id=31012&action=edit Patch for Tomcat6 The attribute "allRolesMode" is not listed in the attributes for the CombinedRealm or LockOutRealm. I have been bitten by it as I thought it was then sufficient to put it in each of the nested Realms. It appears that the check for HasResourcePermission is done on the context.getRealm() which is not passed in the nested Realms in the case of CombinedRealm. I think just adding it to the documentation should be sufficient. I only have a working copy of Tomcat 6 handy, so the patch is done to that version. -- You are receiving this mail because: You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org