Hey Rob,
adding the utility facet always creates a MANIFEST.MF, this is a WTP
thing. I opened this request upstream :
https://bugs.eclipse.org/bugs/show_bug.cgi?id=349575
In m2e-wtp, we have this ugly hack where MANIFESTS added by project
facets are "manually" deleted :
https://github.com/sonatype/m2eclipse-wtp/blob/master/org.maven.ide.eclip...
The Utility project configurator only works on maven projects that
already have the utility facet set, so their configuration can be
updated. Initial configuration is triggered by depending projects (war
or ear).
If you install the Utility facet in your SYconfigurator and it runs
after the Utility configurator(assuming you can't change the maven phase
in which it's called), I suggest you copy what's done in
https://github.com/sonatype/m2eclipse-wtp/blob/master/org.maven.ide.eclip...
and
https://github.com/sonatype/m2eclipse-wtp/blob/master/org.maven.ide.eclip...
, i.e. call WTPProjectsUtil.removeWTPClasspathContainer(),
WTPProjectsUtil.removeTestFolderLinks(),
WTPProjectsUtil.setNonDependencyAttributeToContainer(). There is
obviously some duplication between
UtilityProjectConfigurator.configure() and
AbstractProjectConfiguratorDelegate.configureWtpUtil () and hopefully
I'll be able to refactor that at a later date (quality patches accepted).
About setting the proper maven configuration when setting the Maven
facet, it seemed to work last time I checked, please open a ticket in
JIRA with some steps to reproduce, so I can take a look.
Also, please note that I'm trying to add a conversion API directly in
m2e-core :
https://bugs.eclipse.org/bugs/show_bug.cgi?id=359340
HIH. Regards,
Fred Bricon
Le 07/01/2012 23:17, Rob Cernich a écrit :
Hey all,
I just finished adding some basic WTP support for SwitchYard and had a couple of
questions regarding WTP and Maven integration. The SwitchYard facet can be added to any
JEE type (although it is not currently constrained in this fashion). If the project is
not already a JEE type project, the Utility Module facet is added. This effectively
allows SY applications to be deployed to any JEE server.
Some of the issues:
Adding the Utility Module facet causes the module nature to be added, which always
creates a META-INF/MANIFEST.MF file within the project. Is there a way to disable this
behavior for Maven projects (e.g. where Maven may be generating the manifest)?
Maven project configurators run in the order they appear in the lifecycle processing.
There is a Utility Module configurator that configures projects containing the Utility
Module facet. However, this is executed during the compile phase and the SY configurator,
which adds the Utility Module facet, runs during the process-classes phase. Because of
this, the "deployables" are not configured correctly on the project (i.e. the
test sources and resources are included). The current workaround is to run
Maven->Update Project Configuration after the project is created or imported. Is there
a way to fix this? (FYI, this is not a problem if the project is based on another JEE
technology, e.g. WAR, EJB, etc.)
When running the new faceted project wizard and including the Maven facet, it would be
nice if the other facets' configurations were defaulted appropriately (e.g. Java
source and output folders, web resources, etc.). Is there a way to provide more useful
defaults?
Sorry for the barrage of questions.
Thanks in advance,
Rob
_______________________________________________
jbosstools-dev mailing list
jbosstools-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jbosstools-dev