|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (11)
View Page Historyh2. Additional jbi resources packaging
For service unit, component, shared library ... you can provided a directory thank to following xml element _additionalJBIResourceDirectory,_
which allows to specify a directory where all contained files will be added to zip archive of the su, sl, component ...
This previous mechanism provide a way to package additional jbi resources into your su, sl, component as in the following example:
{code:lang=xml|title=pom.xml} <build>
<plugins>
<plugin>
<groupId>org.ow2.petals</groupId>
<artifactId>maven-petals-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<additionalJBIResourceDirectory>${project.build.directory}/additionals/</additionalJBIResourceDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<id>unpackaging</id>
<phase>process-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>com.ebmwebsourcing.petals-esb-enterprise.usecase1.node2</groupId>
<artifactId>su-filetransfer-P6-provide</artifactId>
<version>0-SNAPSHOT</version>
<type>jbi-service-unit</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/additionals/</outputDirectory>
<includes>**/*.wsdl</includes>
<excludes>**/*.class,**/*.jar</excludes>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>{code}
In the previous example, during the *mvn clean install* of the su-bpel-S9-provide, maven just unpackage the P6.wsdl located in +su-filetransfer-P6-provide+ dependency and copy the wsdl into
_${project.build.directory}/additionals/ \--> corresponding to target/additionals/_
After that the maven-petals-plugin take the P6.wsdl file located into target/additionals precised by the following line:
<additionalJBIResourceDirectory>${project.build.directory}/additionnals/</additionalJBIResourceDirectory>_and copy this wsdl file into your su-bpel-S9-provided.zip (it will be copy directly at the root path into zip file)_
For service unit, component, shared library ... you can provided a directory thank to following xml element _additionalJBIResourceDirectory,_
which allows to specify a directory where all contained files will be added to zip archive of the su, sl, component ...
This previous mechanism provide a way to package additional jbi resources into your su, sl, component as in the following example:
{code:lang=xml|title=pom.xml} <build>
<plugins>
<plugin>
<groupId>org.ow2.petals</groupId>
<artifactId>maven-petals-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<additionalJBIResourceDirectory>${project.build.directory}/additionals/</additionalJBIResourceDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<id>unpackaging</id>
<phase>process-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>com.ebmwebsourcing.petals-esb-enterprise.usecase1.node2</groupId>
<artifactId>su-filetransfer-P6-provide</artifactId>
<version>0-SNAPSHOT</version>
<type>jbi-service-unit</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/additionals/</outputDirectory>
<includes>**/*.wsdl</includes>
<excludes>**/*.class,**/*.jar</excludes>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>{code}
In the previous example, during the *mvn clean install* of the su-bpel-S9-provide, maven just unpackage the P6.wsdl located in +su-filetransfer-P6-provide+ dependency and copy the wsdl into
_${project.build.directory}/additionals/ \--> corresponding to target/additionals/_
After that the maven-petals-plugin take the P6.wsdl file located into target/additionals precised by the following line:
<additionalJBIResourceDirectory>${project.build.directory}/additionnals/</additionalJBIResourceDirectory>_and copy this wsdl file into your su-bpel-S9-provided.zip (it will be copy directly at the root path into zip file)_
h1. Goals
As explained in introduction, the Petals plugin for Maven2 supports several _goals_. goals.
This section details and illustrates them.
This goal allows the creation of a JBI archive.
Depending on the project nature (which is defined by its _packaging_ packaging attribute in the pom.xml), the right archive will be created.
{tip}
h2. jbi-configure
This goal allows the configuration of a JBI archive. Depending on the JBI archive nature (which is defined by its _packaging_ packaging attribute), the right configuration archive will be applied. Only deliverable JBI archives (component, service assembly and shared library) can be configured by this goal, ie. service unit archive is excluded. The main use-case is the configuration of a JBI archive delivered by a provider.
{tip}
* packaging: one of jbi-component, jbi-shared-library, jbi-service-unit, jbi-service-assembly. \\
Example, the following mapping rules define that all component identifiers contain the major version part except for the BC Soap: \\
Example, the following mapping rules define that all component identifiers contain the major version part except for the BC Soap: \\
\\ {code}
org.ow2.petals\:petals-bc-soap\:*\:jbi-component = ${artifactId}
*\:*\:*\:jbi-component = ${artifactId}-${version.major}
*\:*\:*\:jbi-component = ${artifactId}-${version.major}
* version. \\
Example, the following mapping rules define that all versions of the BC JMS will use the shared library including the ActiveMQ JMS client and an other one: \\
Example, the following mapping rules define that all versions of the BC JMS will use the shared library including the ActiveMQ JMS client and an other one: \\
\\ {code}
org.ow2.petals\:petals-bc-jms\:*\:1 = org.ow2.petals:petals-sl-jms-activemq:5.2.0
org.ow2.petals\:petals-bc-jms\:*\:2 = org.ow2.petals:petals-sl-jms-otherjmsprovider:1.0.0
org.ow2.petals\:petals-bc-jms\:*\:2 = org.ow2.petals:petals-sl-jms-otherjmsprovider:1.0.0
* packaging: one of jbi-component, jbi-shared-library, jbi-service-unit, jbi-service-assembly. \\
Example, the following mapping rules define that all shared libraries version identifiers are the major version: \\
Example, the following mapping rules define that all shared libraries version identifiers are the major version: \\
\\ {code}
*\:*\:*\:jbi-shared-library = ${version.major}
{code} |
{code} |
* packaging (optional, default is 'jar'). \\
Example, the following mapping rules define that all versions of the BC SOAP will use the extra component class-path elements provided by all dependencies of the artifact com.foo.bar:foo-bar:1.2.0 and artifact com.foo.bar:foo-resources:1.2.0:zip : \\
Example, the following mapping rules define that all versions of the BC SOAP will use the extra component class-path elements provided by all dependencies of the artifact com.foo.bar:foo-bar:1.2.0 and artifact com.foo.bar:foo-resources:1.2.0:zip : \\
\\ {code}
org.ow2.petals\:petals-bc-soap\:*\:1=com.foo.bar:foo-bar:1.2.0
org.ow2.petals\:petals-bc-soap\:*\:2=com.foo.bar:foo-resources:1.2.0:zip
org.ow2.petals\:petals-bc-soap\:*\:2=com.foo.bar:foo-resources:1.2.0:zip
| startMissingComponents | Boolean \\ | true \\ | This parameter makes sense only to deploy a service assembly. \\
If enabled, the components needed by the service assembly will be installed and started automatically. If shared libraries are needed by a component, their automatic installation is driven by the parameter 'installMissingSharedLibraries'. \\
If enabled, the components needed by the service assembly will be installed and started automatically. If shared libraries are needed by a component, their automatic installation is driven by the parameter 'installMissingSharedLibraries'. \\
{warning}Components MUST be declared as dependency in service unit projects. \\ \\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\
\\ \\
\\ \\
\\ \\
\\ \\
\\ \\
\\ \\
\\ \\
\\ \\
\\ \\
\\ \\
\\
{warning} |
{warning} |