Hmmm, that is a good point. For now however, for simplicities sake, let&#39;s use the PackagingType enum to enable selection, and only use the &#39;--createMain&#39; command if the project is a JAR or WAR.<br><br>For --finalName, I think we can leave that safely?<br>
<br>For --topLevelPackage, I agree, let&#39;s just add a better description. In fact, there is another issue with this that involves java keywords, so we should probably address these at the same time: <a href="https://issues.jboss.org/browse/SEAMFORGE-167">https://issues.jboss.org/browse/SEAMFORGE-167</a><br>
<br>We might actually want to add a check in the NewProjectPlugin that verifies if the groupId is a valid java package. If not, we can offer to keep the groupId but let the user specify a new, legal, java package name for the topLevelPackage.<br>
<br>Thoughts?<br><br>~Lincoln<br><br><div class="gmail_quote">On Tue, May 17, 2011 at 1:35 AM, Tim Pedone <span dir="ltr">&lt;<a href="mailto:macdude357@gmail.com">macdude357@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;">
One issue with reusing the existing plugin is that some of the options<br>
don&#39;t apply to pom projects. In particular are the createMain and<br>
FinalName options.  Also the topLevelPackage option should really be<br>
GroupId for a pom although I guess we could solve that with a little<br>
more info in the help text so it&#39;s obvious that &quot;topLevelPackage&quot; =<br>
&quot;GroupId&quot;.<br>
<br>
On Mon, May 16, 2011 at 10:25 PM, Lincoln Baxter, III<br>
<div><div></div><div class="h5">&lt;<a href="mailto:lincolnbaxter@gmail.com">lincolnbaxter@gmail.com</a>&gt; wrote:<br>
&gt; I think we should try to re-use the existing new-project plugin. Default to<br>
&gt; Java, but offer an @Option for PackagingType in order to facilitate things.<br>
&gt;<br>
&gt; This is worth looking in to for sure, more tomorrow.<br>
&gt; ~Lincoln<br>
&gt;<br>
&gt; On Mon, May 16, 2011 at 10:36 PM, Tim Pedone &lt;<a href="mailto:macdude357@gmail.com">macdude357@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; I was copying the NewProjectPlugin as the basis for a<br>
&gt;&gt; NewPomProjectPlugin so when I said I&#39;d remove that code, I meant from<br>
&gt;&gt; the copied code I was using.  Before I do that, would you rather have<br>
&gt;&gt; a different plugin for the Pom project or add a &quot;type&quot; argument to the<br>
&gt;&gt; new-project command?<br>
&gt;&gt;<br>
&gt;&gt; On Mon, May 16, 2011 at 7:12 PM, Lincoln Baxter, III<br>
&gt;&gt; &lt;<a href="mailto:lincolnbaxter@gmail.com">lincolnbaxter@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt; Why do you need beans.xml in a POM project? I mean, if this is a case<br>
&gt;&gt; &gt; that<br>
&gt;&gt; &gt; you really need, it might be something we should change in Forge. Just<br>
&gt;&gt; &gt; trying to understand better what you need :)<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; On Mon, May 16, 2011 at 5:57 PM, Tim Pedone &lt;<a href="mailto:macdude357@gmail.com">macdude357@gmail.com</a>&gt;<br>
&gt;&gt; &gt; wrote:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; I see, I&#39;ll try omitting the code that creates the beans.xml file when<br>
&gt;&gt; &gt;&gt; generating a pom project and see if that works.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; On Mon, May 16, 2011 at 12:59 PM, Lincoln Baxter, III<br>
&gt;&gt; &gt;&gt; &lt;<a href="mailto:lincolnbaxter@gmail.com">lincolnbaxter@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt;&gt; &gt; If there is no beans.xml in the project, CDIFacet will not register<br>
&gt;&gt; &gt;&gt; &gt; itself;<br>
&gt;&gt; &gt;&gt; &gt; howeer, it&#39;s possible that we need to further restrict packaging<br>
&gt;&gt; &gt;&gt; &gt; types<br>
&gt;&gt; &gt;&gt; &gt; for<br>
&gt;&gt; &gt;&gt; &gt; CDIFacet to JAR and WAR.<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; ~Lincoln<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; On Mon, May 16, 2011 at 11:22 AM, Tim Pedone &lt;<a href="mailto:macdude357@gmail.com">macdude357@gmail.com</a>&gt;<br>
&gt;&gt; &gt;&gt; &gt; wrote:<br>
&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; Sorry, I must have miscommunicated what was going on.  I don&#39;t want<br>
&gt;&gt; &gt;&gt; &gt;&gt; to<br>
&gt;&gt; &gt;&gt; &gt;&gt; use the CDIFacet, it&#39;s getting added automatically.  If you take a<br>
&gt;&gt; &gt;&gt; &gt;&gt; look at the NewProjectPlugin code, it adds some facets to the<br>
&gt;&gt; &gt;&gt; &gt;&gt; project:<br>
&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt;      Project project = projectFactory.createProject(dir,<br>
&gt;&gt; &gt;&gt; &gt;&gt; DependencyFacet.class,<br>
&gt;&gt; &gt;&gt; &gt;&gt;               MetadataFacet.class,<br>
&gt;&gt; &gt;&gt; &gt;&gt;               JavaSourceFacet.class, ResourceFacet.class);<br>
&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; ProjectFactory adds the given facets to the project but then calls<br>
&gt;&gt; &gt;&gt; &gt;&gt; registerFacets() which iterates *all* facets and adds them to the<br>
&gt;&gt; &gt;&gt; &gt;&gt; project resulting in the CDIFacet (and others) getting added.<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; On Sun, May 15, 2011 at 10:01 PM, Lincoln Baxter, III<br>
&gt;&gt; &gt;&gt; &gt;&gt; &lt;<a href="mailto:lincolnbaxter@gmail.com">lincolnbaxter@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; I don&#39;t think that using the CDIFacet for this purpose is the<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; right<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; thing to<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; do. The CDI Facet represents a java project with CDI enabled, so I<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; don&#39;t<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; think a POM project fits that description :)<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; I would just add the CDI api as a dependency, though I suppose I<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; should<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; ask,<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; why are you trying to do this in this particular way?<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; ~Lincoln<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; On Sun, May 15, 2011 at 2:02 AM, Tim Pedone &lt;<a href="mailto:macdude357@gmail.com">macdude357@gmail.com</a>&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; wrote:<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; As part of implementing the ability to add dependencies based off<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; the<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; dependencyManagement section of a parent pom, it would be helpful<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; for<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; testing purposes (and likely for users as well) to be able to<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; create<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; a<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; project of type &quot;pom&quot;.  I copied the NewProjectPlugin and used it<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; to<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; create a PomProjectPlugin.   I removed the Java facet and set the<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; packaging to &quot;pom&quot;; however, it seems that<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; ProjectFactory.createProject() calls registerFacet() which<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; attempts<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; to<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; add every facet (CDI, JEE, etc.) to the project.  The CDI facet<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; fails<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; because the project is not a war or jar.  Is that behavior<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; correct<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; (adding the CDI facet to all projects)?<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; _______________________________________________<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; forge-dev mailing list<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; <a href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a><br>
&gt;&gt; &gt;&gt; &gt;&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; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; --<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; Lincoln Baxter, III<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; <a href="http://ocpsoft.com" target="_blank">http://ocpsoft.com</a><br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; <a href="http://scrumshark.com" target="_blank">http://scrumshark.com</a><br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; &quot;Keep it Simple&quot;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; _______________________________________________<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; forge-dev mailing list<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; <a href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a><br>
&gt;&gt; &gt;&gt; &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; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&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">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">https://lists.jboss.org/mailman/listinfo/forge-dev</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; Lincoln Baxter, III<br>
&gt;&gt; &gt;&gt; &gt; <a href="http://ocpsoft.com" target="_blank">http://ocpsoft.com</a><br>
&gt;&gt; &gt;&gt; &gt; <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; &gt;<br>
&gt;&gt; &gt;&gt; &gt; _______________________________________________<br>
&gt;&gt; &gt;&gt; &gt; forge-dev mailing list<br>
&gt;&gt; &gt;&gt; &gt; <a href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a><br>
&gt;&gt; &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; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; _______________________________________________<br>
&gt;&gt; &gt;&gt; forge-dev mailing list<br>
&gt;&gt; &gt;&gt; <a href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a><br>
&gt;&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; &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">http://ocpsoft.com</a><br>
&gt;&gt; &gt; <a href="http://scrumshark.com" target="_blank">http://scrumshark.com</a><br>
&gt;&gt; &gt; &quot;Keep it Simple&quot;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; _______________________________________________<br>
&gt;&gt; &gt; forge-dev mailing list<br>
&gt;&gt; &gt; <a href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a><br>
&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; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; forge-dev mailing list<br>
&gt;&gt; <a href="mailto:forge-dev@lists.jboss.org">forge-dev@lists.jboss.org</a><br>
&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;<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; 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>
&gt;<br>
&gt;<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"><br>-- <br>Lincoln Baxter, III<br><a href="http://ocpsoft.com">http://ocpsoft.com</a><br><a href="http://scrumshark.com">http://scrumshark.com</a><br>&quot;Keep it Simple&quot;<br>