[jira] [Commented] (MTOMCAT-273) redeploy-only goal is broken for Tomcat 6
[ https://issues.apache.org/jira/browse/MTOMCAT-273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14069920#comment-14069920 ] Hudson commented on MTOMCAT-273: SUCCESS: Integrated in TomcatMavenPlugin-mvn3.x #277 (See [https://builds.apache.org/job/TomcatMavenPlugin-mvn3.x/277/]) [MTOMCAT-273] redeploy-only goal is broken for Tomcat 6 Submitted by Dennis Lundberg (olamy: http://svn.apache.org/viewvc/?view=rev&rev=1612483) * /tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/RedeployOnlyMojo.java > redeploy-only goal is broken for Tomcat 6 > - > > Key: MTOMCAT-273 > URL: https://issues.apache.org/jira/browse/MTOMCAT-273 > Project: Apache Tomcat Maven Plugin > Issue Type: Bug > Components: tomcat6 >Affects Versions: 2.2 >Reporter: Dennis Lundberg >Assignee: Olivier Lamy (*$^¨%`£) > Fix For: 2.3 > > Attachments: MTOMCAT-273.patch > > > The redeploy-only goal for the tomcat6 plugin is broken since > [r1418095|http://svn.apache.org/viewvc?view=revision&revision=1418095]. That > modification [removed the > inheritance|http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/RedeployOnlyMojo.java?r1=1418095&r2=1418091&pathrev=1418095] > which renders this exception when run: > {noformat} > [INFO] > > [ERROR] FATAL ERROR > [INFO] > > [INFO] org.apache.tomcat.maven.plugin.tomcat6.RedeployOnlyMojo cannot be cast > to org.apache.maven.plugin.Mojo > [INFO] > > [INFO] Trace > java.lang.ClassCastException: > org.apache.tomcat.maven.plugin.tomcat6.RedeployOnlyMojo cannot be cast to > org.apache.maven.plugin.Mojo > at > org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:652) > at > org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:468) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) > at > org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) > at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) > at > org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) > at org.codehaus.classworlds.Launcher.main(Launcher.java:375) > {noformat} > It also removed the explicit setting of the update parameter. > Note that the tomcat7 plugin is not affected by this bug. > Patch for this is coming shortly. -- This message was sent by Atlassian JIRA (v6.2#6252) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: [VOTE] Release Apache Tomcat 7.0.55
[X] Stable - go ahead and release as 7.0.55 Stable On Fri, Jul 18, 2014 at 6:47 PM, Violeta Georgieva wrote: > The proposed Apache Tomcat 7.0.55 release is now available for voting. > > It can be obtained from: > https://dist.apache.org/repos/dist/dev/tomcat/tomcat-7/v7.0.55/ > The Maven staging repo is: > https://repository.apache.org/content/repositories/orgapachetomcat-1019/ > The svn tag is: > http://svn.apache.org/repos/asf/tomcat/tc7.0.x/tags/TOMCAT_7_0_55/ > > The proposed 7.0.55 release is: > [ ] Broken - do not release > [ ] Stable - go ahead and release as 7.0.55 Stable > > Regards, > Violeta >
Re: svn commit: r1608840 [1/2] - in /tomcat/trunk: java/org/apache/tomcat/util/net/jsse/ java/org/apache/tomcat/util/net/jsse/openssl/ java/org/apache/tomcat/util/net/jsse/res/ webapps/docs/
2014-07-21 19:57 GMT+02:00 Mark Thomas : > On 20 July 2014 23:40:50 CEST, Tim Whittington wrote: > >This doesn’t look like it’ll work as expected on IBM JDKs (which do > >s/^TLS_/SSL_/ on all the TLS era cipher suite names). > > > >Also a big -0 for importing the brokenness that is the openssl ciphers > >syntax (seriously, I have to recite > >HIGH:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5 to do something sensible?). > >(I get the consistency argument internally (JSSE/APR connectors) and > >externally (Apache, nginx etc.), but meh). > > > >I’m not a fan of the closed-set approach either, but I haven’t got a > >better option that doesn’t involve magic cipher-suite name parsing > >unfortunately (both put you in an arms race with new suites for > >different reasons). > > This seems like a good point to add that I've been looking in to this and > the current mapping doesn't look right. It references cipher suites that > aren't in the standard names doc provided in the JRE docs and it also fails > to reference many suites that are in it. > > I'm less concerned about keeping up with new cipher suites. We can write > unit tests to catch those. > > Different cipher names in different JREs is going to be problematic. > > This is currently top if my to do list when I get back to work next week. > My current view of this feature is buggy with maintenance issues but I also > believe all these to be fixable/manageable. > > I might find some time to play with this this week so don't be surprised > if you see the odd commit from me in this area. > We plan to do maintenance as needed on it too. Rémy
[Bug 43925] org.apache.jasper.runtime.BodyContentImpl causing huge memory allocations
https://issues.apache.org/bugzilla/show_bug.cgi?id=43925 Issa Gorissen changed: What|Removed |Added Component|Jasper |Jasper Version|unspecified |8.0.9 Product|Tomcat 7|Tomcat 8 Target Milestone|--- | -- 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 53367] Database failure may cause pool to hang
https://issues.apache.org/bugzilla/show_bug.cgi?id=53367 Filip Hanik changed: What|Removed |Added Attachment #31838|0 |1 is obsolete|| --- Comment #10 from Filip Hanik --- Created attachment 31840 --> https://issues.apache.org/bugzilla/attachment.cgi?id=31840&action=edit Unit test demonstrating fair queue not working properly This tests correctly fails (assertion fails) when it is supposed to properly show the bug. -- 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 53367] Database failure may cause pool to hang
https://issues.apache.org/bugzilla/show_bug.cgi?id=53367 --- Comment #11 from Filip Hanik --- (In reply to Anton from comment #9) > Created attachment 31838 [details] > Test demonstrating jdbc-pool connection leakage > > I wrote a test which demonstrates how connections can be leaked. To execute > the test you need MySQL server running on port 3306. Anton, thank you for your test. I do confirm the bug you are seeing. Here is what I got 1. work around is to set poolProperties.setFairQueue(false) 2. I did modify the test to properly fail on assertion to demonstrate the actual bug I will get this 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
[Bug 43925] org.apache.jasper.runtime.BodyContentImpl causing huge memory allocations
https://issues.apache.org/bugzilla/show_bug.cgi?id=43925 --- Comment #16 from Issa Gorissen --- Created attachment 31841 --> https://issues.apache.org/bugzilla/attachment.cgi?id=31841&action=edit Test case to compare default and suggested implementation I've ran some tests with JMeter 2.11 against some small custom tags running under Tomcat 8.0.9. The results from the Jmeter test in file show that the default implementation is a little bit faster than suggested one (number of jmeter samples being higher for the same amout of running time). Can someone run the tests I provided and report the results ? If any improvement or suggestion is found for the tests I provide, please report as well. Thx! -- 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 56759] New: tomcat-jasper 8.0.9 pom depends on non-existant ecj 4.4RC4
https://issues.apache.org/bugzilla/show_bug.cgi?id=56759 Bug ID: 56759 Summary: tomcat-jasper 8.0.9 pom depends on non-existant ecj 4.4RC4 Product: Tomcat 8 Version: 8.0.9 Hardware: PC OS: Linux Status: NEW Severity: blocker Priority: P2 Component: Packaging Assignee: dev@tomcat.apache.org Reporter: ad...@moparisthebest.com You can see the pom here: http://search.maven.org/#artifactdetails|org.apache.tomcat|tomcat-jasper|8.0.9|jar Maven projects that depend on this (for pre-compiling JSPs, for instance) will fail because: org.eclipse.jdt.core.compiler ecj 4.4RC4 Does not exist, as you can see here: http://search.maven.org/#search|gav|1|g%3A%22org.eclipse.jdt.core.compiler%22%20AND%20a%3A%22ecj%22 I'm going to guess it should probably depend on 4.4 instead of 4.4RC4, and the only workaround I know of is to change: org.apache.tomcat tomcat-jasper ${tomcat.jasper.version} to: org.apache.tomcat tomcat-jasper ${tomcat.jasper.version} org.eclipse.jdt.core.compiler ecj org.eclipse.jdt.core.compiler ecj 4.4 I'm not sure there is a way to fix this before the next version is released (can you change artifacts in maven central?) Let me know if you need any more information. -- 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 53367] Database failure may cause pool to hang
https://issues.apache.org/bugzilla/show_bug.cgi?id=53367 --- Comment #12 from Anton --- Great, thank you! -- 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 50604] Incorrect dependency in jasper.pom for eclipse ecj
https://issues.apache.org/bugzilla/show_bug.cgi?id=50604 Violeta Georgieva changed: What|Removed |Added CC||ad...@moparisthebest.com --- Comment #18 from Violeta Georgieva --- *** Bug 56759 has been marked as a duplicate of this bug. *** -- 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 56759] tomcat-jasper 8.0.9 pom depends on non-existant ecj 4.4RC4
https://issues.apache.org/bugzilla/show_bug.cgi?id=56759 Violeta Georgieva changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |DUPLICATE --- Comment #1 from Violeta Georgieva --- *** This bug has been marked as a duplicate of bug 50604 *** -- 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 56759] tomcat-jasper 8.0.9 pom depends on non-existant ecj 4.4RC4
https://issues.apache.org/bugzilla/show_bug.cgi?id=56759 --- Comment #2 from ad...@moparisthebest.com --- I'm not so sure this bug affecting only Tomcat 8.0.9 is really a duplicate of a much older similar bug affecting 6.0.29? The pom's for 8.0.8, 8.0.5, and 7.0.54 all have a correct ecj version specified and work fine. -- 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 56759] tomcat-jasper 8.0.9 pom depends on non-existant ecj 4.4RC4
https://issues.apache.org/bugzilla/show_bug.cgi?id=56759 --- Comment #3 from Violeta Georgieva --- (In reply to admin from comment #2) > I'm not so sure this bug affecting only Tomcat 8.0.9 is really a duplicate > of a much older similar bug affecting 6.0.29? > > The pom's for 8.0.8, 8.0.5, and 7.0.54 all have a correct ecj version > specified and work fine. Yes they work fine because there are volunteers that import this artifact to maven central. [1] We are trying to find a long term solution for this issue. Please read the comments. Violeta [1] https://issues.apache.org/bugzilla/show_bug.cgi?id=50604#c5 -- 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 56756] VM argument javaagent is not working
https://issues.apache.org/bugzilla/show_bug.cgi?id=56756 Christopher Schultz changed: What|Removed |Added Status|NEW |NEEDINFO --- Comment #1 from Christopher Schultz --- How are you launching Tomcat? How are you setting that parameter? This is probably best discussed on the user list and not in Bugzilla since there's no evidence thus far that a bug exists. -- 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 55797] Tomcat 7.0.47 crashes using server jvm.dll and APR at ntdll!ZwGetContextThread+0xa
https://issues.apache.org/bugzilla/show_bug.cgi?id=55797 --- Comment #4 from Keith Mashinter --- Here is some further information from a similar crash dump. SYMBOL_STACK_INDEX: 0 SYMBOL_NAME: tcnative_1!Java_org_apache_tomcat_jni_Poll_poll+223 MODULE_NAME: tcnative_1 IMAGE_NAME: tcnative-1.dll DEBUG_FLR_IMAGE_TIMESTAMP: 53467783 STACK_COMMAND: ~83s; .ecxr ; kb FAILURE_BUCKET_ID: NULL_POINTER_READ_BEFORE_WRITE_c005_tcnative-1.dll!Java_org_apache_tomcat_jni_Poll_poll BUCKET_ID: APPLICATION_FAULT_NULL_POINTER_READ_INVALID_POINTER_READ_BEFORE_WRITE_tcnative_1!Java_org_apache_tomcat_jni_Poll_poll+223 ANALYSIS_SOURCE: UM FAILURE_ID_HASH_STRING: um:null_pointer_read_before_write_c005_tcnative-1.dll!java_org_apache_tomcat_jni_poll_poll FAILURE_ID_HASH: {3d0ef292-369d-05ca-f03e-33ba41a5100c} -- 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: r1612753 - in /tomcat/maven-plugin/trunk: common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java tomcat6-maven-plugin/src/main/java/org/apache/
Author: olamy Date: Wed Jul 23 04:00:48 2014 New Revision: 1612753 URL: http://svn.apache.org/r1612753 Log: implemented proxy fix for tomcat6-maven-plugin Modified: tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractCatalinaMojo.java Modified: tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java?rev=1612753&r1=1612752&r2=1612753&view=diff == --- tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java (original) +++ tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java Wed Jul 23 04:00:48 2014 @@ -199,7 +199,6 @@ public class TomcatManager String host = url.getHost(); int port = url.getPort() > -1 ? url.getPort() : AuthScope.ANY_PORT; - httpClient.getCredentialsProvider().setCredentials( new AuthScope( host, port ), creds ); AuthCache authCache = new BasicAuthCache(); @@ -293,7 +292,6 @@ public class TomcatManager */ private void applyProxy() { if( this.proxy != null ) { - System.out.println("proxy: " + proxy); HttpHost proxy = new HttpHost(this.proxy.getHost(), this.proxy.getPort(), this.proxy.getProtocol()); httpClient.getParams().setParameter( ConnRoutePNames.DEFAULT_PROXY, proxy ); if( this.proxy.getUsername() != null ) { Modified: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractCatalinaMojo.java URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractCatalinaMojo.java?rev=1612753&r1=1612752&r2=1612753&view=diff == --- tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractCatalinaMojo.java (original) +++ tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractCatalinaMojo.java Wed Jul 23 04:00:48 2014 @@ -20,9 +20,11 @@ package org.apache.tomcat.maven.plugin.t */ import org.apache.maven.artifact.manager.WagonManager; +import org.apache.maven.execution.MavenSession; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugins.annotations.Component; import org.apache.maven.plugins.annotations.Parameter; +import org.apache.maven.settings.Proxy; import org.apache.maven.wagon.authentication.AuthenticationInfo; import org.apache.tomcat.maven.common.deployer.TomcatManager; import org.apache.tomcat.maven.common.deployer.TomcatManagerException; @@ -69,6 +71,12 @@ public abstract class AbstractCatalinaMo */ @Component( role = WagonManager.class ) private WagonManager wagonManager; + +/** + * The current build session instance. This is used for plugin manager API calls. + */ +@Component +private MavenSession session; /** * The full URL of the Tomcat manager instance to use. @@ -216,6 +224,12 @@ public abstract class AbstractCatalinaMo manager = new TomcatManager( url, userName, password, charset, settings.isInteractiveMode() ); manager.setUserAgent( name + "/" + version ); + +Proxy proxy = session.getSettings().getActiveProxy(); +if( proxy != null && proxy.isActive() ) { + getLog().debug("proxy: " + proxy.getHost() + ":" + proxy.getPort()); + manager.setProxy(proxy); +} } return manager; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1612752 - in /tomcat/maven-plugin/trunk: common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java tomcat7-maven-plugin/src/main/java/org/apache/
Author: olamy Date: Wed Jul 23 04:00:37 2014 New Revision: 1612752 URL: http://svn.apache.org/r1612752 Log: Fix for MTOMCAT-177 - tomcat7:deploy ignores proxy settings Modified: tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/AbstractCatalinaMojo.java Modified: tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java?rev=1612752&r1=1612751&r2=1612752&view=diff == --- tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java (original) +++ tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java Wed Jul 23 04:00:37 2014 @@ -34,12 +34,14 @@ import org.apache.http.client.methods.Ht import org.apache.http.client.methods.HttpPut; import org.apache.http.client.methods.HttpRequestBase; import org.apache.http.client.protocol.ClientContext; +import org.apache.http.conn.params.ConnRoutePNames; import org.apache.http.entity.AbstractHttpEntity; import org.apache.http.impl.auth.BasicScheme; import org.apache.http.impl.client.BasicAuthCache; import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.impl.conn.PoolingClientConnectionManager; import org.apache.http.protocol.BasicHttpContext; +import org.apache.maven.settings.Proxy; import java.io.File; import java.io.FileInputStream; @@ -108,6 +110,8 @@ public class TomcatManager * @since 2.0 */ private BasicHttpContext localContext; + +private Proxy proxy; /** * @since 2.2 @@ -188,6 +192,7 @@ public class TomcatManager PoolingClientConnectionManager poolingClientConnectionManager = new PoolingClientConnectionManager(); poolingClientConnectionManager.setMaxTotal( 5 ); this.httpClient = new DefaultHttpClient( poolingClientConnectionManager ); + if ( StringUtils.isNotEmpty( username ) ) { Credentials creds = new UsernamePasswordCredentials( username, password ); @@ -270,6 +275,37 @@ public class TomcatManager { this.userAgent = userAgent; } + +/** + * @param proxy + */ +public void setProxy(Proxy proxy) { + if( this.proxy != proxy ) { + this.proxy = proxy; + if( httpClient != null ) { + applyProxy(); + } + } + } + +/** + * {@link #setProxy(Proxy)} is called by {@link AbstractCatinalMojo#getManager()} after the constructor + */ +private void applyProxy() { + if( this.proxy != null ) { + System.out.println("proxy: " + proxy); + HttpHost proxy = new HttpHost(this.proxy.getHost(), this.proxy.getPort(), this.proxy.getProtocol()); + httpClient.getParams().setParameter( ConnRoutePNames.DEFAULT_PROXY, proxy ); + if( this.proxy.getUsername() != null ) { + httpClient.getCredentialsProvider().setCredentials( new AuthScope(this.proxy.getHost(), this.proxy.getPort()), + new UsernamePasswordCredentials(this.proxy.getUsername(), + this.proxy.getPassword()) ); + } + } else { + httpClient.getParams().removeParameter( ConnRoutePNames.DEFAULT_PROXY ); + } + } + /** * Deploys the specified WAR as a URL to the specified context path. Modified: tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/AbstractCatalinaMojo.java URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/AbstractCatalinaMojo.java?rev=1612752&r1=1612751&r2=1612752&view=diff == --- tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/AbstractCatalinaMojo.java (original) +++ tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/AbstractCatalinaMojo.java Wed Jul 23 04:00:37 2014 @@ -20,9 +20,11 @@
svn commit: r1612756 - /tomcat/maven-plugin/trunk/pom.xml
Author: olamy Date: Wed Jul 23 04:01:20 2014 New Revision: 1612756 URL: http://svn.apache.org/r1612756 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=1612756&r1=1612755&r2=1612756&view=diff == --- tomcat/maven-plugin/trunk/pom.xml (original) +++ tomcat/maven-plugin/trunk/pom.xml Wed Jul 23 04:01:20 2014 @@ -185,6 +185,9 @@ Dennis Lundberg + + Nicholas Albion + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1612755 - /tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java
Author: olamy Date: Wed Jul 23 04:01:14 2014 New Revision: 1612755 URL: http://svn.apache.org/r1612755 Log: so FIXME has been fixed :-) Modified: tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java Modified: tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java?rev=1612755&r1=1612754&r2=1612755&view=diff == --- tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java (original) +++ tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java Wed Jul 23 04:01:14 2014 @@ -56,7 +56,6 @@ import java.text.DecimalFormatSymbols; import java.util.Locale; /** - * FIXME http connection tru a proxy * A Tomcat manager webapp invocation wrapper. * * @author Mark Hobson - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Closed] (MTOMCAT-177) tomcat7:deploy ignores proxy settings
[ https://issues.apache.org/jira/browse/MTOMCAT-177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Olivier Lamy (*$^¨%`£) closed MTOMCAT-177. -- Resolution: Fixed Fix Version/s: (was: moreinfo) 2.3 pr merged. Thanks! > tomcat7:deploy ignores proxy settings > - > > Key: MTOMCAT-177 > URL: https://issues.apache.org/jira/browse/MTOMCAT-177 > Project: Apache Tomcat Maven Plugin > Issue Type: Bug > Components: tomcat7 >Affects Versions: 2.0 >Reporter: Brad Larson >Assignee: Olivier Lamy (*$^¨%`£) > Labels: proxy > Fix For: 2.3 > > Attachments: MTOMCAT-177.patch > > > Using these settings: > org.apache.tomcat.maven > tomcat7-maven-plugin > 2.0-SNAPSHOT > When running tomcat7:deploy behind a network proxy (specified in > ~/.m2/settings.xml), the deploy will fail with a very generic error message. > Running outside of the proxy (with no proxy settings in ~/.m2/settings.xml) > works fine. > The error message is simply "Connection refused", no other details provided. -- This message was sent by Atlassian JIRA (v6.2#6252) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1612754 - in /tomcat/maven-plugin/trunk: common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/ tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugi
Author: olamy Date: Wed Jul 23 04:01:05 2014 New Revision: 1612754 URL: http://svn.apache.org/r1612754 Log: fix formatting Modified: tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractCatalinaMojo.java tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/AbstractCatalinaMojo.java Modified: tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java?rev=1612754&r1=1612753&r2=1612754&view=diff == --- tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java (original) +++ tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java Wed Jul 23 04:01:05 2014 @@ -110,7 +110,7 @@ public class TomcatManager * @since 2.0 */ private BasicHttpContext localContext; - + private Proxy proxy; /** @@ -192,7 +192,7 @@ public class TomcatManager PoolingClientConnectionManager poolingClientConnectionManager = new PoolingClientConnectionManager(); poolingClientConnectionManager.setMaxTotal( 5 ); this.httpClient = new DefaultHttpClient( poolingClientConnectionManager ); - + if ( StringUtils.isNotEmpty( username ) ) { Credentials creds = new UsernamePasswordCredentials( username, password ); @@ -274,36 +274,44 @@ public class TomcatManager { this.userAgent = userAgent; } - + /** * @param proxy */ -public void setProxy(Proxy proxy) { - if( this.proxy != proxy ) { - this.proxy = proxy; - if( httpClient != null ) { - applyProxy(); - } - } - } - +public void setProxy( Proxy proxy ) +{ +if ( this.proxy != proxy ) +{ +this.proxy = proxy; +if ( httpClient != null ) +{ +applyProxy(); +} +} +} + /** * {@link #setProxy(Proxy)} is called by {@link AbstractCatinalMojo#getManager()} after the constructor */ -private void applyProxy() { - if( this.proxy != null ) { - HttpHost proxy = new HttpHost(this.proxy.getHost(), this.proxy.getPort(), this.proxy.getProtocol()); - httpClient.getParams().setParameter( ConnRoutePNames.DEFAULT_PROXY, proxy ); - if( this.proxy.getUsername() != null ) { - httpClient.getCredentialsProvider().setCredentials( new AuthScope(this.proxy.getHost(), this.proxy.getPort()), - new UsernamePasswordCredentials(this.proxy.getUsername(), - this.proxy.getPassword()) ); - } - } else { - httpClient.getParams().removeParameter( ConnRoutePNames.DEFAULT_PROXY ); - } - } - +private void applyProxy() +{ +if ( this.proxy != null ) +{ +HttpHost proxy = new HttpHost( this.proxy.getHost(), this.proxy.getPort(), this.proxy.getProtocol() ); +httpClient.getParams().setParameter( ConnRoutePNames.DEFAULT_PROXY, proxy ); +if ( this.proxy.getUsername() != null ) +{ +httpClient.getCredentialsProvider().setCredentials( +new AuthScope( this.proxy.getHost(), this.proxy.getPort() ), +new UsernamePasswordCredentials( this.proxy.getUsername(), this.proxy.getPassword() ) ); +} +} +else +{ +httpClient.getParams().removeParameter( ConnRoutePNames.DEFAULT_PROXY ); +} +} + /** * Deploys the specified WAR as a URL to the specified context path. Modified: tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractCatalinaMojo.java URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat6-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat6/AbstractCatalinaMojo.java?rev=1612754&r1=1612753&r2=1612754&view=diff ==
svn commit: r1612759 - /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java
Author: olamy Date: Wed Jul 23 04:14:53 2014 New Revision: 1612759 URL: http://svn.apache.org/r1612759 Log: formatting and add @since 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=1612759&r1=1612758&r2=1612759&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 Jul 23 04:14:53 2014 @@ -68,38 +68,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; /** @@ -107,14 +107,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 @@ -132,13 +132,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.remoteArtifactRepositories}", required = true, readonly = true) protected List remoteRepos; @Component @@ -147,15 +147,15 @@ public abstract class AbstractExecWarMoj /** * Attach or not the generated artifact to the build (use true if you want to install or deploy it) */ -@Parameter( property = "maven.tomcat.exec.war.attachArtifact", defaultValue = "true", required = true ) +@Parameter(property = "maven.tomcat.exec.war.attachArtifact", defaultValue = "true", required = true) protected boolean attachArtifact
svn commit: r1612758 - in /tomcat/maven-plugin/trunk: tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java tomcat7-war-runner/src/main/java/org/apache
Author: olamy Date: Wed Jul 23 04:14:44 2014 New Revision: 1612758 URL: http://svn.apache.org/r1612758 Log: Added the RemoteIpValve to the Tomcat configuration, if enabled by a property configurable in the pom.xml. By default the valve is enabled. 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-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=1612758&r1=1612757&r2=1612758&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 Jul 23 04:14:44 2014 @@ -174,6 +174,13 @@ public abstract class AbstractExecWarMoj /** * see http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html */ +@Parameter( property = "maven.tomcat.exec.war.enableRemoteIpValve", defaultValue = "true", +required = true ) +protected String enableRemoteIpValve; + +/** + * see http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html + */ @Parameter( property = "maven.tomcat.exec.war.accessLogValveFormat", defaultValue = "%h %l %u %t %r %s %b %I %D", required = true ) protected String accessLogValveFormat; @@ -283,6 +290,7 @@ public abstract class AbstractExecWarMoj properties.put( Tomcat7Runner.ARCHIVE_GENERATION_TIMESTAMP_KEY, Long.toString( System.currentTimeMillis() ) ); properties.put( Tomcat7Runner.ENABLE_NAMING_KEY, Boolean.toString( enableNaming ) ); +properties.put( Tomcat7Runner.ENABLE_REMOTE_IP_VALVE, enableRemoteIpValve ); properties.put( Tomcat7Runner.ACCESS_LOG_VALVE_FORMAT_KEY, accessLogValveFormat ); properties.put( Tomcat7Runner.HTTP_PROTOCOL_KEY, connectorHttpProtocol ); 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=1612758&r1=1612757&r2=1612758&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 Jul 23 04:14:44 2014 @@ -26,6 +26,7 @@ import org.apache.catalina.startup.Catal import org.apache.catalina.startup.ContextConfig; import org.apache.catalina.startup.Tomcat; import org.apache.catalina.valves.AccessLogValve; +import org.apache.catalina.valves.RemoteIpValve; import org.apache.juli.ClassLoaderLogManager; import org.apache.tomcat.util.ExceptionUtils; import org.apache.tomcat.util.http.fileupload.FileUtils; @@ -68,6 +69,8 @@ public class Tomcat7Runner public static final String ENABLE_NAMING_KEY = "enableNaming"; +public static final String ENABLE_REMOTE_IP_VALVE = "enableRemoteIpValve"; + public static final String ACCESS_LOG_VALVE_FORMAT_KEY = "accessLogValveFormat"; public static final String CODE_SOURCE_CONTEXT_PATH = "codeSourceContextPath"; @@ -311,6 +314,15 @@ public class Tomcat7Runner tomcat.setConnector( connector ); } +boolean enableRemoteIpValve = +Boolean.parseBoolean(runtimeProperties.getProperty( Tomcat7Runner.ENABLE_REMOTE_IP_VALVE, Boolean.TRUE.toString())); + +if (enableRemoteIpValve) { +debugMessage("Adding RemoteIpValve"); +RemoteIpValve riv = new RemoteIpValve(); +tomcat.getHost().getPipeline().addValve(riv); +} + // add a default acces log valve AccessLogValve alv = new AccessLogValve(); alv.setDirectory( new File( extractDirectory, "logs" ).getAbsolutePath() ); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Updated] (MTOMCAT-250) Pull Request: Support Alternate Session Managers in Standalone War Bootstrap
[ https://issues.apache.org/jira/browse/MTOMCAT-250?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Olivier Lamy (*$^¨%`£) updated MTOMCAT-250: --- Fix Version/s: (was: 3.0) 2.3 > Pull Request: Support Alternate Session Managers in Standalone War Bootstrap > > > Key: MTOMCAT-250 > URL: https://issues.apache.org/jira/browse/MTOMCAT-250 > Project: Apache Tomcat Maven Plugin > Issue Type: Improvement >Reporter: Josh Chaitin-Pollak >Priority: Minor > Fix For: 2.3 > > > Hello, > I have created a pull request on GitHub to allow the standalone war > bootstrapper to use a factory to create an alternate session manager. > https://github.com/apache/tomcat-maven-plugin/pull/5 > I am using this with a modified version of the memcached-session-manager > project to allow my standalone war project to use that session manager. > I think this would be of utility to more people. Here is the MSM pull request > for reference: https://github.com/magro/memcached-session-manager/pull/33 > And here is an example of how you would use this patch: > {code} > java -Dmsm.memcachedNodes="n1:localhost:21211" -jar standalone.jar \ >-sessionManagerFactory > de.javakaffee.web.msm.MemcachedBackupSessionManagerFactory > {code} -- This message was sent by Atlassian JIRA (v6.2#6252) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Assigned] (MTOMCAT-250) Pull Request: Support Alternate Session Managers in Standalone War Bootstrap
[ https://issues.apache.org/jira/browse/MTOMCAT-250?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Olivier Lamy (*$^¨%`£) reassigned MTOMCAT-250: -- Assignee: Olivier Lamy (*$^¨%`£) > Pull Request: Support Alternate Session Managers in Standalone War Bootstrap > > > Key: MTOMCAT-250 > URL: https://issues.apache.org/jira/browse/MTOMCAT-250 > Project: Apache Tomcat Maven Plugin > Issue Type: Improvement >Reporter: Josh Chaitin-Pollak >Assignee: Olivier Lamy (*$^¨%`£) >Priority: Minor > Fix For: 2.3 > > > Hello, > I have created a pull request on GitHub to allow the standalone war > bootstrapper to use a factory to create an alternate session manager. > https://github.com/apache/tomcat-maven-plugin/pull/5 > I am using this with a modified version of the memcached-session-manager > project to allow my standalone war project to use that session manager. > I think this would be of utility to more people. Here is the MSM pull request > for reference: https://github.com/magro/memcached-session-manager/pull/33 > And here is an example of how you would use this patch: > {code} > java -Dmsm.memcachedNodes="n1:localhost:21211" -jar standalone.jar \ >-sessionManagerFactory > de.javakaffee.web.msm.MemcachedBackupSessionManagerFactory > {code} -- This message was sent by Atlassian JIRA (v6.2#6252) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Commented] (MTOMCAT-177) tomcat7:deploy ignores proxy settings
[ https://issues.apache.org/jira/browse/MTOMCAT-177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14071342#comment-14071342 ] Hudson commented on MTOMCAT-177: SUCCESS: Integrated in TomcatMavenPlugin-mvn3.x #278 (See [https://builds.apache.org/job/TomcatMavenPlugin-mvn3.x/278/]) Fix for MTOMCAT-177 - tomcat7:deploy ignores proxy settings (olamy: http://svn.apache.org/viewvc/?view=rev&rev=1612752) * /tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/deployer/TomcatManager.java * /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/AbstractCatalinaMojo.java > tomcat7:deploy ignores proxy settings > - > > Key: MTOMCAT-177 > URL: https://issues.apache.org/jira/browse/MTOMCAT-177 > Project: Apache Tomcat Maven Plugin > Issue Type: Bug > Components: tomcat7 >Affects Versions: 2.0 >Reporter: Brad Larson >Assignee: Olivier Lamy (*$^¨%`£) > Labels: proxy > Fix For: 2.3 > > Attachments: MTOMCAT-177.patch > > > Using these settings: > org.apache.tomcat.maven > tomcat7-maven-plugin > 2.0-SNAPSHOT > When running tomcat7:deploy behind a network proxy (specified in > ~/.m2/settings.xml), the deploy will fail with a very generic error message. > Running outside of the proxy (with no proxy settings in ~/.m2/settings.xml) > works fine. > The error message is simply "Connection refused", no other details provided. -- This message was sent by Atlassian JIRA (v6.2#6252) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1612763 - /tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/pom.xml
Author: olamy Date: Wed Jul 23 04:39:25 2014 New Revision: 1612763 URL: http://svn.apache.org/r1612763 Log: some upgrade in archetype Modified: tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/pom.xml Modified: tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/pom.xml URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/pom.xml?rev=1612763&r1=1612762&r2=1612763&view=diff == --- tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/pom.xml (original) +++ tomcat/maven-plugin/trunk/tomcat-maven-archetype/src/main/resources/archetype-resources/pom.xml Wed Jul 23 04:39:25 2014 @@ -46,7 +46,7 @@ org.apache.maven.plugins maven-surefire-plugin - 2.16 + 2.17 org.apache.maven.plugins @@ -150,7 +150,7 @@ org.apache.cxf cxf-bundle-jaxrs -2.6.10 +2.7.12 org.eclipse.jetty - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1612761 - in /tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner: Tomcat7Runner.java Tomcat7RunnerCli.java
Author: olamy Date: Wed Jul 23 04:39:13 2014 New Revision: 1612761 URL: http://svn.apache.org/r1612761 Log: Added a new parameter, “sessionManagerFactory”. If you specify a class that implements a createSessionManager() function, this class will be called and used to construct the session manager you want. This is useful for having your standalone instance use the memcached-session-manager project. Modified: tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7Runner.java tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7RunnerCli.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=1612761&r1=1612760&r2=1612761&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 Jul 23 04:39:13 2014 @@ -18,38 +18,26 @@ package org.apache.tomcat.maven.runner; * under the License. */ -import org.apache.catalina.Context; -import org.apache.catalina.Host; -import org.apache.catalina.connector.Connector; -import org.apache.catalina.core.StandardContext; -import org.apache.catalina.startup.Catalina; -import org.apache.catalina.startup.ContextConfig; -import org.apache.catalina.startup.Tomcat; -import org.apache.catalina.valves.AccessLogValve; -import org.apache.catalina.valves.RemoteIpValve; -import org.apache.juli.ClassLoaderLogManager; -import org.apache.tomcat.util.ExceptionUtils; -import org.apache.tomcat.util.http.fileupload.FileUtils; - -import java.io.BufferedOutputStream; -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.*; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.net.URISyntaxException; import java.net.URL; import java.security.AccessController; import java.security.PrivilegedAction; -import java.util.HashMap; -import java.util.Map; -import java.util.Properties; -import java.util.StringTokenizer; +import java.util.*; import java.util.logging.LogManager; +import org.apache.catalina.*; +import org.apache.catalina.connector.Connector; +import org.apache.catalina.core.StandardContext; +import org.apache.catalina.startup.*; +import org.apache.catalina.valves.AccessLogValve; +import org.apache.catalina.valves.RemoteIpValve; +import org.apache.juli.ClassLoaderLogManager; +import org.apache.tomcat.util.ExceptionUtils; +import org.apache.tomcat.util.http.fileupload.FileUtils; + /** * FIXME add junit for that but when https://issues.apache.org/bugzilla/show_bug.cgi?id=52028 fixed * Main class used to run the standalone wars in a Apache Tomcat instance. @@ -111,6 +99,8 @@ public class Tomcat7Runner public String extractDirectory = ".extract"; public File extractDirectoryFile; + +public String sessionManagerFactoryClassName = null; public String codeSourceContextPath = null; @@ -275,6 +265,11 @@ public class Tomcat7Runner { host.addChild( ctx ); } + +if (sessionManagerFactoryClassName != null) { +boolean cookies = true; +constructSessionManager(ctx, sessionManagerFactoryClassName, cookies); +} return ctx; } @@ -323,7 +318,7 @@ public class Tomcat7Runner tomcat.getHost().getPipeline().addValve(riv); } -// add a default acces log valve +// add a default access log valve AccessLogValve alv = new AccessLogValve(); alv.setDirectory( new File( extractDirectory, "logs" ).getAbsolutePath() ); alv.setPattern( runtimeProperties.getProperty( Tomcat7Runner.ACCESS_LOG_VALVE_FORMAT_KEY ) ); @@ -464,6 +459,31 @@ public class Tomcat7Runner } } } + +private void constructSessionManager(Context ctx, String sessionManagerFactoryClassName, boolean cookies) { +try { +debugMessage("Constructing session manager with factory " + sessionManagerFactoryClassName); +Class sessionManagerClass = Class.forName(sessionManagerFactoryClassName); + +Object managerFactory = (Object) sessionManagerClass.newInstance(); + +Method method = managerFactory.getClass().getMethod("createSessio
svn commit: r1612762 - /tomcat/maven-plugin/trunk/pom.xml
Author: olamy Date: Wed Jul 23 04:39:18 2014 New Revision: 1612762 URL: http://svn.apache.org/r1612762 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=1612762&r1=1612761&r2=1612762&view=diff == --- tomcat/maven-plugin/trunk/pom.xml (original) +++ tomcat/maven-plugin/trunk/pom.xml Wed Jul 23 04:39:18 2014 @@ -188,6 +188,9 @@ Nicholas Albion + + Joshua Chaitin-Pollak + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1612760 - /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java
Author: olamy Date: Wed Jul 23 04:39:05 2014 New Revision: 1612760 URL: http://svn.apache.org/r1612760 Log: Added the RemoteIpValve to the Tomcat configuration, if enabled by a property configurable in the pom.xml. By default the valve is enabled. 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=1612760&r1=1612759&r2=1612760&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 Jul 23 04:39:05 2014 @@ -175,15 +175,15 @@ public abstract class AbstractExecWarMoj * see http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html * @since 2.3 */ -@Parameter(property = "maven.tomcat.exec.war.enableRemoteIpValve", defaultValue = "true", - required = true) +@Parameter( property = "maven.tomcat.exec.war.enableRemoteIpValve", defaultValue = "true", +required = true ) protected String enableRemoteIpValve; /** * see http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html */ -@Parameter(property = "maven.tomcat.exec.war.accessLogValveFormat", defaultValue = "%h %l %u %t %r %s %b %I %D", - required = true) +@Parameter( property = "maven.tomcat.exec.war.accessLogValveFormat", defaultValue = "%h %l %u %t %r %s %b %I %D", +required = true ) protected String accessLogValveFormat; /** - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1612764 - /tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7RunnerCli.java
Author: olamy Date: Wed Jul 23 04:41:21 2014 New Revision: 1612764 URL: http://svn.apache.org/r1612764 Log: formatting Modified: tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7RunnerCli.java Modified: tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7RunnerCli.java URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7RunnerCli.java?rev=1612764&r1=1612763&r2=1612764&view=diff == --- tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7RunnerCli.java (original) +++ tomcat/maven-plugin/trunk/tomcat7-war-runner/src/main/java/org/apache/tomcat/maven/runner/Tomcat7RunnerCli.java Wed Jul 23 04:41:21 2014 @@ -87,7 +87,7 @@ public class Tomcat7RunnerCli static Option extractDirectory = OptionBuilder.withArgName( "extractDirectory" ).hasArg().withDescription( "path to extract war content, default value: .extract" ).create( "extractDirectory" ); - + static Option sessionManagerFactoryClassName = OptionBuilder.withArgName( "className" ).hasArg().withDescription( "classname of a factory that creates a session manager" ).create( "sessionManagerFactory" ); @@ -102,10 +102,22 @@ public class Tomcat7RunnerCli static { -options.addOption( httpPort ).addOption( httpsPort ).addOption( ajpPort ).addOption( serverXmlPath ).addOption( -resetExtract ).addOption( help ).addOption( debug ).addOption( sysProps ).addOption( -httpProtocol ).addOption( clientAuth ).addOption( keyAlias ).addOption( obfuscate ).addOption( -extractDirectory ).addOption(sessionManagerFactoryClassName).addOption( loggerName ).addOption( uriEncoding ); +options.addOption( httpPort ) // +.addOption( httpsPort ) // +.addOption( ajpPort ) // +.addOption( serverXmlPath ) // +.addOption( resetExtract ) // +.addOption( help ) // +.addOption( debug ) // +.addOption( sysProps ) // +.addOption( httpProtocol ) // +.addOption( clientAuth ) // +.addOption( keyAlias ) // +.addOption( obfuscate ) // +.addOption( extractDirectory ) // +.addOption( sessionManagerFactoryClassName ) // +.addOption( loggerName ) // +.addOption( uriEncoding ); } @@ -210,10 +222,11 @@ public class Tomcat7RunnerCli { tomcat7Runner.extractDirectory = line.getOptionValue( extractDirectory.getOpt() ); } - + if ( line.hasOption( sessionManagerFactoryClassName.getOpt() ) ) { -tomcat7Runner.sessionManagerFactoryClassName = line.getOptionValue( sessionManagerFactoryClassName.getOpt() ); +tomcat7Runner.sessionManagerFactoryClassName = +line.getOptionValue( sessionManagerFactoryClassName.getOpt() ); } if ( line.hasOption( loggerName.getOpt() ) ) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[jira] [Closed] (MTOMCAT-250) Pull Request: Support Alternate Session Managers in Standalone War Bootstrap
[ https://issues.apache.org/jira/browse/MTOMCAT-250?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Olivier Lamy (*$^¨%`£) closed MTOMCAT-250. -- Resolution: Fixed pr merged. Thanks! > Pull Request: Support Alternate Session Managers in Standalone War Bootstrap > > > Key: MTOMCAT-250 > URL: https://issues.apache.org/jira/browse/MTOMCAT-250 > Project: Apache Tomcat Maven Plugin > Issue Type: Improvement >Reporter: Josh Chaitin-Pollak >Assignee: Olivier Lamy (*$^¨%`£) >Priority: Minor > Fix For: 2.3 > > > Hello, > I have created a pull request on GitHub to allow the standalone war > bootstrapper to use a factory to create an alternate session manager. > https://github.com/apache/tomcat-maven-plugin/pull/5 > I am using this with a modified version of the memcached-session-manager > project to allow my standalone war project to use that session manager. > I think this would be of utility to more people. Here is the MSM pull request > for reference: https://github.com/magro/memcached-session-manager/pull/33 > And here is an example of how you would use this patch: > {code} > java -Dmsm.memcachedNodes="n1:localhost:21211" -jar standalone.jar \ >-sessionManagerFactory > de.javakaffee.web.msm.MemcachedBackupSessionManagerFactory > {code} -- This message was sent by Atlassian JIRA (v6.2#6252) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1612767 - in /tomcat/site/trunk/docs/maven-plugin-trunk: ./ apidocs/ apidocs/class-use/ apidocs/org/apache/tomcat/maven/common/config/ apidocs/org/apache/tomcat/maven/common/config/class-
Author: olamy Date: Wed Jul 23 04:59:08 2014 New Revision: 1612767 URL: http://svn.apache.org/r1612767 Log: Apache Tomcat Maven Plugin site documentation for 2.3-SNAPSHOT [This commit notification would consist of 92 parts, which exceeds the limit of 50 ones, so it was shortened to the summary.] - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org