Maven Only : this builds the entire project, including service artifact module, to be deployed to AS7.

Maven + Guvnor : upload shared service artifacts to Guvnor and build a service module there. The service provider, consumer and web projects are built via Maven.

Instructions specific to each approach are included below.

Maven

The multiApp project has a top-level pom.xml which can be used to build the entire set of projects, including service artifacts. The generated service artifact jar is identical to the version that would be produced from Guvnor. Once the project is built, the following artifacts should be deployed to the AS 7 runtime:

Guvnor

As an alternative to building a service artifact module with Maven, you can use Guvnor to upload and manage individual service artifacts and build a single service artifact module for deployment. First, you need to download and deploy Guvnor for AS 7. The latest Guvnor downloads can be found here. Simply copy the downloaded AS7 war to the standalone/deployments directory of your AS7 installation and you are good to go (you may want to change the filename to guvnorsoa.war, which will produce shorter a context root for the actual webapp URL). Once GuvnorSOA is deployed, follow these steps to upload and build the OrderService artifact module:

In the left frame, choose the Services tab. Then select 'Create New' -> 'New Service'. Name the service "OrderService" and click "Create Order Service".

'Create New' -> 'New XML Schemas". Name the schema "orderTypes" and click OK. Upload the schema found in multiApp/artifacts/src/main/resources/orderTypes.xsd.

'Create New' -> 'New WSDLs". Name the WSDL "OrderService" and click OK. Upload the WSDL found in multiApp/artifacts/src/main/resources/OrderService.wsdl.

'Create New' -> 'New Jars". Name the jar "order-classes" and click OK. Upload the jar found in multiApp/artifacts/target/OrderService-classes.jar.

Click on OrderService in the left frame and select the 'Edit' tab in the main frame. Build the service and note the URL for the service module binary.

You have now built a service artifact module using Guvnor. The module is almost ready to deploy to AS7, but you need to make one small change. Since the domain classes in the artifact module are used in a CDI application, the artifact jar must contain a META-INF/beans.xml to make it eligible for bean scanning. Doing this is trivial. Here's an example of how to do it:

This metadata allows the user to track where a given artifact is used in deployed applications, providing the basis for impact and dependency analysis for service artifacts. The Forge command 'import-artifacts' can be used to add this metadata: