[ http://jira.codehaus.org/browse/MWAR-66?page=comments#action_74241 ] 
            
Brian Fox commented on MWAR-66:
-------------------------------

I think that the configuration for layering order should also provide the 
ability to define where to layer to current project because I think the current 
method of building the project and then placing wars on top is backward. 

I had to solve this problem back in early M2 days before war had overlay 
support. I create wars that are intended to be repackaged by excluding all jars 
and some various other files I don't want included (we create 2 wars, one that 
can be run standalone for unit testing and one that is deployed). In the war 
that does the repackaging, I use the dependency plugin to unpack the first war 
into the target folder where the war plugin does the inplace processing. This 
broke because between beta2 and 2.0.1, code was added to check the file 
timestamp. If the timestamp in the project is older than the one being 
unpacked, then it isn't used, even though we intend it to.

There is no way to make this work perfectly just by checking timestamps. If we 
have setup like this:
WAR A
WAR B

Where WAR B extends WAR A. They expect that if they change and build WAR A and 
then build WAR B, those changes are viewed immediately. If you mess with the 
timestamp comparison, this wouldn't be possible. 

The only way to make this work in all cases, is to unpack the dependencies in a 
defined order, and then stack the current project on top and ignore timestamps. 
This guarantees a set order of inheritence where the last to be stacked wins.




> No control over war overlay order
> ---------------------------------
>
>                 Key: MWAR-66
>                 URL: http://jira.codehaus.org/browse/MWAR-66
>             Project: Maven 2.x War Plugin
>          Issue Type: Bug
>    Affects Versions: 2.0.1
>            Reporter: Brian Fox
>
> In order to do proper overlaying of the wars, we must have exact control over 
> the order of layering. Currently the wars are specified in the dependencies 
> and there's no guarantee to the order. The only solution that comes to mind 
> is additional configuration in the war plugin to specify the order like:
> <configuration>
>    <overlays>
>        <overlay>group-artifact-version-type</overlay>
>        <overlay>group-artifact-version-type</overlay>
>        <overlay>group-artifact-version-type</overlay>
>     </overlays>
> </configuration>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to