I think it is already possible to approach Grails-style development on JEE6 with a mix of Maven archetypes, CDI portable extensions and servlet 3 web fragments.<div>I remember there is an option somewhere in Maven to allow an archetype being applied on an existing project, so the archetype would bring the dependency on the PE jar, a web fragment for necessary framework servlets and maybe a few necessary default configuration files (for example an empty process definition for jBPM).</div>

<div><br></div><div>If you compare this with Grails, here&#39;s how that would compare the extension possibilities  :</div><div>- various artifacts, such as js files, images, or example classes =&gt; possible with Maven archetypes.</div>

<div>- doWithSpring : add Spring beans before app init =&gt; doable with CDI beans scan or by a PE.</div><div>- doWithApplicationContext : configure or modify existing Spring beans =&gt; doable with CDI by a PE.</div><div>

- doWithWebDescriptor : add elements to web.xml =&gt; doable with servlet 3 web-fragment.</div><div>- doWithDynamicMethods : dynamically change of the Groovy meta-model. This is for example how CRUD functionality is added by plugins, this is extremely powerful but depends on the Groovy language. However I think that most interesting things could by done by PEs in pure Java by using interceptors / decorators, and I guess nothing would prevent a Groovy PE to modify the meta-model of a CDI application built in Groovy.</div>

<div>- events : don&#39;t know as they are build-time hooks that are triggered when a file is updated, packaged or something like this, there is maybe something similar in Maven.</div><div><br></div><div>In the end I think it is already possible to implement something like :</div>

<div>mvn archetype:generate weld-jsf </div><div>mvn archetype:generate seam-jbpm</div><div><div>mvn archetype:generate seam-itext</div><div>...</div><div><br></div></div><div>Having played a bit with Grails, I can understand why people like it. It&#39;s ultra-simple to get started and simple things are simple. It would be great to achieve a similar development experience with JEE6/CDI. Too bad Maven is almost unavoidable now but the archetype thing is really interesting.</div>

<div><br></div><div><br><div class="gmail_quote"><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">The application I thought of was aimed at reducing complexity and thus barriers to entry. The particular use case I had in mind was:<div>

I have a Weld + JSF app.Now I need to add bpm to the mix, so I would add seam-bpm, but that&#39;s not the whole story. I need some extra configurations, and maybe some boiler plate code to hook it all up, and possibly create some process definitions and add them to the mix. </div>


<div><br></div><div>In another words, I think that some way of simplifying the process of adding libraries and configuring them could be useful. </div><div><br></div><div>I did not consider the idea of CRUD, but it could be nice as well.</div>


<div><br></div><div>Bottom line is that I&#39;d like us to explore ways to simplify and standardize as many aspects of EE development as possible. I see this as a really good selling point for the technology. </div><div>

<div></div><div class="h5"><div><br>
</div><div> </div><div><br><div class="gmail_quote">On Fri, Feb 5, 2010 at 9:27 PM, Steven Boscarine <span dir="ltr">&lt;<a href="mailto:steven.boscarine@childrens.harvard.edu" target="_blank">steven.boscarine@childrens.harvard.edu</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


  
  

