[
https://jira.jboss.org/jira/browse/SHRINKWRAP-112?page=com.atlassian.jira...
]
Aslak Knutsen commented on SHRINKWRAP-112:
------------------------------------------
Easier said then done atm since the forums seems to be down.. :)
This is the current impl:
http://shrinkwrap.pastebin.com/m58f16a3a
from(String)
- from(new File(String))
from(File)
- File.isFile -> (should delegate to a lookup of a supported importer( based on
extension?)) -> ZipImporter
- File.isDirectory -> ExplodedImporter
from(URL)
- URL.getProtocol == file:// -> from(new File(url))
- URL.getName -> (should delegate to a lookup of a supported importer( based on
extension?)) -> ZipImporter
Looking at the current usage (
http://pastie.org/763558); not supporting this creates a lot
of useless/boilerplate code. :)
It would be more consistent with the rest of the apis use of String if it is a lookup in
the ClassLoader instead..
Create a Unified Importer API
-----------------------------
Key: SHRINKWRAP-112
URL:
https://jira.jboss.org/jira/browse/SHRINKWRAP-112
Project: ShrinkWrap
Issue Type: Feature Request
Reporter: Aslak Knutsen
Assignee: Aslak Knutsen
Importer
from(String)
from(new File(String))
from(File)
File.isFile -> LookupImporterType -> ZipImporter
File.isDirectory -> ExplodedImporter
from(URL)
URL.getFile.isDirectory -> ExplodedImporter
URL.getExtension -> LookupImporterType -> ZipImporter
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira