Thats for the bootstrap classloaders.<br>Your approach wont work for the deployment classloaders.<br>They take their resource sources from the urls within the package and the rest come from imports/requirements.<br><br>If you wrote a jboss-classloading ivy resolver, then all you'd have to do is specify the requirements.<br>
It would work in the bootstrap and for deployments.<br><br>It would also make your configs source agnostic.<br><br><div class="gmail_quote">On Wed, Jul 14, 2010 at 9:31 AM, Carlo de Wolf <span dir="ltr"><<a href="mailto:cdewolf@redhat.com">cdewolf@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">It's very similar to your stuff, Bill.<br>
<br>
First I define a repo-classloader:<br>
<a href="http://anonsvn.jboss.org/repos/jbossas/projects/reloaded/trunk/repoclassloader/src/test/resources/conf/bootstrap/repo.xml" target="_blank">http://anonsvn.jboss.org/repos/jbossas/projects/reloaded/trunk/repoclassloader/src/test/resources/conf/bootstrap/repo.xml</a><br>
<br>
The not so nice magic bit is that RepoResolver is injected into<br>
RepoClassLoaderPolicyModule. That bit should really be reflected in the<br>
repo.xml.<br>
<br>
And then I put inline ivy descriptor elements:<br>
<a href="http://anonsvn.jboss.org/repos/jbossas/projects/reloaded/trunk/repoclassloader/src/test/resources/conf/bootstrap/aop.xml" target="_blank">http://anonsvn.jboss.org/repos/jbossas/projects/reloaded/trunk/repoclassloader/src/test/resources/conf/bootstrap/aop.xml</a><br>
<br>
It works with $HOME/.m2/repository or any other Maven / Ivy repository.<br>
<br>
I even have a booting AS 5.0.1 with it:<br>
<a href="http://anonsvn.jboss.org/repos/jbossas/projects/reloaded/trunk/as5_0_1-profile/" target="_blank">http://anonsvn.jboss.org/repos/jbossas/projects/reloaded/trunk/as5_0_1-profile/</a><br>
<font color="#888888"><br>
Carlo<br>
</font><div><div></div><div class="h5"><br>
On 07/14/2010 05:26 AM, Andrew Lee Rubinger wrote:<br>
> We've been discussing similar problems from within the ShrinkWrap context.<br>
><br>
> The idea is that we want to say something like:<br>
><br>
> JavaArchive archive = MavenArchive.create("groupId:artifactId:classifier");<br>
><br>
> Sure, you can look by default in some hardcoded repos (JBoss Nexus, then<br>
> ~/.m2/repository/, etc), but this negates the configuration to have:<br>
><br>
> 1) Alternate external repos<br>
> 2) Alternate local repos in a non-default location (which is usually<br>
> specified in some settings.xml, also may be located in a non-default<br>
> location)<br>
><br>
> At first glance I figure the grammar above is fine for defaults, but we<br>
> *must* hook in a configuration option somehow to define overrides,<br>
> preferably from some settings.xml format located *somewhere*. We<br>
> haven't yet settled on an intelligent/intuitive way of providing this<br>
> hook without muddying the API however.<br>
><br>
> Awesome feature for<classloader> in VFS, BTW. Carlo did a similar one<br>
> as well in the Reloaded prototype, using a backing Ivy library to do the<br>
> resolution off a known/configured Maven2 repo structure.<br>
><br>
> S,<br>
> ALR<br>
><br>
> On 07/13/2010 07:55 PM, Bill Burke wrote:<br>
><br>
>> I've made a small change to jboss-classloading-vfs in my working copy so<br>
>> that you can define a<maven-artifact> within a beans<classloader><br>
>> declaration, i.e.:<br>
>><br>
>> <classloader name="resteasy-classloader"<br>
>> xmlns="urn:jboss:classloader:1.0" export-all="NON_EMPTY" import-all="true"><br>
>><br>
>> <maven-artifact>org.jboss.resteasy:resteasy-jaxrs:2.0-RC1</maven-artifact><br>
>><br>
>> <maven-artifact>org.jboss.resteasy:async-http-servlet-3.0:2.0-RC1</maven-artifact><br>
>> </classloader><br>
>><br>
>> It has no dependency on the profile service (not sure why Scott/Julien<br>
>> wanted to do it that way anyways), just a simple change to the<br>
>> VFSClassLoaderPolicyModule and XML metadata classes.<br>
>><br>
>> I currently have it hardcoded to look in $HOME/.m2/repository for maven<br>
>> artifacts, and it assumes the .jar name can be discovered from the<br>
>> artifact URI.<br>
>><br>
>> Any interest and moving this forward at all? The idea would be to look<br>
>> for artifacts in this order:<br>
>><br>
>> 1. $JBOSS_MAVEN_REPOSITORY<br>
>> 2. $JBOSS_HOME/maven-repository<br>
>> 3. $HOME/.m2/repository<br>
>><br>
>> The repository would have to be on local disk. This would greatly<br>
>> reduce our distribution size as there would be no copies of jars<br>
>> anywhere. It would also help development as you would not have to keep<br>
>> rebuilding the AS distribution, or manually copying jar files to test<br>
>> individual work you are doing. It would just be a change to the<br>
>> artifact declaration.<br>
>><br>
>> The work would be in creating a<classloader> entry in each deployment<br>
>> and creating the $JBOSS_HOME/maven-repository. A maven plugin could be<br>
>> written to create a beans file with classloader info in it. The only<br>
>> problem I see with that is some deployment units have multiple beans.xml<br>
>> files and I don't know if<classloader> is processed in all beans.xml<br>
>> first before the bean metadata.<br>
>><br>
>> I also might need some help if there are any scoping issues as the<br>
>> classloader code is a spaghetti mess.<br>
>><br>
>><br>
>><br>
> _______________________________________________<br>
> jboss-development mailing list<br>
> <a href="mailto:jboss-development@lists.jboss.org">jboss-development@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/jboss-development" target="_blank">https://lists.jboss.org/mailman/listinfo/jboss-development</a><br>
><br>
<br>
_______________________________________________<br>
jboss-development mailing list<br>
<a href="mailto:jboss-development@lists.jboss.org">jboss-development@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/jboss-development" target="_blank">https://lists.jboss.org/mailman/listinfo/jboss-development</a><br>
</div></div></blockquote></div><br>