+1 for a new module. As for the other items, If we have TuscanyServletFilter and TuscanyTestServletFilter, it would only work for the iTests, as they have generated web.xml. If we want to have simmilar aproach on our sample applications, that have real web.xml, how would we do it ?
I'd probably suggest that we make the "host-webapp-junit" or "host-webapp-testing" more like a "clone" of the original "host-webapp", add the necessary logic there for testing, and then, the only thing we would need to do to enable the testing is change dependency from "host-webapp" to "host-webapp-junit", and this can be easily accomplished by maven profiles, right ? Thoughts ? On Feb 8, 2008 10:41 AM, Raymond Feng <[EMAIL PROTECTED]> wrote: > As the first step, I fixed the code (r619973) to tolerate the case that > junit is not present on the classpath. Now the webapp samples should be > working as-is now. > > How about the following refactoring? > > 1) Create a new module as "host-webapp-junit" under "modules" folder. (I > think it should be under "modules" instead of "tools" since it's the runtime > code). > 2) Rename WebTestRunner to TuscanyTestServletFilter and extend it from the > TuscanyServletFilter > 3) Adjust the maven plugin togenerate the web.xml for itests to use > TuscanyTestServletFilter > 4) Adjust the itest/pom.xml to reference host-webapp-junit as the dependency > for "webapp" profile? > > Thanks, > Raymond > > > ----- Original Message ----- > From: "Jean-Sebastien Delfino" <[EMAIL PROTECTED]> > To: <[email protected]> > Cc: <[EMAIL PROTECTED]> > Sent: Friday, February 08, 2008 10:12 AM > Subject: Re: Tuscany web-apps and jUnit dependencies > > > > ant elder wrote: > >> On Feb 8, 2008 5:30 PM, Luciano Resende <[EMAIL PROTECTED]> wrote: > >> > >>> I'm trying to run our sample webapps, and realize that they are all > >>> requiring jUnit as dependencies, even when there is no test available. > >>> This might be a side effect of our effort to automate the run of > >>> iTests in a web container. I just want to double check if others are > >>> seeing the same issue, and I'll try to investigate the issue later > >>> today. > >>> > >>> Error 500: Filter [tuscany]: > >>> org.apache.tuscany.sca.host.webapp.TuscanyServletFilter was found, but > >>> is missing another required class. > >>> > >>> and the following stack trace > >>> > >>> [2/7/08 17:10:28:882 PST] 00000023 WebApp E [Servlet > >>> Error]-[Filter [tuscany]: > >>> org.apache.tuscany.sca.host.webapp.TuscanyServletFilter was found, but > >>> is missing another required class. > >>> ]: java.lang.NoClassDefFoundError: junit.framework.Test > >>> at java.lang.J9VMInternals.verifyImpl(Native Method) > >>> at java.lang.J9VMInternals.verify(J9VMInternals.java:66) > >>> at java.lang.J9VMInternals.initialize(J9VMInternals.java:127) > >>> at > >>> org.apache.tuscany.sca.host.webapp.TuscanyServletFilter.<init>( > >>> TuscanyServletFilter.java:46) > >>> at java.lang.Class.newInstanceImpl(Native Method) > >>> at java.lang.Class.newInstance(Class.java:1300) > >>> at java.beans.Beans.instantiate(Beans.java:219) > >>> at java.beans.Beans.instantiate(Beans.java:63) > >>> > >> > >> Yes i also see it. It has come from the webapp itest work. I still think > >> it > >> would be better to move that out of the runtime into an itest module. > >> > >> ...ant > >> > > > > Me too, normal apps should not require junit. > > > > -- > > Jean-Sebastien > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Luciano Resende Apache Tuscany Committer http://people.apache.org/~lresende http://lresende.blogspot.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
