<?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>5.3.0-beta</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <artifactId>identity-profile-gen</artifactId>
    <packaging>pom</packaging>
    <name>WSO2 IS - IS Profile Generation</name>
    <url>http://wso2.org</url>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <inherited>false</inherited>
                <executions>
                    <execution>
                        <id>1-unpack-p2-agent-distribution</id>
                        <phase>test</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>
                    <execution>
                        <id>unpack-equinox-executable</id>
                        <phase>test</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.eclipse.equinox</groupId>
                                    <artifactId>org.eclipse.equinox.executable</artifactId>
                                    <version>3.5.0.v20110530-7P7NFUFFLWUl76mart</version>
                                    <type>zip</type>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>target</outputDirectory>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.wso2.maven</groupId>
                <artifactId>carbon-p2-plugin</artifactId>
                <version>${carbon.p2.plugin.version}</version>
                <executions>
                    <execution>
                        <id>2-p2-repo-generation</id>
                        <phase>package</phase>
                        <goals>
                            <goal>p2-repo-gen</goal>
                        </goals>
                        <configuration>
                            <p2AgentLocation>${basedir}/target/p2-agent</p2AgentLocation>
                            <metadataRepository>file:${basedir}/target/p2-repo</metadataRepository>
                            <artifactRepository>file:${basedir}/target/p2-repo</artifactRepository>
                            <publishArtifacts>true</publishArtifacts>
                            <publishArtifactRepository>true</publishArtifactRepository>
                            <featureArtifacts>
                                <!--jaggery features-->
                                <featureArtifactDef>org.jaggeryjs:org.jaggeryjs.server.feature:${jaggeryjs.version}
                                </featureArtifactDef>
                                <featureArtifactDef>org.jaggeryjs.modules:ws.feature:${ws.module.version}
                                </featureArtifactDef>
                                <featureArtifactDef>org.jaggeryjs.modules:oauth.feature:${oauth.module.version}
                                </featureArtifactDef>
                                <featureArtifactDef>org.jaggeryjs.modules:email.feature:${email.module.version}
                                </featureArtifactDef>
                                <featureArtifactDef>org.jaggeryjs.modules:uuid.feature:${uuid.module.version}
                                </featureArtifactDef>
                                <featureArtifactDef>org.jaggeryjs.modules:process.feature:${process.module.version}
                                </featureArtifactDef>
                                <featureArtifactDef>org.jaggeryjs.modules:caramel.feature:${caramel.module.version}
                                </featureArtifactDef>
                                <featureArtifactDef>org.jaggeryjs.modules:carbon.feature:${carbon.module.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.jaggeryjs.modules:handlebars.feature:${handlebars.module.version}
                                </featureArtifactDef>
                                <featureArtifactDef>org.jaggeryjs.modules:markdown.feature:${markdown.module.verion}
                                </featureArtifactDef>
                                <featureArtifactDef>org.jaggeryjs.modules:gadget.feature:${gadget.module.version}
                                </featureArtifactDef>
                                <featureArtifactDef>org.jaggeryjs.modules:i18n.feature:${i18n.module.version}
                                </featureArtifactDef>

                                <!--Carbon features-->
                                <featureArtifactDef>
                                    org.wso2.carbon.deployment:org.wso2.carbon.as.runtimes.cxf.feature:${carbon.deployment.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.deployment:org.wso2.carbon.webapp.mgt.server.feature:${carbon.deployment.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.commons:org.wso2.carbon.logging.mgt.feature:${carbon.commons.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.commons:org.wso2.carbon.system.statistics.feature:${carbon.commons.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.commons:org.wso2.carbon.soaptracer.feature:${carbon.commons.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.analytics-common:org.wso2.carbon.databridge.datapublisher.feature:${carbon.analytics-common.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.analytics-common:org.wso2.carbon.event.publisher.aggregate.feature:${carbon.analytics-common.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.framework:org.wso2.carbon.security.mgt.feature:${carbon.identity.framework.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.inbound.auth.sts:org.wso2.carbon.sts.feature:${identity.inbound.auth.sts.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.inbound.auth.sts:org.wso2.carbon.mex.server.feature:${identity.inbound.auth.sts.version}
                                </featureArtifactDef>

                                <!-- registry related features -->
                                <featureArtifactDef>
                                    org.wso2.carbon.registry:org.wso2.carbon.registry.core.feature:${carbon.registry.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.registry:org.wso2.carbon.registry.resource.properties.feature:${carbon.registry.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.registry:org.wso2.carbon.registry.profiles.feature:${carbon.registry.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.registry:org.wso2.carbon.registry.contentsearch.feature:${carbon.registry.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.registry:org.wso2.carbon.registry.ui.menu.feature:${carbon.registry.version}
                                </featureArtifactDef>
                                <!-- Directory server related features -->
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.framework:org.wso2.carbon.directory.service.mgr.feature:${carbon.identity.framework.version}
                                </featureArtifactDef>
                                <!-- identity related features -->
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.framework:org.wso2.carbon.identity.core.feature:${carbon.identity.framework.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.inbound.auth.openid:org.wso2.carbon.identity.provider.server.feature:${identity.inbound.auth.openid.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.framework:org.wso2.carbon.idp.mgt.feature:${carbon.identity.framework.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.framework:org.wso2.carbon.identity.event.feature:${carbon.identity.framework.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.framework:org.wso2.carbon.identity.mgt.feature:${carbon.identity.framework.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.governance:org.wso2.carbon.identity.governance.feature:${identity.governance.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.event.handler.accountlock:org.wso2.carbon.identity.handler.event.account.lock.feature:${identity.event.handler.account.lock.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.event.handler.notification:org.wso2.carbon.email.mgt.feature:${identity.event.handler.notification.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.event.handler.notification:org.wso2.carbon.event.handler.notification.server.feature:${identity.event.handler.notification.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.framework:org.wso2.carbon.identity.user.registration.feature:${carbon.identity.framework.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.framework:org.wso2.carbon.identity.user.profile.feature:${carbon.identity.framework.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.framework:org.wso2.carbon.identity.xacml.feature:${carbon.identity.framework.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.framework:org.wso2.carbon.claim.mgt.feature:${carbon.identity.framework.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.inbound.auth.saml2:org.wso2.carbon.identity.sso.saml.feature:${identity.inbound.auth.saml.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.metadata.saml2:org.wso2.carbon.identity.idp.metadata.saml2.server.feature:${identity.metadata.saml.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.metadata.saml2:org.wso2.carbon.identity.sp.metadata.saml2.server.feature:${identity.metadata.saml.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.framework:org.wso2.carbon.identity.application.mgt.feature:${carbon.identity.framework.version}
                                </featureArtifactDef>

                                <featureArtifactDef>
                                    org.wso2.carbon.identity.framework:org.wso2.carbon.identity.application.authentication.framework.server.feature:${carbon.identity.framework.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.application.authz.xacml:org.wso2.carbon.identity.application.authz.xacml.server.feature:${identity.app.authz.xacml.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.datapublisher.authentication:org.wso2.carbon.identity.data.publisher.application.authentication.server.feature:${identity.data.publisher.authentication.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.data.publisher.oauth:org.wso2.carbon.identity.data.publisher.oauth.server.feature:${identity.data.publisher.oauth.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.data.publisher.audit:org.wso2.carbon.identity.data.publisher.audit.user.operation.server.feature:${identity.data.publisher.audit.version}
                                </featureArtifactDef>

                                <!-- Authenticators -->
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.local.auth.requestpath.basic:org.wso2.carbon.identity.application.authenticator.requestpath.basicauth.server.feature:${identity.outbound.auth.requestpath.basicauth.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.local.auth.requestpath.oauth:org.wso2.carbon.identity.application.authenticator.requestpath.oauth.server.feature:${identity.outbound.auth.requestpath.oauth.version}
                                </featureArtifactDef>

                                <featureArtifactDef>
                                    org.wso2.carbon.identity.carbon.auth.saml2:org.wso2.carbon.identity.authenticator.saml2.sso.feature:${identity.carbon.auth.saml2.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.framework:org.wso2.carbon.identity.thrift.authentication.feature:${carbon.identity.framework.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.carbon.auth.mutualssl:org.wso2.carbon.identity.authenticator.mutualssl.feature:${identity.carbon.auth.mutual.ssl.version}
                                </featureArtifactDef>

                                <featureArtifactDef>
                                    org.wso2.carbon.identity.user.ws:org.wso2.carbon.um.ws.service.feature:${identity.user.ws.version}
                                </featureArtifactDef>

                                <featureArtifactDef>
                                    org.wso2.is:org.wso2.identity.styles.feature:${project.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.is:org.wso2.identity.utils.feature:${project.version}
                                </featureArtifactDef>

                                <featureArtifactDef>
                                    org.wso2.carbon.identity.inbound.auth.oauth2:org.wso2.carbon.identity.oauth.feature:${identity.inbound.auth.oauth.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.carbon.auth.iwa:org.wso2.carbon.identity.authenticator.iwa.feature:${identity.carbon.auth.iwa.version}
                                </featureArtifactDef>

                                <featureArtifactDef>
                                    org.wso2.carbon.identity.inbound.auth.sts:org.wso2.carbon.identity.sts.passive.feature:${identity.inbound.auth.sts.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.inbound.auth.sts:org.wso2.carbon.identity.sts.mgt.feature:${identity.inbound.auth.sts.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.userstore.ldap:org.wso2.carbon.ldap.server.feature:${identity.userstore.ldap.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.userstore.remote:org.wso2.carbon.identity.user.store.remote.feature:${identity.userstore.remote.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.inbound.provisioning.scim:org.wso2.carbon.identity.scim.feature:${identity.inbound.provisioning.scim.version}
                                </featureArtifactDef>
                                <!-- Features related to Cloud Identity -->
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.framework:org.wso2.carbon.user.mgt.feature:${carbon.identity.framework.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.commons:org.wso2.carbon.tenant.mgt.common.feature:${carbon.commons.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.multitenancy:org.wso2.carbon.tenant.common.feature:${carbon.multitenancy.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.is:org.wso2.identity.ui.feature:${project.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon:org.wso2.carbon.core.feature:${carbon.kernel.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon:org.wso2.carbon.core.runtime.feature:${carbon.kernel.version}
                                </featureArtifactDef>

                                <!-- DepSync feature -->
                                <featureArtifactDef>
                                    org.wso2.carbon.commons:org.wso2.carbon.event.server.feature:${carbon.commons.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.commons:org.wso2.carbon.deployment.synchronizer.feature:${carbon.commons.version}
                                </featureArtifactDef>

                                <!-- Store feature for SSO-->
                                <featureArtifactDef>org.jaggeryjs.modules:sso.feature:${jaggery.extensions.version}
                                </featureArtifactDef>

                                <!-- Identity Provisioning Feature -->
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.framework:org.wso2.carbon.identity.provisioning.server.feature:${carbon.identity.framework.version}
                                </featureArtifactDef>

                                <!-- SAML Request/Response Validator Toolkit Feature -->
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.tool.validator.sso.saml2:org.wso2.carbon.identity.tools.saml.validator.feature:${identity.tool.samlsso.validator.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.metadata.saml2:org.wso2.carbon.identity.idp.metadata.saml2.server.feature:${identity.metadata.saml.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.metadata.saml2:org.wso2.carbon.identity.sp.metadata.saml2.server.feature:${identity.metadata.saml.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.framework:org.wso2.carbon.identity.notification.mgt.feature:${carbon.identity.framework.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity:org.wso2.carbon.identity.notification.mgt.json.feature:${identity.notification.json.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity:org.wso2.carbon.identity.notification.mgt.email.feature:${identity.notification.email.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.apache.axis2.transport:org.apache.axis2.transport.mail.feature:${axis2-transports.version}
                                </featureArtifactDef>
                                <!-- User Account Association Feature -->
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.association.account:org.wso2.carbon.identity.user.account.association.feature:${identity.user.account.association.version}
                                </featureArtifactDef>
                                <!-- Cipher tool feature -->
                                <featureArtifactDef>
                                    org.wso2.ciphertool:org.wso2.ciphertool.feature:${cipher-tool.version}
                                </featureArtifactDef>
                                <feaureArtifactDef>
                                    org.wso2.carbon.dashboards:org.wso2.carbon.dashboards.shindig.feature:${carbon.dashboards.version}
                                </feaureArtifactDef>

                                <!-- Workflow mgt Feature -->
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.framework:org.wso2.carbon.identity.workflow.mgt.feature:${carbon.identity.framework.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.workflow.user:org.wso2.carbon.user.mgt.workflow.feature:${identity.user.workflow.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.workflow.impl.bps:org.wso2.carbon.identity.workflow.impl.feature:${identity.workflow.impl.bps.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.workflow.template.multisteps:org.wso2.carbon.identity.workflow.template.server.feature:${identity.workflow.template.multisteps.version}
                                </featureArtifactDef>

                                <!--BPEL and HumanTask features -->
                                <featureArtifactDef>
                                    org.wso2.carbon.business-process:org.wso2.carbon.bpel.server.feature:${carbon.business-process.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.business-process:org.wso2.carbon.humantask.server.feature:${carbon.business-process.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.business-process:org.wso2.carbon.attachment.mgt.feature:${carbon.business-process.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.deployment:org.wso2.carbon.service.mgt.feature:${carbon.deployment.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.business-process:org.wso2.carbon.unifiedendpoint.server.feature:${carbon.business-process.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.analytics-common:org.wso2.carbon.event.output.adapter.server.feature:${carbon.analytics-common.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.analytics-common:org.wso2.carbon.databridge.commons.server.feature:${carbon.analytics-common.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.analytics-common:org.wso2.carbon.event.stream.server.feature:${carbon.analytics-common.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.deployment:org.wso2.carbon.module.mgt.feature:${carbon.deployment.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.metrics:org.wso2.carbon.metrics.feature:${carbon.metrics.version}
                                </featureArtifactDef>

                                <!--Auth/Authz for Rest API-->
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.auth.rest:org.wso2.carbon.identity.auth.server.feature:${carbon.identity.auth.version}
                                </featureArtifactDef>
                                <featureArtifactDef>
                                    org.wso2.carbon.identity.auth.rest:org.wso2.carbon.identity.authz.server.feature:${carbon.identity.auth.version}
                                </featureArtifactDef>

                                <featureArtifactDef>
                                    org.wso2.carbon.identity.auth.rest:org.wso2.carbon.identity.context.rewrite.server.feature:${carbon.identity.auth.version}
                                </featureArtifactDef>

                            </featureArtifacts>
                        </configuration>
                    </execution>


                    <!-- Default Profile (IS Front-End + IS Back-End) -->
                    <execution>
                        <id>3-p2-profile-generation</id>
                        <phase>package</phase>
                        <goals>
                            <goal>p2-profile-gen</goal>
                        </goals>
                        <configuration>
                            <profile>default</profile>
                            <p2AgentLocation>${basedir}/target/p2-agent</p2AgentLocation>
                            <metadataRepository>file:${basedir}/target/p2-repo</metadataRepository>
                            <artifactRepository>file:${basedir}/target/p2-repo</artifactRepository>
                            <destination>
                                ${basedir}/target/wso2carbon-core-${carbon.kernel.version}/repository/components
                            </destination>
                            <deleteOldProfileFiles>true</deleteOldProfileFiles>
                            <features>
                                <feature>
                                    <id>org.jaggeryjs.server.feature.group</id>
                                    <version>${jaggeryjs.version}</version>
                                </feature>
                                <feature>
                                    <id>org.jaggeryjs.modules.ws.feature.group</id>
                                    <version>${ws.module.version}</version>
                                </feature>
                                <feature>
                                    <id>org.jaggeryjs.modules.oauth.feature.group</id>
                                    <version>${oauth.module.version}</version>
                                </feature>
                                <feature>
                                    <id>org.jaggeryjs.modules.email.feature.group</id>
                                    <version>${email.module.version}</version>
                                </feature>
                                <feature>
                                    <id>org.jaggeryjs.modules.uuid.feature.group</id>
                                    <version>${uuid.module.version}</version>
                                </feature>
                                <feature>
                                    <id>org.jaggeryjs.modules.process.feature.group</id>
                                    <version>${process.module.version}</version>
                                </feature>
                                <feature>
                                    <id>org.jaggeryjs.modules.caramel.feature.group</id>
                                    <version>${caramel.module.version}</version>
                                </feature>
                                <feature>
                                    <id>org.jaggeryjs.modules.carbon.feature.group</id>
                                    <version>${carbon.module.version}</version>
                                </feature>
                                <feature>
                                    <id>org.jaggeryjs.modules.handlebars.feature.group</id>
                                    <version>${handlebars.module.version}</version>
                                </feature>
                                <feature>
                                    <id>org.jaggeryjs.modules.markdown.feature.group</id>
                                    <version>${markdown.module.verion}</version>
                                </feature>
                                <feature>
                                    <id>org.jaggeryjs.modules.gadget.feature.group</id>
                                    <version>${gadget.module.version}</version>
                                </feature>
                                <feature>
                                    <id>org.jaggeryjs.modules.i18n.feature.group</id>
                                    <version>${i18n.module.version}</version>
                                </feature>
                                <feature>
                                    <id>org.jaggeryjs.modules.sso.feature.group</id>
                                    <version>${jaggery.extensions.version}</version>
                                </feature>

                                <!--end of store features-->

                                <feature>
                                    <id>org.wso2.carbon.as.runtimes.cxf.feature.group</id>
                                    <version>${carbon.deployment.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.webapp.mgt.server.feature.group</id>
                                    <version>${carbon.deployment.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.logging.mgt.feature.group</id>
                                    <version>${carbon.commons.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.databridge.datapublisher.feature.group</id>
                                    <version>${carbon.analytics-common.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.event.publisher.aggregate.feature.group</id>
                                    <version>${carbon.analytics-common.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.ldap.server.feature.group</id>
                                    <version>${identity.userstore.ldap.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.user.store.remote.feature.group</id>
                                    <version>${identity.userstore.remote.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.system.statistics.feature.group</id>
                                    <version>${carbon.commons.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.soaptracer.feature.group</id>
                                    <version>${carbon.commons.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.security.mgt.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.sts.feature.group</id>
                                    <version>${identity.inbound.auth.sts.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.registry.core.feature.group</id>
                                    <version>${carbon.registry.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.registry.resource.properties.feature.group</id>
                                    <version>${carbon.registry.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.registry.profiles.feature.group</id>
                                    <version>${carbon.registry.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.registry.ui.menu.feature.group</id>
                                    <version>${carbon.registry.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.core.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.provider.server.feature.group</id>
                                    <version>${identity.inbound.auth.openid.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.idp.mgt.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.event.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.governance.feature.group</id>
                                    <version>${identity.governance.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.handler.event.account.lock.feature.group</id>
                                    <version>${identity.event.handler.account.lock.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.mgt.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.email.mgt.feature.group</id>
                                    <version>${identity.event.handler.notification.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.event.handler.notification.server.feature.group</id>
                                    <version>${identity.event.handler.notification.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.user.registration.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.user.profile.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.xacml.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.sso.saml.feature.group</id>
                                    <version>${identity.inbound.auth.saml.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.idp.metadata.saml2.server.feature.group</id>
                                    <version>${identity.metadata.saml.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.sp.metadata.saml2.server.feature.group</id>
                                    <version>${identity.metadata.saml.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.application.mgt.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.claim.mgt.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.authenticator.saml2.sso.feature.group</id>
                                    <version>${identity.carbon.auth.saml2.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.authenticator.mutualssl.feature.group</id>
                                    <version>${identity.carbon.auth.mutual.ssl.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.um.ws.service.feature.group</id>
                                    <version>${identity.user.ws.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.directory.service.mgr.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.identity.styles.feature.group</id>
                                    <version>${project.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.sts.passive.feature.group</id>
                                    <version>${identity.inbound.auth.sts.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.sts.mgt.feature.group</id>
                                    <version>${identity.inbound.auth.sts.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.identity.utils.feature.group</id>
                                    <version>${project.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.oauth.feature.group</id>
                                    <version>${identity.inbound.auth.oauth.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.authenticator.iwa.feature.group</id>
                                    <version>${identity.carbon.auth.iwa.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.scim.feature.group</id>
                                    <version>${identity.inbound.provisioning.scim.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.mex.server.feature.group</id>
                                    <version>${identity.inbound.auth.sts.version}</version>
                                </feature>

                                <!-- Features required for Cloud Identity -->
                                <feature>
                                    <id>org.wso2.carbon.tenant.mgt.common.feature.group</id>
                                    <version>${carbon.commons.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.tenant.common.feature.group</id>
                                    <version>${carbon.multitenancy.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.identity.ui.feature.group</id>
                                    <version>${project.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.registry.contentsearch.feature.group</id>
                                    <version>${carbon.registry.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.user.mgt.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.event.server.feature.group</id>
                                    <version>${carbon.commons.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.deployment.synchronizer.feature.group</id>
                                    <version>${carbon.commons.version}</version>
                                </feature>

                                <feature>
                                    <id>
                                        org.wso2.carbon.identity.application.authentication.framework.server.feature.group
                                    </id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>
                                        org.wso2.carbon.identity.application.authz.xacml.server.feature.group
                                    </id>
                                    <version>${identity.app.authz.xacml.version}</version>
                                </feature>
                                <feature>
                                    <id>
                                        org.wso2.carbon.identity.data.publisher.application.authentication.server.feature.group
                                    </id>
                                    <version>${identity.data.publisher.authentication.version}</version>
                                </feature>
                                <feature>
                                    <id>
                                        org.wso2.carbon.identity.data.publisher.oauth.server.feature.group
                                    </id>
                                    <version>${identity.data.publisher.oauth.version}</version>
                                </feature>
                                <feature>
                                    <id>
                                        org.wso2.carbon.identity.data.publisher.audit.user.operation.server.feature.group
                                    </id>
                                    <version>${identity.data.publisher.audit.version}</version>
                                </feature>
                                <feature>
                                    <id>
                                        org.wso2.carbon.identity.application.authenticator.requestpath.basicauth.server.feature.group
                                    </id>
                                    <version>${identity.outbound.auth.requestpath.basicauth.version}</version>
                                </feature>
                                <feature>
                                    <id>
                                        org.wso2.carbon.identity.application.authenticator.requestpath.oauth.server.feature.group
                                    </id>
                                    <version>${identity.outbound.auth.requestpath.oauth.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.provisioning.server.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>

                                <feature>
                                    <id>org.wso2.carbon.identity.tools.saml.validator.feature.group</id>
                                    <version>${identity.tool.samlsso.validator.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.thrift.authentication.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.notification.mgt.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.notification.mgt.json.feature.group</id>
                                    <version>${identity.notification.json.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.notification.mgt.email.feature.group</id>
                                    <version>${identity.notification.email.version}</version>
                                </feature>
                                <feature>
                                    <id>org.apache.axis2.transport.mail.feature.group</id>
                                    <version>${axis2-transports.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.user.account.association.feature.group</id>
                                    <version>${identity.user.account.association.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.workflow.mgt.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.workflow.impl.feature.group</id>
                                    <version>${identity.workflow.impl.bps.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.workflow.template.server.feature.group</id>
                                    <version>${identity.workflow.template.multisteps.version}</version>
                                </feature>

                                <feature>
                                    <id>org.wso2.carbon.dashboards.shindig.feature.group</id>
                                    <version>${carbon.dashboards.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.user.mgt.workflow.feature.group</id>
                                    <version>${identity.user.workflow.version}</version>
                                </feature>

                                <!--BPEL and HumanTask features -->
                                <feature>
                                    <id>org.wso2.carbon.bpel.server.feature.group</id>
                                    <version>${carbon.business-process.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.humantask.server.feature.group</id>
                                    <version>${carbon.business-process.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.attachment.mgt.feature.group</id>
                                    <version>${carbon.business-process.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.service.mgt.server.feature.group</id>
                                    <version>${carbon.deployment.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.unifiedendpoint.server.feature.group</id>
                                    <version>${carbon.business-process.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.event.output.adapter.server.feature.group</id>
                                    <version>${carbon.analytics-common.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.event.stream.server.feature.group</id>
                                    <version>${carbon.analytics-common.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.databridge.commons.server.feature.group</id>
                                    <version>${carbon.analytics-common.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.module.mgt.server.feature.group</id>
                                    <version>${carbon.deployment.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.metrics.feature.group</id>
                                    <version>${carbon.metrics.version}</version>
                                </feature>

                                <!-- Auth/Authz for Rest API  -->
                                <feature>
                                    <id>org.wso2.carbon.identity.auth.server.feature.group</id>
                                    <version>${carbon.identity.auth.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.authz.server.feature.group</id>
                                    <version>${carbon.identity.auth.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.context.rewrite.server.feature.group</id>
                                    <version>${carbon.identity.auth.version}</version>
                                </feature>


                            </features>
                        </configuration>
                    </execution>

                    <execution>
                        <id>publishing product</id>
                        <phase>package</phase>
                        <goals>
                            <goal>publish-product</goal>
                        </goals>
                        <configuration>
                            <productConfigurationFile>${basedir}/carbon.product
                            </productConfigurationFile>
                            <executable>
                                ${basedir}/target/org.eclipse.equinox.executable_3.5.0.v20110530-7P7NFUFFLWUl76mart
                            </executable>
                            <metadataRepository>file:${basedir}/target/p2-repo</metadataRepository>
                            <artifactRepository>file:${basedir}/target/p2-repo</artifactRepository>
                        </configuration>
                    </execution>


                    <!-- Only IS Profile (IS Front-End + IS Back-End) -->
                    <execution>
                        <id>creating-is-profile</id>
                        <phase>package</phase>
                        <goals>
                            <goal>materialize-product</goal>
                        </goals>
                        <configuration>
                            <productConfigurationFile>${basedir}/carbon.product</productConfigurationFile>
                            <metadataRepository>file:${basedir}/target/p2-repo</metadataRepository>
                            <artifactRepository>file:${basedir}/target/p2-repo</artifactRepository>
                            <targetPath>
                                file:${basedir}/target/wso2carbon-core-${carbon.kernel.version}/repository/components
                            </targetPath>
                            <profile>is</profile>
                        </configuration>
                    </execution>
                    <execution>
                        <id>p2-profile-generation-for-is</id>
                        <phase>package</phase>
                        <goals>
                            <goal>p2-profile-gen</goal>
                        </goals>
                        <configuration>
                            <profile>is</profile>
                            <p2AgentLocation>${basedir}/target/p2-agent</p2AgentLocation>
                            <metadataRepository>file:${basedir}/target/p2-repo</metadataRepository>
                            <artifactRepository>file:${basedir}/target/p2-repo</artifactRepository>
                            <destination>
                                ${basedir}/target/wso2carbon-core-${carbon.kernel.version}/repository/components
                            </destination>
                            <deleteOldProfileFiles>true</deleteOldProfileFiles>
                            <features>
                                <feature>
                                    <id>org.jaggeryjs.server.feature.group</id>
                                    <version>${jaggeryjs.version}</version>
                                </feature>
                                <feature>
                                    <id>org.jaggeryjs.modules.ws.feature.group</id>
                                    <version>${ws.module.version}</version>
                                </feature>
                                <feature>
                                    <id>org.jaggeryjs.modules.oauth.feature.group</id>
                                    <version>${oauth.module.version}</version>
                                </feature>
                                <feature>
                                    <id>org.jaggeryjs.modules.email.feature.group</id>
                                    <version>${email.module.version}</version>
                                </feature>
                                <feature>
                                    <id>org.jaggeryjs.modules.uuid.feature.group</id>
                                    <version>${uuid.module.version}</version>
                                </feature>
                                <feature>
                                    <id>org.jaggeryjs.modules.process.feature.group</id>
                                    <version>${process.module.version}</version>
                                </feature>
                                <feature>
                                    <id>org.jaggeryjs.modules.caramel.feature.group</id>
                                    <version>${caramel.module.version}</version>
                                </feature>
                                <feature>
                                    <id>org.jaggeryjs.modules.carbon.feature.group</id>
                                    <version>${carbon.module.version}</version>
                                </feature>
                                <feature>
                                    <id>org.jaggeryjs.modules.handlebars.feature.group</id>
                                    <version>${handlebars.module.version}</version>
                                </feature>
                                <feature>
                                    <id>org.jaggeryjs.modules.markdown.feature.group</id>
                                    <version>${markdown.module.verion}</version>
                                </feature>
                                <feature>
                                    <id>org.jaggeryjs.modules.gadget.feature.group</id>
                                    <version>${gadget.module.version}</version>
                                </feature>
                                <feature>
                                    <id>org.jaggeryjs.modules.i18n.feature.group</id>
                                    <version>${i18n.module.version}</version>
                                </feature>
                                <feature>
                                    <id>org.jaggeryjs.modules.sso.feature.group</id>
                                    <version>${jaggery.extensions.version}</version>
                                </feature>

                                <!--end of store features-->

                                <feature>
                                    <id>org.wso2.carbon.as.runtimes.cxf.feature.group</id>
                                    <version>${carbon.deployment.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.webapp.mgt.server.feature.group</id>
                                    <version>${carbon.deployment.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.logging.mgt.feature.group</id>
                                    <version>${carbon.commons.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.databridge.datapublisher.feature.group</id>
                                    <version>${carbon.analytics-common.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.event.publisher.aggregate.feature.group</id>
                                    <version>${carbon.analytics-common.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.event.stream.server.feature.group</id>
                                    <version>${carbon.analytics-common.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.databridge.commons.server.feature.group</id>
                                    <version>${carbon.analytics-common.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.ldap.server.feature.group</id>
                                    <version>${identity.userstore.ldap.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.user.store.remote.feature.group</id>
                                    <version>${identity.userstore.remote.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.system.statistics.feature.group</id>
                                    <version>${carbon.commons.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.soaptracer.feature.group</id>
                                    <version>${carbon.commons.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.security.mgt.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.sts.feature.group</id>
                                    <version>${identity.inbound.auth.sts.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.registry.core.feature.group</id>
                                    <version>${carbon.registry.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.registry.resource.properties.feature.group</id>
                                    <version>${carbon.registry.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.registry.profiles.feature.group</id>
                                    <version>${carbon.registry.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.registry.ui.menu.feature.group</id>
                                    <version>${carbon.registry.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.core.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.provider.server.feature.group</id>
                                    <version>${identity.inbound.auth.openid.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.idp.mgt.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.event.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.mgt.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.governance.feature.group</id>
                                    <version>${identity.governance.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.handler.event.account.lock.feature.group</id>
                                    <version>${identity.event.handler.account.lock.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.email.mgt.feature.group</id>
                                    <version>${identity.event.handler.notification.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.event.handler.notification.server.feature.group</id>
                                    <version>${identity.event.handler.notification.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.user.registration.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.user.profile.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.xacml.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.sso.saml.feature.group</id>
                                    <version>${identity.inbound.auth.saml.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.idp.metadata.saml2.server.feature.group</id>
                                    <version>${identity.metadata.saml.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.sp.metadata.saml2.server.feature.group</id>
                                    <version>${identity.metadata.saml.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.application.mgt.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.claim.mgt.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.authenticator.saml2.sso.feature.group</id>
                                    <version>${identity.carbon.auth.saml2.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.authenticator.mutualssl.feature.group</id>
                                    <version>${identity.carbon.auth.mutual.ssl.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.um.ws.service.feature.group</id>
                                    <version>${identity.user.ws.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.directory.service.mgr.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.identity.styles.feature.group</id>
                                    <version>${project.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.sts.passive.feature.group</id>
                                    <version>${identity.inbound.auth.sts.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.sts.mgt.feature.group</id>
                                    <version>${identity.inbound.auth.sts.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.identity.utils.feature.group</id>
                                    <version>${project.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.oauth.feature.group</id>
                                    <version>${identity.inbound.auth.oauth.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.authenticator.iwa.feature.group</id>
                                    <version>${identity.carbon.auth.iwa.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.scim.feature.group</id>
                                    <version>${identity.inbound.provisioning.scim.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.mex.server.feature.group</id>
                                    <version>${identity.inbound.auth.sts.version}</version>
                                </feature>

                                <!-- Features required for Cloud Identity -->
                                <feature>
                                    <id>org.wso2.carbon.tenant.mgt.common.feature.group</id>
                                    <version>${carbon.commons.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.tenant.common.feature.group</id>
                                    <version>${carbon.multitenancy.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.identity.ui.feature.group</id>
                                    <version>${project.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.registry.contentsearch.feature.group</id>
                                    <version>${carbon.registry.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.user.mgt.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.event.server.feature.group</id>
                                    <version>${carbon.commons.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.deployment.synchronizer.feature.group</id>
                                    <version>${carbon.commons.version}</version>
                                </feature>

                                <feature>
                                    <id>
                                        org.wso2.carbon.identity.application.authentication.framework.server.feature.group
                                    </id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>
                                        org.wso2.carbon.identity.application.authz.xacml.server.feature.group
                                    </id>
                                    <version>${identity.app.authz.xacml.version}</version>
                                </feature>
                                <feature>
                                    <id>
                                        org.wso2.carbon.identity.data.publisher.application.authentication.server.feature.group
                                    </id>
                                    <version>${identity.data.publisher.authentication.version}</version>
                                </feature>
                                <feature>
                                    <id>
                                        org.wso2.carbon.identity.data.publisher.oauth.server.feature.group
                                    </id>
                                    <version>${identity.data.publisher.oauth.version}</version>
                                </feature>
                                <feature>
                                    <id>
                                        org.wso2.carbon.identity.data.publisher.audit.user.operation.server.feature.group
                                    </id>
                                    <version>${identity.data.publisher.audit.version}</version>
                                </feature>
                                <feature>
                                    <id>
                                        org.wso2.carbon.identity.application.authenticator.requestpath.basicauth.server.feature.group
                                    </id>
                                    <version>${identity.outbound.auth.requestpath.basicauth.version}</version>
                                </feature>
                                <feature>
                                    <id>
                                        org.wso2.carbon.identity.application.authenticator.requestpath.oauth.server.feature.group
                                    </id>
                                    <version>${identity.outbound.auth.requestpath.oauth.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.provisioning.server.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>

                                <feature>
                                    <id>org.wso2.carbon.identity.tools.saml.validator.feature.group</id>
                                    <version>${identity.tool.samlsso.validator.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.thrift.authentication.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.notification.mgt.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.notification.mgt.json.feature.group</id>
                                    <version>${identity.notification.json.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.notification.mgt.email.feature.group</id>
                                    <version>${identity.notification.email.version}</version>
                                </feature>
                                <feature>
                                    <id>org.apache.axis2.transport.mail.feature.group</id>
                                    <version>${axis2-transports.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.user.account.association.feature.group</id>
                                    <version>${identity.user.account.association.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.workflow.mgt.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.workflow.impl.feature.group</id>
                                    <version>${identity.workflow.impl.bps.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.workflow.template.server.feature.group</id>
                                    <version>${identity.workflow.template.multisteps.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.ciphertool.feature.group</id>
                                    <version>${cipher-tool.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.dashboards.shindig.feature.group</id>
                                    <version>${carbon.dashboards.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.user.mgt.workflow.feature.group</id>
                                    <version>${identity.user.workflow.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.metrics.feature.group</id>
                                    <version>${carbon.metrics.version}</version>
                                </feature>

                                <!-- Auth/Authz for Rest API  -->
                                <feature>
                                    <id>org.wso2.carbon.identity.auth.server.feature.group</id>
                                    <version>${carbon.identity.auth.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.authz.server.feature.group</id>
                                    <version>${carbon.identity.auth.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.context.rewrite.server.feature.group</id>
                                    <version>${carbon.identity.auth.version}</version>
                                </feature>

                            </features>
                        </configuration>
                    </execution>


                    <!-- Worker Profile (IS Back-End) -->
                    <execution>
                        <id>creating-worker-profile</id>
                        <phase>package</phase>
                        <goals>
                            <goal>materialize-product</goal>
                        </goals>
                        <configuration>
                            <productConfigurationFile>${basedir}/carbon.product</productConfigurationFile>
                            <metadataRepository>file:${basedir}/target/p2-repo</metadataRepository>
                            <artifactRepository>file:${basedir}/target/p2-repo</artifactRepository>
                            <targetPath>
                                file:${basedir}/target/wso2carbon-core-${carbon.kernel.version}/repository/components
                            </targetPath>
                            <profile>worker</profile>
                        </configuration>
                    </execution>
                    <execution>
                        <id>p2-profile-generation-for-worker</id>
                        <phase>package</phase>
                        <goals>
                            <goal>p2-profile-gen</goal>
                        </goals>
                        <configuration>
                            <profile>worker</profile>
                            <p2AgentLocation>${basedir}/target/p2-agent</p2AgentLocation>
                            <metadataRepository>file:${basedir}/target/p2-repo</metadataRepository>
                            <artifactRepository>file:${basedir}/target/p2-repo</artifactRepository>
                            <destination>
                                ${basedir}/target/wso2carbon-core-${carbon.kernel.version}/repository/components
                            </destination>
                            <deleteOldProfileFiles>true</deleteOldProfileFiles>
                            <features>

                                <feature>
                                    <id>org.jaggeryjs.server.feature.group</id>
                                    <version>${jaggeryjs.version}</version>
                                </feature>
                                <feature>
                                    <id>org.jaggeryjs.modules.ws.feature.group</id>
                                    <version>${ws.module.version}</version>
                                </feature>
                                <feature>
                                    <id>org.jaggeryjs.modules.oauth.feature.group</id>
                                    <version>${oauth.module.version}</version>
                                </feature>
                                <feature>
                                    <id>org.jaggeryjs.modules.email.feature.group</id>
                                    <version>${email.module.version}</version>
                                </feature>
                                <feature>
                                    <id>org.jaggeryjs.modules.uuid.feature.group</id>
                                    <version>${uuid.module.version}</version>
                                </feature>
                                <feature>
                                    <id>org.jaggeryjs.modules.process.feature.group</id>
                                    <version>${process.module.version}</version>
                                </feature>
                                <feature>
                                    <id>org.jaggeryjs.modules.caramel.feature.group</id>
                                    <version>${caramel.module.version}</version>
                                </feature>
                                <feature>
                                    <id>org.jaggeryjs.modules.carbon.feature.group</id>
                                    <version>${carbon.module.version}</version>
                                </feature>
                                <feature>
                                    <id>org.jaggeryjs.modules.handlebars.feature.group</id>
                                    <version>${handlebars.module.version}</version>
                                </feature>
                                <feature>
                                    <id>org.jaggeryjs.modules.markdown.feature.group</id>
                                    <version>${markdown.module.verion}</version>
                                </feature>
                                <feature>
                                    <id>org.jaggeryjs.modules.gadget.feature.group</id>
                                    <version>${gadget.module.version}</version>
                                </feature>
                                <feature>
                                    <id>org.jaggeryjs.modules.i18n.feature.group</id>
                                    <version>${i18n.module.version}</version>
                                </feature>
                                <feature>
                                    <id>org.jaggeryjs.modules.sso.feature.group</id>
                                    <version>${jaggery.extensions.version}</version>
                                </feature>

                                <!--end of store features-->

                                <feature>
                                    <id>org.wso2.carbon.as.runtimes.cxf.feature.group</id>
                                    <version>${carbon.deployment.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.webapp.mgt.server.feature.group</id>
                                    <version>${carbon.deployment.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.logging.mgt.server.feature.group</id>
                                    <version>${carbon.commons.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.databridge.datapublisher.feature.group</id>
                                    <version>${carbon.analytics-common.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.event.publisher.aggregate.feature.group</id>
                                    <version>${carbon.analytics-common.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.event.stream.server.feature.group</id>
                                    <version>${carbon.analytics-common.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.databridge.commons.server.feature.group</id>
                                    <version>${carbon.analytics-common.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.ldap.server.feature.group</id>
                                    <version>${identity.userstore.ldap.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.user.store.remote.feature.group</id>
                                    <version>${identity.userstore.remote.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.system.statistics.server.feature.group</id>
                                    <version>${carbon.commons.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.soaptracer.server.feature.group</id>
                                    <version>${carbon.commons.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.security.mgt.server.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.sts.server.feature.group</id>
                                    <version>${identity.inbound.auth.sts.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.registry.core.server.feature.group</id>
                                    <version>${carbon.registry.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.registry.resource.properties.server.feature.group</id>
                                    <version>${carbon.registry.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.registry.profiles.server.feature.group</id>
                                    <version>${carbon.registry.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.core.server.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.provider.server.feature.group</id>
                                    <version>${identity.inbound.auth.openid.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.idp.mgt.server.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.event.server.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.mgt.server.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.governance.server.feature.group</id>
                                    <version>${identity.governance.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.handler.event.account.lock.feature.group</id>
                                    <version>${identity.event.handler.account.lock.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.user.registration.server.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.user.profile.server.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.xacml.server.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.sso.saml.server.feature.group</id>
                                    <version>${identity.inbound.auth.saml.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.idp.metadata.saml2.server.feature.group</id>
                                    <version>${identity.metadata.saml.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.sp.metadata.saml2.server.feature.group</id>
                                    <version>${identity.metadata.saml.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.application.mgt.server.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.claim.mgt.server.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.authenticator.saml2.sso.server.feature.group</id>
                                    <version>${identity.carbon.auth.saml2.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.authenticator.mutualssl.feature.group</id>
                                    <version>${identity.carbon.auth.mutual.ssl.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.um.ws.service.server.feature.group</id>
                                    <version>${identity.user.ws.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.directory.service.mgr.server.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.sts.passive.server.feature.group</id>
                                    <version>${identity.inbound.auth.sts.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.sts.mgt.server.feature.group</id>
                                    <version>${identity.inbound.auth.sts.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.identity.utils.feature.group</id>
                                    <version>${project.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.oauth.server.feature.group</id>
                                    <version>${identity.inbound.auth.oauth.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.authenticator.iwa.server.feature.group</id>
                                    <version>${identity.carbon.auth.iwa.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.scim.feature.group</id>
                                    <version>${identity.inbound.provisioning.scim.version}</version>
                                </feature>

                                <!-- Features required for Cloud Identity -->
                                <feature>
                                    <id>org.wso2.carbon.tenant.mgt.common.server.feature.group</id>
                                    <version>${carbon.commons.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.tenant.common.server.feature.group</id>
                                    <version>${carbon.multitenancy.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.registry.contentsearch.server.feature.group</id>
                                    <version>${carbon.registry.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.user.mgt.server.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.event.server.feature.group</id>
                                    <version>${carbon.commons.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.deployment.synchronizer.server.feature.group</id>
                                    <version>${carbon.commons.version}</version>
                                </feature>

                                <feature>
                                    <id>
                                        org.wso2.carbon.identity.application.authentication.framework.server.feature.group
                                    </id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>
                                        org.wso2.carbon.identity.application.authz.xacml.server.feature.group
                                    </id>
                                    <version>${identity.app.authz.xacml.version}</version>
                                </feature>
                                <feature>
                                    <id>
                                        org.wso2.carbon.identity.data.publisher.application.authentication.server.feature.group
                                    </id>
                                    <version>${identity.data.publisher.authentication.version}</version>
                                </feature>
                                <feature>
                                    <id>
                                        org.wso2.carbon.identity.data.publisher.oauth.server.feature.group
                                    </id>
                                    <version>${identity.data.publisher.oauth.version}</version>
                                </feature>
                                <feature>
                                    <id>
                                        org.wso2.carbon.identity.data.publisher.audit.user.operation.server.feature.group
                                    </id>
                                    <version>${identity.data.publisher.audit.version}</version>
                                </feature>
                                <feature>
                                    <id>
                                        org.wso2.carbon.identity.application.authenticator.requestpath.basicauth.server.feature.group
                                    </id>
                                    <version>${identity.outbound.auth.requestpath.basicauth.version}</version>
                                </feature>
                                <feature>
                                    <id>
                                        org.wso2.carbon.identity.application.authenticator.requestpath.oauth.server.feature.group
                                    </id>
                                    <version>${identity.outbound.auth.requestpath.oauth.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.provisioning.server.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>

                                <feature>
                                    <id>org.wso2.carbon.identity.tools.saml.validator.server.feature.group</id>
                                    <version>${identity.tool.samlsso.validator.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.thrift.authentication.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.notification.mgt.server.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.notification.mgt.email.feature.group</id>
                                    <version>${identity.notification.email.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.notification.mgt.json.feature.group</id>
                                    <version>${identity.notification.json.version}</version>
                                </feature>
                                <feature>
                                    <id>org.apache.axis2.transport.mail.feature.group</id>
                                    <version>${axis2-transports.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.user.account.association.server.feature.group</id>
                                    <version>${identity.user.account.association.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.workflow.mgt.server.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.workflow.impl.feature.group</id>
                                    <version>${identity.workflow.impl.bps.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.workflow.template.server.feature.group</id>
                                    <version>${identity.workflow.template.multisteps.version}</version>
                                </feature>

                                <feature>
                                    <id>org.wso2.carbon.dashboards.shindig.feature.group</id>
                                    <version>${carbon.dashboards.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.user.mgt.workflow.server.feature.group</id>
                                    <version>${identity.user.workflow.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.metrics.server.feature.group</id>
                                    <version>${carbon.metrics.version}</version>
                                </feature>

                                <!-- Auth/Authz for Rest API  -->
                                <feature>
                                    <id>org.wso2.carbon.identity.auth.server.feature.group</id>
                                    <version>${carbon.identity.auth.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.authz.server.feature.group</id>
                                    <version>${carbon.identity.auth.version}</version>
                                </feature>

                                <feature>
                                    <id>org.wso2.carbon.identity.context.rewrite.server.feature.group</id>
                                    <version>${carbon.identity.auth.version}</version>
                                </feature>

                            </features>
                        </configuration>
                    </execution>


                    <!-- Workflow Profile (BPS Back-End) -->
                    <execution>
                        <id>creating-workflow-profile</id>
                        <phase>package</phase>
                        <goals>
                            <goal>materialize-product</goal>
                        </goals>
                        <configuration>
                            <productConfigurationFile>${basedir}/carbon.product</productConfigurationFile>
                            <metadataRepository>file:${basedir}/target/p2-repo</metadataRepository>
                            <artifactRepository>file:${basedir}/target/p2-repo</artifactRepository>
                            <targetPath>
                                file:${basedir}/target/wso2carbon-core-${carbon.kernel.version}/repository/components
                            </targetPath>
                            <profile>workflow</profile>
                        </configuration>
                    </execution>


                    <execution>
                        <id>p2-profile-generation-for-workflow</id>
                        <phase>package</phase>
                        <goals>
                            <goal>p2-profile-gen</goal>
                        </goals>
                        <configuration>
                            <profile>workflow</profile>
                            <p2AgentLocation>${basedir}/target/p2-agent</p2AgentLocation>
                            <metadataRepository>file:${basedir}/target/p2-repo</metadataRepository>
                            <artifactRepository>file:${basedir}/target/p2-repo</artifactRepository>
                            <destination>
                                ${basedir}/target/wso2carbon-core-${carbon.kernel.version}/repository/components
                            </destination>
                            <deleteOldProfileFiles>true</deleteOldProfileFiles>
                            <features>

                                <!-- 1 Carbon Kernel -->
                                <feature>
                                    <id>org.wso2.carbon.core.common.feature.group</id>
                                    <version>${carbon.kernel.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.core.server.feature.group</id>
                                    <version>${carbon.kernel.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.core.runtime.feature.group</id>
                                    <version>${carbon.kernel.version}</version>
                                </feature>

                                <!--2 Carbon Business Process -->
                                <feature>
                                    <id>org.wso2.carbon.bpel.server.feature.group</id>
                                    <version>${carbon.business-process.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.humantask.server.feature.group</id>
                                    <version>${carbon.business-process.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.attachment.mgt.feature.group</id>
                                    <version>${carbon.business-process.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.unifiedendpoint.server.feature.group</id>
                                    <version>${carbon.business-process.version}</version>
                                </feature>


                                <!-- 3 Carbon Deployment -->
                                <feature>
                                    <id>org.wso2.carbon.service.mgt.server.feature.group</id>
                                    <version>${carbon.deployment.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.module.mgt.server.feature.group</id>
                                    <version>${carbon.deployment.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.webapp.mgt.server.feature.group</id>
                                    <version>${carbon.deployment.version}</version>
                                </feature>

                                <!-- 4 Carbon Registry -->
                                <feature>
                                    <id>org.wso2.carbon.registry.core.feature.group</id>
                                    <version>${carbon.registry.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.registry.core.server.feature.group</id>
                                    <version>${carbon.registry.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.registry.core.ui.feature.group</id>
                                    <version>${carbon.registry.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.registry.core.common.feature.group</id>
                                    <version>${carbon.registry.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.registry.ui.menu.feature.group</id>
                                    <version>${carbon.registry.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.registry.resource.properties.feature.group
                                    </id>
                                    <version>${carbon.registry.version}</version>
                                </feature>


                                <!--6  Carbon Commons-->

                                <feature>
                                    <id>org.wso2.carbon.tenant.mgt.common.feature.group</id>
                                    <version>${carbon.commons.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.logging.mgt.feature.group</id>
                                    <version>${carbon.commons.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.system.statistics.server.feature.group</id>
                                    <version>${carbon.commons.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.soaptracer.server.feature.group</id>
                                    <version>${carbon.commons.version}</version>
                                </feature>

                                <feature>
                                    <id>org.wso2.carbon.deployment.synchronizer.feature.group</id>
                                    <version>${carbon.commons.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.event.server.feature.group</id>
                                    <version>${carbon.commons.version}</version>
                                </feature>


                                <!-- 7 Carbon Multitenancy -->
                                <feature>
                                    <id>org.wso2.carbon.tenant.common.feature.group</id>
                                    <version>${carbon.multitenancy.version}</version>
                                </feature>

                                <!-- 8 Carbon Identity -->
                                <feature>
                                    <id>org.wso2.carbon.security.mgt.server.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.user.mgt.server.feature.group</id>
                                    <version>${carbon.identity.framework.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.ldap.server.feature.group</id>
                                    <version>${identity.userstore.ldap.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.identity.user.store.remote.feature.group</id>
                                    <version>${identity.userstore.remote.version}</version>
                                </feature>


                                <!-- 6 Carbon Analytics Common -->
                                <feature>
                                    <id>org.wso2.carbon.event.output.adapter.server.feature.group</id>
                                    <version>${carbon.analytics-common.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.event.output.adapter.sms.server.feature.group</id>
                                    <version>${carbon.analytics-common.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.event.output.adapter.email.server.feature.group</id>
                                    <version>${carbon.analytics-common.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.databridge.datapublisher.feature.group</id>
                                    <version>${carbon.analytics-common.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.event.publisher.aggregate.feature.group</id>
                                    <version>${carbon.analytics-common.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.databridge.commons.thrift.server.feature.group</id>
                                    <version>${carbon.analytics-common.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.databridge.commons.server.feature.group</id>
                                    <version>${carbon.analytics-common.version}</version>
                                </feature>

                                <feature>
                                    <id>org.wso2.carbon.registry.contentsearch.feature.group</id>
                                    <version>${carbon.registry.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.metrics.feature.group</id>
                                    <version>${carbon.metrics.version}</version>
                                </feature>
                                <feature>
                                    <id>org.wso2.carbon.event.stream.server.feature.group</id>
                                    <version>${carbon.analytics-common.version}</version>
                                </feature>

                            </features>
                        </configuration>
                    </execution>


                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <configuration>
                            <tasks>
                                <replace token="false" value="true" dir="target/wso2carbon-core-${carbon.kernel.version}/repository/components">
                                    <include name="**/bundles.info" />
                                </replace>
                                <replace file="target/wso2carbon-core-${carbon.kernel.version}/repository/conf/tomcat/context.xml" token="&lt;Context&gt;" value="&lt;Context crossContext=&quot;true&quot;&gt;" />
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
