Hey Rebecca, thanks for the update.
Requiring a build to update configuration still seems strange to me, my guess is that this
Mojo probably does some sort of class scanning to generate missing config. I can't
imagine that it would be required to actually build the final config.
According to the switchyard documentation: "The SwitchYard Maven plugin merges
SwitchYard application information from the source switchyard.xml file and annotated
source code within the project (e.g. @Transformer)." -
https://docs.jboss.org/author/display/SWITCHYARD/Project+Build+and+Valida... , so I keep
my stance that building the project should not be required. There must be a way to simply
write the final XML without requiring a build step - the maven plugin simply generates XML
- we should be able to do so also. To require a project build would mean to require the
internet, which is not a very safe thing to do when running a report. I know brad wants to
limit internet access as much as possible from within windup.)
HOWEVER - As an intermediate step or a shortcut, depending on how you look at it. Doing a
project build would be OK just to get things working until we figure out how to generate
the final XML (either manually, or via the Switchyard config code in the
switchyard-plugin.) Forge can build the project for you. That's not a big deal, no
need to include anything else in the integration module. Just do this:
"switchyardProject.getFacet(PackagingFacet.class).createBuilder().build();"
That will execute a maven build, because you have included the Maven addon, which is
providing the underlying `Project` implementation:
`install(furnace,
AddonId.fromCoordinates("org.jboss.forge.addon:maven,2.0.0-blahblah"));`
~Lincoln
----- Original Message -----
From: "Rebecca Searls" <rsearls(a)redhat.com>
To: "Lincoln Baxter" <lbaxter(a)redhat.com>
Cc: "Robb Greathouse" <robb.greathouse(a)redhat.com>, "Brad Davis"
<bdavis(a)redhat.com>
Sent: Sunday, September 8, 2013 4:05:06 PM
Subject: mvn compile requirement of switchyard in forge and Windup
Lincoln,
I have confirmed that the current switchyard plugin code for forge requires
the user compile the maven project in order for the a service or ref-service
to be listed in the switchyard.xml and accessible by SwitchYardConfigurator or
SwitchyardFacet.
See (attached) the pom file of the generated switchyard project. There is a Maven mojo
for configuring SwitchYard. Code is in
project
https://github.com/jboss-switchyard/core.git
class
tools/maven/plugins/switchyard/src/main/java/org/switchyard/tools/maven/plugins/switchyard/ConfigureMojo.java
The classes listed for execution in the pom file, introspect the generated classes and
build an in memory model that is then
written to the XML file.
When creating a service or ref-service in forge the user is directed to run
mvn install. see
https://github.com/jboss-switchyard/components/tools/forge/bean/src/main/...
classes org.switchyard.tools.forge.bean.BeanServicePlugin and
org.switchyard.tools.forge.bean.BeanReferencePlugin
How do we want to address this in Windup moving forward?
I started playing around with the maven-invoker-plugin API's to kick off the mvn
compile
but its usage appears to conflict with Furnace code.
Also I see that the following plugins are in
https://github.com/jboss-switchyard/components/tools/forge/bean/src/main/...
but not in
https://github.com/forge/plugin-switchyard.git
common
http
jca
sca
soap
Windup may not need all of these. sca is needed for migrating soa 5 listeners.
I would be happy to add the plugin-switchyard code for sca if you would like.