I like the idea of a drop-in file set.<div><br></div><div>I suggest reconsidering the heavily nested structure. One thing that people really love about RoR, Grails and so forth is that they don&#39;t overcomplicate things. A prime example is folders. In Java we are obsessed with this idea of prefixing everything with a domain name so that common names will ever have a remote chance of conflicting. But are their really going to be like a hundred tools named forge? or even two?</div>

<div><br></div><div>Having said all that, here&#39;s my suggestion:</div><div><br></div><div>src/main/resources/forge/scaffolding</div><div><br></div><div>or, to be less technology specific w/ regards to the scaffolding</div>

<div><br></div><div>src/main/resources/scaffolding</div><div><br></div><div>As Lincoln likes to say, keep it simple. Lincoln, is this inline with your motto?</div><div><br></div><div>-Dan<br><div><br><div class="gmail_quote">

On Tue, Jan 3, 2012 at 14:40, Richard Kennard <span dir="ltr">&lt;<a href="mailto:richard@kennardconsulting.com">richard@kennardconsulting.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Lincoln,<br>
<br>
I don&#39;t think this should be an API. It needs to be something users can &#39;drop in&#39; without needing to compile any code.<br>
<br>
I&#39;m fine with a single folder called &#39;/resources&#39;. I chose that name to mirror Maven /src/main/resources, since the subfolder structure from then on should<br>
be the same. This&#39;d help people who are digging around in the plugin code to determine what resource names they needed to override.<br>
<br>
&#39;/resources&#39; then gets added to Forge&#39;s classpath as the first thing on the list. So when I do...<br>
<br>
.getResource(&quot;org/jboss/forge/scaffold/faces/scaffold/create.xhtml&quot;); or<br>
compiler.compile(&quot;org/jboss/forge/scaffold/faces/scaffold/create.xhtml&quot;)<br>
<br>
...I will always pick up the override first if there is one at /resources/org/jboss/forge/scaffold/faces/scaffold/create.xhtml.<br>
<br>
Seeing as how users may want to drop in a new metawidget.xml, we&#39;d need some ability to add arbitrary JARs too. Either under /resources or /lib or<br>
somewhere else. They then can easily drop in a new bit of code, and configure Metawidget to use it.<br>
<br>
But Max may have a more experienced position :)<br>
<br>
Richard.<br>
<div class="im"><br>
On 4/01/2012 5:34 AM, Lincoln Baxter, III wrote:<br>
&gt; This sounds like something that would be really good for users. I guess I just need to know what specifically you think this should look like, then we<br>
&gt; can define an API or even just a config setting (using the new configuration API) might be enough. Is this just a single directory? Multiple? What does<br>
&gt; the layout look like? Do we want a configured path for each image, stylesheet, and file, or will we look up children by a specific file-name?<br>
&gt;<br>
&gt; Thoughts?<br>
&gt; ~Lincoln<br>
&gt;<br>
</div><div><div class="h5">&gt; On Tue, Dec 27, 2011 at 3:11 AM, Richard Kennard &lt;<a href="mailto:richard@kennardconsulting.com">richard@kennardconsulting.com</a> &lt;mailto:<a href="mailto:richard@kennardconsulting.com">richard@kennardconsulting.com</a>&gt;&gt; wrote:<br>


