Hi Daniel,

The 2.0 version of Maven WAR Plugin is over 6 years old. The first thing
I'd do is try a later version to see if it solves your problem. The
latest version is 2.3.

On 2012-12-08 02:32, Winsor, Daniel wrote:
> Hi,
> 
> I have declared an optional dependency, but it is not being overlaid with 
> maven-war-plugin v 2.0
> 
> //parent-of-everything/pom.xml
> 
> <plugin>
> 
>     <groupId>org.apache.maven.plugins</groupId>
> 
>     <artifactId>maven-war-plugin</artifactId>
> 
>     <configuration>
> 
>         <overlays>
> 
>             <overlay>
> 
>                 <artifactId>to-be-overlaid</artifactId>
> 
>                 <includes>
> 
>                     <include>**</include>
> 
>                 </includes>
> 
>             </overlay>
> 
>             <overlay>
> 
>                 <!-- default self overlay -->
> 
>             </overlay>
> 
>         </overlays>
> 
>     </configuration>
> 
> </plugin>
> 
> 
> 
> //some-webapp-war/pom.xml
> 
>     <dependencies>
> 
>         <dependency>
> 
>             <artifactId>to-be-overlaid</artifactId>
> 
>             <optional>true</optional>
> 
>             <type>war</type>
> 
>         </dependency>
> 
>     </dependencies>
> 
> 
> When optional is set to false, then
> 
> [INFO] Assembling webapp some-webapp-war in /target/some-webapp-war
> 
> [INFO] Expanding: /.m2/repository/to-be-overlaid.war into 
> /target/to-be-overlaid
> 
> [INFO] Overlaying 1 war(s).
> 
> 
> When optional is set to true, then no such overlaying happens.
> 
> However, according to optional dependencies, if some-webapp-war optionally 
> depends on to-be-overlaid, well it should show up in this first level 
> dependency, just like normal.  What is going on here?  And how can I best 
> overlay a war to certain other wars while leaving them out of most wars using 
> parent-of-everything (I am currently using a property in the skip parameter 
> in maven-war-plugin)?
> 
> Thank you,
> Daniel Winsor
> Associate, IT Architecture
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 


-- 
Dennis Lundberg

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to