It's it possible with Maven to share common controllers, jsp's and other resources to the web module.
Structure
web1 (packaging jar)
--main
--java
--controller
MyControllerToShared with @Controller annotation
--resources
--webapp
--scripts
javascripts files
--styles
css files
--WEB-INF
--views
jsp to share
pom.xml
web2 (packaging war)
Classic web app structure with dependency of web1.jar
My web2 app works but no mapping found for HTTP request with URI define in web1 module. I use annotation @Controller and @RequestMapping. I defined in the servlet.xml:
<context:component-scan base-package="controller" />
<mvc:annotation-driven/>
How can I share controllers and resources between different web modules? At the end, I need to have 3 web app with commons stuffs (error handler, jsp's errors, styles, js, ...).