From Ingo Schmidt:
>> I am adding a WAR and an EJB to my EAR like so:
>> package(:ear).add :war=>project("webapp-war").package(:war)
>> package(:ear).add :ejb=>project("my-ejb").package(:jar)
>> I run the build and the result is as expected. Now I comment out
>> the line add the EJB to my EAR and run buildr again (no clean
>> task). But my application.xml still has the entry for the EJB.
>> Why is this so? I have seen this happen in other places in buildr,
>> too. Too bad, I didn't write those cases down.
Here's a possible solution, need to see if it will work:
Add the buildfile (Rake.application.rakefile) as a prerequisite for the application.xml task, forcing this task to run every time the build file changes. This will detect changes like removing a component, the downside is that it will re-build the EAR every single time the buildfile changes.
Improve on it by creating the XML in memory, comparing it to the contents of the existing application.xml, and only writing the file if there's a change. That way, the application.xml task will run every time the buildfile changes, but the EAR task will only run if there's a substantial change to application.xml.
>> Is there any way to add a WAR to my EAR as open directory and not
>> as *.war file?
>> I need this because I don't think you can tell IIS to use a *.war file
>> as document root...
>> Is there any way to change/modify the EAR task to do this for me?
>> Would be very handy, because the EAR task so nicely builds the
>> application.xml on the fly.
>> Currently I need to unzip the WAR and modify application.xml by
>> hand. It would just be so much nicer to have it all automated.