<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

    <parent>
        <groupId>org.mule.extensions</groupId>
        <artifactId>mule-ee-core-modules-parent</artifactId>
        <version>1.4.2</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.mulesoft.modules</groupId>
    <artifactId>mule-cryptography-module</artifactId>
    <version>2.0.0</version>

    <packaging>mule-extension</packaging>

    <name>Mule Cryptography Module</name>
    <description>A Mule extension that provides functionality to encrypt and sign data</description>

    <properties>

        <mulesoftLicenseVersion>1.4.0</mulesoftLicenseVersion>
        <license.maven.plugin.version>4.2</license.maven.plugin.version>
        <licensePath>LICENSE_HEADER.txt</licensePath>
        <licenseYear>2023</licenseYear>

        <formatterConfigPath>formatter.xml</formatterConfigPath>
        <xmlsecVersion>3.0.5</xmlsecVersion>
        <commonsLangVersion>3.17.0</commonsLangVersion>
        <commonsIoVersion>2.18.0</commonsIoVersion>
        <commonsCodecVersion>1.15</commonsCodecVersion>
        <xmlunitVersion>1.6</xmlunitVersion>
        <muleEncryptionVersion>1.6.0</muleEncryptionVersion>
        <xmlApiVersion>2.0.2</xmlApiVersion>
        <licenseYear>2025</licenseYear>
        <muleExtensionsShadeVersion>1.0.4</muleExtensionsShadeVersion>
        <muleXmlModuleVersion>1.4.2</muleXmlModuleVersion>
        <!-- Remove when a new parent version with MTF is available -->
        <munit.input.directory>src/test/munit</munit.input.directory>
        <munit.output.directory>${basedir}/target/test-mule/munit</munit.output.directory>
        <munit.extensions.maven.plugin.version>1.5.0</munit.extensions.maven.plugin.version>
        <munit.version>3.4.0</munit.version>
        <mavenResources.version>3.3.1</mavenResources.version>
        <maven.dependency.plugin.version>2.10</maven.dependency.plugin.version>
        <jacoco.version>0.8.12</jacoco.version>
        <mule-sdk-api.version>0.9.2</mule-sdk-api.version>
        <surefire.failIfNoSpecifiedTests>${munit.failIfNoTests}</surefire.failIfNoSpecifiedTests>
        <java-module.version>1.2.14</java-module.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-module-tls</artifactId>
            <version>${mule.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.mule</groupId>
            <artifactId>mule-encryption</artifactId>
            <version>${muleEncryptionVersion}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>${commonsLangVersion}</version>
        </dependency>

        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>${commonsIoVersion}</version>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>${commonsCodecVersion}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.santuario</groupId>
            <artifactId>xmlsec</artifactId>
            <version>${xmlsecVersion}</version>
            <exclusions>
                <exclusion>
                    <groupId>xalan</groupId>
                    <artifactId>xalan</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.mule.sdk</groupId>
            <artifactId>mule-sdk-api</artifactId>
            <version>${mule-sdk-api.version}</version>
        </dependency>

        <dependency>
            <groupId>org.mule.tests</groupId>
            <artifactId>mule-tests-model</artifactId>
            <version>${mule.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.mule.tests.plugin</groupId>
            <artifactId>mule-tests-component-plugin</artifactId>
            <version>${mule.version}</version>
            <classifier>mule-plugin</classifier>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.google.guava</groupId>
                    <artifactId>guava</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>xmlunit</groupId>
            <artifactId>xmlunit</artifactId>
            <version>${xmlunitVersion}</version>
            <scope>test</scope>
        </dependency>

       <dependency>
            <groupId>org.mule.modules</groupId>
            <artifactId>mule-xml-module</artifactId>
            <version>${muleXmlModuleVersion}</version>
            <classifier>mule-plugin</classifier>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <repositories>
        <repository>
            <id>mulesoft-private</id>
            <name>Mulesoft internal repository</name>
            <url>https://repository.mulesoft.org/nexus/content/repositories/private/</url>
        </repository>
        <repository>
            <id>mule</id>
            <name>Mule Repository</name>
            <url>https://repository.mulesoft.org/nexus/content/repositories/public/</url>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>mulesoft-private</id>
            <name>Mulesoft internal repository</name>
            <url>https://repository.mulesoft.org/nexus/content/repositories/private/</url>
        </pluginRepository>
    </pluginRepositories>


    <build>
        <plugins>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco.version}</version>
                <configuration>
                    <destFile>${session.executionRootDirectory}/target/jacoco-java.exec</destFile>
                </configuration>
                <executions>
                    <execution>
                        <id>prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>merge</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>merge</goal>
                        </goals>
                        <configuration>
                            <destFile>${session.executionRootDirectory}/target/jacoco.exec</destFile>
                            <fileSets>
                                <fileSet>
                                    <directory>${session.executionRootDirectory}/target</directory>
                                    <includes>
                                        <include>*.exec</include>
                                    </includes>
                                </fileSet>
                            </fileSets>
                        </configuration>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                        <configuration>
                            <dataFile>${session.executionRootDirectory}/target/jacoco.exec</dataFile>
                            <outputDirectory>${session.executionRootDirectory}/target/jacoco</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>${license.maven.plugin.version}</version>
                <dependencies>
                    <dependency>
                        <groupId>com.mulesoft.license</groupId>
                        <artifactId>license</artifactId>
                        <version>${mulesoftLicenseVersion}</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <header>${licensePath}</header>
                    <properties>
                        <year>${licenseYear}</year>
                    </properties>
                    <includes>
                        <include>**/*.java</include>
                    </includes>
                    <mapping>
                        <java>SLASHSTAR_STYLE</java>
                    </mapping>
                </configuration>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>format</goal>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>${maven.dependency.plugin.version}</version>
                <configuration>
                    <usedDependencies>
                        <dependency>org.apache.commons:commons-lang3</dependency>
                    </usedDependencies>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.mule.runtime.plugins</groupId>
                <artifactId>mule-extensions-maven-plugin</artifactId>
                <version>${mule.app.plugins.maven.plugin.version}</version>
                <extensions>true</extensions>
                <executions>
                    <execution>
                        <id>default-extension-descriptor</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>extension-descriptor</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <classifier>mule-plugin</classifier>
                    <exportedPackages>
                        <exportedPackage>com.mulesoft.modules.cryptography.internal.jce</exportedPackage>
                    </exportedPackages>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <version>${mavenResources.version}</version>
                <executions>
                    <execution>
                        <id>copy-munit-resources</id>
                        <phase>process-test-resources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${munit.output.directory}</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>${munit.input.directory}</directory>
                                    <filtering>true</filtering>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>default-config</id>
            <activation>
                <property>
                    <name>!mule.security.model</name> <!-- if mule.security.model does not exist -->
                </property>
            </activation>
            <properties>
                <env.p12.keystore.extension>.p12</env.p12.keystore.extension>
                <env.jks.keystore.extension>.jks</env.jks.keystore.extension>
                <env.jceks.keystore.extension>.jceks</env.jceks.keystore.extension>
                <env.jceks.keystore.type>JCEKS</env.jceks.keystore.type>
                <env.pkcs12.keystore.type>PKCS12</env.pkcs12.keystore.type>
                <env.jks.keystore.type>JKS</env.jks.keystore.type>
                <env.ignore.on.fips.mode>false</env.ignore.on.fips.mode>
                <env.ignore.non.fips.mode>true</env.ignore.non.fips.mode>
                <testEncryptWithFingerprint.algorithm>DES</testEncryptWithFingerprint.algorithm>
                <bcpg-fips.version>1.0.7.1</bcpg-fips.version>
                <bc-fips.version>1.0.2.5</bc-fips.version>
                <template.file>CryptoTestCase.fips.template</template.file>
            </properties>
            <dependencies>
                <dependency>
                    <groupId>org.bouncycastle</groupId>
                    <artifactId>bc-fips</artifactId>
                    <version>${bc-fips.version}</version>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>org.bouncycastle</groupId>
                    <artifactId>bcpg-fips</artifactId>
                    <version>${bcpg-fips.version}</version>
                    <scope>provided</scope>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.mulesoft.munit</groupId>
                        <artifactId>munit-extensions-maven-plugin</artifactId>
                        <version>${munit.extensions.maven.plugin.version}</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>test</goal>
                                </goals>
                                <phase>integration-test</phase>
                            </execution>
                        </executions>
                        <configuration>
                            <runtimeConfiguration>
                                <discoverRuntimes>
                                    <includeSnapshots>false</includeSnapshots>
                                    <product>EE</product>
                                    <minMuleVersion>${minVersion}</minMuleVersion>
                                </discoverRuntimes>
                            </runtimeConfiguration>
                            <sharedLibraries>
                                <sharedLibrary>
                                    <groupId>org.bouncycastle</groupId>
                                    <artifactId>bc-fips</artifactId>
                                </sharedLibrary>
                                <sharedLibrary>
                                    <groupId>org.bouncycastle</groupId>
                                    <artifactId>bcpg-fips</artifactId>
                                </sharedLibrary>
                            </sharedLibraries>
                            <argLines>
                                <argLine>
                                    -javaagent:${settings.localRepository}/org/jacoco/org.jacoco.agent/${jacoco.version}/org.jacoco.agent-${jacoco.version}-runtime.jar=destfile=${session.executionRootDirectory}/target/jacoco-bc-fips-default-munit.exec
                                </argLine>
                            </argLines>
                        </configuration>
                        <dependencies>
                            <dependency>
                                <groupId>com.mulesoft.munit</groupId>
                                <artifactId>munit-runner</artifactId>
                                <version>${munit.version}</version>
                                <classifier>mule-plugin</classifier>
                            </dependency>
                            <dependency>
                                <groupId>com.mulesoft.munit</groupId>
                                <artifactId>munit-tools</artifactId>
                                <version>${munit.version}</version>
                                <classifier>mule-plugin</classifier>
                            </dependency>
                            <dependency>
                                <groupId>org.mule.module</groupId>
                                <artifactId>mule-java-module</artifactId>
                                <version>${java-module.version}</version>
                                <classifier>mule-plugin</classifier>
                            </dependency>
                            <dependency>
                                <groupId>org.bouncycastle</groupId>
                                <artifactId>bc-fips</artifactId>
                                <version>${bc-fips.version}</version>
                            </dependency>
                            <dependency>
                                <groupId>org.bouncycastle</groupId>
                                <artifactId>bcpg-fips</artifactId>
                                <version>${bcpg-fips.version}</version>
                            </dependency>
                        </dependencies>
                    </plugin>
                    <plugin>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <version>3.1.0</version>
                        <executions>
                            <execution>
                                <id>rename-template</id>
                                <phase>generate-test-sources</phase>
                                <configuration>
                                    <target>
                                        <copy file="src/test/resources/template/${template.file}"
                                              tofile="src/test/java/com/mulesoft/modules/cryptography/CryptoTestCase.java"
                                              overwrite="true"/>
                                    </target>
                                </configuration>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>fips-config</id>
            <activation>
                <property>
                    <name>mule.security.model</name>
                    <value>fips140-2</value> <!-- if mule.security.model == fips140-2 -->
                </property>
            </activation>
            <properties>
                <env.p12.keystore.extension>.bcfks</env.p12.keystore.extension>
                <env.jks.keystore.extension>.bcfks</env.jks.keystore.extension>
                <env.jceks.keystore.extension>.bcfks</env.jceks.keystore.extension>
                <env.jceks.keystore.type>BCFKS</env.jceks.keystore.type>
                <env.pkcs12.keystore.type>BCFKS</env.pkcs12.keystore.type>
                <env.jks.keystore.type>BCFKS</env.jks.keystore.type>
                <env.ignore.on.fips.mode>true</env.ignore.on.fips.mode>
                <env.ignore.non.fips.mode>false</env.ignore.non.fips.mode>
                <testEncryptWithFingerprint.algorithm>AES_128</testEncryptWithFingerprint.algorithm>
                <template.file>CryptoTestCase.fips.template</template.file>
                <bcpg-fips.version>1.0.7.1</bcpg-fips.version>
                <bc-fips.version>1.0.2.5</bc-fips.version>
            </properties>
            <dependencies>
                <dependency>
                    <groupId>org.bouncycastle</groupId>
                    <artifactId>bc-fips</artifactId>
                    <version>${bc-fips.version}</version>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>org.bouncycastle</groupId>
                    <artifactId>bcpg-fips</artifactId>
                    <version>${bcpg-fips.version}</version>
                    <scope>provided</scope>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.mulesoft.munit</groupId>
                        <artifactId>munit-extensions-maven-plugin</artifactId>
                        <version>${munit.extensions.maven.plugin.version}</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>test</goal>
                                </goals>
                                <phase>integration-test</phase>
                            </execution>
                        </executions>
                        <configuration>
                            <runtimeConfiguration>
                                <discoverRuntimes>
                                    <includeSnapshots>false</includeSnapshots>
                                    <product>EE</product>
                                    <minMuleVersion>${minVersion}</minMuleVersion>
                                </discoverRuntimes>
                            </runtimeConfiguration>
                            <sharedLibraries>
                                <sharedLibrary>
                                    <groupId>org.bouncycastle</groupId>
                                    <artifactId>bc-fips</artifactId>
                                </sharedLibrary>
                                <sharedLibrary>
                                    <groupId>org.bouncycastle</groupId>
                                    <artifactId>bcpg-fips</artifactId>
                                </sharedLibrary>
                            </sharedLibraries>
                            <argLines>
                                <argLine>
                                    -javaagent:${settings.localRepository}/org/jacoco/org.jacoco.agent/${jacoco.version}/org.jacoco.agent-${jacoco.version}-runtime.jar=destfile=${session.executionRootDirectory}/target/jacoco-bc-fips-140-2-munit.exec
                                </argLine>
                            </argLines>
                        </configuration>
                        <dependencies>
                            <dependency>
                                <groupId>com.mulesoft.munit</groupId>
                                <artifactId>munit-runner</artifactId>
                                <version>${munit.version}</version>
                                <classifier>mule-plugin</classifier>
                            </dependency>
                            <dependency>
                                <groupId>com.mulesoft.munit</groupId>
                                <artifactId>munit-tools</artifactId>
                                <version>${munit.version}</version>
                                <classifier>mule-plugin</classifier>
                            </dependency>
                            <dependency>
                                <groupId>org.mule.module</groupId>
                                <artifactId>mule-java-module</artifactId>
                                <version>${java-module.version}</version>
                                <classifier>mule-plugin</classifier>
                            </dependency>
                            <dependency>
                                <groupId>org.bouncycastle</groupId>
                                <artifactId>bc-fips</artifactId>
                                <version>${bc-fips.version}</version>
                            </dependency>
                            <dependency>
                                <groupId>org.bouncycastle</groupId>
                                <artifactId>bcpg-fips</artifactId>
                                <version>${bcpg-fips.version}</version>
                            </dependency>
                        </dependencies>
                    </plugin>
                    <plugin>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <version>3.1.0</version>
                        <executions>
                            <execution>
                                <id>rename-template</id>
                                <phase>generate-test-sources</phase>
                                <configuration>
                                    <target>
                                        <copy file="src/test/resources/template/${template.file}"
                                              tofile="src/test/java/com/mulesoft/modules/cryptography/CryptoTestCase.java"
                                              overwrite="true"/>
                                    </target>
                                </configuration>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!-- Profile for testing Bouncy Castle jdk18on -->
        <profile>
            <id>bc-jdk18on-config</id>
            <activation>
                <property>
                    <name>mule.security.model</name>
                    <value>jdk18on</value> <!-- This is not a real option, we are using this value to force mutual exclusion. -->
                </property>
            </activation>
            <properties>
                <env.p12.keystore.extension>.p12</env.p12.keystore.extension>
                <env.jks.keystore.extension>.jks</env.jks.keystore.extension>
                <env.jceks.keystore.extension>.jceks</env.jceks.keystore.extension>
                <env.jceks.keystore.type>JCEKS</env.jceks.keystore.type>
                <env.pkcs12.keystore.type>PKCS12</env.pkcs12.keystore.type>
                <env.jks.keystore.type>JKS</env.jks.keystore.type>
                <env.ignore.on.fips.mode>false</env.ignore.on.fips.mode>
                <env.ignore.non.fips.mode>true</env.ignore.non.fips.mode>
                <testEncryptWithFingerprint.algorithm>DES</testEncryptWithFingerprint.algorithm>
                <bc.version>1.80</bc.version>
                <template.file>CryptoTestCase.jdk18on.template</template.file>
            </properties>
            <dependencies>
                <dependency>
                    <groupId>org.bouncycastle</groupId>
                    <artifactId>bcprov-jdk18on</artifactId>
                    <version>${bc.version}</version>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>org.bouncycastle</groupId>
                    <artifactId>bcpg-jdk18on</artifactId>
                    <version>${bc.version}</version>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>org.bouncycastle</groupId>
                    <artifactId>bcpkix-jdk18on</artifactId>
                    <version>${bc.version}</version>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>org.bouncycastle</groupId>
                    <artifactId>bcutil-jdk18on</artifactId>
                    <version>${bc.version}</version>
                    <scope>provided</scope>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.mulesoft.munit</groupId>
                        <artifactId>munit-extensions-maven-plugin</artifactId>
                        <version>${munit.extensions.maven.plugin.version}</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>test</goal>
                                </goals>
                                <phase>integration-test</phase>
                            </execution>
                        </executions>
                        <configuration>
                            <runtimeConfiguration>
                                <discoverRuntimes>
                                    <includeSnapshots>false</includeSnapshots>
                                    <product>EE</product>
                                    <minMuleVersion>${minVersion}</minMuleVersion>
                                </discoverRuntimes>
                            </runtimeConfiguration>
                            <sharedLibraries>
                                <sharedLibrary>
                                    <groupId>org.bouncycastle</groupId>
                                    <artifactId>bcprov-jdk18on</artifactId>
                                </sharedLibrary>
                                <sharedLibrary>
                                    <groupId>org.bouncycastle</groupId>
                                    <artifactId>bcpg-jdk18on</artifactId>
                                </sharedLibrary>
                                <sharedLibrary>
                                    <groupId>org.bouncycastle</groupId>
                                    <artifactId>bcpkix-jdk18on</artifactId>
                                </sharedLibrary>
                                <sharedLibrary>
                                    <groupId>org.bouncycastle</groupId>
                                    <artifactId>bcutil-jdk18on</artifactId>
                                </sharedLibrary>
                            </sharedLibraries>
                            <argLines>
                                <argLine>
                                    -javaagent:${settings.localRepository}/org/jacoco/org.jacoco.agent/${jacoco.version}/org.jacoco.agent-${jacoco.version}-runtime.jar=destfile=${session.executionRootDirectory}/target/jacoco-bc-jdk18on-munit.exec
                                </argLine>
                            </argLines>
                        </configuration>
                        <dependencies>
                            <dependency>
                                <groupId>com.mulesoft.munit</groupId>
                                <artifactId>munit-runner</artifactId>
                                <version>${munit.version}</version>
                                <classifier>mule-plugin</classifier>
                            </dependency>
                            <dependency>
                                <groupId>com.mulesoft.munit</groupId>
                                <artifactId>munit-tools</artifactId>
                                <version>${munit.version}</version>
                                <classifier>mule-plugin</classifier>
                            </dependency>
                            <dependency>
                                <groupId>org.mule.module</groupId>
                                <artifactId>mule-java-module</artifactId>
                                <version>${java-module.version}</version>
                                <classifier>mule-plugin</classifier>
                            </dependency>
                            <dependency>
                                <groupId>org.bouncycastle</groupId>
                                <artifactId>bcprov-jdk18on</artifactId>
                                <version>${bc.version}</version>
                            </dependency>
                            <dependency>
                                <groupId>org.bouncycastle</groupId>
                                <artifactId>bcpg-jdk18on</artifactId>
                                <version>${bc.version}</version>
                            </dependency>
                            <dependency>
                                <groupId>org.bouncycastle</groupId>
                                <artifactId>bcpkix-jdk18on</artifactId>
                                <version>${bc.version}</version>
                            </dependency>
                            <dependency>
                                <groupId>org.bouncycastle</groupId>
                                <artifactId>bcutil-jdk18on</artifactId>
                                <version>${bc.version}</version>
                            </dependency>
                        </dependencies>
                    </plugin>
                    <plugin>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <version>3.1.0</version>
                        <executions>
                            <execution>
                                <id>rename-template</id>
                                <phase>generate-test-sources</phase>
                                <configuration>
                                    <target>
                                        <copy file="src/test/resources/template/${template.file}"
                                              tofile="src/test/java/com/mulesoft/modules/cryptography/CryptoTestCase.java"
                                              overwrite="true"/>
                                    </target>
                                </configuration>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
