]
Andrew Rubinger updated SHRINKWRAP-304:
---------------------------------------
Status: Resolved (was: Pull Request Sent)
Assignee: Davide D'Alto
Fix Version/s: 1.0.0-beta-6
Resolution: Done
Upstream:
Add option for omitting archive extension from exploded directory
name
----------------------------------------------------------------------
Key: SHRINKWRAP-304
URL:
https://issues.jboss.org/browse/SHRINKWRAP-304
Project: ShrinkWrap
Issue Type: Enhancement
Components: api
Affects Versions: 1.0.0-beta-2
Reporter: Ian Brandt
Assignee: Davide D'Alto
Fix For: 1.0.0-beta-6
It would be nice if ExplodedExporter offered the option of omitting the archive extension
from the exploded directory name.
h5. Current Method:
{code:java}
/**
* 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);
{code}
h5. Current Example:
{code:java}
Archive webArchive = ShrinkWrap.create(WebArchive.class, "test.war");
File explodedDirectory =
webArchive.as(ExplodedExporter.class).exportExploded(tmpDirectory);
System.out.println(explodedDirectory.getName()) // "test.war"
{code}
h5. Proposed Method Overload:
{code:java}
/**
* 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);
{code}
h5. Proposed Example
{code:java}
Archive webArchive = ShrinkWrap.create(WebArchive.class, "test.war");
File explodedDirectory =
webArchive.as(ExplodedExporter.class).exportExploded(tmpDirectory, true);
System.out.println(explodedDirectory.getName()) // "test"
{code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: