[windup-dev] mvn compile requirement of switchyard in forge and Windup

Rebecca Searls rsearls at redhat.com
Mon Sep 9 15:48:56 EDT 2013


Lincoln,

Thanks for the temp workaround.
Agreed it seems a little funky to have to compile stuff.  Hopefully the appropriate solution can be identified in the
near future.



----- Original Message -----
> From: "Lincoln Baxter" <lbaxter at redhat.com>
> To: "Rebecca Searls" <rsearls at redhat.com>
> Cc: "Robb Greathouse" <robb.greathouse at redhat.com>, "Brad Davis" <bdavis at redhat.com>, windup-dev at lists.jboss.org
> Sent: Monday, September 9, 2013 1:07:14 PM
> Subject: Re: mvn compile requirement of switchyard in forge and Windup
> 
> 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+Validation
> , 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 at redhat.com>
> To: "Lincoln Baxter" <lbaxter at redhat.com>
> Cc: "Robb Greathouse" <robb.greathouse at redhat.com>, "Brad Davis"
> <bdavis at 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/java/org/switchyard/tools/forge
> 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/java/org/switchyard/tools/forge
> 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.
> 


More information about the windup-dev mailing list