Return-Path: X-Original-To: apmail-axis-java-dev-archive@www.apache.org Delivered-To: apmail-axis-java-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8AA0A1179C for ; Sun, 20 Jul 2014 15:55:08 +0000 (UTC) Received: (qmail 84722 invoked by uid 500); 20 Jul 2014 15:55:08 -0000 Delivered-To: apmail-axis-java-dev-archive@axis.apache.org Received: (qmail 84586 invoked by uid 500); 20 Jul 2014 15:55:07 -0000 Mailing-List: contact java-dev-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@axis.apache.org Delivered-To: mailing list java-dev@axis.apache.org Received: (qmail 84576 invoked by uid 99); 20 Jul 2014 15:55:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 Jul 2014 15:55:07 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of andreas.veithen@gmail.com designates 209.85.216.54 as permitted sender) Received: from [209.85.216.54] (HELO mail-qa0-f54.google.com) (209.85.216.54) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 Jul 2014 15:55:03 +0000 Received: by mail-qa0-f54.google.com with SMTP id k15so4333161qaq.41 for ; Sun, 20 Jul 2014 08:54:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=HR19lJNyB7upNdsgL8sJl0UvEKRDmBzgqDxpTKhRf7U=; b=vXHQU2hoZZeO0I1vT/FQR5ahK21LN+rbME2StPZHpq5kn0CNsA+77CeKiAF7e2xFP5 hMDerUMSkj3qZsy20SILUsMs/p0wz96LVk2s69I+hrz5FSdiNHVaRTzFqDlszUwyxteo uuMAnF/PUYYBe8gqmTrbeP9es3h2/G2a4fwbJDG0sywo7KZk/h8RVUXO7Gp+V/EFfbzA IcksUcK6LaRVHycu4/xoj1qL47sv2R3IMhrAFTveX4VwCd1Y/YEbNWbIdEaAFMR5o9GY rJjTW1EQTbQyU8AGrzo16Dp3udBcGp+RcrD0MKw/6QLxToN32Oamf5xYUxV85chHySoR +ybA== X-Received: by 10.224.19.197 with SMTP id c5mr28947070qab.20.1405871679857; Sun, 20 Jul 2014 08:54:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.96.205.166 with HTTP; Sun, 20 Jul 2014 08:54:19 -0700 (PDT) In-Reply-To: References: From: Andreas Veithen Date: Sun, 20 Jul 2014 16:54:19 +0100 Message-ID: Subject: Re: Rampart transport binding integration tests? To: java-dev Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org I've used maven-eclipse-plugin for a couple of years, but I finally switched to m2e. I think that m2e does a better job to set up classpaths. That being said, if you configure the JUnit runner correctly, wouldn't it be enough to add a dependencyManagement entry to the POM (and no exclusions)? Something like this: javax.servlet servlet-api 2.5 Andreas On Wed, Jul 16, 2014 at 9:32 PM, wrote: > I'm using Maven Eclipse plugin. Basically running "mvn eclipse:clean > eclipse:eclipse" from the root project then importing everything under > /modules. Afterwards I switch the projects to use Java 1.6 since I saw this > is being used for the nightly build, while by default Maven generates > "J2SE-1.5" JRE container for them, at least on my side. > > Actually, I just figured out a way to execute RampartTest integration test > while keeping Rampart core module using servlet api 2.3. What needs to be > done is to exclude servlet api dependency from all dependencies to other > Rampart modules in Rampart integration module, then configure the JUnit test > runner in Eclipse to "only include exported entries", which means that it > would not include the classpath libraries of other projects, which are not > explicitly marked as exported. > This is a somehow hidden option in Eclipse that I did not know about, though > I use Eclipse extensively. I found out about it in the following blog post: > http://robertmarkbramprogrammer.blogspot.com/2011/11/eclipse-make-sure-your-unit-test-uses.html > > Also, I found a bug report in Eclipse for the same, apparently other > developers already complained that Eclipse JUnit runner is including all > referenced projects' libraries in the run classpath: > > https://bugs.eclipse.org/bugs/show_bug.cgi?id=306220 > > All this means that I can change the patch and revert Rampart core module to > use servlet api 2.3 and configure Rampart integration module to use 2.5. > Still, I think that many people might not know how to reconfigure their > Eclipse and they will struggle with the duplicate servlet jars and the > exception that I mentioned before. I can do that if you think this the > preferred solution. > > Detelin > > > On Wed, Jul 16, 2014 at 9:54 PM, Andreas Veithen > wrote: >> >> Do you use maven-eclipse-plugin or m2e to import Rampart into Eclipse? >> >> Andreas >> >> On Wed, Jul 16, 2014 at 12:39 AM, wrote: >> > Sure, we could leave rampart core compile against servlet api 2.3 from >> > axis2 >> > kernel and exclude it from rampart integration so that Jetty would run >> > with >> > 2.5, but still if all rampart modules are imported in Eclipse IDE as >> > projects, then both servlet api versions are available on the classpath >> > and >> > when running Rampart Jetty-based tests in Eclipse, one gets: >> > >> > java.lang.SecurityException: class >> > "javax.servlet.ServletRequestListener"'s >> > signer information does not match signer information of other classes in >> > the >> > same package >> > >> > If nobody is using Eclipse to run tests but sticking to command-line >> > then >> > this approach would work. I also tried to find a Jetty version that uses >> > servlet api 2.3 but even the oldest 6.0 is using 2.5. >> > >> > Regards, >> > Detelin >> > >> > >> > >> > On Tue, Jul 15, 2014 at 10:28 PM, Andreas Veithen >> > wrote: >> >> >> >> Yes, that is a very good idea. >> >> >> >> I had a quick look at the patch. I think that we need to refine a bit >> >> the part about the Servlet API versioning. More on this later. >> >> >> >> Andreas >> >> >> >> On Tue, Jul 15, 2014 at 12:36 PM, wrote: >> >> > Hi again, >> >> > I opened an enhancement request for Rampart to re-enable the >> >> > transport >> >> > binding integration tests: >> >> > >> >> > https://issues.apache.org/jira/browse/RAMPART-416 >> >> > >> >> > I provided a patch that introduces usage of embedded Jetty 7 web >> >> > container >> >> > with SSL support, modifies RampartTest to use that instead of the >> >> > UtilServer >> >> > and re-enables transport binding integration tests. >> >> > Please let me know if you have any concerns with it, I will be glad >> >> > to >> >> > improve it. >> >> > >> >> > Regards, >> >> > Detelin >> >> > >> >> > >> >> > On Mon, Jul 14, 2014 at 12:18 PM, wrote: >> >> >> >> >> >> Hi Rampart devs, >> >> >> While working on a Rampart extension for Kerberos authentication >> >> >> over >> >> >> transport binding, I was looking into implementing an integration >> >> >> test >> >> >> in >> >> >> Rampart, but noticed that transport binding (https) tests are not >> >> >> supported >> >> >> at the moment, since it uses Axis2 SimpleHttpServer which does not >> >> >> support >> >> >> https. Are there any plans to use a regular web container (e.g. >> >> >> Jetty) >> >> >> to >> >> >> enable transport binding tests? I can verify if Jetty Maven plugin >> >> >> can >> >> >> be >> >> >> used for this purpose, but wanted to check whether this has not >> >> >> already >> >> >> been >> >> >> attempted in the past. Any comments on this are welcome. >> >> >> >> >> >> Thanks, >> >> >> Detelin >> >> > >> >> > >> >> >> >> --------------------------------------------------------------------- >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org >> >> For additional commands, e-mail: java-dev-help@axis.apache.org >> >> >> > >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org >> For additional commands, e-mail: java-dev-help@axis.apache.org >> > --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org For additional commands, e-mail: java-dev-help@axis.apache.org