Using jetty:run with multiple webapp directories?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Using jetty:run with multiple webapp directories?

Francesco Vivoli
Hi all

We've been happily using the maven jetty plugin for quite some time now.
Recently we've added Jasper reports to the webapp

We are managing to compile them through maven, and to have them working
when assembling a full war (using jetty:run-war or deploying the war externally works).

What I can't sort out is how to have also jetty:run to pick the reports.
My objective is to have the compiled reports be accessible from the Servlet
context as "/reports/AnyReport.jasper".

With the above setup (assembling a war) I can access succesfully the
following directory

Instead when using jetty:run the above URL gives a 404, and when trying
to generate the report I get the following:

org.springframework.context.ApplicationContextException: Could not load JasperReports report for URL [/reports/ScanReport.jasper]; nested exception is Could not open ServletContext resource [/reports/ScanReport.jasper]

I've setup my pom so that the jasper plugins is as follows


The war plugin is configured so that

While the jetty plugin is like the following




As you can note I have also tried adding a further scan target,

and having the jasper plugin compile reports under <outputDirectory>${}/other/reports</outputDirectory>

but the result is the same.

Does somebody have an idea of what I could do? After almost an year
of happy jetty:run I'm not really keen on letting it go

Thanks a lot, cheers