[
https://jira.jboss.org/jira/browse/WELDX-81?page=com.atlassian.jira.plugi...
]
Koichi Kobayashi commented on WELDX-81:
---------------------------------------
I think that Weld SE should be configurable than Weld SE supports one jar directly.
for example,
public abstract class SEWeldDeployment implements Deployment {
public SEWeldDeployment() { this(new SEBeanDeploymentArchive()); }
public SEWeldDeployment(BeanDeploymentArchive beanDeploymentArchive) {...}
...
}
public class SEBeanDeploymentArchive implements BeanDeploymentArchive {
public SEBeanDeploymentArchive() { this(new SEWeldDiscovery() {}); }
public SEBeanDeploymentArchive(SEWeldDiscovery wbDiscovery) {...}
...
}
public abstract class SEWeldDiscovery {
public SEWeldDiscovery() { this(new URLScanner(Reflections.getClassLoader(), this)); }
public SEWeldDiscovery(Scanner scanner) {
this.wbClasses = new HashSet<Class<?>>();
this.wbUrls = new HashSet<URL>();
scan(scanner);
}
private void scan(Scanner scanner) {
scanner.scanResources(new String[] { "META-INF/beans.xml" });
}
...
}
public class Weld {
public Weld() { this(new SEWeldDeployment() {}); }
public Weld(Deployment deployment) {...}
...
}
then, Pieter can use custom Scanner for one jar:
SEWeldDiscovery discovery = new SEWeldDiscovery(new OneJarScanner()) {};
BeanDeploymentArchive deploymentArchive = new SEBeanDeploymentArchive(discovery);
Deployment deployment = new SEWeldDeployment(deploymentArchive) {};
WeldContainer weld = new Weld(deployment).initialize();
...
Add support for onejar-maven-plugin
-----------------------------------
Key: WELDX-81
URL:
https://jira.jboss.org/jira/browse/WELDX-81
Project: Weld Extensions
Issue Type: Feature Request
Components: Weld Extensions
Reporter: Pieter Martin
Attachments: onejar-maven-plugin-patch.txt
The onejar-maven-plugin
http://code.google.com/p/onejar-maven-plugin packages a project
with all its dependencies into a single jar. The dependencies being nested jars inside the
one jar.
This is a nice way to make an executable jar for a java-se standalone project.
However the current org.jboss.weld.environment.se.discovery.URLScanner does not support
this as the classes are not in the expected place.
Attached is a first attempt at modifying the URLScanner to support the
onejar-maven-plugin
--
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