Details
-
Enhancement
-
Resolution: Done
-
Major
-
1.0.0-beta-2
-
None
Description
It would be nice if ExplodedExporter offered the option of omitting the archive extension from the exploded directory name.
Current Method:
/** * Exports provided archive as an exploded directory structure. * * @param archive * @param parentDirectory Must be a folder * @return File for exploded archive contents * @throws IllegalArgumentException if the archive or parent directory not valid * @throws ArchiveExportException if the export process fails */ File exportExploded(File parentDirectory);
Current Example:
Archive webArchive = ShrinkWrap.create(WebArchive.class, "test.war"); File explodedDirectory = webArchive.as(ExplodedExporter.class).exportExploded(tmpDirectory); System.out.println(explodedDirectory.getName()) // "test.war"
Proposed Method Overload:
/** * Exports provided archive as an exploded directory structure. * * @param archive * @param parentDirectory Must be a folder * @param omitExtension Whether to omit the archive extension from the exploded directory name * @return File for exploded archive contents * @throws IllegalArgumentException if the archive or parent directory not valid * @throws ArchiveExportException if the export process fails */ File exportExploded(File parentDirectory, boolean omitExtension);
Proposed Example
Archive webArchive = ShrinkWrap.create(WebArchive.class, "test.war"); File explodedDirectory = webArchive.as(ExplodedExporter.class).exportExploded(tmpDirectory, true); System.out.println(explodedDirectory.getName()) // "test"
Attachments
Issue Links
- relates to
-
SHRINKWRAP-196 Strip the extension from the archive name when setting the context path for the WebAppContext
- Closed