Sorry, I must have miscommunicated what was going on. I don't want to
use the CDIFacet, it's getting added automatically. If you take a
look at the NewProjectPlugin code, it adds some facets to the project:
Project project = projectFactory.createProject(dir, DependencyFacet.class,
MetadataFacet.class,
JavaSourceFacet.class, ResourceFacet.class);
ProjectFactory adds the given facets to the project but then calls
registerFacets() which iterates *all* facets and adds them to the
project resulting in the CDIFacet (and others) getting added.
On Sun, May 15, 2011 at 10:01 PM, Lincoln Baxter, III
<lincolnbaxter(a)gmail.com> wrote:
I don't think that using the CDIFacet for this purpose is the
right thing to
do. The CDI Facet represents a java project with CDI enabled, so I don't
think a POM project fits that description :)
I would just add the CDI api as a dependency, though I suppose I should ask,
why are you trying to do this in this particular way?
~Lincoln
On Sun, May 15, 2011 at 2:02 AM, Tim Pedone <macdude357(a)gmail.com> wrote:
>
> As part of implementing the ability to add dependencies based off the
> dependencyManagement section of a parent pom, it would be helpful for
> testing purposes (and likely for users as well) to be able to create a
> project of type "pom". I copied the NewProjectPlugin and used it to
> create a PomProjectPlugin. I removed the Java facet and set the
> packaging to "pom"; however, it seems that
> ProjectFactory.createProject() calls registerFacet() which attempts to
> add every facet (CDI, JEE, etc.) to the project. The CDI facet fails
> because the project is not a war or jar. Is that behavior correct
> (adding the CDI facet to all projects)?
> _______________________________________________
> forge-dev mailing list
> forge-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/forge-dev
--
Lincoln Baxter, III
http://ocpsoft.com
http://scrumshark.com
"Keep it Simple"
_______________________________________________
forge-dev mailing list
forge-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/forge-dev