<?xml version="1.0" encoding="UTF-8"?>
<!--
 Copyright (c) 2011-2012 EBM WebSourcing, 2012-2026 Linagora

 This program/library is free software: you can redistribute it and/or modify
 it under the terms of the GNU Lesser General Public License as published by
 the Free Software Foundation, either version 2.1 of the License, or (at your
 option) any later version.

 This program/library is distributed in the hope that it will be useful, but
 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
 for more details.

 You should have received a copy of the GNU Lesser General Public License
 along with this program/library; If not, see http://www.gnu.org/licenses/
 for the GNU Lesser General Public License version 2.1.
-->
<assembly>
   <id>distribution</id>
   <formats>
      <!-- tar.gz should be prefered to zip because it handles files permissions -->
      <format>zip</format>
      <format>dir</format>
   </formats>
   
   <dependencySets>
      <dependencySet>
         <outputDirectory>/esb</outputDirectory>
         <outputFileNameMapping>${artifact.artifactId}-${artifact.baseVersion}.${artifact.extension}
         </outputFileNameMapping>
         <fileMode>644</fileMode>
         <includes>
            <include>org.ow2.petals:petals-esb-default-zip</include>
            <include>org.ow2.petals:petals-cli-distrib-zip</include>
            <include>org.ow2.petals:petals-registry-overlay-zip</include>
            <include>org.ow2.petals:petals-registry-cli-zip</include>
         </includes>
      </dependencySet>
      <dependencySet>
         <outputDirectory>/esb-components</outputDirectory>
         <outputFileNameMapping>${artifact.artifactId}-${artifact.baseVersion}.${artifact.extension}
         </outputFileNameMapping>
         <fileMode>644</fileMode>
         <includes>
            <include>org.ow2.petals:petals-se*</include>
            <include>org.ow2.petals:petals-bc*</include>
         </includes>
         <excludes>
            <exclude>org.ow2.petals:petals-se-jsr181-library</exclude>
            <exclude>org.ow2.petals:petals-bc-sftp-connection</exclude>
            <exclude>org.ow2.petals:petals-bc-soap-clientserver-api</exclude>
            <exclude>org.ow2.petals:petals-bc-gateway-clientserver-api</exclude>
            <exclude>org.ow2.petals:petals-se-flowable-clientserver-api</exclude>
         </excludes>
      </dependencySet>
      <dependencySet>
         <outputDirectory>/esb-sls</outputDirectory>
         <outputFileNameMapping>${artifact.artifactId}-${artifact.baseVersion}.${artifact.extension}
         </outputFileNameMapping>
         <fileMode>644</fileMode>
         <includes>
            <include>org.ow2.petals:petals-sl*</include>
         </includes>
      </dependencySet>
      <dependencySet>
         <outputDirectory>/tools</outputDirectory>
         <outputFileNameMapping>${artifact.artifactId}-${artifact.baseVersion}.${artifact.extension}
         </outputFileNameMapping>
         <fileMode>644</fileMode>
         <includes>
            <include>org.ow2.petals:petals-ant</include>
            <include>org.ow2.petals:petals-sample-client</include>
         </includes>
      </dependencySet>
      <dependencySet>
         <outputDirectory>/samples</outputDirectory>
         <outputFileNameMapping>${artifact.artifactId}-${artifact.baseVersion}.${artifact.extension}
         </outputFileNameMapping>
         <fileMode>644</fileMode>
         <includes>
            <include>org.ow2.petals.samples:*</include>
         </includes>
         <unpack>true</unpack>
         <unpackOptions>
            <includes>
               <!-- Only Petals Samples associated to components embedded in this distribution are included also -->
               <include>**/sa-camel-datamapping*</include>
               <include>**/sa-camel-hello-proxies*</include>
               <include>**/sa-eip*</include>
               <include>**/sa-filetransfer*</include>
               <include>**/sa-ftp*</include>
               <include>**/sa-gateway*</include>
               <include>**/sa-jsr*</include>
               <include>**/sa-mail*</include>
               <include>**/sa-mapping*</include>
               <include>**/sa-quartz*</include>
               <include>**/sa-sftp*</include>
               <include>**/sa-sql*</include>
               <include>**/sa-flowable-vacation-sample*</include>
               <include>**/sa-validation*</include>
               <include>**/sa-xslt*</include>
               <include>**/sa-xslt-autogenerate*</include>
            </includes>
            <excludes>
               <!-- We don't include license(s) and copyright information of the Petals Samples distribution archive -->
               <exclude>**/LICENSE</exclude>
               <exclude>**/COPYRIGHT</exclude>
               <exclude>**/THIRD-PARTY</exclude>
            </excludes>
         </unpackOptions>
      </dependencySet>
   </dependencySets>

   <fileSets>
      <fileSet>
         <!-- Product license & copyright -->
         <outputDirectory>/</outputDirectory>
         <fileMode>644</fileMode>
         <includes>
            <include>LICENSE</include>
            <include>COPYRIGHT</include>
         </includes>
      </fileSet>
      <fileSet>
         <!-- Third party products -->
         <outputDirectory>/</outputDirectory>
         <fileMode>644</fileMode>
         <includes>
            <include>THIRD-PARTY</include>
         </includes>
      </fileSet>
   </fileSets>
</assembly>
