Maven Petals Plug-in 2.1.4+

compared with
Current by Christophe DENEUX
on Feb 12, 2014 16:49.

(show comment)
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (19)

View Page History
| {anchor:jbi-package-updateJbiXml}updateJBIXml | Boolean | true | \* | When true, the packaging updates the JBI descriptor from the project's POM. \\
This option must be activated to configure the JBI archive. |
| serviceUnitFileNameMappingInSA | String | $$\{artifactId\}-$$\{version\}.$$\{extension\} | jbi-service-assembly | This parameter makes sense only if the [petalsesbsnapshot:updateJBIXml\|#jbi-package-updateJbiXml] option is activated. \\
It defines the name format of JBI archives for the service-units this assembly embeds. It can be used to make them match the content of the JBI descriptor of the assembly. \\
\\
Configuring this parameter should work correctly when the issue [MNG-3558|http://jira.codehaus.org/browse/MNG-3558] is fixed. |
| serviceUnitNameMappingInSA | String | $$\{artifactId\}-$$\{version\} | jbi-service-assembly | This parameter makes sense only if the [petalsesbsnapshot:updateJBIXml\|#jbi-package-updateJbiXml] option is activated. \\
It defines the name format (the <name> mark-up> of service-units embedded by the service assembly archive. \\
\\
Configuring this parameter should work correctly when the issue [MNG-3558|http://jira.codehaus.org/browse/MNG-3558] is fixed. |
| serviceAssemblyNameMapping | String | $$\{artifactId\}-$$\{version\} | jbi-service-assembly | This parameter makes sense only if the [petalsesbsnapshot:updateJBIXml\|#jbi-package-updateJbiXml] option is activated. \\
It defines the format of the service assembly name in the JBI descriptor. \\
\\
Configuring this parameter should work correctly when the issue [MNG-3558|http://jira.codehaus.org/browse/MNG-3558] is fixed. |
| sharedLibraryNameMappingInComponent | String | $$\{artifactId\} | jbi-component | This parameter makes sense only if the [petalsesbsnapshot:updateJBIXml\|#jbi-package-updateJbiXml] option is activated. \\
When a component depends on a shared library, this last one can be automatically added in the component's JBI descriptor. This parameter defines the name of the shared-libraries to add in the JBI descriptor. \\
\\
Configuring this parameter should work correctly when the issue [MNG-3558|http://jira.codehaus.org/browse/MNG-3558] is fixed. |
| componentNameMapping | String | $$\{artifactId\} | jbi-component | This parameter makes sense only if the [petalsesbsnapshot:updateJBIXml\|#jbi-package-updateJbiXml] option is activated. \\
This parameter defines the name format of the component in the JBI descriptor. \\
\\
Configuring this parameter should work correctly when the issue [MNG-3558|http://jira.codehaus.org/browse/MNG-3558] is fixed. |
| sharedLibraryNameMapping | String | $$\{artifactId\} | jbi-shared-library | This parameter makes sense only if the [petalsesbsnapshot:updateJBIXml\|#jbi-package-updateJbiXml] option is activated. \\
This parameter defines the name format of the shared library in the JBI descriptor. \\
\\
Configuring this parameter should work correctly when the issue [MNG-3558|http://jira.codehaus.org/browse/MNG-3558] is fixed. |
| includeConfiguration \\ | Boolean \\ | true \\ | \* \\ | Flag to activate JBI archive configuration when packaging it. To authorize the component configuration when packaging it, JBI descriptor update MUST be activated (see [petalsesbsnapshot:updateJBIXml\|#jbi-package-updateJbiXml]). \\
\\
If one of files needed by the component configuration is missing, no configuration is applied. \\ |
| jbiVersionsMappingFileURL | URL | \- \\ | \* \\ | If the JBI versions mapping configuration file (jbiVersionsMappingFile) does not exist through the class-path, the file is look for according to this URL. |
| toExcludes | String | \- \\ | jbi-component \\
jbi-shared-library \\ | This parameter makes sense only if the [petalsesbsnapshot:updateJBIXml\|#jbi-package-updateJbiXml] option is activated. It contains a list a JAR files (comma separated) to exclude from the packaging. \\ |


h3. How is updated the JBI descriptor ?

As explain below, the parameter [petalsesbsnapshot:updateJBIXml\|#jbi-package-updateJbiXml] is used to generated the JBI descriptor from the Maven POM file. Updates are done according to the nature of the JBI archive and following rules.

h4. JBI descriptor updates of a component archive
<artifactId>foo-bar</artifactId>
<groupId>com.foo.bar</groupId>
<version>0-SNAPSHOT</version>
<packaging>pom</packaging>

<groupId>org.ow2.petals</groupId>
<artifactId>maven-petals-plugin</artifactId>
<version>2.3.0</version> <version>2.1.4</version>
 <extensions>true</extensions>
<dependencies>

{code}
mvn org.ow2.petals:maven-petals-plugin:2.3.0:jbi-configure org.ow2.petals:maven-petals-plugin:2.1.4:jbi-configure -DgroupId=org.ow2.petals -DartifactId=petals-sl-jms-activemq -Dversion=4.1.1 -DjbiIdentifiersMappingFileURL=http://myhost:myport/myPath/jbi-identifiers-mapping-file.properties

mvn org.ow2.petals:maven-petals-plugin:2.3.0:jbi-configure org.ow2.petals:maven-petals-plugin:2.1.4:jbi-configure -DgroupId=org.ow2.petals -DartifactId=petals-sl-jms-activemq -Dversion=5.2.0 -DjbiIdentifiersMappingFileURL=http://myhost:myport/myPath/jbi-identifiers-mapping-file.properties
{code}
* Next, we configure the components:

{code}
mvn org.ow2.petals:maven-petals-plugin:2.3.0:jbi-configure org.ow2.petals:maven-petals-plugin:2.1.4:jbi-configure -DgroupId=org.ow2.petals -DartifactId=petals-bc-jms -Dversion=3.1.1 -DjbiIdentifiersMappingFileURL=http://myhost:myport/myPath/jbi-identifiers-mapping-file.properties -DjbiSharedLibrariesMappingFileURL=http://myhost:myport/myPath/jbi-shared-libraries-list-mapping-file.properties -DjbiVersionsMappingFileURL=http://myhost:myport/myPath/jbi-versions-mapping-file.properties

mvn org.ow2.petals:maven-petals-plugin:2.3.0:jbi-configure org.ow2.petals:maven-petals-plugin:2.1.4:jbi-configure -DgroupId=org.ow2.petals -DartifactId=petals-bc-soap -Dversion=4.0.2 -DjbiIdentifiersMappingFileURL=http://myhost:myport/myPath/jbi-identifiers-mapping-file.properties -DjbiSharedLibrariesMappingFileURL=http://myhost:myport/myPath/jbi-shared-libraries-list-mapping-file.properties -DjbiVersionsMappingFileURL=http://myhost:myport/myPath/jbi-versions-mapping-file.properties
{code}
* using the following content of the file 'jbi-identifiers-mapping-file.properties':

{code}
mvn org.ow2.petals:maven-petals-plugin:2.3.0:jbi-configure org.ow2.petals:maven-petals-plugin:2.1.4:jbi-configure -DgroupId=org.ow2.petals -DartifactId=petals-bc-soap -Dversion=4.0.2 -DjbiExtraComponentClasspathMappingURL=file:///home/myuser/my-extra-component-classpath-mapping.properties
{code}
where the file /home/myuser/my-extra-component-classpath-mapping.properties contains:

{code}
mvn org.ow2.petals:maven-petals-plugin:2.3.0:jbi-configure org.ow2.petals:maven-petals-plugin:2.1.4:jbi-configure -DgroupId=org.ow2.petals -DartifactId=petals-bc-soap -Dversion=3.1.4 -DjbiIdentifiersMappingFileURL=http://myhost:myport/myPath/jbi-identifiers-mapping-file.properties

mvn org.ow2.petals:maven-petals-plugin:2.3.0:jbi-configure org.ow2.petals:maven-petals-plugin:2.1.4:jbi-configure -DgroupId=org.ow2.petals -DartifactId=petals-bc-soap -Dversion=4.0.5 -DjbiIdentifiersMappingFileURL=http://myhost:myport/myPath/jbi-identifiers-mapping-file.properties
{code}

To use a configuration available as Maven artifact, use the following command line:
{code}
mvn org.ow2.petals:maven-petals-plugin:2.3.0:jbi-configure org.ow2.petals:maven-petals-plugin:2.1.4:jbi-configure -DgroupId=org.ow2.petals -DartifactId=petals-bc-soap -Dversion=3.1.4 -DjbiIdentifiersMappingFile=jbi-identifiers-mapping-file.properties
{code}
where jbi-identifiers-mapping-file.properties is available as resource into the configuration Maven artifact.