And that&#39;s why a module system is needed. If people can just add dependencies there will be duplicate (possibly multiple versions) dependencies. Each plugin should be in a separate classloader, and each dependency should be too so that a plugin never breaks other plugins or Forge itself. It would be a big limitation if plugins can&#39;t use libraries otherwise. <div>
<br></div><div>Paul<br><div><br><div class="gmail_quote">On Tue, Apr 19, 2011 at 6:14 PM, Lincoln Baxter, III <span dir="ltr">&lt;<a href="mailto:lincolnbaxter@gmail.com">lincolnbaxter@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
That&#39;s right, but what I&#39;m saying is that I don&#39;t want developers to be responsible for anything but *their code* -- if they have dependencies, those depenencies will be fetched for them (or somehow bundled in the JAR file itself, which is certainly possible, however not my preference.)<br>

<br>If you could write a plugin, reference dependencies in your POM, and have everything *Just Work* don&#39;t you think that would be a friendlier experience?<br><font color="#888888"><br>~Lincoln</font><div><div></div>
<div class="h5"><br><br><div class="gmail_quote">On Mon, Apr 18, 2011 at 5:55 PM, Max Andersen <span dir="ltr">&lt;<a href="mailto:manderse@redhat.com" target="_blank">manderse@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"><div bgcolor="#FFFFFF"><div>But if your plugin uses multiple jars it is not one jar. <div>
<br><br>/max (sent from my phone)<div><br></div></div></div><div><div></div><div><div><br>On 18/04/2011, at 19.06, &quot;Lincoln Baxter, III&quot; &lt;<a href="mailto:lincolnbaxter@gmail.com" target="_blank">lincolnbaxter@gmail.com</a>&gt; wrote:<br>

<br></div><div></div><blockquote type="cite"><div>That doesn&#39;t solve the problem of having to drop jar files onto the classpath in order for plugins to work. I want one JAR per plugin.<br><br>~Lincoln<br><br><div class="gmail_quote">

On Mon, Apr 18, 2011 at 12:59 PM, Max Rydahl Andersen <span dir="ltr">&lt;<a href="mailto:max.andersen@redhat.com" target="_blank"></a><a href="mailto:max.andersen@redhat.com" target="_blank">max.andersen@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"><div><br>
On Apr 18, 2011, at 18:57, Lincoln Baxter, III wrote:<br>
<br>
&gt; I don&#39;t want to force plugin-developers to create modules for every dependency that their plugin requires. That&#39;s why I&#39;ve been avoiding OSGI or JBoss Modules.<br>
<br>
</div>But then you shouldn&#39;t be forcing them to shade either - you should just have one global classloader for the plugins then.<br>
<div><div></div><div><br>
/max<br>
<br>
&gt;<br>
&gt; ~Lincoln<br>
&gt;<br>
&gt; On Mon, Apr 18, 2011 at 12:37 PM, Max Rydahl Andersen &lt;<a href="mailto:max.andersen@redhat.com" target="_blank"></a><a href="mailto:max.andersen@redhat.com" target="_blank">max.andersen@redhat.com</a>&gt; wrote:<br>