<div bgcolor="#ffffff" text="#000000">
One significant difference is that an archetype gives you a starter
application, but really knows nothing about your application.  A mojo
can be run at different points of the maven lifecycle, but doesn&#39;t know
much about the app it&#39;s being run on.  It&#39;s up to the mojo writer to
turn the collection of classes and resources into meaningful pieces of
an application.  <br>
<br>
I can&#39;t speak for rails, but I know Grails actually is aware of your
data and has a much richer model.  Grails can apply a template per each
entity or database table in your application.  Maven, as of 2.2
(haven&#39;t looked at 3.0 yet), has no idea what your domain is.  <br>
<br>
For example, if you wanted to create a plugin that generated a CRUD app
per each entity in your application, your Maven2 mojo would have to
start from scratch and determine what your entities are.  It is my
understanding that Grails plugins have convenient hooks to that data,
controllers, service, etc (although someone who has actually written a
Grails plugin before would be a better source of details on the
subject).  <br><div><div></div><div>
<br>
<br>
<br>
On 02/05/2010 06:06 PM, Arbi Sookazian wrote:
<blockquote type="cite">That&#39;s interesting.<br>
  <h2 style="margin-left:40px">The Basics of Creating Rails Plugins</h2>
  <p style="margin-left:40px">A Rails plugin is either an extension
or a modification of the core framework. Plugins provide:</p>
  <ul style="margin-left:40px">
    <li>a way for developers to share bleeding-edge ideas without
hurting the stable code base</li>
    <li>a segmented architecture so that units of code can be fixed or
updated on their own release schedule</li>
    <li>an outlet for the core developers so that they don’t have to
include every cool new feature under the sun</li>
  </ul>
  <a href="http://guides.rubyonrails.org/plugins.html" target="_blank">http://guides.rubyonrails.org/plugins.html</a><br>
  <br>
Sounds like CDI PEs (portable extensions) was a ripoff of this idea... 
And wasn&#39;t seam-gen alarmingly similar to Grails in terms of quick
project setup/startup?  <br>
  <br>
PE is strikingly similar to Rails plugins based on the above
description when you think of Seam 3 having Weld as its new core and
the &quot;extras&quot; like jBPM integration, remoting, iText, PDF, Excel, etc.<br>
  <br>
Maven 2 already has the concept of MOJO (Maven POJO) and plugins:<br>
  <br>
  <a href="http://maven.apache.org/guides/plugin/guide-java-plugin-development.html" target="_blank">http://maven.apache.org/guides/plugin/guide-java-plugin-development.html</a><br>
  <br>
Not sure what added-value you&#39;re suggesting??<br>
  <br>
  <br>
  <div class="gmail_quote">On Fri, Feb 5, 2010 at 2:34 PM, Piotr
Steininger <span dir="ltr">&lt;<a href="mailto:piotr.steininger@gmail.com" target="_blank">piotr.steininger@gmail.com</a>&gt;</span>
wrote:<br>
  <blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
    <div>I totally agree. Weld archetypes are probably the best
polished ones I have ever seen. They remind me of some of the Rails
semantics (get up and running in minutes). </div>
    <div><br>
    </div>
    <div>These similarities got me thinking about another aspect of
Rails - Plugins or gems (which I think is a mixed bag). The promise of
plugins/gems is that you can quickly add dependent code and do some
setup in minutes as well. I think that maven could very well be a
platform to do the same. Currently one has to add dependencies by hand
and quite often tweak the exclusions. With the introduction of maven
console plugin, I think the door became open to create maven
plugins/console scripts to make this a more automated process.</div>
    <div><br>
    </div>
    <div>I don&#39;t have the expertise to create a prototype. I also don&#39;t
know if this is really something that could be useful in the community
(or simply serve as a tool for Maven newbies).</div>
    <div><br>
    </div>
    <div>In any case, I wanted to see what the community thinks about
this.</div>
    <div><br>
    </div>
    <div> <br>
 <br>
    <div class="gmail_quote">
    <div>On Fri, Feb 5, 2010 at 5:06 PM, Dan Allen <span dir="ltr">&lt;<a href="mailto:dan.j.allen@gmail.com" target="_blank">dan.j.allen@gmail.com</a>&gt;</span>
wrote:<br>
    </div>
    <blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
      <div>
      <div>The Weld archetype initiative has had a further
reaching impact than just the community of developers interested in
using CDI (via Weld). A recent blog entry on Sonatype cites the Weld
archetypes as &quot;the perfect case study of how using Archetypes benefits
the community.&quot; Steven is acknowledged for his effort to identify the
need of archetypes and ultimately get them promoted to Maven central
for all to use.<br>
      <br>
      <a href="http://www.sonatype.com/people/2010/01/maven-archetypes-and-nexus-there-is-no-faster-way/" target="_blank">http://www.sonatype.com/people/2010/01/maven-archetypes-and-nexus-there-is-no-faster-way/</a><br>
      <br>
Although archetypes are rather technically simple, it&#39;s important to
recognize the impact they can have by starting people off on the right
foot.<br>
      <br clear="all">
-Dan<br>
      <font color="#888888"><br>
-- <br>
Dan Allen<br>
Senior Software Engineer, Red Hat | Author of Seam in Action<br>
Registered Linux User #231597<br>
      <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>
      <a href="http://www.google.com/profiles/dan.j.allen" target="_blank">http://www.google.com/profiles/dan.j.allen</a><br>
      </font><br>
      </div>
      </div>
      <div>_______________________________________________<br>
weld-dev mailing list<br>
      <a href="mailto:weld-dev@lists.jboss.org" target="_blank">weld-dev@lists.jboss.org</a><br>
      <a href="https://lists.jboss.org/mailman/listinfo/weld-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/weld-dev</a><br>
      </div>
    </blockquote>
    </div>
    <br>
    </div>
    <br>
_______________________________________________<br>
weld-dev mailing list<br>
    <a href="mailto:weld-dev@lists.jboss.org" target="_blank">weld-dev@lists.jboss.org</a><br>
    <a href="https://lists.jboss.org/mailman/listinfo/weld-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/weld-dev</a><br>
  </blockquote>
  </div>
  <br>
</blockquote>
<br>
</div></div></div>

</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
weld-dev mailing list<br>
<a href="mailto:weld-dev@lists.jboss.org">weld-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/weld-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/weld-dev</a><br></blockquote></div><br></div>