[weld-issues] [JBoss JIRA] Commented: (WELDX-81) Add support for onejar-maven-plugin
Koichi Kobayashi (JIRA)
jira-events at lists.jboss.org
Fri Feb 26 11:08:16 EST 2010
[ https://jira.jboss.org/jira/browse/WELDX-81?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12517036#action_12517036 ]
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
More information about the weld-issues
mailing list