jira-importer commented on issue #232:
URL: 
https://github.com/apache/maven-war-plugin/issues/232#issuecomment-2967854505

   **[Brian E. Fox 
(imported)](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=bri...@infinity.nu)**
 commented
   
   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.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to