&gt;<br>
&gt;     I think this sounds like a great idea. It should probably be &#39;Forge-wide&#39; rather than specific to the scaffolding, as I imagine other plugins might<br>
&gt;     have a<br>
&gt;     similar requirement. Lincoln can you define something?<br>
&gt;<br>
&gt;     Regards,<br>
&gt;<br>
&gt;     Richard.<br>
&gt;<br>
&gt;     On 23/12/2011 11:26 PM, Max Rydahl Andersen wrote:<br>
&gt;     &gt; In Hibernate Tools I had a notion of a template path (classpath is not appropriate for this IMO).<br>
&gt;     &gt;<br>
&gt;     &gt; <a href="http://docs.jboss.org/tools/3.3.0.M5/en/hibernatetools/html_single/index.html" target="_blank">http://docs.jboss.org/tools/3.3.0.M5/en/hibernatetools/html_single/index.html</a><br>
&gt;     &gt;<br>
&gt;     &gt; Templatepath was a list of directories and we used the the classpath as the last fallback, meaning it would pickup the tools provided ones.<br>
&gt;     &gt;<br>
&gt;     &gt; I also went the &quot;extra step&quot; and placed these templates in &quot;packages&quot; a.k.a. sub directory to allow the different<br>
&gt;     &gt; template usages to be configured via just one template path.<br>
&gt;     &gt;<br>
&gt;     &gt; i.e. we had a view, pojo, hbm and a few others to separate them properly and to avoid name collisions.<br>
&gt;     &gt;<br>
&gt;     &gt; /max<br>
&gt;     &gt;<br>
&gt;     &gt; On Dec 23, 2011, at 06:20, Richard Kennard wrote:<br>
&gt;     &gt;<br>
&gt;     &gt;&gt; Hi guys,<br>
&gt;     &gt;&gt;<br>
&gt;     &gt;&gt; I&#39;ve written up a bit of documentation for the scaffolding here: <a href="https://docs.jboss.org/author/display/FORGE/UI+Scaffolding" target="_blank">https://docs.jboss.org/author/display/FORGE/UI+Scaffolding</a><br>


&gt;     &gt;&gt;<br>
&gt;     &gt;&gt; But I have a question around the customization. Clearly, we have some nice template files like &#39;create.xhtml&#39; and &#39;BackingBean.jv&#39; which can be<br>
&gt;     edited in<br>
&gt;     &gt;&gt; any text editor. And we have a nice separation of the CSS/image files that can be replaced to change the look and feel.<br>
&gt;     &gt;&gt;<br>
&gt;     &gt;&gt; But how are we expecting people to &#39;get at&#39; these files? Are they supposed to extend the existing scaffold plugin? Or open up the JAR and edit<br>
&gt;     these files?<br>
&gt;     &gt;&gt; Or can they be placed &#39;on the classpath&#39; somehow such that they will be found before the ones in the scaffolding JAR? Or some other way?<br>
&gt;     &gt;&gt;<br>
&gt;     &gt;&gt; Regards,<br>
&gt;     &gt;&gt;<br>
&gt;     &gt;&gt; Richard.<br>
&gt;     &gt;&gt; _______________________________________________<br>
&gt;     &gt;&gt; forge-dev mailing list<br>
</div></div>&gt;     &gt;&gt; <a href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a> &lt;mailto:<a href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a>&gt;<br>
<div class="im">&gt;     &gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a><br>
&gt;     &gt; /max<br>
&gt;     &gt; <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; forge-dev mailing list<br>
</div>&gt;     &gt; <a href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a> &lt;mailto:<a href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a>&gt;<br>
<div class="im">&gt;     &gt; <a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a><br>
&gt;     &gt;<br>
&gt;     &gt;<br>
&gt;<br>
&gt;     _______________________________________________<br>
&gt;     forge-dev mailing list<br>
</div>&gt;     <a href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a> &lt;mailto:<a href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a>&gt;<br>
<div class="HOEnZb"><div class="h5">&gt;     <a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a><br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Lincoln Baxter, III<br>
&gt; <a href="http://ocpsoft.com" target="_blank">http://ocpsoft.com</a><br>
&gt; <a href="http://scrumshark.com" target="_blank">http://scrumshark.com</a><br>
&gt; &quot;Keep it Simple&quot;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; forge-dev mailing list<br>
&gt; <a href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/forge-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/forge-dev</a><br>
<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>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Dan Allen</div>Principal Software Engineer, Red Hat | Author of Seam in Action<br>Registered Linux User #231597<br><br><div><a href="http://google.com/profiles/dan.j.allen" target="_blank">http://google.com/profiles/dan.j.allen</a><br>

<a href="http://mojavelinux.com" target="_blank">http://mojavelinux.com</a><br><a href="http://mojavelinux.com/seaminaction" target="_blank">http://mojavelinux.com/seaminaction</a><br></div><br>
</div></div>