[JBoss JIRA] Created: (SHRINKWRAP-244) When calling JavaArchiveImpl.addClass(String, ClassLoader) the TCCL gets used instead
by David Bosschaert (JIRA)
When calling JavaArchiveImpl.addClass(String, ClassLoader) the TCCL gets used instead
-------------------------------------------------------------------------------------
Key: SHRINKWRAP-244
URL: https://jira.jboss.org/browse/SHRINKWRAP-244
Project: ShrinkWrap
Issue Type: Bug
Components: impl-base
Affects Versions: 1.0.0-alpha-12
Reporter: David Bosschaert
When I call JavaArchiveImpl.addClass(String fqcn, ClassLoader cl) the cl gets used to load fqcn, but then further down the line, I find myself in ContainerBase.addPackages(), which is called indirectly from the previous addClass method. The addPackages still uses the TCCL while it should really use the cl passed in to the addClass method.
This also applies to JavaArchiveImpl.addClass(Class cls) where the classloader to be used could be inferred from the cls argument, but instead the TCCL gets used...
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 11 months
[JBoss JIRA] Created: (SHRINKWRAP-235) Add print methods to Archive
by Dan Allen (JIRA)
Add print methods to Archive
----------------------------
Key: SHRINKWRAP-235
URL: https://jira.jboss.org/browse/SHRINKWRAP-235
Project: ShrinkWrap
Issue Type: Feature Request
Components: api, impl-base
Affects Versions: 1.0.0-alpha-11
Reporter: Dan Allen
Priority: Minor
Fix For: 1.0.0-alpha-12
An extremely common use case for the "toString" methods on Archive are to print the contents of the Archive to stdout.
System.out.println(archive.toString(true));
Having to wrap the call in System.out.println is really annoying (even with editor shortcuts). ShrinkWrap should provide parallel print methods, that print to stdout (or perhaps to an optional stream argument).
archive.print()
archive.print(true)
archive.print(Formatter)
* parallel methods that accept a stream if warranted
* I'd also settle for printArchive()
This feature is consistent with the ever popular Exception#printStackTrace().
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years
[JBoss JIRA] Created: (SHRINKWRAP-236) Introduce Asset criteria to find contents in archive
by Dan Allen (JIRA)
Introduce Asset criteria to find contents in archive
-----------------------------------------------------
Key: SHRINKWRAP-236
URL: https://jira.jboss.org/browse/SHRINKWRAP-236
Project: ShrinkWrap
Issue Type: Feature Request
Components: api, impl-base
Affects Versions: 1.0.0-alpha-11
Reporter: Dan Allen
The read capabilities on Archive are largely inadequate. You can get the content by an archive path or you can flip through all the content and filter the results by path name. However, there are much more logical structures inside the archive that ShrinkWrap does not expose an API to locate. For instance, I want to pull out one or more WebModules from an EnterpriseArchive.
However, if we were to introduce a closed set of read methods, the user would eventual outgrow them and find themselves in the same position. My recommendation is to follow the lead of Weld Extensions and use an Archive criteria API. I believe it's a good choice because it feels familiar to Java EE developers with it's JPA-like syntax and it's completely extensible.
For example:
ArchiveContentQuery<EnterpriseArchive> query = ArchiveContentQueries.<EnterpriseArchive>createQuery(EnterpriseArchive.class)
.addCriteria(new TypedAssetCriteria(WebArchive.class));
List<WebArchive> wars = query.getResuiltList();
This is so much simpler than using a filter on a tree walker. It's also crucial for manipulation of the Archive within Arquillian.
see http://docs.jboss.org/weld/extensions/reference/latest/en-US/html/propert...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years