If there is no beans.xml in the project, CDIFacet will not register itself; howeer, it&#39;s possible that we need to further restrict packaging types for CDIFacet to JAR and WAR.<br><br>~Lincoln<br><br><div class="gmail_quote">
On Mon, May 16, 2011 at 11:22 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;">
Sorry, I must have miscommunicated what was going on.  I don&#39;t want to<br>
use the CDIFacet, it&#39;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, 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>
<div><div></div><div class="h5"><br>
<br>
<br>
On Sun, May 15, 2011 at 10:01 PM, Lincoln Baxter, III<br>
&lt;<a href="mailto:lincolnbaxter@gmail.com">lincolnbaxter@gmail.com</a>&gt; wrote:<br>
&gt; I don&#39;t think that using the CDIFacet for this purpose is the right thing to<br>
&gt; do. The CDI Facet represents a java project with CDI enabled, so I don&#39;t<br>
&gt; think a POM project fits that description :)<br>
&gt;<br>
&gt; I would just add the CDI api as a dependency, though I suppose I should ask,<br>
&gt; why are you trying to do this in this particular way?<br>
&gt;<br>
&gt; ~Lincoln<br>
&gt;<br>
&gt; On Sun, May 15, 2011 at 2:02 AM, Tim Pedone &lt;<a href="mailto:macdude357@gmail.com">macdude357@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; As part of implementing the ability to add dependencies based off the<br>
&gt;&gt; dependencyManagement section of a parent pom, it would be helpful for<br>
&gt;&gt; testing purposes (and likely for users as well) to be able to create a<br>
&gt;&gt; project of type &quot;pom&quot;.  I copied the NewProjectPlugin and used it to<br>
&gt;&gt; create a PomProjectPlugin.   I removed the Java facet and set the<br>
&gt;&gt; packaging to &quot;pom&quot;; however, it seems that<br>
&gt;&gt; ProjectFactory.createProject() calls registerFacet() which attempts to<br>
&gt;&gt; add every facet (CDI, JEE, etc.) to the project.  The CDI facet fails<br>
&gt;&gt; because the project is not a war or jar.  Is that behavior correct<br>
&gt;&gt; (adding the CDI facet to all projects)?<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>