Details
-
Type:
New Feature
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: future
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
Users need to be able to control exactly how artefacts in .sar are extracted, updated, deleted etc. The best way is to allow the user to specify a new configuration file such as;
SAR-INF/filesystem.xml
In it we would contain a list of file filesets and associated actions to take with the filesets. Some example actions include;
- extract to temporary work directory when deployed
- extract to base directory of application
- when upgrading a .sar (ie .sar is newer) then extract this
- when upgrading a .sar (ie .sar is newer) then extract this if and only if there is no corresponding file with a modify time greater than file in .sar file
A sample descriptor may be
<filesystem version="1.0">
<extractToBaseDir>
<fileset dir="SAR-INF">
<include name="*.xml"/>
</fileset>
<fileset dir=".">
<exclude name="SAR-INF/**"/>
</fileset>
</extractToBaseDir>
<extractToWorkDir>
<fileset dir=".">
<include name="SAR-INF//*"/>
</fileset>
</extractToWorkDir>
</filesystem>
You can use the PatternMatcher from Spice to perform the pattern matching.