Hi Konrad,
On Thu, 2020-04-09 at 18:25 +0200, Konrad Windszus wrote:
> For me the tests are interesting (although an edge case).
> But the deployment should not be as a bundle into OSGi but rather as
> a dedicated 2nd war (
> https://www.eclipse.org/jetty/documentation/9.4.x/jetty-maven-plugin.html#deploy-war-running-pre-assembled-war
> <
> https://www.eclipse.org/jetty/documentation/9.4.x/jetty-maven-plugin.html#deploy-war-running-pre-assembled-war
> > ) while executing
> https://github.com/apache/sling-org-apache-sling-launchpad-testing-war/blob/fa39f6a3c238cd79da4962ebf3f827f19b567016/pom.xml#L128
>
>
> That was also the intention I guess as services-war have the
> packaging war (
> https://github.com/apache/sling-org-apache-sling-launchpad-test-services-war/blob/e93ea20c1f62d8219efd0e749c7e12f4225695d2/pom.xml#L31
> ).
I tried to explore that direction, but I'm not sure I got the whole
idea. Did you mean to say that the test-services-war war file was meant
to be deployed standalone in Jetty, in a different context?
I looked at the contents ( excluding directories, LICENSE files, etc )
and it's basically
META-INF/MANIFEST.MF
WEB-INF/web.xml
WEB-INF/classes/org/apache/sling/launchpad/testservices/war/servlets/TestServlet.class
WEB-INF/classes/org/apache/sling/launchpad/testservices/war/servlets/SelectorServlet.class
OSGI-INF/org.apache.sling.launchpad.testservices.war.servlets.SelectorServlet.xml
The web.xml does not contain any servlet elements, only (namespaces elided):
<web-app id="TestServicesWebapp" version="2.5">
<display-name>Test Services Webapp</display-name>
</web-app>
Of course, deploying the war with Jetty works, but nothing can be
served. This looks a lot like a bundle in WAR's clothing, if you will.
It's packaged as a war file, but everything says 'bundle'.
So could you clarify how you would see this deployed and tested?
Thanks,
Robert
> Konrad
>
> If we deprecate (and I am not against it) we should IMHO deprecate
> https://github.com/apache/sling-org-apache-sling-launchpad-testing-war
> <
> https://github.com/apache/sling-org-apache-sling-launchpad-testing-war
> > at the same time and say War in general may or may not work!
>
> > On 9. Apr 2020, at 18:15, Robert Munteanu <[email protected]>
> > wrote:
> >
> > Hi,
> >
> > With SLING-8680 [1] we seem to have found a interesting scenario in
> > our
> > testing setup:
> >
> > - org.apache.sling.launchpad.test-services-war [2] is packaged as a
> > WAR
> > file with a manifest, exposing two Servlets
> > - before SLING-8680 [1] we only checked for a manifest when
> > transforming resources, now we reject the WAR file
> > - we have two tests that validate that those servlets are running
> > properly - see WarSelectorServletTest.java [3]
> >
> > IMO we should not test or support this scenario (WAR files
> > installed as
> > OSGi bundles) as it's a quite convoluted and specific scenario.
> >
> > Therefore I propose that we retire this module following our
> > Deprecated
> > Sling Modules process and delete the two tests.
> >
> > Please vote to accept this retirement. This majority vote is open
> > for
> > at least 72 hours.
> >
> > Thanks,
> > Robert
> >
> > [1]: https://issues.apache.org/jira/browse/SLING-8680
> > [2]:
> > https://github.com/apache/sling-org-apache-sling-launchpad-test-services-war/blob/e93ea20c1f62d8219efd0e749c7e12f4225695d2/pom.xml
> > [3]:
> > https://github.com/apache/sling-org-apache-sling-launchpad-integration-tests/blob/49e5c948a0115566f778a5696e7f3df45e5dd3f5/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/resolution/WarSelectorServletTest.java
> >