[JBoss JIRA] Created: (SHRINKWRAP-247) Support recursive addition of web resources
by Karel Piwko (JIRA)
Support recursive addition of web resources
--------------------------------------------
Key: SHRINKWRAP-247
URL: https://issues.jboss.org/browse/SHRINKWRAP-247
Project: ShrinkWrap
Issue Type: Feature Request
Affects Versions: 1.0.0-alpha-11
Reporter: Karel Piwko
Assignee: Karel Piwko
Priority: Critical
Fix For: 1.0.0-alpha-12
There should be a similar way to include web resources recursively as for classes.
Imagine that you would like to build a complete WAR used for functional tests, than the deployment method body will look like:
WebArchive war = ShrinkWrap.create(WebArchive.class, "practice0x-testing.war")
.addLibraries(Dependencies.use(MavenDependencies.class).resolveFrom("pom.xml", new ScopeFilter("", "compile")))
.addPackages(true, NO_TEST_CLASSES, org.jboss.lectures.auction.AuctionManager.class.getPackage())
.addResource(new File("src/main/webapp/detail.xhtml"), ArchivePaths.create("detail.xhtml"))
.addResource(new File("src/main/webapp/index.html"), ArchivePaths.create("index.html"))
.addResource(new File("src/main/webapp/list.xhtml"), ArchivePaths.create("list.xhtml"))
.addResource(new File("src/main/webapp/myAuctions.xhtml"), ArchivePaths.create("myAuctions.xhtml"))
.addResource(new File("src/main/webapp/myOverview.xhtml"), ArchivePaths.create("myOverview.xhtml"))
.addResource(new File("src/main/webapp/newAuction.xhtml"), ArchivePaths.create("newAuction.xhtml"))
.addResource(new File("src/main/webapp/newAuctionDetails.xhtml"), ArchivePaths.create("newAuctionDetails.xhtml"))
.addResource(new File("src/main/webapp/newAuctionSummary.xhtml"), ArchivePaths.create("newAuctionSummary.xhtml"))
.addResource(new File("src/main/webapp/script.js"), ArchivePaths.create("script.js"))
.addResource(new File("src/main/webapp/style.css"), ArchivePaths.create("style.css"))
.addResource(new File("src/main/webapp/style.ie6.css"), ArchivePaths.create("style.ie6.css"))
.addResource(new File("src/main/webapp/style.ie7.css"), ArchivePaths.create("style.ie7.css"))
.addResource(new File("src/main/webapp/images/01.png"), ArchivePaths.create("images/01.png"))
.addResource(new File("src/main/webapp/images/02.png"), ArchivePaths.create("images/02.png"))
.addResource(new File("src/main/webapp/images/03.png"), ArchivePaths.create("images/03.png"))
.addResource(new File("src/main/webapp/images/Block-h.png"), ArchivePaths.create("images/Block-h.png"))
.addResource(new File("src/main/webapp/images/Block-s.png"), ArchivePaths.create("images/Block-s.png"))
.addResource(new File("src/main/webapp/images/Block-v.png"), ArchivePaths.create("images/Block-v.png"))
.addResource(new File("src/main/webapp/images/BlockContentBullets.png"), ArchivePaths.create("images/BlockContentBullets.png"))
.addResource(new File("src/main/webapp/images/BlockHeader.png"), ArchivePaths.create("images/BlockHeader.png"))
.addResource(new File("src/main/webapp/images/BlockHeaderIcon.png"), ArchivePaths.create("images/BlockHeaderIcon.png"))
.addResource(new File("src/main/webapp/images/Button.png"), ArchivePaths.create("images/Button.png"))
.addResource(new File("src/main/webapp/images/Footer.png"), ArchivePaths.create("images/Footer.png"))
.addResource(new File("src/main/webapp/images/Header.jpg"), ArchivePaths.create("images/Header.jpg"))
.addResource(new File("src/main/webapp/images/Header.png"), ArchivePaths.create("images/Header.png"))
.addResource(new File("src/main/webapp/images/MenuItem.png"), ArchivePaths.create("images/MenuItem.png"))
.addResource(new File("src/main/webapp/images/Page-BgGlare.png"), ArchivePaths.create("images/Page-BgGlare.png"))
.addResource(new File("src/main/webapp/images/Page-BgSimpleGradient.jpg"), ArchivePaths.create("images/Page-BgSimpleGradient.jpg"))
.addResource(new File("src/main/webapp/images/PostQuote.png"), ArchivePaths.create("images/PostQuote.png"))
.addResource(new File("src/main/webapp/images/Sheet-h.png"), ArchivePaths.create("images/Sheet-h.png"))
.addResource(new File("src/main/webapp/images/Sheet-s.png"), ArchivePaths.create("images/Sheet-s.png"))
.addResource(new File("src/main/webapp/images/Sheet-v.png"), ArchivePaths.create("images/Sheet-v.png"))
.addResource(new File("src/main/webapp/images/contact.jpg"), ArchivePaths.create("images/contact.jpg"))
.addResource(new File("src/main/webapp/images/link photo.txt"), ArchivePaths.create("images/link photo.txt"))
.addResource(new File("src/main/webapp/images/nav.png"), ArchivePaths.create("images/nav.png"))
.addResource(new File("src/main/webapp/images/rssIcon.png"), ArchivePaths.create("images/rssIcon.png"))
.addResource(new File("src/main/webapp/images/spacer.gif"), ArchivePaths.create("images/spacer.gif"))
.addResource(new File("src/main/webapp/images/spectacles.gif"), ArchivePaths.create("images/spectacles.gif"))
.addResource(new File("src/main/webapp/images/subitem-bg.png"), ArchivePaths.create("images/subitem-bg.png"))
.addResource(new File("src/main/webapp/resources/auction/auctionList.xhtml"), ArchivePaths.create("resources/auction/auctionList.xhtml"))
.addResource(new File("src/main/webapp/resources/auction/menuItem.xhtml"), ArchivePaths.create("resources/auction/menuItem.xhtml"))
.addResource(new File("src/main/webapp/templates/home.xhtml"), ArchivePaths.create("templates/home.xhtml"))
.addResource(new File("src/main/webapp/templates/menu.xhtml"), ArchivePaths.create("templates/menu.xhtml"))
.addResource(new File("src/main/webapp/templates/login.xhtml"), ArchivePaths.create("templates/login.xhtml"))
.addWebResource(new File("src/main/webapp/WEB-INF/beans.xml"), "beans.xml")
.addWebResource(new File("src/main/webapp/WEB-INF/faces-config.xml"), "faces-config.xml")
.addWebResource(new File("src/main/webapp/WEB-INF/jboss-scanning.xml"), "jboss-scanning.xml")
.addWebResource(new File("src/main/resources/import.sql"), ArchivePaths.create("classes/import.sql"))
.addManifestResource(new File("src/main/resources/META-INF/persistence.xml"))
.setWebXML(new File("src/main/webapp/WEB-INF/web.xml"));
This could be massively reduced using a recursive addResources() call with a filter.
(ommiting incomming API changes in SHRINKWRAP-241)
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 10 months
[JBoss JIRA] Created: (SHRINKWRAP-249) Support add directory content
by Aslak Knutsen (JIRA)
Support add directory content
-----------------------------
Key: SHRINKWRAP-249
URL: https://issues.jboss.org/browse/SHRINKWRAP-249
Project: ShrinkWrap
Issue Type: Feature Request
Components: api, impl-base
Affects Versions: 1.0.0-alpha-11
Reporter: Aslak Knutsen
A common use case is to add multiple Assets from your directory structure:
addManifestResource("src/main/resources/META-INF/name", "name")
addManifestResource("src/main/resources/META-INF/name2", "name2")
This can be quite painful if you have a lot of items, e.g. html/jsp/jsf
We should support adding of recursive directory content, where target path is resolved as relative to where you add from:
addManifestResource("src/main/resources/META-INF/")
The expected target in the archive would be, root + CONTAINER_PATH + ('file.getName()' + parentDirectory if in a subdirectory of specified import source )
src/main/resources/META-INF/test.html -> (CONTAINER_PATH) + test.html
src/main/resources/META-INF/images/test.jpg -> (CONTAINER_PATH) + images/test.jpg
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 11 months
[JBoss JIRA] Created: (SHRINKWRAP-85) Support Event/Listener style callbacks
by Aslak (JIRA)
Support Event/Listener style callbacks
--------------------------------------
Key: SHRINKWRAP-85
URL: https://jira.jboss.org/jira/browse/SHRINKWRAP-85
Project: ShrinkWrap
Issue Type: Feature Request
Reporter: Aslak
A interesting featre would be to beablt to add listeners for events on ContainerTypes or paths.
/META-INF/* or all events generated via ClassContainer
usecase 1, if/when we add something like a ManifestDescriptor, instead of having it like the WebArchiveDescriptor.addServlet, adding a addMenifestLibrary that delegates down to addLibrary and update the 'classpath: ' manifest entry.. we could register a listener on the LibraryContainer and get callbacks when a 'normal' addLibrary happens
usecase 2, could deploy a 'live' archive to embedded.. one could register a listener on all changes in the archive and auto redeploy it on events..
deploy it once, redeploy on change
--
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
12 years, 1 month