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&#39;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">&lt;<a href="mailto:cdewolf@redhat.com">cdewolf@redhat.com</a>&gt;</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&#39;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>
&gt; We&#39;ve been discussing similar problems from within the ShrinkWrap context.<br>
&gt;<br>
&gt; The idea is that we want to say something like:<br>
&gt;<br>
&gt; JavaArchive archive = MavenArchive.create(&quot;groupId:artifactId:classifier&quot;);<br>
&gt;<br>
&gt; Sure, you can look by default in some hardcoded repos (JBoss Nexus, then<br>
&gt; ~/.m2/repository/, etc), but this negates the configuration to have:<br>
&gt;<br>
&gt; 1) Alternate external repos<br>
&gt; 2) Alternate local repos in a non-default location (which is usually<br>
&gt; specified in some settings.xml, also may be located in a non-default<br>
&gt; location)<br>
&gt;<br>
&gt; At first glance I figure the grammar above is fine for defaults, but we<br>
&gt; *must* hook in a configuration option somehow to define overrides,<br>
&gt; preferably from some settings.xml format located *somewhere*.  We<br>
&gt; haven&#39;t yet settled on an intelligent/intuitive way of providing this<br>
&gt; hook without muddying the API however.<br>
&gt;<br>
&gt; Awesome feature for&lt;classloader&gt;  in VFS, BTW.  Carlo did a similar one<br>
&gt; as well in the Reloaded prototype, using a backing Ivy library to do the<br>
&gt; resolution off a known/configured Maven2 repo structure.<br>
&gt;<br>
&gt; S,<br>
&gt; ALR<br>
&gt;<br>
&gt; On 07/13/2010 07:55 PM, Bill Burke wrote:<br>
&gt;<br>
&gt;&gt; I&#39;ve made a small change to jboss-classloading-vfs in my working copy so<br>
&gt;&gt; that you can define a&lt;maven-artifact&gt;   within a beans&lt;classloader&gt;<br>
&gt;&gt; declaration, i.e.:<br>
&gt;&gt;<br>
&gt;&gt;       &lt;classloader name=&quot;resteasy-classloader&quot;<br>
&gt;&gt; xmlns=&quot;urn:jboss:classloader:1.0&quot; export-all=&quot;NON_EMPTY&quot; import-all=&quot;true&quot;&gt;<br>
&gt;&gt;<br>
&gt;&gt; &lt;maven-artifact&gt;org.jboss.resteasy:resteasy-jaxrs:2.0-RC1&lt;/maven-artifact&gt;<br>
&gt;&gt;<br>
&gt;&gt; &lt;maven-artifact&gt;org.jboss.resteasy:async-http-servlet-3.0:2.0-RC1&lt;/maven-artifact&gt;<br>
&gt;&gt;       &lt;/classloader&gt;<br>
&gt;&gt;<br>
&gt;&gt; It has no dependency on the profile service (not sure why Scott/Julien<br>
&gt;&gt; wanted to do it that way anyways), just a simple change to the<br>
&gt;&gt; VFSClassLoaderPolicyModule and XML metadata classes.<br>
&gt;&gt;<br>
&gt;&gt; I currently have it hardcoded to look in $HOME/.m2/repository for maven<br>
&gt;&gt; artifacts, and it assumes the .jar name can be discovered from the<br>
&gt;&gt; artifact URI.<br>
&gt;&gt;<br>
&gt;&gt; Any interest and moving this forward at all?  The idea would be to look<br>
&gt;&gt; for artifacts in this order:<br>
&gt;&gt;<br>
&gt;&gt; 1. $JBOSS_MAVEN_REPOSITORY<br>
&gt;&gt; 2. $JBOSS_HOME/maven-repository<br>
&gt;&gt; 3. $HOME/.m2/repository<br>
&gt;&gt;<br>
&gt;&gt; The repository would have to be on local disk.  This would greatly<br>
&gt;&gt; reduce our distribution size as there would be no copies of jars<br>
&gt;&gt; anywhere.  It would also help development as you would not have to keep<br>
&gt;&gt; rebuilding the AS distribution, or manually copying jar files to test<br>
&gt;&gt; individual work you are doing.  It would just be a change to the<br>
&gt;&gt; artifact declaration.<br>
&gt;&gt;<br>
&gt;&gt; The work would be in creating a&lt;classloader&gt;   entry in each deployment<br>
&gt;&gt; and creating the $JBOSS_HOME/maven-repository.  A maven plugin could be<br>
&gt;&gt; written to create a beans file with classloader info in it.  The only<br>
&gt;&gt; problem I see with that is some deployment units have multiple beans.xml<br>
&gt;&gt;     files and I don&#39;t know if&lt;classloader&gt;   is processed in all beans.xml<br>
&gt;&gt; first before the bean metadata.<br>
&gt;&gt;<br>
&gt;&gt; I also might need some help if there are any scoping issues as the<br>
&gt;&gt; classloader code is a spaghetti mess.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt; _______________________________________________<br>
&gt; jboss-development mailing list<br>
&gt; <a href="mailto:jboss-development@lists.jboss.org">jboss-development@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/jboss-development" target="_blank">https://lists.jboss.org/mailman/listinfo/jboss-development</a><br>
&gt;<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>