I think we should try to re-use the existing new-project plugin. Default to Java, but offer an @Option for PackagingType in order to facilitate things.<br><br>This is worth looking in to for sure, more tomorrow.<br>~Lincoln<br>
<br><div class="gmail_quote">On Mon, May 16, 2011 at 10:36 PM, Tim Pedone <span dir="ltr"><<a href="mailto:macdude357@gmail.com">macdude357@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I was copying the NewProjectPlugin as the basis for a<br>
NewPomProjectPlugin so when I said I'd remove that code, I meant from<br>
the copied code I was using. Before I do that, would you rather have<br>
a different plugin for the Pom project or add a "type" argument to the<br>
new-project command?<br>
<br>
On Mon, May 16, 2011 at 7:12 PM, Lincoln Baxter, III<br>
<div><div></div><div class="h5"><<a href="mailto:lincolnbaxter@gmail.com">lincolnbaxter@gmail.com</a>> wrote:<br>
> Why do you need beans.xml in a POM project? I mean, if this is a case that<br>
> you really need, it might be something we should change in Forge. Just<br>
> trying to understand better what you need :)<br>
><br>
> On Mon, May 16, 2011 at 5:57 PM, Tim Pedone <<a href="mailto:macdude357@gmail.com">macdude357@gmail.com</a>> wrote:<br>
>><br>
>> I see, I'll try omitting the code that creates the beans.xml file when<br>
>> generating a pom project and see if that works.<br>
>><br>
>> On Mon, May 16, 2011 at 12:59 PM, Lincoln Baxter, III<br>
>> <<a href="mailto:lincolnbaxter@gmail.com">lincolnbaxter@gmail.com</a>> wrote:<br>
>> > If there is no beans.xml in the project, CDIFacet will not register<br>
>> > itself;<br>
>> > howeer, it's possible that we need to further restrict packaging types<br>
>> > for<br>
>> > CDIFacet to JAR and WAR.<br>
>> ><br>
>> > ~Lincoln<br>
>> ><br>
>> > On Mon, May 16, 2011 at 11:22 AM, Tim Pedone <<a href="mailto:macdude357@gmail.com">macdude357@gmail.com</a>><br>
>> > wrote:<br>
>> >><br>
>> >> Sorry, I must have miscommunicated what was going on. I don't want to<br>
>> >> use the CDIFacet, it's getting added automatically. If you take a<br>
>> >> look at the NewProjectPlugin code, it adds some facets to the project:<br>
>> >><br>
>> >> Project project = projectFactory.createProject(dir,<br>
>> >> DependencyFacet.class,<br>
>> >> MetadataFacet.class,<br>
>> >> JavaSourceFacet.class, ResourceFacet.class);<br>
>> >><br>
>> >> ProjectFactory adds the given facets to the project but then calls<br>
>> >> registerFacets() which iterates *all* facets and adds them to the<br>
>> >> project resulting in the CDIFacet (and others) getting added.<br>
>> >><br>
>> >><br>
>> >><br>
>> >> On Sun, May 15, 2011 at 10:01 PM, Lincoln Baxter, III<br>
>> >> <<a href="mailto:lincolnbaxter@gmail.com">lincolnbaxter@gmail.com</a>> wrote:<br>
>> >> > I don't think that using the CDIFacet for this purpose is the right<br>
>> >> > thing to<br>
>> >> > do. The CDI Facet represents a java project with CDI enabled, so I<br>
>> >> > don't<br>
>> >> > think a POM project fits that description :)<br>
>> >> ><br>
>> >> > I would just add the CDI api as a dependency, though I suppose I<br>
>> >> > should<br>
>> >> > ask,<br>
>> >> > why are you trying to do this in this particular way?<br>
>> >> ><br>
>> >> > ~Lincoln<br>
>> >> ><br>
>> >> > On Sun, May 15, 2011 at 2:02 AM, Tim Pedone <<a href="mailto:macdude357@gmail.com">macdude357@gmail.com</a>><br>
>> >> > wrote:<br>
>> >> >><br>
>> >> >> As part of implementing the ability to add dependencies based off<br>
>> >> >> the<br>
>> >> >> dependencyManagement section of a parent pom, it would be helpful<br>
>> >> >> for<br>
>> >> >> testing purposes (and likely for users as well) to be able to create<br>
>> >> >> a<br>
>> >> >> project of type "pom". I copied the NewProjectPlugin and used it to<br>
>> >> >> create a PomProjectPlugin. I removed the Java facet and set the<br>
>> >> >> packaging to "pom"; however, it seems that<br>
>> >> >> ProjectFactory.createProject() calls registerFacet() which attempts<br>
>> >> >> to<br>
>> >> >> add every facet (CDI, JEE, etc.) to the project. The CDI facet<br>
>> >> >> fails<br>
>> >> >> because the project is not a war or jar. Is that behavior correct<br>
>> >> >> (adding the CDI facet to all projects)?<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>
>> >> ><br>
>> >> ><br>
>> >> > --<br>
>> >> > 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>
>> >> > "Keep it Simple"<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>
>> >> ><br>
>> >> ><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>
>> ><br>
>> ><br>
>> ><br>
>> > --<br>
>> > 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>
>> > "Keep it Simple"<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>
>> ><br>
>> ><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>
><br>
><br>
><br>
> --<br>
> 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>
> "Keep it Simple"<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>
><br>
><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>"Keep it Simple"<br>