[JBoss JIRA] Created: (SHRINKWRAP-229) Should be able to add Packages based on String name
by Aslak Knutsen (JIRA)
Should be able to add Packages based on String name
---------------------------------------------------
Key: SHRINKWRAP-229
URL: https://jira.jboss.org/browse/SHRINKWRAP-229
Project: ShrinkWrap
Issue Type: Feature Request
Components: api, impl-base
Reporter: Aslak Knutsen
Assignee: Aslak Knutsen
Problem:
Adding all classes to a parent package that does not contain a class is not possible. The Parent Package is never created by the jvm etc. You have to manually add all sub packages instead.
Adding classes from a package where no Classes have been loaded from yet is not possible, jvm lazy creates the packages.
e.g. Pakcage.getPackage("my.package") does not exist until a class in "my.package" has been loaded. Workaround is to force load a class e.g. my.package.MyClass.class.getPackage()
Solution:
Add method to ClassContainer API
- addPackage(String packageName)
- addPackages(boolean recursive, String... packageNames)
- addPackages(boolean recursive, Filter<ArchivePath> filter, String... packageNames)
--
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
13 years, 6 months
[JBoss JIRA] Created: (SHRINKWRAP-259) ShrinkWrap.create(ZipImporter.class) Results in Error
by Andrew Rubinger (JIRA)
ShrinkWrap.create(ZipImporter.class) Results in Error
-----------------------------------------------------
Key: SHRINKWRAP-259
URL: https://issues.jboss.org/browse/SHRINKWRAP-259
Project: ShrinkWrap
Issue Type: Bug
Affects Versions: 1.0.0-alpha-12
Reporter: Andrew Rubinger
We haven't mapped ZipImporter as a valid type for creation.
java.lang.RuntimeException: No property value found for key extension
at org.jboss.shrinkwrap.impl.base.ExtensionWrapper.getProperty(ExtensionWrapper.java:61)
at org.jboss.shrinkwrap.impl.base.ServiceExtensionLoader.getExtensionFromExtensionMapping(ServiceExtensionLoader.java:140)
at org.jboss.shrinkwrap.api.ArchiveFactory.create(ArchiveFactory.java:105)
at org.jboss.shrinkwrap.api.ShrinkWrap.create(ShrinkWrap.java:157)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 6 months
[JBoss JIRA] Created: (SHRINKWRAP-218) Add multiple modules at once to EnterpriseArchive
by Michael Schuetz (JIRA)
Add multiple modules at once to EnterpriseArchive
-------------------------------------------------
Key: SHRINKWRAP-218
URL: https://jira.jboss.org/browse/SHRINKWRAP-218
Project: ShrinkWrap
Issue Type: Feature Request
Reporter: Michael Schuetz
At the moment I can add multiple modules to EnterpriseArchiv like this:
final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "test.ear")
.addModule(ejb)
.addModule(war)
.addModule(ArtifactResolver.resolve("org.jboss.seam:jboss-seam:2.2.0.GA"));
Would be nice to shorten this a bit, like this:
final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, "test.ear")
.addModules(ejb, war, ArtifactResolver.resolve("org.jboss.seam:jboss-seam:2.2.0.GA"));
--
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
13 years, 6 months
[JBoss JIRA] Created: (SHRINKWRAP-190) Improve Exception on ClassNotFoundException during addPackage
by Aslak Knutsen (JIRA)
Improve Exception on ClassNotFoundException during addPackage
-------------------------------------------------------------
Key: SHRINKWRAP-190
URL: https://jira.jboss.org/browse/SHRINKWRAP-190
Project: ShrinkWrap
Issue Type: Feature Request
Components: impl-base
Affects Versions: 1.0.0-alpha-10
Reporter: Aslak Knutsen
It's possible to get ClassNotFoundException during addPackage(..) since the Classes found are loaded. If a Class found refers to a Class not in the Classloader.
Currently the Exception states only which class it can not find, it would be helpful to add which Class is being loaded that cause the ClassNotFoundException.
java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInvocation
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at org.jboss.shrinkwrap.impl.base.container.ContainerBase$2.classFound(ContainerBase.java:932)
at org.jboss.shrinkwrap.impl.base.URLPackageScanner.foundClass(URLPackageScanner.java:178)
at org.jboss.shrinkwrap.impl.base.URLPackageScanner.handleArchiveByFile(URLPackageScanner.java:134)
at org.jboss.shrinkwrap.impl.base.URLPackageScanner.handle(URLPackageScanner.java:156)
at org.jboss.shrinkwrap.impl.base.URLPackageScanner.scanPackage(URLPackageScanner.java:107)
at org.jboss.shrinkwrap.impl.base.container.ContainerBase.addPackages(ContainerBase.java:917)
--
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
13 years, 6 months