Hi, Am Mittwoch, den 16.04.2008, 13:22 +0200 schrieb Carsten Ziegeler: > I'm currently using the launchpad/webapp to build my own webapp. All I > need from the webapp are the configuration files for Sling and the > classes which launch Sling; no bundles etc. > Now, this works, but unfortunately the current webapp is about 40mb, and > I only need some files out of it. > > So it would be great if we could solve this somehow, perhaps by > splitting the configuration and classes into an own project?
To recap we currently have the launchpad/app and launchpad/webapp modules. The first contains the main launcher classes as well as a sling.properties file for use. In addition when building the project most Sling bundles as well as some Felix bundles are added into the final jar file to be installed on first startup. The webapp module extends the app module and shuffles the classes and integrated bundles around. Now, it would of course possibly be interesting to have this all in a single module ? What is the price we pay ? (1) The app has a Main class not used by the serlvet and the webapp has a Servlet not used by the app. This is not much, so could probably be merged. (2) The app has the bundles in "resources/bundles" while the webapp has them under "WEB-INF/resources/bundles". When merging the app would probably also have to look for the resources under WEB-INF. This would be kind of strange. Same holds for the sling.properties file - but this we could also put in the "classes" folder in the web app ... So here is my proposal: We create a launchpad/core module, which just contains the classes from the app and web app module and combine them in a single (simple) jar file. In addition the core sling.properties file would also be part of this jar file. This jar file, by itself is not usable. The launchpad/app module would have a dependency on the core module and just unpack the classes and properties file - through the maven dependency plugin. We also need to get the bundles into the jar. The launchpadd/webapp module also would have a dependency on the core module, but would pack the core jar file into the WEB-INF/lib folder unmodified. Again, we need to get the bundles into the jar and the of course the web.xml file. Now my question is: both launchpad/app and launchpadd/webapp use the same set of bundles. Is there a way of sharing this common knowledge between the app and webapp modules without creating a dependency on the app module in the webapp module ? Could the maven assembly plugin be used for this ? If we split like this, we could also make the launchpadd/jcrapp module simpler by just adding the dependency to the launchpad/core module and setup the dependency list. Is this correct ? Does this make sense ? Regards Felix