<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~ http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<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 http://maven.apache.org/maven-v4_0_0.xsd">

    <parent>
        <groupId>org.wso2.is</groupId>
        <artifactId>identity-server-parent</artifactId>
        <version>7.2.0-beta</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <artifactId>wso2is</artifactId>
    <packaging>jar</packaging>
    <name>Identity Server</name>
    <url />
    <description>Identity Server: Distribution</description>

    <dependencies>
        <dependency>
            <groupId>org.wso2.orbit.com.h2database</groupId>
            <artifactId>h2-engine</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.rampart</groupId>
            <artifactId>rampart</artifactId>
            <type>mar</type>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.neethi</groupId>
                    <artifactId>neethi</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.woden</groupId>
                    <artifactId>woden-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.woden</groupId>
                    <artifactId>woden-impl-dom</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
        </dependency>
        <!--
              dependency> <groupId>org.wso2.carbon</groupId>
              <artifactId>com.wso2.carbon.multitenancy.tenant.mgt</artifactId>
              <version>${carbon.version}</version> </dependency> <dependency>
              <groupId>org.wso2.carbon</groupId>
              <artifactId>com.wso2.carbon.multitenancy.theme.mgt</artifactId>
              <version>${carbon.version}</version > </dependency -->

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.0-alpha-4</version>
                <inherited>false</inherited>
                <executions>
                    <!-- Add Rest API Resources web application-->
                    <execution>
                        <id>add-rest-api-resources-all</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.wso2.is</groupId>
                                    <artifactId>api-resources-full</artifactId>
                                    <version>${project.version}</version>
                                    <type>war</type>
                                    <overWrite>true</overWrite>
                                    <destFileName>api.war</destFileName>
                                    <outputDirectory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps</outputDirectory>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                    <execution>
                        <id>unpack-wso2carbon</id>
                        <phase>package</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.wso2.carbon</groupId>
                                    <artifactId>wso2carbon-core</artifactId>
                                    <version>${carbon.kernel.version}</version>
                                    <type>zip</type>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>target</outputDirectory>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.wso2.maven</groupId>
                <artifactId>wso2-maven-json-merge-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>merge</goal>
                        </goals>
                        <configuration>
                            <tasks>
                                <task>
                                    <base>${basedir}/src/repository/resources/conf/default.json</base>
                                    <include>
                                        <param>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/default.json</param>
                                        <param>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/org.wso2.carbon.identity.core.server.feature.default.json</param>
                                        <param>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/org.wso2.carbon.databridge.agent.default.json</param>
                                        <param>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/org.wso2.carbon.event.output.adapter.default.json</param>
                                        <param>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/org.wso2.carbon.event.processor.manager.core.default.json</param>
                                        <param>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/org.wso2.carbon.identity.application.authentication.framework.server.feature.default.json</param>
                                        <param>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/org.wso2.carbon.identity.event.server.feature.default.json</param>
                                        <param>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/org.wso2.carbon.identity.captcha.server.feature.default.json</param>
                                        <param>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/org.wso2.carbon.identity.scim2.common.feature.default.json</param>
                                        <param>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/org.wso2.carbon.identity.scim.common.feature.default.json</param>
                                        <param>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/org.wso2.carbon.consent.mgt.server.feature.default.json</param>
                                        <param>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/org.wso2.carbon.humantask.server.feature.default.json</param>
                                        <param>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/org.wso2.carbon.tenant.common.server.default.json</param>
                                        <param>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/org.wso2.carbon.extension.identity.x509Certificate.validation.server.feature.default.json</param>
                                    </include>
                                    <target>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/default.json</target>
                                    <mergeChildren>true</mergeChildren>
                                </task>
                                <task>
                                    <base>${basedir}/src/repository/resources/conf/infer.json</base>
                                    <include>
                                        <param>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/infer.json</param>
                                        <param>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/org.wso2.carbon.identity.core.server.feature.infer.json</param>
                                        <param>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/org.wso2.carbon.identity.event.server.feature.infer.json</param>
                                        <param>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/org.wso2.carbon.identity.scim2.common.feature.infer.json</param>
                                    </include>
                                    <target>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/infer.json</target>
                                    <mergeChildren>true</mergeChildren>
                                </task>
                                <task>
                                    <base>${basedir}/src/repository/resources/conf/key-mappings.json</base>
                                    <include>
                                        <param>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/key-mappings.json</param>
                                        <param>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/org.wso2.carbon.identity.core.server.feature.key-mappings.json</param>
                                        <param>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/org.wso2.carbon.identity.application.authentication.framework.server.feature.key-mappings.json</param>
                                        <param>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/org.wso2.carbon.identity.event.server.feature.key-mappings.json</param>
                                        <param>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/org.wso2.carbon.identity.scim.common.feature.key-mappings.json</param>
                                    </include>
                                    <target>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/key-mappings.json</target>
                                </task>
                                <task>
                                    <base>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/validator.json</base>
                                    <include>
                                        <param>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/org.wso2.carbon.identity.core.server.feature.validator.json</param>
                                        <param>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/org.wso2.carbon.identity.captcha.server.feature.validator.json</param>
                                    </include>
                                    <target>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/validator.json</target>
                                </task>
                                <task>
                                    <base>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/unit-resolve.json</base>
                                    <include>
                                        <param>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/org.wso2.carbon.identity.core.server.feature.unit-resolve.json</param>
                                        <param>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/org.wso2.carbon.event.output.adapter.unit-resolve.json</param>
                                        <param>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/org.wso2.carbon.identity.event.server.feature.unit-resolve.json</param>
                                    </include>
                                    <target>${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/unit-resolve.json</target>
                                    <mergeChildren>true</mergeChildren>
                                </task>
                            </tasks>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <id>extract-docs-from-components</id>
                        <phase>package</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <tasks>
                                <property name="tempdir" value="target/docs-temp" />

                                <property name="xss-kernel-token" value="&lt;XSSPreventionConfig&gt;${line.separator} &lt;Enabled&gt;true&lt;/Enabled&gt;${line.separator} &lt;Rule&gt;allow&lt;/Rule&gt;${line.separator} &lt;Patterns&gt;${line.separator} &lt;!--Pattern&gt;&lt;/Pattern--&gt;${line.separator} &lt;/Patterns&gt;${line.separator} &lt;/XSSPreventionConfig&gt;" />

                                <property name="xss-is-token" value="" />

                                <property name="security-header-filter-is-token" value="&lt;filter&gt;${line.separator} &lt;filter-name&gt;HttpHeaderSecurityFilter&lt;/filter-name&gt;${line.separator} &lt;filter-class&gt;org.apache.catalina.filters.HttpHeaderSecurityFilter&lt;/filter-class&gt;${line.separator} &lt;init-param&gt;${line.separator} &lt;param-name&gt;hstsEnabled&lt;/param-name&gt;${line.separator} &lt;param-value&gt;false&lt;/param-value&gt;${line.separator} &lt;/init-param&gt;${line.separator} &lt;init-param&gt;${line.separator} &lt;param-name&gt;antiClickJackingEnabled&lt;/param-name&gt;${line.separator} &lt;param-value&gt;false&lt;/param-value&gt;${line.separator} &lt;/init-param&gt;${line.separator} &lt;/filter&gt;${line.separator}${line.separator} &lt;filter&gt;${line.separator} &lt;filter-name&gt;HttpHeaderSecurityFilter_EnableAntiClickJacking&lt;/filter-name&gt;${line.separator} &lt;filter-class&gt;org.apache.catalina.filters.HttpHeaderSecurityFilter&lt;/filter-class&gt;${line.separator} &lt;init-param&gt;${line.separator} &lt;param-name&gt;hstsEnabled&lt;/param-name&gt;${line.separator} &lt;param-value&gt;false&lt;/param-value&gt;${line.separator} &lt;/init-param&gt;${line.separator} &lt;init-param&gt;${line.separator} &lt;param-name&gt;blockContentTypeSniffingEnabled&lt;/param-name&gt;${line.separator} &lt;param-value&gt;false&lt;/param-value&gt;${line.separator}&lt;/init-param&gt;${line.separator}&lt;init-param&gt;${line.separator}&lt;param-name&gt;xssProtectionEnabled&lt;/param-name&gt;${line.separator}&lt;param-value&gt;false&lt;/param-value&gt;${line.separator}&lt;/init-param&gt;${line.separator}&lt;/filter&gt;" />

                                <property name="security-header-filter-mapping-is-token" value="&lt;filter-mapping&gt;${line.separator} &lt;filter-name&gt;HttpHeaderSecurityFilter&lt;/filter-name&gt;${line.separator} &lt;url-pattern&gt;*&lt;/url-pattern&gt;${line.separator} &lt;/filter-mapping&gt;${line.separator}${line.separator} &lt;filter-mapping&gt;${line.separator} &lt;filter-name&gt;CharsetFilter&lt;/filter-name&gt;${line.separator} &lt;url-pattern&gt;/*&lt;/url-pattern&gt;${line.separator} &lt;/filter-mapping&gt;${line.separator}${line.separator} &lt;filter-mapping&gt;${line.separator} &lt;filter-name&gt;HttpHeaderSecurityFilter_EnableAntiClickJacking&lt;/filter-name&gt;${line.separator} &lt;url-pattern&gt;/carbon/*&lt;/url-pattern&gt;${line.separator} &lt;url-pattern&gt;/services/*&lt;/url-pattern&gt;${line.separator} &lt;url-pattern&gt;/samlsso/*&lt;/url-pattern&gt;${line.separator} &lt;url-pattern&gt;/openid/*&lt;/url-pattern&gt;${line.separator} &lt;url-pattern&gt;/openidserver/*&lt;/url-pattern&gt;${line.separator} &lt;url-pattern&gt;/passivests/*&lt;/url-pattern&gt;${line.separator} &lt;url-pattern&gt;/acs/*&lt;/url-pattern&gt;${line.separator} &lt;url-pattern&gt;/iwa/*&lt;/url-pattern&gt;${line.separator} &lt;url-pattern&gt;/identity/*&lt;/url-pattern&gt;${line.separator} &lt;url-pattern&gt;/thriftAuthenticator/*&lt;/url-pattern&gt;${line.separator} &lt;/filter-mapping&gt;${line.separator}${line.separator} &lt;filter-mapping&gt;${line.separator} &lt;filter-name&gt;CSRFGuard&lt;/filter-name&gt;${line.separator} &lt;url-pattern&gt;/*&lt;/url-pattern&gt;${line.separator} &lt;/filter-mapping&gt;${line.separator}" />
                                <property name="hideMenu" value="&lt;/Security&gt;${line.separator}&lt;HideMenuItemIds&gt;${line.separator}&lt;HideMenuItemId&gt;claim_mgt_menu&lt;/HideMenuItemId&gt;${line.separator}&lt;HideMenuItemId&gt;identity_mgt_emailtemplate_menu&lt;/HideMenuItemId&gt;${line.separator}&lt;HideMenuItemId&gt;identity_security_questions_menu&lt;/HideMenuItemId&gt;${line.separator}&lt;HideMenuItemId&gt;metrics_menu&lt;/HideMenuItemId&gt;${line.separator}&lt;/HideMenuItemIds&gt;" />
                                <property name="hideMenuTemplate" value="&lt;/Security&gt;${line.separator}&lt;HideMenuItemIds&gt;${line.separator}{% for item in server.hide_menu_items %}${line.separator}&lt;HideMenuItemId&gt;{{item}}&lt;/HideMenuItemId&gt;${line.separator}{% endfor %}${line.separator}{% if identity.entitlement.policy_point.pap.store_metadata is defined and identity.entitlement.policy_point.pap.store_metadata == 'false' %}${line.separator}&lt;HideMenuItemId&gt;policy_search_menu&lt;/HideMenuItemId&gt;${line.separator}{% endif %}${line.separator}&lt;/HideMenuItemIds&gt;" />

                                <property name="4-space-tab" value=" " />
                                <property name="identity-db" value="${4-space-tab}&lt;datasource&gt;${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}&lt;name&gt;WSO2_IDENTITY_DB&lt;/name&gt;${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}&lt;description&gt;The datasource used for identity data&lt;/description&gt;${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}&lt;jndiConfig&gt;${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}&lt;name&gt;jdbc/WSO2IdentityDB&lt;/name&gt;${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}&lt;/jndiConfig&gt;${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}&lt;definition type=&quot;RDBMS&quot;&gt;${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}&lt;configuration&gt;${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}&lt;url&gt;jdbc:h2:./repository/database/WSO2IDENTITY_DB;DB_CLOSE_ON_EXIT=FALSE&lt;/url&gt;${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}&lt;username&gt;wso2carbon&lt;/username&gt;${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}&lt;password&gt;wso2carbon&lt;/password&gt;${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}&lt;driverClassName&gt;org.h2.Driver&lt;/driverClassName&gt;${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}&lt;maxActive&gt;50&lt;/maxActive&gt;${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}&lt;maxWait&gt;60000&lt;/maxWait&gt;${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}&lt;testOnBorrow&gt;true&lt;/testOnBorrow&gt;${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}&lt;validationQuery&gt;SELECT 1&lt;/validationQuery&gt;${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}&lt;validationInterval&gt;30000&lt;/validationInterval&gt;${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}&lt;defaultAutoCommit&gt;true&lt;/defaultAutoCommit&gt;${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}&lt;/configuration&gt;${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}&lt;/definition&gt;${line.separator}${4-space-tab}${4-space-tab}&lt;/datasource&gt;${line.separator}${4-space-tab}&lt;/datasources&gt;" />
                                <property name="identity-db-template" value="${4-space-tab}&lt;datasource&gt;${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}&lt;name&gt;WSO2_IDENTITY_DB&lt;/name&gt;${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}&lt;description&gt;Shared database for identity data&lt;/description&gt;${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}&lt;jndiConfig&gt;${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}&lt;name&gt;jdbc/WSO2IdentityDB&lt;/name&gt;${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}&lt;/jndiConfig&gt;${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}&lt;definition type=&quot;RDBMS&quot;&gt;${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}&lt;configuration&gt;${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}&lt;url&gt;{{database.identity_db.url}}&lt;/url&gt;${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}&lt;username&gt;{{database.identity_db.username}}&lt;/username&gt;${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}&lt;password&gt;{{database.identity_db.password}}&lt;/password&gt;${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}&lt;driverClassName&gt;{{database.identity_db.driver}}&lt;/driverClassName&gt;${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}{% if database.identity_db.db_props %}${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}&lt;databaseProps&gt;${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}{% for property_name,property_value in database.identity_db.db_props.items() %}${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}&lt;property name=&quot;{{property_name}}&quot;&gt;{{property_value}}&lt;/property&gt;${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}{% endfor %}${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}&lt;/databaseProps&gt;${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}{% endif %}${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}{% for property_name, property_value in database.identity_db.pool_options.items() %}${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}&lt;{{property_name}}&gt;{{property_value}}&lt;/{{property_name}}&gt;${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}{% endfor %}${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}${4-space-tab}&lt;/configuration&gt;${line.separator}${4-space-tab}${4-space-tab}${4-space-tab}&lt;/definition&gt;${line.separator}${4-space-tab}${4-space-tab}&lt;/datasource&gt;${line.separator}${4-space-tab}&lt;/datasources&gt;" />

                                <property name="captcha-filter-is-token" value="{% if recaptcha.enabled is sameas true %}${line.separator}&lt;filter&gt;${line.separator} &lt;filter-name&gt;CaptchaFilter&lt;/filter-name&gt;${line.separator} &lt;filter-class&gt;org.wso2.carbon.identity.captcha.filter.CaptchaFilter&lt;/filter-class&gt;${line.separator} &lt;/filter&gt;${line.separator}${line.separator} &lt;filter-mapping&gt;${line.separator} &lt;filter-name&gt;CaptchaFilter&lt;/filter-name&gt;${line.separator} &lt;url-pattern&gt;/samlsso&lt;/url-pattern&gt;${line.separator} &lt;url-pattern&gt;/oauth2&lt;/url-pattern&gt;${line.separator} &lt;url-pattern&gt;/commonauth&lt;/url-pattern&gt;${line.separator} &lt;url-pattern&gt;/identity/recovery/v0.9/recover-password&lt;/url-pattern&gt;${line.separator} &lt;url-pattern&gt;/identity/recovery/v0.9/recover-username/&lt;/url-pattern&gt;${line.separator} &lt;url-pattern&gt;/identity/recovery/v0.9/security-question&lt;/url-pattern&gt;${line.separator} &lt;url-pattern&gt;/identity/recovery/v0.9/validate-answer&lt;/url-pattern&gt;${line.separator} &lt;url-pattern&gt;/identity/user/v1.0/me&lt;/url-pattern&gt;${line.separator} &lt;url-pattern&gt;/identity/user/v1.0/resend-code&lt;/url-pattern&gt;${line.separator} &lt;dispatcher&gt;FORWARD&lt;/dispatcher&gt;${line.separator} &lt;dispatcher&gt;REQUEST&lt;/dispatcher&gt;${line.separator} &lt;/filter-mapping&gt;${line.separator}${line.separator}{% endif %}${line.separator}&lt;/web-app&gt;" />

                                <mkdir dir="${tempdir}" />
                                <unzip dest="${tempdir}">
                                    <fileset dir="target">
                                        <include name="wso2is-${project.version}.zip" />
                                    </fileset>
                                </unzip>

                                <!--unzip src="wso2is-${project.version}.zip" dest="${tempdir}">
                                </unzip-->
                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/carbon.xml" token="${product.name}" value="WSO2 Identity Server" />
                                <replace file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/templates/repository/conf/carbon.xml.j2" token="${product.name}" value="WSO2 Identity Server" />

                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/carbon.xml" token="${default.server.role}" value="IdentityServer" />
                                <replace file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/templates/repository/conf/carbon.xml.j2" token="${default.server.role}" value="IdentityServer" />

                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/carbon.xml" token="${product.version}" value="${project.version}" />
                                <replace file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/templates/repository/conf/carbon.xml.j2" token="${product.version}" value="{{product.version}}" />
                                <replace file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/default.json" token="${product.version}" value="${project.version}" />

                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/carbon.xml" token="${product.key}" value="IS" />
                                <replace file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/templates/repository/conf/carbon.xml.j2" token="${product.key}" value="IS" />

                                <replace file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/tomcat/context.xml" token="&lt;Context crossContext=&quot;true&quot;&gt;" value="&lt;Context crossContext=&quot;true&quot; useHttpOnly=&quot;true&quot;&gt;" />
                                <replace file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/tomcat/context.xml" token="&lt;Manager className=&quot;org.wso2.carbon.webapp.mgt.CarbonTomcatSessionManager&quot;&gt;" value="&lt;Manager className=&quot;org.apache.catalina.session.StandardManager&quot;&gt;" />
                                <replace file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/tomcat/catalina-server.xml" token="clientAuth=&quot;false&quot;" value="clientAuth=&quot;want&quot;" />

                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/carbon.xml" token="&lt;ServerURL&gt;https://${carbon.local.ip}" value="&lt;ServerURL&gt;https://localhost" />
                                <replace file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/templates/repository/conf/carbon.xml.j2" token="&lt;ServerURL&gt;https://${carbon.local.ip}" value="&lt;ServerURL&gt;https://localhost" />

                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/carbon.xml" token="&lt;!--MgtHostName&gt;mgt.wso2.org&lt;/MgtHostName--&gt;" value="&lt;MgtHostName&gt;localhost&lt;/MgtHostName&gt;" />

                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/carbon.xml" token="&lt;!--HostName&gt;www.wso2.org&lt;/HostName--&gt;" value="&lt;HostName&gt;localhost&lt;/HostName&gt;" />

                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/carbon.xml" token="&lt;EmbeddedLDAP&gt;" value="&lt;!--EmbeddedLDAP--&gt;" />
                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/carbon.xml" token="&lt;LDAPServerPort&gt;10389&lt;/LDAPServerPort&gt;" value="&lt;!--LDAPServerPort&gt;10389&lt;/LDAPServerPort--&gt;" />
                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/carbon.xml" token="&lt;KDCServerPort&gt;8000&lt;/KDCServerPort&gt;" value="&lt;!--KDCServerPort&gt;8000&lt;/KDCServerPort--&gt;" />
                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/carbon.xml" token="&lt;/EmbeddedLDAP&gt;" value="&lt;!--/EmbeddedLDAP--&gt;" />
                                <replace file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/templates/repository/conf/carbon.xml.j2" token="&lt;EmbeddedLDAP&gt;" value="&lt;!--EmbeddedLDAP--&gt;" />
                                <replace file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/templates/repository/conf/carbon.xml.j2" token="&lt;LDAPServerPort&gt;10389&lt;/LDAPServerPort&gt;" value="&lt;!--LDAPServerPort&gt;10389&lt;/LDAPServerPort--&gt;" />
                                <replace file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/templates/repository/conf/carbon.xml.j2" token="&lt;KDCServerPort&gt;8000&lt;/KDCServerPort&gt;" value="&lt;!--KDCServerPort&gt;8000&lt;/KDCServerPort--&gt;" />
                                <replace file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/templates/repository/conf/carbon.xml.j2" token="&lt;/EmbeddedLDAP&gt;" value="&lt;!--/EmbeddedLDAP--&gt;" />

                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/carbon.xml" token="&lt;!--LdapServer&gt;" value="&lt;LdapServer&gt;" />
                                <replace file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/templates/repository/conf/carbon.xml.j2" token="&lt;!--LdapServer&gt;" value="&lt;LdapServer&gt;" />

                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/carbon.xml" token="&lt;/LdapServer--&gt;" value="&lt;/LdapServer&gt;" />

                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/carbon.xml" token="${xss-kernel-token}" value="${xss-is-token}" />

                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/carbon.xml" token="&lt;/Security&gt;" value="${hideMenu}" />
                                <replace file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/templates/repository/conf/carbon.xml.j2" token="&lt;/Security&gt;" value="${hideMenuTemplate}" />

                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/datasources/master-datasources.xml" token="&lt;/datasources&gt;" value="${identity-db}" />
                                <replace file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/templates/repository/conf/datasources/master-datasources.xml.j2" token="&lt;/datasources&gt;" value="${identity-db-template}" />

                                <replace file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/consent-mgt-config.xml" token="&lt;Name&gt;jdbc/WSO2CarbonDB&lt;/Name&gt;" value="&lt;Name&gt;jdbc/WSO2IdentityDB&lt;/Name&gt;" />

                                <replaceregexp file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/carbon.xml" match="^(\s)*&lt;\!--(\s)*Uncomment the following configuration to use hardware security module for cryptographic operations.\n(\s)*Provide configurations as detailed in each tag.\n(\s)*--&gt;" replace=" " flags="m" />
                                <replaceregexp file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/templates/repository/conf/carbon.xml.j2" match="^(\s)*&lt;\!--(\s)*Uncomment the following configuration to use hardware security module for cryptographic operations.\n(\s)*Provide configurations as detailed in each tag.\n(\s)*--&gt;" replace=" " flags="m" />

                                <replaceregexp file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/carbon.xml" match="^(\s)*&lt;\!--(\s)*&lt;HSMBasedCryptoProviderConfig&gt;[\s\S]*?&lt;\/HSMBasedCryptoProviderConfig&gt;(\s)*--&gt;" replace=" " flags="m" />
                                <replaceregexp file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/templates/repository/conf/carbon.xml.j2" match="^(\s)*&lt;\!--(\s)*&lt;HSMBasedCryptoProviderConfig&gt;[\s\S]*?&lt;\/HSMBasedCryptoProviderConfig&gt;(\s)*--&gt;" replace=" " flags="m" />

                                <!-- Enable AskPassword Admin UI in product-is -->
                                <replace file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/identity/identity.xml" token="&lt;EnableAskPasswordAdminUI&gt;false&lt;/EnableAskPasswordAdminUI&gt;" value="&lt;EnableAskPasswordAdminUI&gt;true&lt;/EnableAskPasswordAdminUI&gt;" />

                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/carbon.xml" token="&lt;InternalCryptoProviderClassName&gt;org.wso2.carbon.crypto.provider.KeyStoreBasedInternalCryptoProvider&lt;/InternalCryptoProviderClassName&gt;" value="&lt;InternalCryptoProviderClassName&gt;org.wso2.carbon.crypto.provider.SymmetricKeyInternalCryptoProvider&lt;/InternalCryptoProviderClassName&gt;" />
                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/carbon.xml" token="&lt;/InternalCryptoProviderClassName&gt;" value="&lt;/InternalCryptoProviderClassName&gt;${line.separator}${line.separator} &lt;Secret&gt;03BAFEB27A8E871CAD83C5CD4E771DAB&lt;/Secret&gt;" />
                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/carbon.xml" token="&lt;UserStorePasswordEncryption&gt;InternalKeyStore&lt;/UserStorePasswordEncryption&gt;" value="&lt;UserStorePasswordEncryption&gt;&lt;/UserStorePasswordEncryption&gt;" />
                                <!-- Update log4j.properties file with Identity related log files -->
                                <!--<replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/log4j2.properties" token="logger.org-apache-directory-server-core-event.level=WARN" value="logger.org-apache-directory-server-core-event.level=WARN${line.separator}log4j.logger.org.apache.directory.api=ERROR${line.separator}log4j.logger.org.apache.directory.api.ldap.model.entry=FATAL" />-->

                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/log4j2.properties" token="logger.net-sf-ehcache-config-ConfigurationFactory.name = net.sf.ehcache.config.ConfigurationFactory" value="logger.net-sf-ehcache.name = net.sf.ehcache${line.separator}" />
                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/log4j2.properties" token="logger.net-sf-ehcache-config-ConfigurationFactory.level = ERROR" value="logger.net-sf-ehcache.level = ERROR${line.separator}" />
                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/log4j2.properties" token="net-sf-ehcache-config-ConfigurationFactory," value="net-sf-ehcache," />

                                <!--<replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/log4j2.properties" token="logger.net-sf-ehcache-config-ConfigurationFactory.name = net.sf.ehcache.config.ConfigurationFactory" value="logger.net-sf-ehcache.name = net.sf.ehcache${line.separator}${line.separator}log4j.logger.org.springframework=WARN${line.separator}log4j.logger.org.opensaml.xml.security.credential.criteria=WARN${line.separator}${line.separator} #log4j.logger.org.wso2.carbon.user.core=DEBUG${line.separator} #log4j.logger.org.wso2.carbon.identity=DEBUG${line.separator} #log4j.logger.org.wso2.carbon.identity.sso.saml=DEBUG${line.separator} #log4j.logger.org.wso2.carbon.identity.application=DEBUG${line.separator} #log4j.logger.org.wso2.carbon.identity.application.authentication.framework=DEBUG${line.separator} #log4j.logger.org.wso2.carbon.identity.mgt=DEBUG${line.separator} #log4j.logger.org.wso2.carbon.identity.oauth2=DEBUG${line.separator} #log4j.logger.org.wso2.carbon.identity.scim=DEBUG${line.separator} #log4j.logger.org.wso2.carbon.identity.mgt=DEBUG${line.separator} #log4j.logger.org.wso2.carbon.idp.mgt=DEBUG${line.separator} #log4j.logger.org.wso2.carbon.identity.provisioning=DEBUG${line.separator} #log4j.logger.org.wso2.carbon.identity.user.account.association=DEBUG${line.separator} #log4j.logger.org.wso2.carbon.identity.user.profile.mgt=DEBUG${line.separator} #log4j.logger.org.wso2.carbon.security=DEBUG${line.separator} #log4j.logger.org.wso2.carbon.identity.sso.agent=DEBUG${line.separator} #log4j.logger.org.wso2.carbon.identity.core=DEBUG" />-->

                                <!--<replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/log4j2.properties" token="log4j.appender.CARBON_MEMORY=org.wso2.carbon.utils.logging.appenders.MemoryAppender" value="log4j.appender.CARBON_MEMORY=org.wso2.carbon.logging.service.appender.CarbonMemoryAppender" />-->

                                <!--<replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/log4j2.properties" token="log4j.appender.CARBON_MEMORY.layout=org.apache.log4j.PatternLayout" value="log4j.appender.CARBON_MEMORY.layout=org.wso2.carbon.utils.logging.TenantAwarePatternLayout" />-->

                                <!--<replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/log4j2.properties" token="log4j.appender.CARBON_MEMORY.layout.ConversionPattern=[%d] %5p {%c} - %x %m %n" value="log4j.appender.CARBON_MEMORY.layout.ConversionPattern=TID: [%T] [%S] [%d] %P%5p {%c} - %x %m {%c}%n${line.separator}log4j.appender.CARBON_MEMORY.layout.TenantPattern=%U%@%D [%T] [%S]${line.separator}log4j.appender.CARBON_MEMORY.columnList=%T,%S,%A,%d,%c,%p,%m,%H,%I,%Stacktrace" />-->

                                <!--<replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/log4j2.properties" token="log4j.logger.AUDIT_LOG=INFO, AUDIT_LOGFILE" value="log4j.logger.AUDIT_LOG=INFO, AUDIT_LOGFILE${line.separator}log4j.logger.DELETE_EVENT_LOGGER=INFO, DELETE_EVENT_LOGFILE${line.separator}log4j.logger.TRANSACTION_LOGGER=INFO, TRANSACTION_LOGGER" />-->

                                <!--<replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/log4j2.properties" token="log4j.additivity.AUDIT_LOG=false" value="log4j.additivity.AUDIT_LOG=false${line.separator}${line.separator}log4j.appender.DELETE_EVENT_LOGFILE=org.apache.log4j.FileAppender${line.separator}log4j.appender.DELETE_EVENT_LOGFILE.File=${carbon.home}/repository/logs/delete-event.log${line.separator}log4j.appender.DELETE_EVENT_LOGFILE.Append=true${line.separator}log4j.appender.DELETE_EVENT_LOGFILE.layout=org.apache.log4j.PatternLayout${line.separator}log4j.appender.DELETE_EVENT_LOGFILE.layout.ConversionPattern=%m %n${line.separator}log4j.appender.DELETE_EVENT_LOGFILE.threshold=INFO${line.separator}log4j.additivity.DELETE_EVENT_LOGFILE=false${line.separator}${line.separator}log4j.appender.TRANSACTION_LOGGER=org.apache.log4j.FileAppender${line.separator}log4j.appender.TRANSACTION_LOGGER.File=${carbon.home}/repository/logs/transaction.log${line.separator}log4j.appender.TRANSACTION_LOGGER.Append=true${line.separator}log4j.appender.TRANSACTION_LOGGER.layout=org.apache.log4j.PatternLayout${line.separator}log4j.appender.TRANSACTION_LOGGER.layout.ConversionPattern=[%d] - %m %n${line.separator}log4j.appender.TRANSACTION_LOGGER.threshold=INFO${line.separator}log4j.additivity.TRANSACTION_LOGGER=false" />-->

                                <!-- Update carbon webapps web.xml file for HttpHeaderSecurityFilter to skip /oidc/* path from antiClickJacking  -->
                                <replaceregexp file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/tomcat/carbon/WEB-INF/web.xml" match="(?s)&lt;filter&gt;\s+&lt;filter-name&gt;HttpHeaderSecurityFilter&lt;/filter-name&gt;.*&lt;/filter&gt;" replace="${security-header-filter-is-token}" />

                                <replaceregexp file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/tomcat/carbon/WEB-INF/web.xml" match="(?s)&lt;filter-mapping&gt;\s+&lt;filter-name&gt;HttpHeaderSecurityFilter&lt;/filter-name&gt;.*&lt;/filter-mapping&gt;" replace="${security-header-filter-mapping-is-token}" />

                                <replace file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/templates/repository/conf/tomcat/web.xml.j2" token="&lt;/web-app&gt;" value="${captcha-filter-is-token}" />

                                <!-- Update Owasp.CsrfGuard.properties file location to fix IBM JDK and DevStudio issue-->
                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/tomcat/carbon/WEB-INF/web.xml" token="/repository/conf/security/Owasp.CsrfGuard.Carbon.properties" value="repository/conf/security/Owasp.CsrfGuard.Carbon.properties" />

                                <!-- Update Owasp.CsrfGuard.properties file with ValidateWhenNoSessionExists to disable validation on requests made with no valid session -->
                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/security/Owasp.CsrfGuard.Carbon.properties" token="org.owasp.csrfguard.ValidateWhenNoSessionExists = true" value="org.owasp.csrfguard.ValidateWhenNoSessionExists = false" />

                                <!-- Update Owasp.CsrfGuard.properties file with authenticator endpoint URLs -->
                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/security/Owasp.CsrfGuard.Carbon.properties" token="org.owasp.csrfguard.unprotected.Services=%servletContext%/services/*" value="org.owasp.csrfguard.unprotected.Services=%servletContext%/services/*${line.separator}org.owasp.csrfguard.unprotected.commonauth=%servletContext%/commonauth/*${line.separator}org.owasp.csrfguard.unprotected.samlsso=%servletContext%/samlsso/*${line.separator}org.owasp.csrfguard.unprotected.authenticationendpoint=%servletContext%/authenticationendpoint/*${line.separator}org.owasp.csrfguard.unprotected.wso2=%servletContext%/wso2/*${line.separator}org.owasp.csrfguard.unprotected.oauth2=%servletContext%/oauth2/*${line.separator}org.owasp.csrfguard.unprotected.oidc=%servletContext%/oidc/*${line.separator}org.owasp.csrfguard.unprotected.openid=%servletContext%/openid/*${line.separator}org.owasp.csrfguard.unprotected.openidserver=%servletContext%/openidserver/*${line.separator}org.owasp.csrfguard.unprotected.passivests=%servletContext%/passivests/*${line.separator}org.owasp.csrfguard.unprotected.acs=%servletContext%/acs/*${line.separator}org.owasp.csrfguard.unprotected.iwa=%servletContext%/iwa/*${line.separator}org.owasp.csrfguard.unprotected.oauthiwa=%servletContext%/commonauth/iwa/*${line.separator}org.owasp.csrfguard.unprotected.thrift=%servletContext%/thriftAuthenticator/*${line.separator}org.owasp.csrfguard.unprotected.mex=%servletContext%/mexut/*${line.separator}org.owasp.csrfguard.unprotected.identity=%servletContext%/identity/*" />

                                <!-- Comment all active UserStoreManagers -->
                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/user-mgt.xml" token="&lt;UserStoreManager" value="&lt;!--UserStoreManager" />

                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/user-mgt.xml" token="&lt;/UserStoreManager&gt;" value="&lt;/UserStoreManager--&gt;" />

                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/user-mgt.xml" token="&lt;!--ISUserStoreManager" value="&lt;UserStoreManager" />

                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/user-mgt.xml" token="&lt;/ISUserStoreManager--&gt;" value="&lt;/UserStoreManager&gt;" />

                               <replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/user-mgt.xml" token="&lt;Property name=&quot;GetAllRolesOfUserEnabled&quot;&gt;true&lt;/Property&gt;" value="&lt;!--Property name=&quot;GetAllRolesOfUserEnabled&quot;&gt;true&lt;/Property--&gt;" />

                                <!-- turn off IsBulkImportSupported -->
                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/user-mgt.xml" token="&lt;Property name=&quot;IsBulkImportSupported&quot;&gt;true&lt;/Property&gt;" value="&lt;Property name=&quot;IsBulkImportSupported&quot;&gt;false&lt;/Property&gt;" />

                                <!-- turn off CaseInsensitiveUsername -->
                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/user-mgt.xml" token="&lt;Property name=&quot;CaseInsensitiveUsername&quot;&gt;true&lt;/Property&gt;" value="&lt;Property name=&quot;CaseInsensitiveUsername&quot;&gt;false&lt;/Property&gt;" />

                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/user-mgt.xml" token="&lt;Property name=&quot;isCascadeDeleteEnabled&quot;&gt;true&lt;/Property&gt;" value="&lt;Property name=&quot;isCascadeDeleteEnabled&quot;&gt;true&lt;/Property&gt;${line.separator} &lt;Property name=&quot;initializeNewClaimManager&quot;&gt;true&lt;/Property&gt;" />

                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/bin/wso2server.bat" token="set CARBON_CLASSPATH=.\lib\*;%CARBON_CLASSPATH%" value="set CARBON_CLASSPATH=.\lib\*;%CARBON_CLASSPATH%" />

                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/bin/wso2server.sh" token="-Dhttpclient.hostnameVerifier=&quot;DefaultAndLocalhost&quot; \" value="-Dhttpclient.hostnameVerifier=&quot;DefaultAndLocalhost&quot; \${line.separator} -Dorg.apache.xml.security.ignoreLineBreaks=false \" />

                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/bin/wso2server.sh" token="--add-opens=java.xml/com.sun.org.apache.xerces.internal.dom=ALL-UNNAMED" value="--add-opens=java.xml/com.sun.org.apache.xerces.internal.dom=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/sun.security.util=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.security.cert=ALL-UNNAMED --add-opens=java.base/sun.security.rsa=ALL-UNNAMED" />

                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/bin/wso2server.bat" token="--add-opens=java.xml/com.sun.org.apache.xerces.internal.dom=ALL-UNNAMED" value="--add-opens=java.xml/com.sun.org.apache.xerces.internal.dom=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/sun.security.util=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.security.cert=ALL-UNNAMED --add-opens=java.base/sun.security.rsa=ALL-UNNAMED" />

                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/bin/wso2server.bat" token="-Dhttpclient.hostnameVerifier=&quot;DefaultAndLocalhost&quot;" value="-Dhttpclient.hostnameVerifier=&quot;DefaultAndLocalhost&quot;" />

                                <replace file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/security/authenticators.xml" token="&lt;!--Authenticator name=&quot;MutualSSLAuthenticator&quot; disabled=&quot;false&quot;&gt;" value="&lt;Authenticator name=&quot;MutualSSLAuthenticator&quot;&gt;" />

                                <replace file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/security/authenticators.xml" token="&lt;/Authenticator--&gt;" value="&lt;/Authenticator&gt;" />

                                <!-- turn off Registry Indexing -->
                                <replace file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/registry.xml" token="&lt;startIndexing&gt;true&lt;/startIndexing&gt;" value="&lt;startIndexing&gt;false&lt;/startIndexing&gt;" />

                                <!-- update ciphertool properties to enable securevault on thrift server keystore password-->
                                <replace file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/security/cipher-text.properties" token="Server.Service.Connector.keystorePass=[wso2carbon]" value="Server.Service.Connector.keystorePass=[wso2carbon]${line.separator}ThirftBasedEntitlementConfig.KeyStore.Password=[wso2carbon]" />
                                <replace file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/security/cipher-tool.properties" token="Server.Service.Connector.keystorePass=repository/conf/tomcat/catalina-server.xml//Server/Service/Connector[@keystorePass],true" value="Server.Service.Connector.keystorePass=repository/conf/tomcat/catalina-server.xml//Server/Service/Connector[@keystorePass],true${line.separator}ThirftBasedEntitlementConfig.KeyStore.Password=repository/conf/identity/identity.xml//Server/EntitlementSettings/ThirftBasedEntitlementConfig/KeyStore/Password,true" />

                                <!-- Update the README.txt inside the bin folder about forgetme execution scripts. -->
                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/bin/README.txt" token="10. carbondump.sh &amp; carbondump.bat - Carbondump is a tool for collecting all the necessary data from a running Carbon instance at the time of an error. The carbondump generates a zip archive with the collected data, which can be used to analyze your system and determine the problem which caused the error." value="10. carbondump.sh &amp; carbondump.bat - Carbondump is a tool for collecting all the necessary data from a running Carbon instance at the time of an error. The carbondump generates a zip archive with the collected data, which can be used to analyze your system and determine the problem which caused the error.${line.separator}${line.separator}11. forgetme.sh &amp; forgetme.bat - Forgetme is a tool to anonymize deleted user information from metadata tables and log files. This tool will replace the given user name with a given or random pseudonym.${line.separator}" />

                                <replace file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/templates/repository/conf/registry.xml.j2" token="&lt;versioningProperties&gt;true&lt;/versioningProperties&gt;" value="&lt;versioningProperties&gt;false&lt;/versioningProperties&gt;" />

                                <replace file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/templates/repository/conf/registry.xml.j2" token="&lt;versioningComments&gt;true&lt;/versioningComments&gt;" value="&lt;versioningComments&gt;false&lt;/versioningComments&gt;" />

                                <replace file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/templates/repository/conf/registry.xml.j2" token="&lt;versioningTags&gt;true&lt;/versioningTags&gt;" value="&lt;versioningTags&gt;false&lt;/versioningTags&gt;" />

                                <replace file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/templates/repository/conf/registry.xml.j2" token="&lt;versioningRatings&gt;true&lt;/versioningRatings&gt;" value="&lt;versioningRatings&gt;false&lt;/versioningRatings&gt;" />

                                <replace file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/registry.xml" token="&lt;versioningProperties&gt;true&lt;/versioningProperties&gt;" value="&lt;versioningProperties&gt;false&lt;/versioningProperties&gt;" />

                                <replace file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/registry.xml" token="&lt;versioningComments&gt;true&lt;/versioningComments&gt;" value="&lt;versioningComments&gt;false&lt;/versioningComments&gt;" />

                                <replace file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/registry.xml" token="&lt;versioningTags&gt;true&lt;/versioningTags&gt;" value="&lt;versioningTags&gt;false&lt;/versioningTags&gt;" />

                                <replace file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/registry.xml" token="&lt;versioningRatings&gt;true&lt;/versioningRatings&gt;" value="&lt;versioningRatings&gt;false&lt;/versioningRatings&gt;" />

                                <delete file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/templates/repository/conf/tomcat/carbon/WEB-INF/web.xml.j2" />
                                <delete dir="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/templates/repository/conf/tomcat/carbon/WEB-INF/" />

                                <!-- Add org.wso2.carbon.identity.entitlement.policy.finder.registry.RegistryPolicyHandler to IS -->

                                <replace file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/registry.xml" token="&lt;!--&lt;handler class=&quot;org.wso2.carbon.registry.extensions.handlers.SynapseRepositoryHandler&quot;&gt;" value="${registryPolicyHandler}" />

                                <!-- Enable KDC for IS -->

                                <copy todir="target/wso2carbon-core-${carbon.kernel.version}/repository/components/" overwrite="false">
                                    <fileset dir="${tempdir}/wso2is-${project.version}/repository/components/">
                                    </fileset>
                                </copy>
                                <copy todir="target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/client/modules" overwrite="false">
                                    <fileset dir="${tempdir}/wso2is-${project.version}/repository/deployment/client/modules">
                                    </fileset>
                                </copy>
                                <copy todir="target/wso2carbon-core-${carbon.kernel.version}/dbscripts/identity" overwrite="false">
                                    <fileset dir="${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/dbscripts/identity/">
                                    </fileset>
                                </copy>

                                <copy todir="target/wso2carbon-core-${carbon.kernel.version}/dbscripts/consent" overwrite="false">
                                    <fileset dir="${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/dbscripts/consent/">
                                    </fileset>
                                </copy>
                                <copy todir="target/wso2carbon-core-${carbon.kernel.version}/dbscripts/identity/agent" overwrite="false">
                                    <fileset dir="${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/dbscripts/identity/agent">
                                    </fileset>
                                </copy>

                                <path id="h2.classpath">
                                    <path refid="maven.compile.classpath" />
                                </path>
                                <echo message="########### Create Identity Database ##############" />
                                <sql driver="org.h2.Driver" url="jdbc:h2:${basedir}/target/wso2carbon-core-${carbon.kernel.version}/repository/database/WSO2IDENTITY_DB" userid="wso2carbon" password="wso2carbon" autocommit="true" onerror="continue">
                                    <classpath>
                                        <path refid="h2.classpath" />
                                    </classpath>
                                    <fileset file="target/wso2carbon-core-${carbon.kernel.version}/dbscripts/identity/h2.sql" />
                                </sql>
                                <echo message="##################### END ########################" />
                                <echo message="########### Create Consent Management Database ##############" />
                                <sql driver="org.h2.Driver" url="jdbc:h2:${basedir}/target/wso2carbon-core-${carbon.kernel.version}/repository/database/WSO2IDENTITY_DB" userid="wso2carbon" password="wso2carbon" autocommit="true" onerror="continue">
                                    <classpath>
                                        <path refid="h2.classpath" />
                                    </classpath>
                                    <fileset file="target/wso2carbon-core-${carbon.kernel.version}/dbscripts/consent/h2.sql" />
                                </sql>
                                <echo message="########### Create Agent Identity Database ##############" />
                                <sql driver="org.h2.Driver" url="jdbc:h2:${basedir}/target/wso2carbon-core-${carbon.kernel.version}/repository/database/WSO2AGENTIDENTITY_DB" userid="wso2carbon" password="wso2carbon" autocommit="true" onerror="continue">
                                    <classpath>
                                        <path refid="h2.classpath" />
                                    </classpath>
                                    <fileset file="target/wso2carbon-core-${carbon.kernel.version}/dbscripts/identity/agent/h2.sql" />
                                </sql>
                                <echo message="##################### END ########################" />

                                <delete file="target/wso2is-${project.version}.zip" />
                                <delete dir="${tempdir}" />
                                <mkdir dir="${tempdir}" />
                                <unzip dest="${tempdir}">
                                    <fileset dir="target/wso2carbon-core-${carbon.kernel.version}/repository/components/plugins/">
                                        <include name="*.ui*.jar" />
                                    </fileset>
                                </unzip>
                                <move todir="${tempdir}/web/" includeemptydirs="false">
                                    <fileset dir="${tempdir}/web/">
                                        <exclude name="**/yui/**" />
                                        <exclude name="**/ajax/**" />
                                        <exclude name="**/WEB-INF/**" />
                                        <include name="**/*.html" />
                                        <exclude name="**/editarea/**" />
                                        <exclude name="**/codepress/**" />
                                    </fileset>
                                    <mapper type="glob" from="*.html" to="*.xml" />
                                </move>
                                <delete dir="${tempdir}" />

                                <!-- Explode the api.war -->
                                <unzip dest="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps/api">
                                    <fileset dir="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps">
                                        <include name="api.war" />
                                    </fileset>
                                </unzip>
                                <delete file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps/api.war" />

                                <!-- Explode the authenticationendpoint.war -->
                                <unzip dest="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps/authenticationendpoint">
                                    <fileset dir="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps">
                                        <include name="authenticationendpoint.war" />
                                    </fileset>
                                </unzip>
                                <delete file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps/authenticationendpoint.war" />

                                <!-- Explode the accounts.war -->
                                <unzip dest="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps/accounts">
                                    <fileset dir="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps">
                                        <include name="accounts.war" />
                                    </fileset>
                                </unzip>
                                <delete file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps/accounts.war" />

                                <!-- Explode the accountrecoveryendpoint.war -->
                                <unzip dest="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps/accountrecoveryendpoint">
                                    <fileset dir="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps">
                                        <include name="accountrecoveryendpoint.war" />
                                    </fileset>
                                </unzip>
                                <delete file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps/accountrecoveryendpoint.war" />

                                <!-- Explode the x509certificateauthenticationendpoint.war -->
                                <unzip dest="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps/x509certificateauthenticationendpoint">
                                    <fileset dir="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps">
                                        <include name="x509certificateauthenticationendpoint.war" />
                                    </fileset>
                                </unzip>
                                <delete file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps/x509certificateauthenticationendpoint.war" />

                                <!-- Explode the myaccount.war -->
                                <unzip dest="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps/myaccount">
                                    <fileset dir="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps">
                                        <include name="myaccount.war" />
                                    </fileset>
                                </unzip>
                                <delete file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps/myaccount.war" />

                                <!-- Explode the api#health-check#v1.0.war -->
                                <unzip dest="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps/api#health-check#v1.0">
                                    <fileset dir="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps">
                                        <include name="api#health-check#v1.0.war" />
                                    </fileset>
                                </unzip>
                                <delete file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps/api#health-check#v1.0.war" />

                                <!-- Explode the mexut.war -->
                                <unzip dest="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps/mexut">
                                    <fileset dir="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps">
                                        <include name="mexut.war" />
                                    </fileset>
                                </unzip>
                                <delete file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps/mexut.war" />

                                <!-- Explode the scim2.war -->
                                <unzip dest="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps/scim2">
                                    <fileset dir="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps">
                                        <include name="scim2.war" />
                                    </fileset>
                                </unzip>
                                <delete file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps/scim2.war" />

                                <!-- Explode the oauth2.war -->
                                <unzip dest="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps/oauth2">
                                    <fileset dir="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps">
                                        <include name="oauth2.war" />
                                    </fileset>
                                </unzip>
                                <delete file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps/oauth2.war" />

                                <!-- Explode the wso2.war -->
                                <unzip dest="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps/wso2">
                                    <fileset dir="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps">
                                        <include name="wso2.war" />
                                    </fileset>
                                </unzip>
                                <delete file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps/wso2.war" />

                                <!-- Explode the console.war -->
                                <unzip dest="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps/console">
                                    <fileset dir="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps">
                                        <include name="console.war" />
                                    </fileset>
                                </unzip>
                                <delete file="../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps/console.war" />

                                <!-- Explode the x509certificateauthenticationendpoint.war -->
                                <unzip dest="../connectors/target/authenticatorCopied/war/x509certificateauthenticationendpoint">
                                    <fileset dir="../connectors/target/authenticatorCopied/war">
                                        <include name="x509certificateauthenticationendpoint.war" />
                                    </fileset>
                                </unzip>
                                <delete file="../connectors/target/authenticatorCopied/war/x509certificateauthenticationendpoint.war" />
                            </tasks>
                        </configuration>
                    </execution>
                    <execution>
                        <id>finalize</id>
                        <phase>install</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <tasks>
                                <delete dir="target/archive-tmp" />
                                <delete dir="target/dependency-maven-plugin-markers" />
                                <delete dir="target/maven-archiver" />
                                <delete dir="target/wso2carbon-core-${carbon.kernel.version}" />
                                <delete file="target/wso2is-${project.version}.jar" />
                                <delete dir="target/sources" />
                                <delete dir="target/site" />
                                <delete dir="src/site" />
                                <delete dir="target/forget-me" />
                            </tasks>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.21.0</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <id>--------create-documentation-module----</id>
                        <goals>
                            <goal>site</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.google.code.maven-config-processor-plugin</groupId>
                <artifactId>config-processor-maven-plugin</artifactId>
                <version>2.6</version>
                <executions>
                    <execution>
                        <id>add-missing-registry-configs</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>process</goal>
                        </goals>
                        <configuration>
                            <failOnMissingXpath>false</failOnMissingXpath>
                            <transformations>
                                <transformation>
                                    <input>
                                        ${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/templates/repository/conf/registry.xml.j2
                                    </input>
                                    <output>
                                        ../../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/templates/repository/conf/registry.xml.j2
                                    </output>
                                    <config>registry_config_change.xml.j2</config>
                                </transformation>
                            </transformations>
                            <namespaceContexts>
                                <sv>http://org.wso2.securevault/configuration</sv>
                            </namespaceContexts>
                        </configuration>
                    </execution>
                    <execution>
                        <id>add-missing-axis2-configs</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>process</goal>
                        </goals>
                        <configuration>
                            <failOnMissingXpath>false</failOnMissingXpath>
                            <transformations>
                                <transformation>
                                    <input>
                                        ${basedir}/../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/templates/repository/conf/axis2/axis2.xml.j2
                                    </input>
                                    <output>
                                        ../../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/conf/templates/repository/conf/axis2/axis2.xml.j2
                                    </output>
                                    <config>axis2_config_change.xml.j2</config>
                                </transformation>
                            </transformations>
                            <namespaceContexts>
                                <sv>http://org.wso2.securevault/configuration</sv>
                            </namespaceContexts>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy_components</id>
                        <phase>test</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <filters>
                                <filter>${basedir}/src/assembly/filter.properties</filter>
                            </filters>
                            <descriptors>
                                <descriptor>src/assembly/dist.xml</descriptor>
                            </descriptors>
                            <appendAssemblyId>false</appendAssemblyId>
                        </configuration>
                    </execution>
                    <execution>
                        <id>dist</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <filters>
                                <filter>${basedir}/src/assembly/filter.properties</filter>
                            </filters>
                            <descriptors>
                                <descriptor>src/assembly/bin.xml</descriptor>
                            </descriptors>
                            <appendAssemblyId>false</appendAssemblyId>
                        </configuration>
                    </execution>
                    <execution>
                        <id>src-doc</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <filters>
                                <filter>${basedir}/src/assembly/filter.properties</filter>
                            </filters>
                            <descriptors>
                                <descriptor>src/assembly/src.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>maven-buildnumber-plugin</artifactId>
                <version>0.9.4</version>
                <configuration>
                    <format>{0,date,dd MMM yyyy}</format>
                    <items>
                        <item>timestamp</item>
                    </items>
                    <doCheck>false</doCheck>
                    <doUpdate>false</doUpdate>
                </configuration>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>create</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>year-property</id>
                        <goals>
                            <goal>timestamp-property</goal>
                        </goals>
                        <phase>validate</phase>

                        <configuration>
                            <name>current.date.year</name>
                            <pattern>yyyy</pattern>
                        </configuration>
                    </execution>
                    <execution>
                        <id>month-property</id>
                        <goals>
                            <goal>timestamp-property</goal>
                        </goals>
                        <phase>validate</phase>
                        <configuration>
                            <name>current.date.month</name>
                            <pattern>MMMM</pattern>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>3.8.0</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>index</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>
</project>
