maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Eggers <>
Subject Shade plugin plus WAR overlays
Date Tue, 16 Apr 2013 06:56:05 GMT

I'm fairly new to Maven, and I'm trying to meet the following requirements.

1. A web site consisting of multiple components, some optional
2. Optional components each have some configuration files
3. If multiple optional components are present, the configuration files
    should be concatenated

My first pass using WAR overlays and the shade plugin worked, in that 
the resulting site.war had all the right components. However, 
target/site did not contain the concatenated files created by the shade 
plugin. This prevented target/site being run from within an IDE.

If I thought about it for a minute, that's pretty obvious since the 
shade plugin is executed during the package part of the lifecycle.

What I came up with is the following:

1. Create a multi-module project
2. One module collects all of the components that require use of the
    shade plugin
3. The second module is the actual site, and depends on the
    "collections" module
4. Use the WAR plugin overlay, plus exclusions, plus the shade plugin
    to create an intermediate WAR in the collections module
5. Overlay that intermediate WAR on the final site

This works except that I now have an extra artifact that is only used 
during the build. I can run target/site from the IDE (great for 
debugging) and site.war looks as it should.

Other than the fact that this works, is this the proper "Maven way"? The 
extra artifact (an artifact of the build process as it were) feels a 
little odd.

. . . . just my two cents

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message