[JBoss JIRA] Created: (SHRINKDESC-33) Descriptors API forces classloading for configuration
by Lincoln Baxter III (JIRA)
Descriptors API forces classloading for configuration
-----------------------------------------------------
Key: SHRINKDESC-33
URL: https://issues.jboss.org/browse/SHRINKDESC-33
Project: ShrinkWrap Descriptors
Issue Type: Enhancement
Components: api
Affects Versions: 0.1.0
Reporter: Lincoln Baxter III
The beans descriptor contains methods for specifying various interceptors, decorators, and alternatives, but requires that the Class<?> instance for said artifacts be provided to the API. This is not practical because it requires that the target classes be Classloaded in order for descriptor alteration to take place.
Descriptor APIs should accept String values wherever a qualified Class name is required by the descriptor. It should not be assumed that the class instance is available:
public interface BeansDescriptor extends Descriptor
{
BeansDescriptor interceptors(String... classes);
BeansDescriptor interceptor(String clazz);
BeansDescriptor decorators(String... classes);
BeansDescriptor decorator(String clazz);
BeansDescriptor alternativeClasses(String... classes);
BeansDescriptor alternativeClass(String clazz);
BeansDescriptor alternativeStereotypes(String... annotations);
BeansDescriptor alternativeStereotype(String clazz);
BeansDescriptor interceptors(Class<?>... classes);
BeansDescriptor interceptor(Class<?> clazz);
BeansDescriptor decorators(Class<?>... classes);
BeansDescriptor decorator(Class<?> clazz);
BeansDescriptor alternativeClasses(Class<?>... classes);
BeansDescriptor alternativeClass(Class<?> clazz);
BeansDescriptor alternativeStereotypes(Class<? extends Annotation>... annotations);
BeansDescriptor alternativeStereotype(Class<? extends Annotation> clazz);
}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 4 months
[JBoss JIRA] Created: (SHRINKWRAP-265) MavenDependencyResolver.resolveAs is misleading
by Samuel Santos (JIRA)
MavenDependencyResolver.resolveAs is misleading
-----------------------------------------------
Key: SHRINKWRAP-265
URL: https://issues.jboss.org/browse/SHRINKWRAP-265
Project: ShrinkWrap
Issue Type: Task
Components: ext-resolver
Affects Versions: 1.0.0-alpha-12
Reporter: Samuel Santos
Assignee: Samuel Santos
The method name {{resolveAs}} is misleading as it does not imply any dependencies.
We should refactor it into two distinct methods:
{code}
<T extends Archive<T>> Collection<T> MavenDependencyResolver.resolveWithDependenciesAs(T type); // return the Maven artifact and its dependencies
<T extends Archive<T>> T MavenDependencyResolver.resolveAs(T type); // return the artifact without any dependencies
{code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 7 months
[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, 11 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, 12 months