[ 
https://issues.apache.org/jira/browse/MWAR-260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Elliotte Rusty Harold updated MWAR-260:
---------------------------------------
    Description: 
There are a number of bugs raised around support for WAR overlays:
MWAR-73 - war overlay mechanism does not work for classes
MWAR-253 - Inherit dependencies from a WAR type dependency when it is overlayed.
MWAR-194 - Warn when inconsistent jar versions are detected during overlay
MWAR-220 - dependencyManagement && overlay + transitive dependency = multiple 
versions of same dependency in WEB-INF/lib
MWAR-33 - jars with differents versions can be in WEB-INF/lib with war as 
dependencies
MWAR-360 - Overlay: ignore WAR which is transitively dependent over JAR

Most of these relate to the fact that overlays are not treated as normal maven 
dependencies.

The code in https://github.com/SciSysUK/maven-plugins/tree/waroverlay 
introduces a new packaging type of "war-overlay", that works in the following 
way:
    - The primary artifact is a jar containing the classes from the overlay
    - Another artifact is attached containing the web content
    - A dependency on a war-overlay will automatically pull both artifacts into 
the packaged war

To use the new type all you need to do is declare <extensions>true</extensions> 
on the maven-war-plugin. There is an integration test example here: 
https://github.com/SciSysUK/maven-plugins/tree/waroverlay/maven-war-plugin/src/it/war-overlay.
 

If someone could review the code I could create a patch and update the site 
documentation.



  was:
There are a number of bugs raised around support for WAR overlays:
MWAR-73 - war overlay mechanism does not work for classes
MWAR-253 - Inherit dependencies from a WAR type dependency when it is overlayed.
MWAR-194 - Warn when inconsistent jar versions are detected during overlay
MWAR-220 - dependencyManagement && overlay + transitive dependency = multiple 
versions of same dependency in WEB-INF/lib
MWAR-33 - jars with differents versions can be in WEB-INF/lib with war as 
dependencies
MWAR-360

Most of these relate to the fact that overlays are not treated as normal maven 
dependencies.

The code in https://github.com/SciSysUK/maven-plugins/tree/waroverlay 
introduces a new packaging type of "war-overlay", that works in the following 
way:
    - The primary artifact is a jar containing the classes from the overlay
    - Another artifact is attached containing the web content
    - A dependency on a war-overlay will automatically pull both artifacts into 
the packaged war

To use the new type all you need to do is declare <extensions>true</extensions> 
on the maven-war-plugin. There is an integration test example here: 
https://github.com/SciSysUK/maven-plugins/tree/waroverlay/maven-war-plugin/src/it/war-overlay.
 

If someone could review the code I could create a patch and update the site 
documentation.




> Patch to provide new war-overlay type
> -------------------------------------
>
>                 Key: MWAR-260
>                 URL: https://issues.apache.org/jira/browse/MWAR-260
>             Project: Maven WAR Plugin
>          Issue Type: Improvement
>          Components: overlay
>    Affects Versions: 2.1.1
>            Reporter: Alex Clarke
>            Priority: Major
>         Attachments: MWAR-260-example.zip
>
>
> There are a number of bugs raised around support for WAR overlays:
> MWAR-73 - war overlay mechanism does not work for classes
> MWAR-253 - Inherit dependencies from a WAR type dependency when it is 
> overlayed.
> MWAR-194 - Warn when inconsistent jar versions are detected during overlay
> MWAR-220 - dependencyManagement && overlay + transitive dependency = multiple 
> versions of same dependency in WEB-INF/lib
> MWAR-33 - jars with differents versions can be in WEB-INF/lib with war as 
> dependencies
> MWAR-360 - Overlay: ignore WAR which is transitively dependent over JAR
> Most of these relate to the fact that overlays are not treated as normal 
> maven dependencies.
> The code in https://github.com/SciSysUK/maven-plugins/tree/waroverlay 
> introduces a new packaging type of "war-overlay", that works in the following 
> way:
>     - The primary artifact is a jar containing the classes from the overlay
>     - Another artifact is attached containing the web content
>     - A dependency on a war-overlay will automatically pull both artifacts 
> into the packaged war
> To use the new type all you need to do is declare 
> <extensions>true</extensions> on the maven-war-plugin. There is an 
> integration test example here: 
> https://github.com/SciSysUK/maven-plugins/tree/waroverlay/maven-war-plugin/src/it/war-overlay.
>  
> If someone could review the code I could create a patch and update the site 
> documentation.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to