&gt;<br>
&gt; &gt; What do you think about using Maven APIs to inspect the POM and fetch dependencies dynamically for each plugin, then isolate them in the plugin&#39;s classloader?<br>
&gt;<br>
&gt; Why not just load them in to one classloader so you don&#39;t have collisions when there are mixed dependencies on Forge it self ?<br>
&gt;<br>
&gt; How about shared data instances ? How does that work ?<br>
&gt;<br>
&gt; ...as a side note...creating our own module system now - I feel that is a very bad direction :(<br>
&gt; Might as well adopt osgi plugin system if you want this kind of separation ?<br>
&gt;<br>
&gt; /max<br>
&gt;<br>
&gt; &gt;<br>
&gt; &gt; ~Lincoln<br>
&gt; &gt;<br>
&gt; &gt; On Mon, Apr 18, 2011 at 11:56 AM, Max Rydahl Andersen &lt;<a href="mailto:max.andersen@redhat.com" target="_blank"></a><a href="mailto:max.andersen@redhat.com" target="_blank">max.andersen@redhat.com</a>&gt; wrote:<br>


&gt; &gt;<br>
&gt; &gt; On Apr 18, 2011, at 15:15, Lincoln Baxter, III wrote:<br>
&gt; &gt;<br>
&gt; &gt; &gt; &quot;if there is a standard location for dependencies&quot;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; What do you mean?<br>
&gt; &gt;<br>
&gt; &gt; Your &quot;standard&quot; for shading is that you put all classes into the plugin.jar.<br>
&gt; &gt;<br>
&gt; &gt; A &quot;standard&quot; for dependencies for a plugin.jar could be &quot;next to the plugin.jar&quot;.<br>
&gt; &gt;<br>
&gt; &gt; Would still have the problem of overlapping jars but then at least its easier to see where the duplication is.<br>
&gt; &gt;<br>
&gt; &gt; /max<br>
&gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Thx,<br>
&gt; &gt; &gt; ~Lincoln<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; On Mon, Apr 18, 2011 at 6:20 AM, Max Rydahl Andersen &lt;<a href="mailto:max.andersen@redhat.com" target="_blank"></a><a href="mailto:max.andersen@redhat.com" target="_blank">max.andersen@redhat.com</a>&gt; wrote:<br>


&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; I was thinking we might already be able to do that using the existing pom.xml metadata that&#39;s stored in the artifact itself, or is that too tricky?<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; if there is a standard location for dependencies then it should be fine - at least better than shading ;)<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; /max<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; On Mon, Apr 11, 2011 at 6:51 PM, Max Andersen &lt;<a href="mailto:manderse@redhat.com" target="_blank"></a><a href="mailto:manderse@redhat.com" target="_blank">manderse@redhat.com</a>&gt; wrote:<br>
&gt; &gt; &gt; &gt; I was thinking Plugin jar having references to dependent jars via manifest.mf<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; /max (sent from my phone)<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; On 12/04/2011, at 00.39, &quot;Lincoln Baxter, III&quot; &lt;<a href="mailto:lincolnbaxter@gmail.com" target="_blank"></a><a href="mailto:lincolnbaxter@gmail.com" target="_blank">lincolnbaxter@gmail.com</a>&gt; wrote:<br>


&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;&gt; Can you give an example of how you would bundle the JARs? (Just put them in /META-INF/dependencies/ ... ?) And would that not cause just as many class conflicts? If you shade/relocate then the deps *should be* completely isolated.<br>



&gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt;&gt; On Mon, Apr 11, 2011 at 4:11 PM, Max Rydahl Andersen &lt;<a href="mailto:max.andersen@redhat.com" target="_blank"></a><a href="mailto:max.andersen@redhat.com" target="_blank">max.andersen@redhat.com</a>&gt; wrote:<br>


&gt; &gt; &gt; &gt;&gt; well, recommending just bundling jars would be a better approach than shading IMO.<br>
&gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt;&gt; /max<br>
&gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt;&gt; On Apr 11, 2011, at 16:00, Lincoln Baxter, III wrote:<br>
&gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt;&gt; &gt; Yeah, shading is currently the recommended approach. Conflicts should be avoided by using relocations. I know this is... not a great method, but for now it&#39;s all we&#39;ve got. Open to suggestions.<br>



&gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt; &gt; &gt; &gt;&gt; &gt; ~Lincoln<br>
&gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt; &gt; &gt; &gt;&gt; &gt; On Mon, Apr 11, 2011 at 3:41 AM, Max Rydahl Andersen &lt;<a href="mailto:max.andersen@redhat.com" target="_blank"></a><a href="mailto:max.andersen@redhat.com" target="_blank">max.andersen@redhat.com</a>&gt; wrote:<br>


&gt; &gt; &gt; &gt;&gt; &gt; Heya,<br>
&gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt; &gt; &gt; &gt;&gt; &gt; Lincoln, I just saw your commits to hibernattools plugin at (<a href="https://github.com/forge/plugin-hibernate-tools/commit/8b208b4a8e79dbb8a01d10d266ee81afd2cf7106" target="_blank"></a><a href="https://github.com/forge/plugin-hibernate-tools/commit/8b208b4a8e79dbb8a01d10d266ee81afd2cf7106" target="_blank">https://github.com/forge/plugin-hibernate-tools/commit/8b208b4a8e79dbb8a01d10d266ee81afd2cf7106</a>)<br>



&gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt; &gt; &gt; &gt;&gt; &gt; Is shading of jars really the recommended approach for plugins in Forge ?<br>
&gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt; &gt; &gt; &gt;&gt; &gt; How are you going to share/avoid collisions of libraries across plugins if they need to bundle via shading ?<br>
&gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt; &gt; &gt; &gt;&gt; &gt; /max<br>
&gt; &gt; &gt; &gt;&gt; &gt; <a href="http://about.me/maxandersen" target="_blank"></a><a href="http://about.me/maxandersen" target="_blank">http://about.me/maxandersen</a><br>
&gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt; &gt; &gt; &gt;&gt; &gt; _______________________________________________<br>
&gt; &gt; &gt; &gt;&gt; &gt; forge-dev mailing list<br>
&gt; &gt; &gt; &gt;&gt; &gt; <a href="mailto:forge-dev@lists.jboss.org" target="_blank"></a><a href="mailto:forge-dev@lists.jboss.org" target="_blank">forge-dev@lists.jboss.org</a><br>
&gt; &gt; &gt; &gt;&gt; &gt; <a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank"></a><a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a><br>


&gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt; &gt; &gt; &gt;&gt; &gt;<br>
&gt; &gt; &gt; &gt;&gt; &gt; --<br>
&gt; &gt; &gt; &gt;&gt; &gt; Lincoln Baxter, III<br>
&gt; &gt; &gt; &gt;&gt; &gt; <a href="http://ocpsoft.com" target="_blank"></a><a href="http://ocpsoft.com" target="_blank">http://ocpsoft.com</a><br>
&gt; &gt; &gt; &gt;&gt; &gt; <a href="http://scrumshark.com" target="_blank"></a><a href="http://scrumshark.com" target="_blank">http://scrumshark.com</a><br>
&gt; &gt; &gt; &gt;&gt; &gt; &quot;Keep it Simple&quot;<br>
&gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt;&gt; /max<br>
&gt; &gt; &gt; &gt;&gt; <a href="http://about.me/maxandersen" target="_blank"></a><a href="http://about.me/maxandersen" target="_blank">http://about.me/maxandersen</a><br>
&gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt; &gt;&gt; --<br>
&gt; &gt; &gt; &gt;&gt; Lincoln Baxter, III<br>
&gt; &gt; &gt; &gt;&gt; <a href="http://ocpsoft.com" target="_blank"></a><a href="http://ocpsoft.com" target="_blank">http://ocpsoft.com</a><br>
&gt; &gt; &gt; &gt;&gt; <a href="http://scrumshark.com" target="_blank"></a><a href="http://scrumshark.com" target="_blank">http://scrumshark.com</a><br>
&gt; &gt; &gt; &gt;&gt; &quot;Keep it Simple&quot;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; --<br>
&gt; &gt; &gt; &gt; Lincoln Baxter, III<br>
&gt; &gt; &gt; &gt; <a href="http://ocpsoft.com" target="_blank"></a><a href="http://ocpsoft.com" target="_blank">http://ocpsoft.com</a><br>
&gt; &gt; &gt; &gt; <a href="http://scrumshark.com" target="_blank"></a><a href="http://scrumshark.com" target="_blank">http://scrumshark.com</a><br>
&gt; &gt; &gt; &gt; &quot;Keep it Simple&quot;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; /max<br>
&gt; &gt; &gt; <a href="http://about.me/maxandersen" target="_blank"></a><a href="http://about.me/maxandersen" target="_blank">http://about.me/maxandersen</a><br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; --<br>
&gt; &gt; &gt; Lincoln Baxter, III<br>
&gt; &gt; &gt; <a href="http://ocpsoft.com" target="_blank"></a><a href="http://ocpsoft.com" target="_blank">http://ocpsoft.com</a><br>
&gt; &gt; &gt; <a href="http://scrumshark.com" target="_blank"></a><a href="http://scrumshark.com" target="_blank">http://scrumshark.com</a><br>
&gt; &gt; &gt; &quot;Keep it Simple&quot;<br>
&gt; &gt;<br>
&gt; &gt; /max<br>
&gt; &gt; <a href="http://about.me/maxandersen" target="_blank"></a><a href="http://about.me/maxandersen" target="_blank">http://about.me/maxandersen</a><br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; --<br>
&gt; &gt; Lincoln Baxter, III<br>
&gt; &gt; <a href="http://ocpsoft.com" target="_blank"></a><a href="http://ocpsoft.com" target="_blank">http://ocpsoft.com</a><br>
&gt; &gt; <a href="http://scrumshark.com" target="_blank"></a><a href="http://scrumshark.com" target="_blank">http://scrumshark.com</a><br>
&gt; &gt; &quot;Keep it Simple&quot;<br>
&gt;<br>
&gt; /max<br>
&gt; <a href="http://about.me/maxandersen" target="_blank"></a><a href="http://about.me/maxandersen" target="_blank">http://about.me/maxandersen</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Lincoln Baxter, III<br>
&gt; <a href="http://ocpsoft.com" target="_blank"></a><a href="http://ocpsoft.com" target="_blank">http://ocpsoft.com</a><br>
&gt; <a href="http://scrumshark.com" target="_blank"></a><a href="http://scrumshark.com" target="_blank">http://scrumshark.com</a><br>
&gt; &quot;Keep it Simple&quot;<br>
<br>
/max<br>
<a href="http://about.me/maxandersen" target="_blank"></a><a href="http://about.me/maxandersen" target="_blank">http://about.me/maxandersen</a><br>
<br>
<br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Lincoln Baxter, III<br><a href="http://ocpsoft.com" target="_blank"></a><a href="http://ocpsoft.com" target="_blank">http://ocpsoft.com</a><br><a href="http://scrumshark.com" target="_blank"></a><a href="http://scrumshark.com" target="_blank">http://scrumshark.com</a><br>

&quot;Keep it Simple&quot;<br>

</div></blockquote></div></div></div></blockquote></div><br><br clear="all"><br></div></div>-- <br><div><div></div><div class="h5">Lincoln Baxter, III<br><a href="http://ocpsoft.com" target="_blank">http://ocpsoft.com</a><br>
<a href="http://scrumshark.com" target="_blank">http://scrumshark.com</a><br>
&quot;Keep it Simple&quot;<br>
</div></div><br>_______________________________________________<br>
forge-dev mailing list<br>
<a href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a><br>
<br></blockquote></div><br></div></div>