<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>ru.entaxy.ion.distribution</groupId>
        <artifactId>entaxy-ion-karaf-dist</artifactId>
        <version>1.12.0</version>
    </parent>
    <artifactId>entaxy-ion-karaf</artifactId>
    <packaging>karaf-assembly</packaging>
    <name>Entaxy :: Distribution :: Karaf</name>
    <description>Entaxy ready Karaf ${karaf.version} distribution</description>

    <dependencyManagement>
        <dependencies>

            <!-- USE THIS DEPENDENCY for Karaf from 4.2.11 -->
            <!-- dependency>
                <groupId>org.apache.karaf</groupId>
                <artifactId>karaf-bom</artifactId>
                <version>${karaf.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency -->

            <!-- TEMP BOM for Karaf 4.2.9 -->
            <dependency>
                <groupId>org.apache.karaf</groupId>
                <artifactId>karaf-bom</artifactId>
                <version>4.2.9-ENTAXY</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>


    <dependencies>

        <dependency>
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>framework</artifactId>
            <version>${karaf.version}</version>
            <type>kar</type>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>framework</artifactId>
            <version>${karaf.version}</version>
            <classifier>features</classifier>
            <type>xml</type>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>standard</artifactId>
            <version>${karaf.version}</version>
            <classifier>features</classifier>
            <type>xml</type>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>spring</artifactId>
            <version>${karaf.version}</version>
            <classifier>features</classifier>
            <type>xml</type>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>enterprise</artifactId>
            <version>${karaf.version}</version>
            <classifier>features</classifier>
            <type>xml</type>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>ru.entaxy.ion.distribution</groupId>
            <artifactId>entaxy-ion-karaf-features</artifactId>
            <version>${project.version}</version>
            <type>xml</type>
            <classifier>features</classifier>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>ru.entaxy.esb.underlying</groupId>
            <artifactId>entaxy-underlying-features</artifactId>
            <version>${entaxy.underlying.version}</version>
            <type>xml</type>
            <classifier>features</classifier>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.cxf.karaf</groupId>
            <artifactId>apache-cxf</artifactId>
            <version>${cxf.version}</version>
            <type>xml</type>
            <classifier>features</classifier>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.camel.karaf</groupId>
            <artifactId>apache-camel</artifactId>
            <version>${camel.version}</version>
            <type>xml</type>
            <classifier>features</classifier>
            <scope>runtime</scope>
        </dependency>

		<!-- REPLACED with ION-customized version -->
        <dependency>
            <groupId>org.apache.activemq</groupId>
            <artifactId>artemis-features</artifactId>
            <version>${activemq.version}-ENTAXY</version>
            <classifier>features</classifier>
            <type>xml</type>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-osgi</artifactId>
            <version>${hibernate.version}</version>
            <type>xml</type>
            <classifier>karaf</classifier>
            <scope>runtime</scope>
        </dependency>

       <!-- <dependency>
            <groupId>org.apache.ignite</groupId>
            <artifactId>ignite-osgi-karaf</artifactId>
            <version>${ignite.version}</version>
            <type>xml</type>
            <classifier>features</classifier>
            <scope>runtime</scope>
        </dependency>-->


        <dependency>
            <groupId>ru.entaxy.cellar</groupId>
            <artifactId>apache-karaf-cellar</artifactId>
            <version>${cellar.version}</version>
            <type>xml</type>
            <classifier>features</classifier>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>ru.entaxy.cave</groupId>
            <artifactId>apache-karaf-cave</artifactId>
            <version>${cave.version}</version>
            <type>xml</type>
            <classifier>features</classifier>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>org.ops4j.pax.jdbc</groupId>
            <artifactId>pax-jdbc-features</artifactId>
            <version>1.4.4-ENTAXY</version>
            <type>xml</type>
            <classifier>features</classifier>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.ops4j.pax.transx</groupId>
            <artifactId>pax-transx-features</artifactId>
            <version>0.4.4-ENTAXY</version>
            <type>xml</type>
            <classifier>features</classifier>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.aries.jpa</groupId>
            <artifactId>jpa-features</artifactId>
            <version>2.7.2-ENTAXY</version>
            <type>xml</type>
            <classifier>features</classifier>
            <scope>compile</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>

            <!-- 
            	WE'RE JUST UNPACKING READY-TO-USE RESOURCES FROM 
            		entaxy-underlying-configuration
            		platform-backward-compat 
            -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>download-features-replacements</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>ru.entaxy.ion.distribution</groupId>
                                    <artifactId>assembled-replacements</artifactId>
                                    <version>${project.version}</version>
                                    <type>zip</type>
                                    <classifier>assembly</classifier>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>${project.build.directory}/assembly-resources/system</outputDirectory>
                                </artifactItem>

                            </artifactItems>
                        </configuration>
                    </execution>
                    <execution>
                        <id>provide-features-processing</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>ru.entaxy.esb.underlying</groupId>
                                    <artifactId>entaxy-underlying-configuration</artifactId>
                                    <version>${entaxy.underlying.version}</version>
                                    <type>xml</type>
                                    <classifier>org.apache.karaf.features</classifier>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>${project.build.directory}/support</outputDirectory>
                                    <destFileName>org.apache.karaf.features.xml</destFileName>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-to-assembly-resources</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <!-- properties -->
                                <artifactItem>
                                    <groupId>ru.entaxy.esb.underlying</groupId>
                                    <artifactId>entaxy-underlying-configuration</artifactId>
                                    <version>${entaxy.underlying.version}</version>
                                    <type>properties</type>
                                    <classifier>jre</classifier>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>${project.build.directory}/assembly-resources/etc</outputDirectory>
                                    <destFileName>jre.properties</destFileName>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>ru.entaxy.esb.underlying</groupId>
                                    <artifactId>entaxy-underlying-configuration</artifactId>
                                    <version>${entaxy.underlying.version}</version>
                                    <type>properties</type>
                                    <classifier>system</classifier>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>${project.build.directory}/assembly-resources/etc</outputDirectory>
                                    <destFileName>system.properties</destFileName>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>ru.entaxy.esb.underlying</groupId>
                                    <artifactId>entaxy-underlying-configuration</artifactId>
                                    <version>${entaxy.underlying.version}</version>
                                    <type>properties</type>
                                    <classifier>config</classifier>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>${project.build.directory}/assembly-resources/etc</outputDirectory>
                                    <destFileName>config.properties</destFileName>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>ru.entaxy.esb.underlying</groupId>
                                    <artifactId>entaxy-underlying-configuration</artifactId>
                                    <version>${entaxy.underlying.version}</version>
                                    <type>properties</type>
                                    <classifier>entaxy</classifier>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>${project.build.directory}/assembly-resources/etc</outputDirectory>
                                    <destFileName>entaxy.properties</destFileName>
                                </artifactItem>
                                <!-- cfg & xml -->
<!--                                <artifactItem>-->
<!--                                    <groupId>ru.entaxy.esb.underlying</groupId>-->
<!--                                    <artifactId>entaxy-underlying-configuration</artifactId>-->
<!--                                    <version>${entaxy.underlying.version}</version>-->
<!--                                    <type>cfg</type>-->
<!--                                    <classifier>org.apache.karaf.cellar.groups</classifier>-->
<!--                                    <overWrite>true</overWrite>-->
<!--                                    <outputDirectory>${project.build.directory}/assembly-resources/etc</outputDirectory>-->
<!--                                    <destFileName>org.apache.karaf.cellar.groups.cfg</destFileName>-->
<!--                                </artifactItem>-->
                                <artifactItem>
                                    <groupId>ru.entaxy.esb.underlying</groupId>
                                    <artifactId>entaxy-underlying-configuration</artifactId>
                                    <version>${entaxy.underlying.version}</version>
                                    <type>cfg</type>
                                    <classifier>org.apache.karaf.cellar.node</classifier>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>${project.build.directory}/assembly-resources/etc</outputDirectory>
                                    <destFileName>org.apache.karaf.cellar.node.cfg</destFileName>
                                </artifactItem>

                                <artifactItem>
                                    <groupId>ru.entaxy.esb.underlying</groupId>
                                    <artifactId>entaxy-underlying-configuration</artifactId>
                                    <version>${entaxy.underlying.version}</version>
                                    <type>cfg</type>
                                    <classifier>org.apache.karaf.management</classifier>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>${project.build.directory}/assembly-resources/etc</outputDirectory>
                                    <destFileName>org.apache.karaf.management.cfg</destFileName>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>ru.entaxy.esb.underlying</groupId>
                                    <artifactId>entaxy-underlying-configuration</artifactId>
                                    <version>${entaxy.underlying.version}</version>
                                    <type>cfg</type>
                                    <classifier>org.apache.karaf.shell</classifier>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>${project.build.directory}/assembly-resources/etc</outputDirectory>
                                    <destFileName>org.apache.karaf.shell.cfg</destFileName>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>ru.entaxy.esb.underlying</groupId>
                                    <artifactId>entaxy-underlying-configuration</artifactId>
                                    <version>${entaxy.underlying.version}</version>
                                    <type>cfg</type>
                                    <classifier>org.ops4j.pax.url.mvn</classifier>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>${project.build.directory}/assembly-resources/etc</outputDirectory>
                                    <destFileName>org.ops4j.pax.url.mvn.cfg</destFileName>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>ru.entaxy.esb.underlying</groupId>
                                    <artifactId>entaxy-underlying-configuration</artifactId>
                                    <version>${entaxy.underlying.version}</version>
                                    <type>cfg</type>
                                    <classifier>org.ops4j.pax.web</classifier>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>${project.build.directory}/assembly-resources/etc</outputDirectory>
                                    <destFileName>org.ops4j.pax.web.cfg</destFileName>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>ru.entaxy.esb.underlying</groupId>
                                    <artifactId>entaxy-underlying-configuration</artifactId>
                                    <version>${entaxy.underlying.version}</version>
                                    <type>cfg</type>
                                    <classifier>org.ops4j.pax.logging</classifier>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>${project.build.directory}/assembly-resources/etc</outputDirectory>
                                    <destFileName>org.ops4j.pax.logging.cfg</destFileName>
                                </artifactItem>
                                
                                <artifactItem>
                                    <groupId>ru.entaxy.esb.underlying</groupId>
                                    <artifactId>entaxy-underlying-configuration</artifactId>
                                    <version>${entaxy.underlying.version}</version>
                                    <type>xml</type>
                                    <classifier>org.apache.karaf.features</classifier>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>${project.build.directory}/assembly-resources/etc</outputDirectory>
                                    <destFileName>org.apache.karaf.features.xml</destFileName>
                                </artifactItem>
							
								<!-- shell extensions script -->
                                <artifactItem>
                                    <groupId>ru.entaxy.esb.underlying</groupId>
                                    <artifactId>entaxy-underlying-configuration</artifactId>
                                    <version>${entaxy.underlying.version}</version>
                                    <type>script</type>
                                    <classifier>entaxy.shell</classifier>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>${project.build.directory}/assembly-resources/etc/scripts</outputDirectory>
                                    <destFileName>entaxy.shell.script</destFileName>
                                </artifactItem>

								<!-- shell extensions script for backward compatibility management -->
                                <artifactItem>
                                    <groupId>ru.entaxy.platform</groupId>
                                    <artifactId>platform-backward-compat</artifactId>
                                    <version>${project.version}</version>
                                    <type>script</type>
                                    <classifier>entaxy.bc.shell</classifier>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>${project.build.directory}/assembly-resources/etc/scripts</outputDirectory>
                                    <destFileName>entaxy.bc.shell.script</destFileName>
                                </artifactItem>
								
                                <!-- installation scripts -->
                                <artifactItem>
                                    <groupId>ru.entaxy.esb</groupId>
                                    <artifactId>platform</artifactId>
                                    <version>${entaxy.platform.version}</version>
                                    <type>install</type>
                                    <classifier>entaxy-platform</classifier>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>${project.build.directory}/assembly-resources/scripts
                                    </outputDirectory>
                                    <destFileName>entaxy-platform.install</destFileName>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>ru.entaxy.esb</groupId>
                                    <artifactId>ui</artifactId>
                                    <version>${entaxy.ui.version}</version>
                                    <type>install</type>
                                    <classifier>entaxy-ui</classifier>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>${project.build.directory}/assembly-resources/scripts
                                    </outputDirectory>
                                    <destFileName>entaxy-ui.install</destFileName>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                    <execution>
                        <id>prepare-features-combine</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <!--
                                    we'll combine org.apache.karaf.features.repos.cfg
                                    of the ones from
                                    - ru.entaxy.esb.underlying/entaxy-underlying-configuration
                                    - ru.entaxy.esb.ui/entaxy-hawtio
                                    so we unpack it to temp directory
                                    and then merge with antrun
                                 -->
                                <artifactItem>
                                    <groupId>ru.entaxy.esb.underlying</groupId>
                                    <artifactId>entaxy-underlying-configuration</artifactId>
                                    <version>${entaxy.underlying.version}</version>
                                    <type>cfg</type>
                                    <classifier>org.apache.karaf.features.repos</classifier>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>${project.build.directory}/temp/org.apache.karaf.features.repos
                                    </outputDirectory>
                                    <destFileName>fragment-1.cfg</destFileName>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>ru.entaxy.esb.ui</groupId>
                                    <artifactId>entaxy-hawtio</artifactId>
                                    <version>${entaxy.ui.hawtio.version}</version>
                                    <type>cfg</type>
                                    <classifier>org.apache.karaf.features.repos</classifier>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>${project.build.directory}/temp/org.apache.karaf.features.repos
                                    </outputDirectory>
                                    <destFileName>fragment-2.cfg</destFileName>
                                </artifactItem>

                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>

                    <!--
                        combine resulting org.apache.karaf.features.repos.cfg
                        from fragments in ${project.build.directory}/temp/org.apache.karaf.features.repos
                    -->

                    <execution>
                        <id>combine_cfg</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target>
                                <delete file="${project.build.directory}/assembly/etc/org.apache.karaf.features.repos.cfg"/>
                                <concat destfile="${project.build.directory}/assembly/etc/org.apache.karaf.features.repos.cfg"
                                        force="yes">
                                    <fileset dir="${project.build.directory}/temp/org.apache.karaf.features.repos">
                                        <include name="**/*.cfg"></include>
                                    </fileset>
                                </concat>
                                <!-- copy file="${project.build.directory}/tmp/startup.properties"
                                    tofile="${project.build.directory}/assembly/etc/startup.properties" / -->
                            </target>

                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <configuration>
                            <target>
                                <mkdir dir="${project.build.directory}/assembly-resources"/>
                                <copy todir="${project.build.directory}/assembly-resources" overwrite="true">
                                    <fileset dir="${basedir}/src/main/non-filtered-resources"/>
                                </copy>
                                <fixcrlf srcdir="${project.build.directory}/assembly-resources/bin" eol="lf"/>
                            </target>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.karaf.tooling</groupId>
                <artifactId>karaf-maven-plugin</artifactId>
                <extensions>true</extensions>
                <executions>

                    <execution>
                        <id>default-assembly</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>assembly</goal>
                        </goals>
                        <configuration>
                            <sourceDirectory>${project.build.directory}/assembly-resources</sourceDirectory>
                        </configuration>
                    </execution>
                </executions>

                <configuration>
                    <finalName>${project.artifactId}</finalName>
                    <featuresProcessing>${project.build.directory}/support/org.apache.karaf.features.xml
                    </featuresProcessing>
                    <installedFeatures>
                        <feature>wrapper</feature>
                        <feature>camel-jpa</feature>
                        <feature>camel-jaxb</feature>
                        <feature>camel-base64</feature>
                        <feature>camel-zip-deflater</feature>
                        <feature>camel-zipfile</feature>
                        <feature>cxf-commands</feature>
                        <feature>cellar-kubernetes</feature>
                        <feature>entaxy-karaf-jaxb-support</feature>
                    </installedFeatures>

                    <bootFeatures>

                        <feature>feature</feature>
                        <feature>jaas</feature>
                        <feature>ssh</feature>
                        <feature>management</feature>
                        <feature>bundle</feature>
                        <feature>config</feature>
                        <feature>deployer</feature>
                        <feature>diagnostic</feature>
                        <feature>instance</feature>
                        <feature>kar</feature>
                        <feature>war</feature>
                        <feature>log</feature>
                        <feature>package</feature>
                        <feature>service</feature>
                        <feature>system</feature>

                        <feature>cxf</feature>
                        <feature>camel</feature>
                        <feature>camel-blueprint</feature>
                        <feature>camel-jaxb</feature>
                        <feature>camel-cxf</feature>
                        <feature>camel-amqp</feature>
                        <feature>camel-core</feature>
                        <feature>camel-http</feature>
                        <feature>camel-eventadmin</feature>
                        <feature>camel-quartz</feature>
                        <feature>camel-jsonpath</feature>
                        <feature>camel-gson</feature>
                        <feature>camel-ognl</feature>
						<feature>camel-freemarker</feature>

                        <feature>artemis-jms-client</feature>
                        <feature>camel-jms</feature>
                        <feature>entaxy-hibernate-support</feature>

                        <feature>jdbc</feature>
                        <feature>pax-jdbc-pool-dbcp2</feature>
                        <feature>jndi</feature>
                        <feature version="[2,3)">jpa</feature>
                        <!-- feature>entaxy-karaf-db-support</feature -->

                        <feature>entaxy-karaf-ignite-support</feature>
                        <feature>camel-sql</feature>
                        <feature>camel-ftp</feature>
                        <feature>camel-jdbc</feature>
                        <feature>camel-mongodb</feature>
                        <feature>camel-telegram</feature>

                        <feature>cellar</feature>
                        <feature>cellar-eventadmin</feature>

                        <feature>cave-repository</feature>
                        <feature>cave-repository-api</feature>
						
						<feature>entaxy-karaf-jgroup-support</feature>
						<feature>entaxy-karaf-healthcheck-support</feature>
						
                    </bootFeatures>

                    <startupFeatures>
						<feature>framework</feature>
                        <feature>wrap</feature>
                        <feature>classpath</feature>
                        <feature>shell</feature>
                        <feature>shell-compat</feature>
						
                        <feature>entaxy-underlying-configuration</feature>
                        <feature>scheduler</feature>
                        <feature>eventadmin</feature>
                        <feature>aries-blueprint</feature>

                        <feature>entaxy-ion-karaf-startup</feature>

                        <feature version="${spring.bundles.version}">spring</feature>
                        <feature version="${spring.bundles.version}">spring-jdbc</feature>
                        <feature version="${spring.bundles.version}">spring-tx</feature>

                    </startupFeatures>

                    <libraries>
                    </libraries>
                    <javase>11</javase>
                    <generateConsistencyReport>${project.build.directory}</generateConsistencyReport>
                    <consistencyReportProjectName>Entaxy Karaf (full)</consistencyReportProjectName>
                    <installAllFeaturesByDefault>false</installAllFeaturesByDefault>
                    <pathPrefix>${project.artifactId}</pathPrefix>
                    <usePathPrefix>true</usePathPrefix>
                </configuration>
            </plugin>

        </plugins>
    </build>

    <profiles>
        <profile>
            <id>entaxy-karaf-license-config</id>
            <activation>
                <property>
                    <name>processLicense</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>license-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>update-project-license</id>
                                <goals>
                                    <goal>update-project-license</goal>
                                </goals>
                                <configuration>
                                    <bundleLicensePath>LICENSE</bundleLicensePath>
                                    <generateBundle>true</generateBundle>
                                </configuration>
                            </execution>

                            <execution>
                                <id>add-third-party</id>
                                <goals>
                                    <goal>add-third-party</goal>
                                </goals>
                                <configuration>
                                    <!-- @TODO make this work -->
                                    <bundleThirdPartyPath>DEPENDENCIES</bundleThirdPartyPath>
                                    <generateBundle>true</generateBundle>

                                    <includeTransitiveDependencies>false</includeTransitiveDependencies>
                                    <excludedScopes>test, provided</excludedScopes>

                                </configuration>
                            </execution>

                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
