You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ud...@apache.org on 2015/05/19 09:55:18 UTC

[1/4] stratos git commit: removing local database scripts

Repository: stratos
Updated Branches:
  refs/heads/master 21f79315a -> a7c7dd800


removing local database scripts


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/96ad4803
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/96ad4803
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/96ad4803

Branch: refs/heads/master
Commit: 96ad48033eae08bca2a57a90383437a69bcf1440
Parents: 21f7931
Author: Udara Liyanage <ud...@wso2.com>
Authored: Tue May 19 11:55:47 2015 +0530
Committer: Udara Liyanage <ud...@wso2.com>
Committed: Tue May 19 12:49:20 2015 +0530

----------------------------------------------------------------------
 products/stratos/dbscripts/billing-h2.sql     | 128 ----------------
 products/stratos/dbscripts/billing-mysql.sql  | 139 -----------------
 products/stratos/dbscripts/metering_h2.sql    | 133 ----------------
 products/stratos/dbscripts/metering_mysql.sql | 168 ---------------------
 products/stratos/dbscripts/migration.sql      |  26 ----
 products/stratos/dbscripts/s2_h2.sql          | 115 --------------
 products/stratos/dbscripts/stratos_mysql.sql  | 159 -------------------
 products/stratos/dbscripts/wso2_rss.sql       |  99 ------------
 8 files changed, 967 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/96ad4803/products/stratos/dbscripts/billing-h2.sql
----------------------------------------------------------------------
diff --git a/products/stratos/dbscripts/billing-h2.sql b/products/stratos/dbscripts/billing-h2.sql
deleted file mode 100755
index ccf1393..0000000
--- a/products/stratos/dbscripts/billing-h2.sql
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you 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.
-*/ 
-
-CREATE TABLE IF NOT EXISTS BC_CUSTOMER (
-             BC_ID INTEGER AUTO_INCREMENT,
-             BC_NAME VARCHAR (64),
-             BC_STARTED_DATE TIMESTAMP,
-             BC_EMAIL VARCHAR (64),
-             BC_ADDRESS VARCHAR (256),
-             CONSTRAINT PK_BC_CUSTOMER PRIMARY KEY (BC_ID)
-);
-
-CREATE HASH INDEX BC_CUSTOMER_IND_BY_BC_NAME ON BC_CUSTOMER(BC_NAME);
-CREATE HASH INDEX BC_CUSTOMER_IND_BY_BC_EMAIL ON BC_CUSTOMER(BC_EMAIL);
-
-CREATE TABLE IF NOT EXISTS BC_ITEM (
-             BC_ID INTEGER AUTO_INCREMENT,
-             BC_NAME VARCHAR (64),
-             BC_COST VARCHAR (64),
-             BC_DESCRIPTION VARCHAR(128),
-             BC_PARENT_ITEM_ID INTEGER,
-             CONSTRAINT PK_BC_ITEM PRIMARY KEY (BC_ID)
-);
-INSERT INTO BC_ITEM (BC_NAME,BC_COST,BC_DESCRIPTION,BC_PARENT_ITEM_ID) values ('Demo',NULL,NULL,NULL);
-INSERT INTO BC_ITEM (BC_NAME,BC_COST,BC_DESCRIPTION,BC_PARENT_ITEM_ID) values ('SMB',NULL,NULL,NULL);
-INSERT INTO BC_ITEM (BC_NAME,BC_COST,BC_DESCRIPTION,BC_PARENT_ITEM_ID) values ('Professional',NULL,NULL,NULL);
-INSERT INTO BC_ITEM (BC_NAME,BC_COST,BC_DESCRIPTION,BC_PARENT_ITEM_ID) values ('Enterprise',NULL,NULL,NULL);
-
-ALTER TABLE BC_ITEM ADD CONSTRAINT IF NOT EXISTS BC_ITEM_FK_BY_PARENT_ITEM_ID FOREIGN KEY (BC_PARENT_ITEM_ID) REFERENCES BC_ITEM (BC_ID);
-
-
-CREATE TABLE IF NOT EXISTS BC_SUBSCRIPTION (
-             BC_ID INTEGER AUTO_INCREMENT,
-             BC_FILTER VARCHAR (32),
-             BC_IS_ACTIVE INTEGER,
-             BC_ACTIVE_SINCE TIMESTAMP,
-             BC_ACTIVE_UNTIL TIMESTAMP,
-             BC_ITEM_ID INTEGER,
-             BC_TENANT_ID INTEGER,
-             CONSTRAINT PK_BC_SUBSCRIPTION PRIMARY KEY (BC_ID)
-);
-
-ALTER TABLE BC_SUBSCRIPTION ADD CONSTRAINT IF NOT EXISTS BC_SUBSCRIPTION_FK_BY_ITEM_ID FOREIGN KEY (BC_ITEM_ID) REFERENCES BC_ITEM (BC_ID);
-
-CREATE TABLE IF NOT EXISTS BC_INVOICE (
-             BC_ID INTEGER AUTO_INCREMENT,
-             BC_TENANT_ID INTEGER,
-             BC_DATE TIMESTAMP,
-             BC_START_DATE TIMESTAMP,
-             BC_END_DATE TIMESTAMP,
-             BC_BOUGHT_FORWARD VARCHAR (64),
-             BC_CARRIED_FORWARD VARCHAR (64),
-             BC_TOTAL_PAYMENTS VARCHAR (64),
-             BC_TOTAL_COST VARCHAR (64),
-             CONSTRAINT PK_BC_INVOICE PRIMARY KEY (BC_ID)
-);
-
-
-CREATE TABLE IF NOT EXISTS BC_PAYMENT (
-             BC_ID INTEGER AUTO_INCREMENT,
-             BC_DATE TIMESTAMP,
-             BC_AMOUNT VARCHAR (64),
-             BC_DESCRIPTION VARCHAR (128),
-             BC_INVOICE_ID INTEGER,
-	     	 BC_TENANT_ID INTEGER,	
-             CONSTRAINT PK_BC_PAYMENT PRIMARY KEY (BC_ID)
-);
-
-ALTER TABLE BC_PAYMENT ADD CONSTRAINT IF NOT EXISTS BC_PAYMENT_FK_BY_INVOICE_ID FOREIGN KEY (BC_INVOICE_ID) REFERENCES BC_INVOICE (BC_ID);
-
--- this is n-n relationship
-CREATE TABLE IF NOT EXISTS BC_PAYMENT_SUBSCRIPTION (
-             BC_PAYMENT_ID INTEGER,
-             BC_SUBSCRIPTION_ID INTEGER,
-             CONSTRAINT PK_BC_SUBSCRIPTION_ORDER PRIMARY KEY (BC_PAYMENT_ID, BC_SUBSCRIPTION_ID)
-);
-
-ALTER TABLE BC_PAYMENT_SUBSCRIPTION ADD CONSTRAINT IF NOT EXISTS BC_PAYMENT_SUBSCRIPTION_FK_BY_PAYMENT_ID FOREIGN KEY (BC_PAYMENT_ID) REFERENCES BC_PAYMENT (BC_ID);
-ALTER TABLE BC_PAYMENT_SUBSCRIPTION ADD CONSTRAINT IF NOT EXISTS BC_PAYMENT_SUBSCRIPTION_FK_BY_SUBSCRIPTION_ID FOREIGN KEY (BC_SUBSCRIPTION_ID) REFERENCES BC_SUBSCRIPTION (BC_ID);
-
-CREATE TABLE IF NOT EXISTS BC_INVOICE_SUBSCRIPTION (
-             BC_ID INTEGER  AUTO_INCREMENT,
-             BC_INVOICE_ID INTEGER,
-             BC_SUBSCRIPTION_ID INTEGER,
-             CONSTRAINT PK_BC_INVOICE_ITEM PRIMARY KEY (BC_ID)
-);
-
-ALTER TABLE BC_INVOICE_SUBSCRIPTION ADD CONSTRAINT IF NOT EXISTS BC_INVOICE_SUBSCRIPTION_FK_BY_INVOICE_ID FOREIGN KEY (BC_INVOICE_ID) REFERENCES BC_INVOICE (BC_ID);
-ALTER TABLE BC_INVOICE_SUBSCRIPTION ADD CONSTRAINT IF NOT EXISTS BC_INVOICE_SUBSCRIPTION_FK_BY_SUBSCRIPTION_ID FOREIGN KEY (BC_SUBSCRIPTION_ID) REFERENCES BC_SUBSCRIPTION (BC_ID);
-
-
-CREATE TABLE IF NOT EXISTS BC_INVOICE_SUBSCRIPTION_ITEM (
-             BC_INVOICE_SUBSCRIPTION_ID INTEGER,
-             BC_ITEM_ID INTEGER,
-             BC_COST VARCHAR (64),
-	     BC_DESCRIPTION VARCHAR (64),	
-             CONSTRAINT PK_BC_INVOICE_SUBSCRIPTION_ITEM PRIMARY KEY (BC_INVOICE_SUBSCRIPTION_ID, BC_ITEM_ID)
-);
-
-ALTER TABLE BC_INVOICE_SUBSCRIPTION_ITEM ADD CONSTRAINT IF NOT EXISTS BC_INVOICE_SUBSCRIPTION_ITEM_FK_BY_INVOICE_SUBSCRIPTION_ID FOREIGN KEY (BC_INVOICE_SUBSCRIPTION_ID) REFERENCES BC_INVOICE_SUBSCRIPTION (BC_ID);
-ALTER TABLE BC_INVOICE_SUBSCRIPTION_ITEM ADD CONSTRAINT IF NOT EXISTS BC_INVOICE_SUBSCRIPTION_ITEM_FK_BY_ITEM_ID FOREIGN KEY (BC_ITEM_ID) REFERENCES BC_ITEM(BC_ID);
-
-CREATE TABLE IF NOT EXISTS BC_DISCOUNT (
-	BC_ID INTEGER AUTO_INCREMENT,
-	BC_TENANT_ID INTEGER,
-	BC_PERCENTAGE FLOAT,
-	BC_AMOUNT FLOAT,
-	BC_START_DATE TIMESTAMP,
-	BC_END_DATE TIMESTAMP,
-	BC_PERCENTAGE_TYPE INTEGER,
-	CONSTRAINT PK_BC_DISCOUNT PRIMARY KEY (BC_ID)
-);

http://git-wip-us.apache.org/repos/asf/stratos/blob/96ad4803/products/stratos/dbscripts/billing-mysql.sql
----------------------------------------------------------------------
diff --git a/products/stratos/dbscripts/billing-mysql.sql b/products/stratos/dbscripts/billing-mysql.sql
deleted file mode 100755
index cfe828f..0000000
--- a/products/stratos/dbscripts/billing-mysql.sql
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you 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.
-*/ 
-
-CREATE TABLE IF NOT EXISTS BC_CUSTOMER (
-             BC_ID INTEGER AUTO_INCREMENT,
-             BC_NAME VARCHAR (64),
-             BC_STARTED_DATE TIMESTAMP,
-             BC_EMAIL VARCHAR (64),
-             BC_ADDRESS VARCHAR (256),
-             CONSTRAINT PK_BC_CUSTOMER PRIMARY KEY (BC_ID)
-)ENGINE INNODB;
-
-CREATE INDEX BC_CUSTOMER_IND_BY_BC_NAME USING HASH ON BC_CUSTOMER(BC_NAME);
-CREATE INDEX BC_CUSTOMER_IND_BY_BC_EMAIL USING HASH ON BC_CUSTOMER(BC_EMAIL);
-
-CREATE TABLE IF NOT EXISTS BC_ITEM (
-             BC_ID INTEGER AUTO_INCREMENT,
-             BC_NAME VARCHAR (64),
-             BC_COST VARCHAR (64),
-             BC_DESCRIPTION VARCHAR(128),
-             BC_PARENT_ITEM_ID INTEGER,
-             CONSTRAINT PK_BC_ITEM PRIMARY KEY (BC_ID)
-)ENGINE INNODB;
-INSERT INTO BC_ITEM (BC_NAME,BC_COST,BC_DESCRIPTION,BC_PARENT_ITEM_ID) values ("Demo",NULL,NULL,NULL);
-INSERT INTO BC_ITEM (BC_NAME,BC_COST,BC_DESCRIPTION,BC_PARENT_ITEM_ID) values ("SMB",NULL,NULL,NULL);
-INSERT INTO BC_ITEM (BC_NAME,BC_COST,BC_DESCRIPTION,BC_PARENT_ITEM_ID) values ("Professional",NULL,NULL,NULL);
-INSERT INTO BC_ITEM (BC_NAME,BC_COST,BC_DESCRIPTION,BC_PARENT_ITEM_ID) values ("Enterprise",NULL,NULL,NULL);
-
-ALTER TABLE BC_ITEM ADD CONSTRAINT BC_ITEM_FK_BY_PARENT_ITEM_ID FOREIGN KEY (BC_PARENT_ITEM_ID) REFERENCES BC_ITEM (BC_ID);
-
-
-CREATE TABLE IF NOT EXISTS BC_SUBSCRIPTION (
-             BC_ID INTEGER AUTO_INCREMENT,
-             BC_FILTER VARCHAR (32),
-             BC_IS_ACTIVE INTEGER,
-             BC_ACTIVE_SINCE TIMESTAMP,
-             BC_ACTIVE_UNTIL TIMESTAMP,
-             BC_ITEM_ID INTEGER,
-             BC_TENANT_ID INTEGER,
-             CONSTRAINT PK_BC_SUBSCRIPTION PRIMARY KEY (BC_ID)
-)ENGINE INNODB;
-
-ALTER TABLE BC_SUBSCRIPTION ADD CONSTRAINT BC_SUBSCRIPTION_FK_BY_ITEM_ID FOREIGN KEY (BC_ITEM_ID) REFERENCES BC_ITEM (BC_ID);
-
-CREATE TABLE IF NOT EXISTS BC_INVOICE (
-             BC_ID INTEGER AUTO_INCREMENT,
-             BC_TENANT_ID INTEGER,
-             BC_DATE TIMESTAMP,
-             BC_START_DATE TIMESTAMP,
-             BC_END_DATE TIMESTAMP,
-             BC_BOUGHT_FORWARD VARCHAR (64),
-             BC_CARRIED_FORWARD VARCHAR (64),
-             BC_TOTAL_PAYMENTS VARCHAR (64),
-             BC_TOTAL_COST VARCHAR (64),
-             CONSTRAINT PK_BC_INVOICE PRIMARY KEY (BC_ID)
-)ENGINE INNODB;
-
-
-CREATE TABLE IF NOT EXISTS BC_PAYMENT (
-             BC_ID INTEGER AUTO_INCREMENT,
-             BC_DATE TIMESTAMP,
-             BC_AMOUNT VARCHAR (64),
-             BC_DESCRIPTION VARCHAR (128),
-             BC_INVOICE_ID INTEGER,
-	     BC_TENANT_ID INTEGER,	
-             CONSTRAINT PK_BC_SUBSCRIPTION_ORDER PRIMARY KEY (BC_ID)
-)ENGINE INNODB;
-
-ALTER TABLE BC_PAYMENT ADD CONSTRAINT BC_PAYMENT_FK_BY_INVOICE_ID FOREIGN KEY (BC_INVOICE_ID) REFERENCES BC_INVOICE (BC_ID);
-
-CREATE TABLE IF NOT EXISTS BC_REGISTRATION_PAYMENT (
-             BC_ID INTEGER AUTO_INCREMENT,
-             BC_DATE TIMESTAMP,
-             BC_AMOUNT VARCHAR (64),
-             BC_DESCRIPTION VARCHAR (128),
-			 BC_USAGE_PLAN VARCHAR (64),
-	     	 BC_TENANT_ID INTEGER,	
-             CONSTRAINT PK_BC_REGISTRATION_PAYMENT PRIMARY KEY (BC_ID)
-)ENGINE INNODB;
-
--- this is n-n relationship
-CREATE TABLE IF NOT EXISTS BC_PAYMENT_SUBSCRIPTION (
-             BC_PAYMENT_ID INTEGER,
-             BC_SUBSCRIPTION_ID INTEGER,
-             CONSTRAINT PK_BC_SUBSCRIPTION_ORDER PRIMARY KEY (BC_PAYMENT_ID, BC_SUBSCRIPTION_ID)
-)ENGINE INNODB;
-
-ALTER TABLE BC_PAYMENT_SUBSCRIPTION ADD CONSTRAINT BC_PAYMENT_SUBSCRIPTION_FK_BY_PAYMENT_ID FOREIGN KEY (BC_PAYMENT_ID) REFERENCES BC_PAYMENT (BC_ID);
-ALTER TABLE BC_PAYMENT_SUBSCRIPTION ADD CONSTRAINT BC_PAYMENT_SUBSCRIPTION_FK_BY_SUBSCRIPTION_ID FOREIGN KEY (BC_SUBSCRIPTION_ID) REFERENCES BC_SUBSCRIPTION (BC_ID);
-
-CREATE TABLE IF NOT EXISTS BC_INVOICE_SUBSCRIPTION (
-             BC_ID INTEGER  AUTO_INCREMENT,
-             BC_INVOICE_ID INTEGER,
-             BC_SUBSCRIPTION_ID INTEGER,
-             CONSTRAINT PK_BC_INVOICE_ITEM PRIMARY KEY (BC_ID)
-)ENGINE INNODB;
-
-ALTER TABLE BC_INVOICE_SUBSCRIPTION ADD CONSTRAINT BC_INVOICE_SUBSCRIPTION_FK_BY_INVOICE_ID FOREIGN KEY (BC_INVOICE_ID) REFERENCES BC_INVOICE (BC_ID);
-ALTER TABLE BC_INVOICE_SUBSCRIPTION ADD CONSTRAINT BC_INVOICE_SUBSCRIPTION_FK_BY_SUBSCRIPTION_ID FOREIGN KEY (BC_SUBSCRIPTION_ID) REFERENCES BC_SUBSCRIPTION (BC_ID);
-
-
-CREATE TABLE IF NOT EXISTS BC_INVOICE_SUBSCRIPTION_ITEM (
-             BC_INVOICE_SUBSCRIPTION_ID INTEGER,
-             BC_ITEM_ID INTEGER,
-             BC_COST VARCHAR (64),
-	     BC_DESCRIPTION varchar (64),	
-             CONSTRAINT PK_BC_INVOICE_SUBSCRIPTION_ITEM PRIMARY KEY (BC_INVOICE_SUBSCRIPTION_ID, BC_ITEM_ID)
-)ENGINE INNODB;
-
-ALTER TABLE BC_INVOICE_SUBSCRIPTION_ITEM ADD CONSTRAINT BC_INVOICE_SUBSCRIPTION_ITEM_FK_BY_INVOICE_SUBSCRIPTION_ID FOREIGN KEY (BC_INVOICE_SUBSCRIPTION_ID) REFERENCES BC_INVOICE_SUBSCRIPTION (BC_ID);
-ALTER TABLE BC_INVOICE_SUBSCRIPTION_ITEM ADD CONSTRAINT BC_INVOICE_SUBSCRIPTION_ITEM_FK_BY_ITEM_ID FOREIGN KEY (BC_ITEM_ID) REFERENCES BC_ITEM(BC_ID);
-
-CREATE TABLE IF NOT EXISTS BC_DISCOUNT (
-        BC_ID INTEGER AUTO_INCREMENT,
-        BC_TENANT_ID INTEGER,
-        BC_PERCENTAGE FLOAT,
-        BC_AMOUNT FLOAT,
-        BC_START_DATE TIMESTAMP,
-        BC_END_DATE TIMESTAMP,
-        BC_PERCENTAGE_TYPE INTEGER,
-        CONSTRAINT PK_BC_DISCOUNT PRIMARY KEY (BC_ID)
-)ENGINE INNODB;
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/96ad4803/products/stratos/dbscripts/metering_h2.sql
----------------------------------------------------------------------
diff --git a/products/stratos/dbscripts/metering_h2.sql b/products/stratos/dbscripts/metering_h2.sql
deleted file mode 100755
index 1f38fe2..0000000
--- a/products/stratos/dbscripts/metering_h2.sql
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you 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.
-*/ 
-
---
--- TABLES
---
-
-CREATE TABLE IF NOT EXISTS USAGE_HOURLY_ANALYTICS (
-        ID VARCHAR(200) NOT NULL,
-        HOUR_FACT TIMESTAMP,
-        SERVER_NAME VARCHAR(100),
-        TENANT_ID VARCHAR(50),
-        PAYLOAD_TYPE VARCHAR(50),
-        PAYLOAD_VALUE  BIGINT,
-        PRIMARY KEY (ID)
-);
-
-CREATE TABLE IF NOT EXISTS USAGE_DAILY_ANALYTICS (
-        ID VARCHAR(200) NOT NULL,
-        DAY_FACT TIMESTAMP,
-        SERVER_NAME VARCHAR(100),
-        TENANT_ID VARCHAR(50),
-        PAYLOAD_TYPE VARCHAR(50),
-        PAYLOAD_VALUE  BIGINT,
-        PRIMARY KEY (ID)
-);
-
-CREATE TABLE IF NOT EXISTS USAGE_MONTHLY_ANALYTICS (
-        ID VARCHAR(200) NOT NULL,
-        MONTH_FACT TIMESTAMP,
-        SERVER_NAME VARCHAR(100),
-        TENANT_ID VARCHAR(50),
-        PAYLOAD_TYPE VARCHAR(50),
-        PAYLOAD_VALUE  BIGINT,
-        PRIMARY KEY (ID)
-);
-
-CREATE TABLE IF NOT EXISTS USAGE_LAST_HOURLY_TS (
-	ID VARCHAR(200) NOT NULL,
-	TIMESTMP TIMESTAMP,
-	PRIMARY KEY (ID)
-);
-	
-CREATE TABLE IF NOT EXISTS USAGE_LAST_DAILY_TS (
-	ID VARCHAR(200) NOT NULL,
-	TIMESTMP TIMESTAMP,
-	PRIMARY KEY (ID)
-);
-
-CREATE TABLE IF NOT EXISTS USAGE_LAST_MONTHLY_TS (
-	ID VARCHAR(200) NOT NULL,
-	TIMESTMP TIMESTAMP,
-	PRIMARY KEY (ID)
-);
-
-CREATE TABLE IF NOT EXISTS SERVICE_STATS_HOURLY_ANALYTICS (
-	ID VARCHAR(200) NOT NULL,
-	HOUR_FACT TIMESTAMP,
-	SERVER_NAME VARCHAR(100),
-	TENANT_ID VARCHAR(50),
-	REQUEST_COUNT BIGINT,
-	RESPONSE_COUNT BIGINT,
-	FAULT_COUNT BIGINT,
-	PRIMARY KEY (ID)
-);
-
-CREATE TABLE IF NOT EXISTS SERVICE_STATS_DAILY_ANALYTICS (
-	ID VARCHAR(200) NOT NULL,
-	DAY_FACT TIMESTAMP,
-	SERVER_NAME VARCHAR(100),
-	TENANT_ID VARCHAR(50),
-	REQUEST_COUNT BIGINT,
-	RESPONSE_COUNT BIGINT,
-	FAULT_COUNT BIGINT,
-	PRIMARY KEY (ID)
-);
-
-CREATE TABLE IF NOT EXISTS SERVICE_STATS_MONTHLY_ANALYTICS (
-	ID VARCHAR(200) NOT NULL,
-	MONTH_FACT TIMESTAMP,
-	SERVER_NAME VARCHAR(100),
-	TENANT_ID VARCHAR(50),
-	REQUEST_COUNT BIGINT,
-	RESPONSE_COUNT BIGINT,
-	FAULT_COUNT BIGINT,
-	PRIMARY KEY (ID)
-);
-
-CREATE TABLE IF NOT EXISTS SERVICE_STATS_LAST_HOURLY_TS (
-	ID VARCHAR(200) NOT NULL,
-	TIMESTMP TIMESTAMP,
-	PRIMARY KEY (ID)
-);
-	
-CREATE TABLE IF NOT EXISTS SERVICE_STATS_LAST_DAILY_TS (
-	ID VARCHAR(200) NOT NULL,
-	TIMESTMP TIMESTAMP,
-	PRIMARY KEY (ID)
-);
-
-CREATE TABLE IF NOT EXISTS SERVICE_STATS_LAST_MONTHLY_TS (
-	ID VARCHAR(200) NOT NULL,
-	TIMESTMP TIMESTAMP,
-	PRIMARY KEY (ID)
-);
-
-CREATE TABLE IF NOT EXISTS REGISTRY_USAGE_HOURLY_ANALYTICS ( 
-	ID VARCHAR(50),
-	TENANT_ID VARCHAR(50),	
-	HISTORY_USAGE BIGINT,
-	CURRENT_USAGE BIGINT,
-	PRIMARY KEY (ID)
-); 
-
-
-COMMIT;
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/96ad4803/products/stratos/dbscripts/metering_mysql.sql
----------------------------------------------------------------------
diff --git a/products/stratos/dbscripts/metering_mysql.sql b/products/stratos/dbscripts/metering_mysql.sql
deleted file mode 100755
index 755403d..0000000
--- a/products/stratos/dbscripts/metering_mysql.sql
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you 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.
-*/ 
-
--- WSO2 METERING DATABASE SQL FOR MySQL
-
-SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
-
-SET AUTOCOMMIT=0;
-START TRANSACTION;
-
---
--- TABLES
---
-
-CREATE TABLE IF NOT EXISTS USAGE_HOURLY_ANALYTICS (
-        ID VARCHAR(200) NOT NULL,
-        HOUR_FACT TIMESTAMP,
-        SERVER_NAME VARCHAR(100),
-        TENANT_ID VARCHAR(50),
-        PAYLOAD_TYPE VARCHAR(50),
-        PAYLOAD_VALUE  BIGINT,
-        PRIMARY KEY (`ID`)
-) ENGINE=INNODB;
-
-CREATE TABLE IF NOT EXISTS USAGE_DAILY_ANALYTICS (
-        ID VARCHAR(200) NOT NULL,
-        DAY_FACT TIMESTAMP,
-        SERVER_NAME VARCHAR(100),
-        TENANT_ID VARCHAR(50),
-        PAYLOAD_TYPE VARCHAR(50),
-        PAYLOAD_VALUE  BIGINT,
-        PRIMARY KEY (`ID`)
-) ENGINE=INNODB;
-
-CREATE TABLE IF NOT EXISTS USAGE_MONTHLY_ANALYTICS (
-        ID VARCHAR(200) NOT NULL,
-        MONTH_FACT TIMESTAMP,
-        SERVER_NAME VARCHAR(100),
-        TENANT_ID VARCHAR(50),
-        PAYLOAD_TYPE VARCHAR(50),
-        PAYLOAD_VALUE  BIGINT,
-        PRIMARY KEY (`ID`)
-) ENGINE=INNODB;
-
-CREATE TABLE IF NOT EXISTS USAGE_LAST_HOURLY_TS (
-	ID VARCHAR(200) NOT NULL,
-	TIMESTMP TIMESTAMP,
-	PRIMARY KEY (`ID`)
-) ENGINE=INNODB;
-	
-CREATE TABLE IF NOT EXISTS USAGE_LAST_DAILY_TS (
-	ID VARCHAR(200) NOT NULL,
-	TIMESTMP TIMESTAMP,
-	PRIMARY KEY (`ID`)
-) ENGINE=INNODB;
-
-CREATE TABLE IF NOT EXISTS USAGE_LAST_MONTHLY_TS (
-	ID VARCHAR(200) NOT NULL,
-	TIMESTMP TIMESTAMP,
-	PRIMARY KEY (`ID`)
-) ENGINE=INNODB;
-
-CREATE TABLE IF NOT EXISTS SERVICE_STATS_HOURLY_ANALYTICS (
-	ID VARCHAR(200) NOT NULL,
-	HOUR_FACT TIMESTAMP,
-	SERVER_NAME VARCHAR(100),
-	TENANT_ID VARCHAR(50),
-	REQUEST_COUNT BIGINT,
-	RESPONSE_COUNT BIGINT,
-	FAULT_COUNT BIGINT,
-	PRIMARY KEY (`ID`)
-) ENGINE=INNODB;
-
-CREATE TABLE IF NOT EXISTS SERVICE_STATS_DAILY_ANALYTICS (
-	ID VARCHAR(200) NOT NULL,
-	DAY_FACT TIMESTAMP,
-	SERVER_NAME VARCHAR(100),
-	TENANT_ID VARCHAR(50),
-	REQUEST_COUNT BIGINT,
-	RESPONSE_COUNT BIGINT,
-	FAULT_COUNT BIGINT,
-	PRIMARY KEY (`ID`)
-) ENGINE=INNODB;
-
-CREATE TABLE IF NOT EXISTS SERVICE_STATS_MONTHLY_ANALYTICS (
-	ID VARCHAR(200) NOT NULL,
-	MONTH_FACT TIMESTAMP,
-	SERVER_NAME VARCHAR(100),
-	TENANT_ID VARCHAR(50),
-	REQUEST_COUNT BIGINT,
-	RESPONSE_COUNT BIGINT,
-	FAULT_COUNT BIGINT,
-	PRIMARY KEY (`ID`)
-) ENGINE=INNODB;
-
-CREATE TABLE IF NOT EXISTS SERVICE_STATS_LAST_HOURLY_TS (
-	ID VARCHAR(200) NOT NULL,
-	TIMESTMP TIMESTAMP,
-	PRIMARY KEY (`ID`)
-) ENGINE=INNODB;
-	
-CREATE TABLE IF NOT EXISTS SERVICE_STATS_LAST_DAILY_TS (
-	ID VARCHAR(200) NOT NULL,
-	TIMESTMP TIMESTAMP,
-	PRIMARY KEY (`ID`)
-) ENGINE=INNODB;
-
-CREATE TABLE IF NOT EXISTS SERVICE_STATS_LAST_MONTHLY_TS (
-	ID VARCHAR(200) NOT NULL,
-	TIMESTMP TIMESTAMP,
-	PRIMARY KEY (`ID`)
-) ENGINE=INNODB;
-
-CREATE TABLE IF NOT EXISTS REGISTRY_USAGE_HOURLY_ANALYTICS ( 
-	ID VARCHAR(50),
-	TENANT_ID VARCHAR(50),	
-	HISTORY_USAGE BIGINT,
-	CURRENT_USAGE BIGINT,
-	PRIMARY KEY (`ID`)
-) ENGINE=INNODB;
-
-CREATE TABLE IF NOT EXISTS CARTRIDGE_STATS_HOURLY_ANALYTICS (
-        HOUR_FACT TIMESTAMP,
-        TENANT_ID VARCHAR(50),
-	CARTRIDGE_TYPE VARCHAR(20),
-	IMAGE_ID VARCHAR(100),
-	NODE_ID VARCHAR(100),
-	DURATION_HOURS INT(5),
-        PRIMARY KEY (`NODE_ID`)
-) ENGINE=INNODB;
-
-CREATE TABLE IF NOT EXISTS CARTRIDGE_STATS_LAST_HOURLY_TS (
-        ID VARCHAR(200) NOT NULL,
-        TIMESTMP TIMESTAMP,
-        PRIMARY KEY (`ID`)
-) ENGINE=INNODB;
-
-CREATE TABLE IF NOT EXISTS CARTRIDGE_STATS_LAST_DAILY_TS (
-        ID VARCHAR(200) NOT NULL,
-        TIMESTMP TIMESTAMP,
-        PRIMARY KEY (`ID`)
-) ENGINE=INNODB;
-
-CREATE TABLE IF NOT EXISTS CARTRIDGE_STATS_LAST_MONTHLY_TS (
-        ID VARCHAR(200) NOT NULL,
-        TIMESTMP TIMESTAMP,
-        PRIMARY KEY (`ID`)
-) ENGINE=INNODB;
- 
-
-COMMIT;
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/96ad4803/products/stratos/dbscripts/migration.sql
----------------------------------------------------------------------
diff --git a/products/stratos/dbscripts/migration.sql b/products/stratos/dbscripts/migration.sql
deleted file mode 100755
index 421fd1d..0000000
--- a/products/stratos/dbscripts/migration.sql
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you 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.
-*/ 
-
-ALTER TABLE UM_TENANT ADD UM_CREATED_DATE TIMESTAMP NOT NULL DEFAULT '2010-06-01 00:00:01';  
-ALTER TABLE UM_TENANT ADD UNIQUE INDEX INDEX_UM_TENANT_UM_DOMAIN_NAME (UM_DOMAIN_NAME);
-
-ALTER TABLE REG_ASSOCIATION ADD INDEX REG_ASSOCIATION_INDEX_SOURCEPATH (REG_SOURCEPATH, REG_TENANT_ID);
-ALTER TABLE REG_ASSOCIATION ADD INDEX REG_ASSOCIATION_INDEX_TARGETPATH (REG_TARGETPATH, REG_TENANT_ID);
-ALTER TABLE REG_ASSOCIATION ADD INDEX REG_ASSOCIATION_INDEX_ASSOCIATION_TYPE (REG_ASSOCIATION_TYPE, REG_TENANT_ID); 
-

http://git-wip-us.apache.org/repos/asf/stratos/blob/96ad4803/products/stratos/dbscripts/s2_h2.sql
----------------------------------------------------------------------
diff --git a/products/stratos/dbscripts/s2_h2.sql b/products/stratos/dbscripts/s2_h2.sql
deleted file mode 100644
index d88149d..0000000
--- a/products/stratos/dbscripts/s2_h2.sql
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you 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.
-*/ 
-
---
--- Create schema s2_db
---
-
--- CREATE SCHEMA  IF NOT EXISTS s2_db; 
--- SET SCHEMA s2_db;
-
---
--- Definition of table s2_db.CARTRIDGE_INSTANCE
---
-
-DROP TABLE IF EXISTS CARTRIDGE_INSTANCE;
-CREATE TABLE  CARTRIDGE_INSTANCE (
-  ID int(11) NOT NULL AUTO_INCREMENT,
-  INSTANCE_IP varchar(255) NOT NULL,
-  TENANT_ID int(11) DEFAULT NULL,
-  TENANT_DOMAIN varchar(255) DEFAULT NULL,
-  CARTRIDGE_TYPE varchar(255) NOT NULL,
-  STATE varchar(255) NOT NULL,
-  CLUSTER_DOMAIN varchar(255) NOT NULL,
-  CLUSTER_SUBDOMAIN varchar(255) NOT NULL,
-  PRIMARY KEY (ID)
-);
-
---
--- Definition of table CARTRIDGE_SUBSCRIPTION
---
-
-DROP TABLE IF EXISTS CARTRIDGE_SUBSCRIPTION;
-CREATE TABLE  CARTRIDGE_SUBSCRIPTION (
-  SUBSCRIPTION_ID int(11) NOT NULL AUTO_INCREMENT,
-  TENANT_ID int(11) NOT NULL,
-  CARTRIDGE varchar(30) NOT NULL,
-  PROVIDER varchar(30) NOT NULL,
-  HOSTNAME varchar(255) NOT NULL,
-  POLICY varchar(50) NULL,
-  CLUSTER_DOMAIN varchar(255) NOT NULL,
-  CLUSTER_SUBDOMAIN varchar(255) NOT NULL,
-  MGT_DOMAIN varchar(255) NOT NULL,
-  MGT_SUBDOMAIN varchar(255) NOT NULL,
-  STATE varchar(30) NOT NULL,
-  ALIAS varchar(255) NOT NULL,
-  TENANT_DOMAIN varchar(255) NOT NULL,
-  BASE_DIR varchar(255) NOT NULL,
-  REPO_ID int(11) DEFAULT NULL,
-  DATA_CARTRIDGE_ID int(11) DEFAULT NULL,
-  MAPPED_DOMAIN varchar(255),
-  PRIMARY KEY (SUBSCRIPTION_ID)
-);
-
-
-
---
--- Definition of table DATA_CARTRIDGE
---
-
-DROP TABLE IF EXISTS DATA_CARTRIDGE;
-CREATE TABLE  DATA_CARTRIDGE (
-  DATA_CART_ID int(11) NOT NULL AUTO_INCREMENT,
-  TYPE varchar(30) NOT NULL,
-  USER_NAME varchar(255) NOT NULL,
-  PASSWORD varchar(255) NOT NULL,
-  STATE varchar(255) NOT NULL,
-  PRIMARY KEY (DATA_CART_ID) 
-);
-
-
---
--- Definition of table PORT_MAPPING
---
-
-DROP TABLE IF EXISTS PORT_MAPPING;
-CREATE TABLE  PORT_MAPPING (
-  PORT_MAPPING_ID int(11) NOT NULL AUTO_INCREMENT,
-  SUBSCRIPTION_ID int(11) NOT NULL,
-  TYPE varchar(30) NOT NULL,
-  PRIMARY_PORT varchar(30) NOT NULL,
-  PROXY_PORT varchar(30) NOT NULL,
-  STATE varchar(30) NOT NULL,
-  PRIMARY KEY (PORT_MAPPING_ID)
-);
-
-
---
--- Definition of table REPOSITORY
---
-
-DROP TABLE IF EXISTS REPOSITORY;
-CREATE TABLE  REPOSITORY (
-  REPO_ID int(11) NOT NULL AUTO_INCREMENT,
-  REPO_NAME varchar(255) NOT NULL,
-  STATE varchar(30) NOT NULL,
-  REPO_USER_NAME varchar(255) NOT NULL,
-  REPO_USER_PASSWORD varchar(255) NOT NULL,
-  PRIMARY KEY (REPO_ID)
-);

http://git-wip-us.apache.org/repos/asf/stratos/blob/96ad4803/products/stratos/dbscripts/stratos_mysql.sql
----------------------------------------------------------------------
diff --git a/products/stratos/dbscripts/stratos_mysql.sql b/products/stratos/dbscripts/stratos_mysql.sql
deleted file mode 100644
index 9b2393b..0000000
--- a/products/stratos/dbscripts/stratos_mysql.sql
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you 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.
-*/ 
-
--- MySQL Administrator dump 1.4
---
--- ------------------------------------------------------
--- Server version	5.5.24-0ubuntu0.12.04.1
-
-
-/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
-/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
-/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
-/*!40101 SET NAMES utf8 */;
-
-/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
-/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
-/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-
-
---
--- Create schema stratos_foundation
---
-
-CREATE DATABASE IF NOT EXISTS stratos_foundation;
-USE stratos_foundation;
-
---
--- Definition of table `stratos_foundation`.`CARTRIDGE_INSTANCE`
---
-
-DROP TABLE IF EXISTS `stratos_foundation`.`CARTRIDGE_INSTANCE`;
-CREATE TABLE  `stratos_foundation`.`CARTRIDGE_INSTANCE` (
-  `ID` int(11) NOT NULL AUTO_INCREMENT,
-  `INSTANCE_IP` varchar(255) NOT NULL,
-  `TENANT_ID` int(11) DEFAULT NULL,
-  `TENANT_DOMAIN` varchar(255) DEFAULT NULL,
-  `CARTRIDGE_TYPE` varchar(255) NOT NULL,
-  `STATE` varchar(255) NOT NULL,
-  `CLUSTER_DOMAIN` varchar(255) NOT NULL,
-  `CLUSTER_SUBDOMAIN` varchar(255) NOT NULL,
-  PRIMARY KEY (`ID`)
-) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
-
---
--- Definition of table `stratos_foundation`.`CARTRIDGE_SUBSCRIPTION`
---
-
-DROP TABLE IF EXISTS `stratos_foundation`.`CARTRIDGE_SUBSCRIPTION`;
-CREATE TABLE  `stratos_foundation`.`CARTRIDGE_SUBSCRIPTION` (
-  `SUBSCRIPTION_ID` int(11) NOT NULL AUTO_INCREMENT,
-  `TENANT_ID` int(11) NOT NULL,
-  `CARTRIDGE` varchar(30) NOT NULL,
-  `PROVIDER` varchar(30) NOT NULL,
-  `HOSTNAME` varchar(255) NOT NULL,
-  `POLICY` varchar(50) NULL,
-  `CLUSTER_DOMAIN` varchar(255) NOT NULL,
-  `CLUSTER_SUBDOMAIN` varchar(255) NOT NULL,
-  `MGT_DOMAIN` varchar(255) NOT NULL,
-  `MGT_SUBDOMAIN` varchar(255) NOT NULL,
-  `STATE` varchar(30) NOT NULL,
-  `ALIAS` varchar(255) NOT NULL,
-  `TENANT_DOMAIN` varchar(255) NOT NULL,
-  `BASE_DIR` varchar(255) NULL,
-  `REPO_ID` int(11) DEFAULT NULL,
-  `DATA_CARTRIDGE_ID` int(11) DEFAULT NULL,
-  `MAPPED_DOMAIN` varchar(255),
-  `SUBSCRIPTION_KEY` varchar(255) NOT NULL,
-  PRIMARY KEY (`SUBSCRIPTION_ID`)
-) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
-
-
-
---
--- Definition of table `stratos_foundation`.`DATA_CARTRIDGE`
---
-
-DROP TABLE IF EXISTS `stratos_foundation`.`DATA_CARTRIDGE`;
-CREATE TABLE  `stratos_foundation`.`DATA_CARTRIDGE` (
-  `DATA_CART_ID` int(11) NOT NULL AUTO_INCREMENT,
-  `TYPE` varchar(30) NOT NULL,
-  `USER_NAME` varchar(255) NOT NULL,
-  `PASSWORD` varchar(255) NOT NULL,
-  `STATE` varchar(255) NOT NULL,
-  PRIMARY KEY (`DATA_CART_ID`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
-
-
---
--- Definition of table `stratos_foundation`.`PORT_MAPPING`
---
-
-DROP TABLE IF EXISTS `stratos_foundation`.`PORT_MAPPING`;
-CREATE TABLE  `stratos_foundation`.`PORT_MAPPING` (
-  `PORT_MAPPING_ID` int(11) NOT NULL AUTO_INCREMENT,
-  `SUBSCRIPTION_ID` int(11) NOT NULL,
-  `TYPE` varchar(30) NOT NULL,
-  `PRIMARY_PORT` varchar(30) NOT NULL,
-  `PROXY_PORT` varchar(30) NOT NULL,
-  `STATE` varchar(30) NOT NULL,
-  PRIMARY KEY (`PORT_MAPPING_ID`)
-) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
-
-
---
--- Definition of table `stratos_foundation`.`REPOSITORY`
---
-
-DROP TABLE IF EXISTS `stratos_foundation`.`REPOSITORY`;
-CREATE TABLE  `stratos_foundation`.`REPOSITORY` (
-  `REPO_ID` int(11) NOT NULL AUTO_INCREMENT,
-  `REPO_NAME` varchar(255) NOT NULL,
-  `STATE` varchar(30) NOT NULL,
-  `REPO_USER_NAME` varchar(255) NOT NULL,
-  `REPO_USER_PASSWORD` varchar(255) NOT NULL,
-  PRIMARY KEY (`REPO_ID`)
-) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
-
-
---
--- Definition of table `stratos_foundation`.`SERVICE`
---
-DROP TABLE IF EXISTS `stratos_foundation`.`SERVICE`;
-CREATE TABLE `stratos_foundation`.`SERVICE` (
-    `SERVICE_ID` int NOT NULL AUTO_INCREMENT,
-    `TYPE` varchar(255) NOT NULL,
-    `AUTOSCALING_POLICY` varchar(255) NOT NULL,
-    `DEPLOYMENT_POLICY` varchar(255) NOT NULL,
-    `TENANT_RANGE` varchar(255) NOT NULL,
-    `CLUSTER_ID` varchar(255) NOT NULL,
-    `HOST_NAME` varchar(255) NOT NULL,
-    `SUBSCRIPTION_KEY` varchar(255) NOT NULL,
-    PRIMARY KEY (`SERVICE_ID`)
-) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
-
-
-
-/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
-/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
-/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
-/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
-/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
-/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
-/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;

http://git-wip-us.apache.org/repos/asf/stratos/blob/96ad4803/products/stratos/dbscripts/wso2_rss.sql
----------------------------------------------------------------------
diff --git a/products/stratos/dbscripts/wso2_rss.sql b/products/stratos/dbscripts/wso2_rss.sql
deleted file mode 100755
index 4a2348f..0000000
--- a/products/stratos/dbscripts/wso2_rss.sql
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you 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.
-*/ 
-
-CREATE TABLE RSS_INSTANCE (
-  rss_instance_id INTEGER AUTO_INCREMENT,
-  name VARCHAR(128) NOT NULL,
-  server_url VARCHAR(1024) NOT NULL,
-  dbms_type VARCHAR(128) NOT NULL,
-  instance_type VARCHAR(128) NOT NULL,
-  server_category VARCHAR(128) NOT NULL,
-  admin_username VARCHAR(128),
-  admin_password VARCHAR(128),
-  tenant_id INTEGER NOT NULL,
-  UNIQUE (name, tenant_id),
-  PRIMARY KEY (rss_instance_id)
-) ENGINE="InnoDB";
-
-CREATE TABLE DATABASE_INSTANCE (
-  database_instance_id INTEGER AUTO_INCREMENT,
-  name VARCHAR(128) NOT NULL,
-  rss_instance_id INTEGER,
-  tenant_id INTEGER,
-  UNIQUE (name, rss_instance_id),
-  PRIMARY KEY (database_instance_id),
-  FOREIGN KEY (rss_instance_id) REFERENCES RSS_INSTANCE (rss_instance_id)
-) ENGINE="InnoDB";
-
-CREATE TABLE DATABASE_USER (
-  user_id INTEGER AUTO_INCREMENT,
-  db_username VARCHAR(128) NOT NULL,
-  rss_instance_id INTEGER,
-  user_tenant_id INTEGER,
-  UNIQUE (db_username, rss_instance_id, user_tenant_id),
-  PRIMARY KEY (user_id),
-  FOREIGN KEY (rss_instance_id) REFERENCES RSS_INSTANCE (rss_instance_id)
-) ENGINE="InnoDB";
-
-CREATE TABLE DATABASE_INSTANCE_PROPERTY (
-  db_property_id INTEGER AUTO_INCREMENT,
-  prop_name VARCHAR(128) NOT NULL,
-  prop_value TEXT,
-  database_instance_id INTEGER,
-  UNIQUE (prop_name, database_instance_id),
-  PRIMARY KEY (db_property_id),
-  FOREIGN KEY (database_instance_id) REFERENCES DATABASE_INSTANCE (database_instance_id)
-) ENGINE="InnoDB";
-
-CREATE TABLE USER_DATABASE_ENTRY (
-  user_id INTEGER,
-  database_instance_id INTEGER,
-  PRIMARY KEY (user_id, database_instance_id),
-  FOREIGN KEY (user_id) REFERENCES DATABASE_USER (user_id),
-  FOREIGN KEY (database_instance_id) REFERENCES DATABASE_INSTANCE (database_instance_id)
-) ENGINE="InnoDB";
-
-CREATE TABLE USER_DATABASE_PERMISSION (
-  user_id INTEGER,
-  database_instance_id INTEGER,
-  perm_name VARCHAR(128) NOT NULL,
-  perm_value VARCHAR(128),
-  PRIMARY KEY (user_id, database_instance_id, perm_name),
-  FOREIGN KEY (user_id) REFERENCES DATABASE_USER (user_id),
-  FOREIGN KEY (database_instance_id) REFERENCES DATABASE_INSTANCE (database_instance_id)
-) ENGINE="InnoDB";
-
-CREATE TABLE WSO2_RSS_DATABASE_INSTANCE_COUNT (
-  instance_count INTEGER NOT NULL DEFAULT 0
-) ENGINE="InnoDB";
-
-CREATE TABLE USER_PRIVILEGE_GROUP (
-  priv_group_id INTEGER AUTO_INCREMENT,
-  priv_group_name VARCHAR(128),
-  tenant_id INTEGER,
-  PRIMARY KEY (priv_group_id, priv_group_name, tenant_id)
-) ENGINE="InnoDB";
-
-CREATE TABLE USER_PRIVILEGE_GROUP_ENTRY (
-  priv_group_id INTEGER,
-  perm_name VARCHAR(128),
-  perm_value CHAR(1),
-  PRIMARY KEY (priv_group_id, perm_name),
-  FOREIGN KEY (priv_group_id) REFERENCES USER_PRIVILEGE_GROUP (priv_group_id)
-) ENGINE="InnoDB";


[2/4] stratos git commit: removing billing/metering database adding to h2 database

Posted by ud...@apache.org.
removing billing/metering database adding to h2 database


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/50971784
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/50971784
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/50971784

Branch: refs/heads/master
Commit: 509717846eccc48dee943b5ffd4f596f6a8cbc22
Parents: 96ad480
Author: Udara Liyanage <ud...@wso2.com>
Authored: Tue May 19 11:56:36 2015 +0530
Committer: Udara Liyanage <ud...@wso2.com>
Committed: Tue May 19 12:49:21 2015 +0530

----------------------------------------------------------------------
 products/stratos/modules/distribution/pom.xml | 11 -----------
 1 file changed, 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/50971784/products/stratos/modules/distribution/pom.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/distribution/pom.xml b/products/stratos/modules/distribution/pom.xml
index 6645f9a..fbbdb51 100755
--- a/products/stratos/modules/distribution/pom.xml
+++ b/products/stratos/modules/distribution/pom.xml
@@ -606,17 +606,6 @@
                                     <fileset
                                             file="target/wso2carbon-core-4.2.0/dbscripts/identity/h2.sql"/>
                                 </sql>
-
-                                <echo message="########### Create Billing Database ##############"/>
-                                <sql driver="org.h2.Driver" url="jdbc:h2:${basedir}/target/database/WSO2BILLING_DB"
-                                     userid="wso2carbon" password="wso2carbon" autocommit="true" onerror="continue">
-                                    <classpath>
-                                        <path refid="h2.classpath"/>
-                                    </classpath>
-                                    <fileset file="../../dbscripts/billing-h2.sql"/>
-                                    <fileset file="../../dbscripts/metering_h2.sql"/>
-                                </sql>
-                                <echo message="##################### END ########################"/>
                             </tasks>
                         </configuration>
                     </execution>


[4/4] stratos git commit: add sql scripts from carbon core and patch01

Posted by ud...@apache.org.
add sql scripts from carbon core and patch01


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/5bc41d19
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/5bc41d19
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/5bc41d19

Branch: refs/heads/master
Commit: 5bc41d19be99f8bc1247e0a1339995a9a2b8079b
Parents: 5097178
Author: Udara Liyanage <ud...@wso2.com>
Authored: Tue May 19 12:03:57 2015 +0530
Committer: Udara Liyanage <ud...@wso2.com>
Committed: Tue May 19 12:49:21 2015 +0530

----------------------------------------------------------------------
 .../modules/distribution/src/assembly/bin.xml   | 34 ++++++++++++++++++--
 1 file changed, 31 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/5bc41d19/products/stratos/modules/distribution/src/assembly/bin.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/distribution/src/assembly/bin.xml b/products/stratos/modules/distribution/src/assembly/bin.xml
index f74794a..22df548 100755
--- a/products/stratos/modules/distribution/src/assembly/bin.xml
+++ b/products/stratos/modules/distribution/src/assembly/bin.xml
@@ -45,8 +45,8 @@
                 <exclude>**/log4j.properties</exclude>
                 <exclude>**/repository/components/**</exclude>
 		        <exclude>**/lib/endorsed/**</exclude>
-                <exclude>**/dbscripts/mysql.sql</exclude>
                 <exclude>**/repository/conf/security/cipher-tool.properties</exclude>
+                <exclude>**/dbscripts/**</exclude>
                 <exclude>**/repository/conf/security/cipher-text.properties</exclude>
 		        <exclude>**/repository/conf/axis2/axis2.xml</exclude>
 		        <exclude>**/repository/conf/registry.xml</exclude>
@@ -344,13 +344,29 @@
 				<include>**/*.war</include>
 			</includes>
 		</fileSet>
-        <fileSet>
+
+		<fileSet>
 			<directory>../../resources/cloud-services-icons/target/</directory>
 			<outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/webapps</outputDirectory>
 			<includes>
 				<include>**/*.war</include>
 			</includes>
 		</fileSet>
+
+		<fileSet>
+	        	<directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/dbscripts/</directory>
+        		<outputDirectory>${pom.artifactId}-${pom.version}/dbscripts/registry/</outputDirectory>
+            	<excludes>
+                	<exclude>**/identity/**</exclude>
+			<!-- new version of mysql.sql and db2.sql is coming from WSO2-CARBON-PATCH-4.2.0-0001 patch. So excluding them-->
+                	<exclude>mysql.sql</exclude>
+                	<exclude>db2.sql</exclude>
+            	</excludes>
+            	<includes>
+                	<include>**/**.sql</include>
+            	</includes>
+		</fileSet>
+
 		<fileSet>
 	        	<directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/dbscripts/identity/</directory>
         		<outputDirectory>${pom.artifactId}-${pom.version}/dbscripts/identity</outputDirectory>
@@ -359,6 +375,14 @@
             	</includes>
 		</fileSet>
 
+		<fileSet>
+	        	<directory>../p2-profile-gen/target/WSO2-CARBON-PATCH-4.2.0-0001/dbscripts</directory>
+        		<outputDirectory>${pom.artifactId}-${pom.version}/dbscripts/registry</outputDirectory>
+            	<includes>
+                	<include>**/**.sql</include>
+            	</includes>
+		</fileSet>
+
         <!-- copy cxf runtime -->
         <fileSet>
             <directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/lib/runtimes</directory>
@@ -449,10 +473,12 @@
                 <include>**/patch0008/*.*</include>
             </includes>
         </fileSet>
+<!--
 		<fileSet>
                    <directory>../../dbscripts/</directory>
                    <outputDirectory>${pom.artifactId}-${pom.version}/dbscripts</outputDirectory>
                 </fileSet>
+-->
 		<fileSet>
                    <directory>../../payload</directory>
 		   <includes>
@@ -983,11 +1009,13 @@
         </file>
 
    <!--Copying config files from kernel patches -->
+<!--
         <file>
             <source>../p2-profile-gen/target/WSO2-CARBON-PATCH-4.2.0-0001/dbscripts/mysql.sql</source>
-            <outputDirectory>${pom.artifactId}-${pom.version}/dbscripts</outputDirectory>
+            <outputDirectory>${pom.artifactId}-${pom.version}/dbscripts/registry</outputDirectory>
             <filtered>true</filtered>
         </file>
+-->
         <file>
             <source>../p2-profile-gen/target/WSO2-CARBON-PATCH-4.2.0-0002/repository/conf/security/cipher-text.properties</source>
             <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/security/</outputDirectory>


[3/4] stratos git commit: xml format modules/distribution/pom.xml and modules/distribution/src/assembly/bin.xml

Posted by ud...@apache.org.
xml format modules/distribution/pom.xml and modules/distribution/src/assembly/bin.xml


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/a7c7dd80
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/a7c7dd80
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/a7c7dd80

Branch: refs/heads/master
Commit: a7c7dd800211e1b148f8035e1d46c7b6eb5fba29
Parents: 5bc41d1
Author: Udara Liyanage <ud...@wso2.com>
Authored: Tue May 19 12:49:06 2015 +0530
Committer: Udara Liyanage <ud...@wso2.com>
Committed: Tue May 19 12:49:21 2015 +0530

----------------------------------------------------------------------
 products/stratos/modules/distribution/pom.xml   |  73 +--
 .../modules/distribution/src/assembly/bin.xml   | 553 +++++++++----------
 2 files changed, 267 insertions(+), 359 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/a7c7dd80/products/stratos/modules/distribution/pom.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/distribution/pom.xml b/products/stratos/modules/distribution/pom.xml
index fbbdb51..5465903 100755
--- a/products/stratos/modules/distribution/pom.xml
+++ b/products/stratos/modules/distribution/pom.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
   ~ Licensed to the Apache Software Foundation (ASF) under one
   ~ or more contributor license agreements.  See the NOTICE file
@@ -16,22 +17,18 @@
   ~ 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">
-
+<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.apache.stratos</groupId>
         <artifactId>stratos</artifactId>
         <version>4.1.0-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
-
     <modelVersion>4.0.0</modelVersion>
     <artifactId>apache-stratos</artifactId>
     <packaging>jar</packaging>
     <name>Apache Stratos - Distribution</name>
     <description>Apache Stratos Manager Distribution</description>
-
     <dependencies>
         <dependency>
             <groupId>org.apache.rampart</groupId>
@@ -94,7 +91,6 @@
             <version>${carbon.kernel.version}</version>
             <type>zip</type>
         </dependency>
-
         <!-- Synapse dependencies -->
         <!--dependency>
             <groupId>org.apache.synapse</groupId>
@@ -126,7 +122,6 @@
             <artifactId>synapse-extensions</artifactId>
             <version>${synapse.version}</version>
         </dependency-->
-
         <!-- Carbon mediation initializer -->
         <dependency>
             <groupId>org.wso2.carbon</groupId>
@@ -143,8 +138,6 @@
             <artifactId>org.wso2.carbon.mediation.dependency.mgt</artifactId>
             <version>${carbon.version}</version>
         </dependency>
-
-
         <!-- ### Required Carbon components ### -->
         <!-- Transport managament components -->
         <dependency>
@@ -204,21 +197,18 @@
             <artifactId>org.wso2.carbon.mediator.command.services</artifactId>
             <version>${carbon.version}</version>
         </dependency>
-
         <!--Entitlement mediator dependency -->
         <dependency>
             <groupId>org.wso2.carbon</groupId>
             <artifactId>org.wso2.carbon.identity.entitlement.mediator</artifactId>
             <version>${carbon.version}</version>
         </dependency>
-
         <!--OAuth mediator dependency -->
         <dependency>
             <groupId>org.wso2.carbon</groupId>
             <artifactId>org.wso2.carbon.identity.oauth.mediator</artifactId>
             <version>${carbon.version}</version>
         </dependency>
-
         <!--Drools dependency-->
         <dependency>
             <groupId>org.drools.wso2</groupId>
@@ -291,19 +281,16 @@
             <artifactId>rampart-policy</artifactId>
             <version>1.6.1.wso2v1</version>
         </dependency>
-
         <dependency>
             <groupId>org.apache.rampart.wso2</groupId>
             <artifactId>rampart-trust</artifactId>
             <version>1.6.1.wso2v1</version>
         </dependency>
-
         <dependency>
             <groupId>org.apache.rampart.wso2</groupId>
             <artifactId>rampart-core</artifactId>
             <version>1.6.1.wso2v1</version>
         </dependency>
-
         <!-- Policy Editor component -->
         <dependency>
             <groupId>org.wso2.carbon</groupId>
@@ -362,7 +349,6 @@
             <artifactId>org.wso2.carbon.rm</artifactId>
             <version>${carbon.version}</version>
         </dependency>
-
         <!-- Menus -->
         <dependency>
             <groupId>org.wso2.carbon</groupId>
@@ -446,20 +432,17 @@
             <artifactId>bcprov-jdk15</artifactId>
             <version>132</version>
         </dependency>
-
         <!-- autoscale components -->
         <dependency>
             <groupId>org.wso2.carbon</groupId>
             <artifactId>org.wso2.carbon.mediator.autoscale</artifactId>
             <version>4.0.3</version>
         </dependency>
-
         <dependency>
             <groupId>org.wso2.carbon</groupId>
             <artifactId>org.wso2.carbon.discovery.core</artifactId>
             <version>${carbon.version}</version>
         </dependency>
-
         <dependency>
             <groupId>org.wso2.carbon</groupId>
             <artifactId>org.wso2.carbon.relay</artifactId>
@@ -502,7 +485,6 @@
             <version>4.2.0-stratos</version>
         </dependency>
     </dependencies>
-
     <build>
         <plugins>
             <plugin>
@@ -560,7 +542,6 @@
                     </execution>
                 </executions>
             </plugin>
-
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-antrun-plugin</artifactId>
@@ -573,38 +554,24 @@
                         </goals>
                         <configuration>
                             <tasks>
-                                <copy
-                                        todir="target/wso2carbon-core-4.2.0/dbscripts/identity"
-                                        overwrite="false">
-                                    <fileset
-                                            dir="${basedir}/../p2-profile-gen/target/wso2carbon-core-4.2.0/dbscripts/identity/">
-                                    </fileset>
+                                <copy todir="target/wso2carbon-core-4.2.0/dbscripts/identity" overwrite="false">
+                                    <fileset dir="${basedir}/../p2-profile-gen/target/wso2carbon-core-4.2.0/dbscripts/identity/" />
                                 </copy>
                                 <path id="h2.classpath">
-                                    <path refid="maven.compile.classpath"/>
+                                    <path refid="maven.compile.classpath" />
                                 </path>
-                                <echo message="########### Adding identity , identity/application-mgt tables to WSO2Carbon DB ##############"/>
-                                <sql
-                                        driver="org.h2.Driver"
-                                        url="jdbc:h2:${basedir}/target/wso2carbon-core-4.2.0/repository/database//WSO2CARBON_DB"
-                                        userid="wso2carbon" password="wso2carbon" autocommit="true"
-                                        onerror="continue">
+                                <echo message="########### Adding identity , identity/application-mgt tables to WSO2Carbon DB ##############" />
+                                <sql driver="org.h2.Driver" url="jdbc:h2:${basedir}/target/wso2carbon-core-4.2.0/repository/database//WSO2CARBON_DB" userid="wso2carbon" password="wso2carbon" autocommit="true" onerror="continue">
                                     <classpath>
-                                        <path refid="h2.classpath"/>
+                                        <path refid="h2.classpath" />
                                     </classpath>
-                                    <fileset
-                                            file="target/wso2carbon-core-4.2.0/dbscripts/identity/application-mgt/h2.sql"/>
+                                    <fileset file="target/wso2carbon-core-4.2.0/dbscripts/identity/application-mgt/h2.sql" />
                                 </sql>
-                                <sql
-                                        driver="org.h2.Driver"
-                                        url="jdbc:h2:${basedir}/target/wso2carbon-core-4.2.0/repository/database/WSO2CARBON_DB"
-                                        userid="wso2carbon" password="wso2carbon" autocommit="true"
-                                        onerror="continue">
+                                <sql driver="org.h2.Driver" url="jdbc:h2:${basedir}/target/wso2carbon-core-4.2.0/repository/database/WSO2CARBON_DB" userid="wso2carbon" password="wso2carbon" autocommit="true" onerror="continue">
                                     <classpath>
-                                        <path refid="h2.classpath"/>
+                                        <path refid="h2.classpath" />
                                     </classpath>
-                                    <fileset
-                                            file="target/wso2carbon-core-4.2.0/dbscripts/identity/h2.sql"/>
+                                    <fileset file="target/wso2carbon-core-4.2.0/dbscripts/identity/h2.sql" />
                                 </sql>
                             </tasks>
                         </configuration>
@@ -614,14 +581,14 @@
                         <phase>install</phase>
                         <configuration>
                             <tasks>
-                                <delete dir="target/archive-tmp"/>
-                                <delete dir="target/dependency-maven-plugin-markers"/>
-                                <delete dir="target/maven-archiver"/>
-                                <delete dir="target/wso2carbon-core-${carbon.kernel.version}"/>
-                                <delete dir="target/shopping-cart-global-${shoppingcart.global.version}"/>
-                                <delete file="target/${project.artifactId}-${project.version}.jar"/>
-                                <delete dir="target/sources"/>
-                                <delete dir="target/database"/>
+                                <delete dir="target/archive-tmp" />
+                                <delete dir="target/dependency-maven-plugin-markers" />
+                                <delete dir="target/maven-archiver" />
+                                <delete dir="target/wso2carbon-core-${carbon.kernel.version}" />
+                                <delete dir="target/shopping-cart-global-${shoppingcart.global.version}" />
+                                <delete file="target/${project.artifactId}-${project.version}.jar" />
+                                <delete dir="target/sources" />
+                                <delete dir="target/database" />
                             </tasks>
                         </configuration>
                         <goals>

http://git-wip-us.apache.org/repos/asf/stratos/blob/a7c7dd80/products/stratos/modules/distribution/src/assembly/bin.xml
----------------------------------------------------------------------
diff --git a/products/stratos/modules/distribution/src/assembly/bin.xml b/products/stratos/modules/distribution/src/assembly/bin.xml
index 22df548..3a53653 100755
--- a/products/stratos/modules/distribution/src/assembly/bin.xml
+++ b/products/stratos/modules/distribution/src/assembly/bin.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
   ~ Licensed to the Apache Software Foundation (ASF) under one
   ~ or more contributor license agreements.  See the NOTICE file
@@ -22,14 +23,13 @@
         <format>zip</format>
     </formats>
     <includeBaseDirectory>false</includeBaseDirectory>
-
     <fileSets>
         <fileSet>
             <directory>target/wso2carbon-core-${carbon.kernel.version}</directory>
             <outputDirectory>${pom.artifactId}-${pom.version}</outputDirectory>
             <excludes>
                 <exclude>**/*.sh</exclude>
-		<exclude>**/wso2server.bat</exclude>
+                <exclude>**/wso2server.bat</exclude>
                 <exclude>**/axis2services/sample01.aar</exclude>
                 <exclude>**/axis2services/echo/**</exclude>
                 <exclude>**/axis2services/version/**</exclude>
@@ -39,47 +39,44 @@
                 <exclude>**/LICENSE.txt</exclude>
                 <exclude>**/NOTICE</exclude>
                 <exclude>**/release-notes.html</exclude>
- 		        <exclude>**/launch.ini</exclude>
+                <exclude>**/launch.ini</exclude>
                 <exclude>**/carbon.xml</exclude>
                 <exclude>**/README*</exclude>
                 <exclude>**/log4j.properties</exclude>
                 <exclude>**/repository/components/**</exclude>
-		        <exclude>**/lib/endorsed/**</exclude>
+                <exclude>**/lib/endorsed/**</exclude>
                 <exclude>**/repository/conf/security/cipher-tool.properties</exclude>
                 <exclude>**/dbscripts/**</exclude>
                 <exclude>**/repository/conf/security/cipher-text.properties</exclude>
-		        <exclude>**/repository/conf/axis2/axis2.xml</exclude>
-		        <exclude>**/repository/conf/registry.xml</exclude>
-
-		<exclude>**/repository/conf/log4j.properties</exclude>
-  		<exclude>**/repository/conf/data-bridge/**</exclude>
-  		<exclude>**/repository/resources/security/client-truststore.jks</exclude>
+                <exclude>**/repository/conf/axis2/axis2.xml</exclude>
+                <exclude>**/repository/conf/registry.xml</exclude>
+                <exclude>**/repository/conf/log4j.properties</exclude>
+                <exclude>**/repository/conf/data-bridge/**</exclude>
+                <exclude>**/repository/resources/security/client-truststore.jks</exclude>
             </excludes>
         </fileSet>
-	<!-- Copying p2 profile and osgi bundles-->
-	<fileSet>
-	    <directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/components</directory>
-	    <outputDirectory>${pom.artifactId}-${pom.version}/repository/components</outputDirectory>
-	    <excludes>
-	        <exclude>**/eclipse.ini</exclude>
-	        <exclude>**/*.lock</exclude>
-	        <exclude>**/.data</exclude>
-	        <exclude>**/.settings</exclude>
-	        <exclude>**/org.wso2.store.sso.common_1.0.0.jar</exclude>
-	        <exclude>**/org.wso2.stratos.identity.saml2.sso.mgt_2.2.0.jar</exclude>
-	        <exclude>**/org.jaggeryjs.hostobjects.xhr_0.9.0.ALPHA4_wso2v1.jar</exclude>
+        <!-- Copying p2 profile and osgi bundles-->
+        <fileSet>
+            <directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/components</directory>
+            <outputDirectory>${pom.artifactId}-${pom.version}/repository/components</outputDirectory>
+            <excludes>
+                <exclude>**/eclipse.ini</exclude>
+                <exclude>**/*.lock</exclude>
+                <exclude>**/.data</exclude>
+                <exclude>**/.settings</exclude>
+                <exclude>**/org.wso2.store.sso.common_1.0.0.jar</exclude>
+                <exclude>**/org.wso2.stratos.identity.saml2.sso.mgt_2.2.0.jar</exclude>
+                <exclude>**/org.jaggeryjs.hostobjects.xhr_0.9.0.ALPHA4_wso2v1.jar</exclude>
                 <exclude>**/infinispan-core_5.1.2.wso2v1.jar</exclude>
-	        <exclude>**/jboss-logging_3.1.0.wso2v1.jar</exclude>
-		<exclude>**/marshalling_1.3.6.wso2v1.jar</exclude>
-		<exclude>**/jboss-transaction-api_1.1_spec-1.0.0.Final.jar</exclude>
-		<exclude>**/org.wso2.carbon.ui_4.2.0.jar</exclude>
-		<exclude>**/httpclient_4.1.1.wso2v1.jar</exclude>
-		<exclude>**/httpcore_4.1.0.wso2v1.jar</exclude>
-	    </excludes>
-	</fileSet>
-
-
-	<!-- Exclude non-Apache2 compliant dependency from lib/endorsed/ directory-->
+                <exclude>**/jboss-logging_3.1.0.wso2v1.jar</exclude>
+                <exclude>**/marshalling_1.3.6.wso2v1.jar</exclude>
+                <exclude>**/jboss-transaction-api_1.1_spec-1.0.0.Final.jar</exclude>
+                <exclude>**/org.wso2.carbon.ui_4.2.0.jar</exclude>
+                <exclude>**/httpclient_4.1.1.wso2v1.jar</exclude>
+                <exclude>**/httpcore_4.1.0.wso2v1.jar</exclude>
+            </excludes>
+        </fileSet>
+        <!-- Exclude non-Apache2 compliant dependency from lib/endorsed/ directory-->
         <fileSet>
             <directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/lib/endorsed</directory>
             <outputDirectory>${pom.artifactId}-${pom.version}/lib/endorsed</outputDirectory>
@@ -87,10 +84,9 @@
                 <exclude>**/jboss-transaction-api_1.1_spec-1.0.0.Final.jar</exclude>
             </excludes>
         </fileSet>
-	
         <fileSet>
-        <directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/jaggeryapps</directory>
-        <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/jaggeryapps</outputDirectory>
+            <directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/jaggeryapps</directory>
+            <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/jaggeryapps</outputDirectory>
             <excludes>
                 <exclude>**/publisher/**</exclude>
                 <exclude>**/store/**</exclude>
@@ -114,12 +110,12 @@
             <excludes>
                 <exclude>**/README</exclude>
             </excludes>
-	 </fileSet>
-         <fileSet>
+        </fileSet>
+        <fileSet>
             <directory>../../../../components/org.apache.stratos.manager.console/sso</directory>
             <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/jaggeryapps/sso</outputDirectory>
         </fileSet>
-         <fileSet>
+        <fileSet>
             <directory>../../../../components/org.apache.stratos.manager.console/modules/console</directory>
             <outputDirectory>${pom.artifactId}-${pom.version}/modules/console</outputDirectory>
         </fileSet>
@@ -128,10 +124,10 @@
             <outputDirectory>${pom.artifactId}-${pom.version}</outputDirectory>
             <excludes>
                 <exclude>**/daemon.sh</exclude>
-		<exclude>**/log4j.properties</exclude>
-		<exclude>**/repository/conf/log4j.properties</exclude>
-		<exclude>**/wso2server.sh</exclude>
-		<exclude>**/wso2server.bat</exclude>
+                <exclude>**/log4j.properties</exclude>
+                <exclude>**/repository/conf/log4j.properties</exclude>
+                <exclude>**/wso2server.sh</exclude>
+                <exclude>**/wso2server.bat</exclude>
             </excludes>
             <includes>
                 <include>**/*.sh</include>
@@ -139,10 +135,9 @@
             </includes>
             <fileMode>755</fileMode>
         </fileSet>
-	<fileSet>
+        <fileSet>
             <directory>../../conf/synapse-configs</directory>
-            <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/synapse-configs
-            </outputDirectory>
+            <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/synapse-configs</outputDirectory>
         </fileSet>
         <fileSet>
             <directory>../../conf</directory>
@@ -164,16 +159,15 @@
                 <exclude>email-new-tenant-registration.xml</exclude>
                 <exclude>email-password-reset.xml</exclude>
                 <exclude>email-payment-received-customer.xml</exclude>
-		<exclude>email-registration-payment-received-customer.xml</exclude>
+                <exclude>email-registration-payment-received-customer.xml</exclude>
                 <exclude>email-payment-received-wso2.xml</exclude>
                 <exclude>email-registration-complete.xml</exclude>
                 <exclude>email-registration-moderation.xml</exclude>
                 <exclude>email-registration.xml</exclude>
                 <exclude>email-update.xml</exclude>
-		<exclude>tenant-reg-agent.xml</exclude>
+                <exclude>tenant-reg-agent.xml</exclude>
                 <exclude>features-dashboard.xml</exclude>
                 <exclude>**/data-bridge/**</exclude>
-
             </excludes>
         </fileSet>
         <fileSet>
@@ -187,14 +181,14 @@
                 <include>email-password-reset.xml</include>
                 <include>email-payment-received-customer.xml</include>
                 <include>email-registration-payment-received-customer.xml</include>
-				<include>email-payment-received-wso2.xml</include>
+                <include>email-payment-received-wso2.xml</include>
                 <include>email-registration-complete.xml</include>
                 <include>email-registration-moderation.xml</include>
                 <include>email-registration.xml</include>
                 <include>email-update.xml</include>
             </includes>
         </fileSet>
-	<fileSet>
+        <fileSet>
             <directory>../../conf</directory>
             <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/multitenancy</outputDirectory>
             <includes>
@@ -202,16 +196,15 @@
                 <include>features-dashboard.xml</include>
             </includes>
         </fileSet>
-	<fileSet>
+        <fileSet>
             <directory>../../conf</directory>
             <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/datasources</outputDirectory>
             <includes>
                 <include>stratos-datasources.xml</include>
             </includes>
         </fileSet>
-
         <!-- Copying themes, cloud icons-->
-         <fileSet>
+        <fileSet>
             <directory>../../resources</directory>
             <outputDirectory>${pom.artifactId}-${pom.version}/resources</outputDirectory>
             <fileMode>755</fileMode>
@@ -223,7 +216,6 @@
                 <exclude>.svn</exclude>
             </excludes>
         </fileSet>
-
         <!--start BAM related files -->
         <!--<fileSet>
             <directory>resources/dataservices</directory>
@@ -245,7 +237,6 @@
                 <include>*.xml</include>
             </includes>
         </fileSet>-->
-
         <fileSet>
             <directory>resources</directory>
             <outputDirectory>${pom.artifactId}-${pom.version}/repository/resources</outputDirectory>
@@ -253,7 +244,7 @@
                 <include>**/*</include>
             </includes>
         </fileSet>
-	<!--fileSet>
+        <!--fileSet>
             <directory>resources/dbscripts</directory>
             <outputDirectory>${pom.artifactId}-${pom.version}/dbscripts/</outputDirectory>
             <includes>
@@ -261,128 +252,116 @@
             </includes>
         </fileSet-->
         <!--end BAM related files -->
-
-	<!--qpid related files -->
-	<fileSet>
-           <directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/advanced/</directory>
-           <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/advanced</outputDirectory>
-	   <includes>
-               <include>**/*</include>
-           </includes>
-	    <excludes>
+        <!--qpid related files -->
+        <fileSet>
+            <directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/advanced/</directory>
+            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/advanced</outputDirectory>
+            <includes>
+                <include>**/*</include>
+            </includes>
+            <excludes>
                 <exclude>**/jmx.xml</exclude>
-		<exclude>**/authenticators.xml</exclude>
-		<exclude>**/logging-config.xml</exclude>
+                <exclude>**/authenticators.xml</exclude>
+                <exclude>**/logging-config.xml</exclude>
             </excludes>
         </fileSet>
-	<!-- end of qpid related files -->
-
-	<!-- adc.mgt related files -->
-	<fileSet>
-           <!--directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/</directory-->
-	   <directory>src/main/conf/</directory>
-           <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf</outputDirectory>
-	   <includes>
-               <include>cartridge-config.properties</include>
-               <include>policies.xml</include>
-           </includes>
+        <!-- end of qpid related files -->
+        <!-- adc.mgt related files -->
+        <fileSet>
+            <!--directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/</directory-->
+            <directory>src/main/conf/</directory>
+            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf</outputDirectory>
+            <includes>
+                <include>cartridge-config.properties</include>
+                <include>policies.xml</include>
+            </includes>
         </fileSet>
         <fileSet>
-           <directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/etc</directory>
-           <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/etc</outputDirectory>
-	   <includes>
-               <include>policies.xsd</include>
-           </includes>
+            <directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/etc</directory>
+            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/etc</outputDirectory>
+            <includes>
+                <include>policies.xsd</include>
+            </includes>
         </fileSet>
-	<!-- end of adc.mgt related files -->
-
-	<!-- axis2.xml -->
-	<fileSet>
-           <directory>src/main/conf/</directory>
-           <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/axis2</outputDirectory>
-           <includes>
-               <include>axis2.xml</include>
-           </includes>
+        <!-- end of adc.mgt related files -->
+        <!-- axis2.xml -->
+        <fileSet>
+            <directory>src/main/conf/</directory>
+            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/axis2</outputDirectory>
+            <includes>
+                <include>axis2.xml</include>
+            </includes>
         </fileSet>
-
-	 <fileSet>
-           <directory>../p2-profile/target/wso2carbon-core-${carbon.platform.version}/repository/conf/etc/</directory>
-           <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/etc</outputDirectory>
-           <includes>
-               <include>**/cassandra.yaml</include>
-           </includes>
+        <fileSet>
+            <directory>../p2-profile/target/wso2carbon-core-${carbon.platform.version}/repository/conf/etc/</directory>
+            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/etc</outputDirectory>
+            <includes>
+                <include>**/cassandra.yaml</include>
+            </includes>
         </fileSet>
-	<fileSet>
-           <directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/</directory>
-           <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/</outputDirectory>
-	   <includes>
-		<include>**/rule-engine-config.xml</include>
-           </includes>
+        <fileSet>
+            <directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/</directory>
+            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/</outputDirectory>
+            <includes>
+                <include>**/rule-engine-config.xml</include>
+            </includes>
         </fileSet>
-
-	<fileSet>
-           <directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/multitenancy/</directory>
-           <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/multitenancy/</outputDirectory>
-           <includes>
+        <fileSet>
+            <directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/multitenancy/</directory>
+            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/multitenancy/</outputDirectory>
+            <includes>
                 <include>**/multitenancy-packages.xml</include>
                 <include>**/stratos.xml</include>
                 <include>**/usage-throttling-agent-config.xml</include>
-		<!--include>**/cloud-services-desc.xml</include-->
-           </includes>
+                <!--include>**/cloud-services-desc.xml</include-->
+            </includes>
         </fileSet>
-
-		<!-- copy the landing page webapp -->
+        <!-- copy the landing page webapp -->
         <fileSet>
-			<directory>lib/home</directory>
-			<outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/webapps/STRATOS_ROOT</outputDirectory>
-		</fileSet>
-
-		<fileSet>
-			<directory>../../modules/features-dashboard/target/</directory>
-			<outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/webapps</outputDirectory>
-			<includes>
-				<include>**/*.war</include>
-			</includes>
-		</fileSet>
-
-		<fileSet>
-			<directory>../../resources/cloud-services-icons/target/</directory>
-			<outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/webapps</outputDirectory>
-			<includes>
-				<include>**/*.war</include>
-			</includes>
-		</fileSet>
-
-		<fileSet>
-	        	<directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/dbscripts/</directory>
-        		<outputDirectory>${pom.artifactId}-${pom.version}/dbscripts/registry/</outputDirectory>
-            	<excludes>
-                	<exclude>**/identity/**</exclude>
-			<!-- new version of mysql.sql and db2.sql is coming from WSO2-CARBON-PATCH-4.2.0-0001 patch. So excluding them-->
-                	<exclude>mysql.sql</exclude>
-                	<exclude>db2.sql</exclude>
-            	</excludes>
-            	<includes>
-                	<include>**/**.sql</include>
-            	</includes>
-		</fileSet>
-
-		<fileSet>
-	        	<directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/dbscripts/identity/</directory>
-        		<outputDirectory>${pom.artifactId}-${pom.version}/dbscripts/identity</outputDirectory>
-            	<includes>
-                	<include>**/**.sql</include>
-            	</includes>
-		</fileSet>
-
-		<fileSet>
-	        	<directory>../p2-profile-gen/target/WSO2-CARBON-PATCH-4.2.0-0001/dbscripts</directory>
-        		<outputDirectory>${pom.artifactId}-${pom.version}/dbscripts/registry</outputDirectory>
-            	<includes>
-                	<include>**/**.sql</include>
-            	</includes>
-		</fileSet>
-
+            <directory>lib/home</directory>
+            <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/webapps/STRATOS_ROOT</outputDirectory>
+        </fileSet>
+        <fileSet>
+            <directory>../../modules/features-dashboard/target/</directory>
+            <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/webapps</outputDirectory>
+            <includes>
+                <include>**/*.war</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>../../resources/cloud-services-icons/target/</directory>
+            <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/webapps</outputDirectory>
+            <includes>
+                <include>**/*.war</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/dbscripts/</directory>
+            <outputDirectory>${pom.artifactId}-${pom.version}/dbscripts/registry/</outputDirectory>
+            <excludes>
+                <exclude>**/identity/**</exclude>
+                <!-- new version of mysql.sql and db2.sql is coming from WSO2-CARBON-PATCH-4.2.0-0001 patch. So excluding them-->
+                <exclude>mysql.sql</exclude>
+                <exclude>db2.sql</exclude>
+            </excludes>
+            <includes>
+                <include>**/**.sql</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/dbscripts/identity/</directory>
+            <outputDirectory>${pom.artifactId}-${pom.version}/dbscripts/identity</outputDirectory>
+            <includes>
+                <include>**/**.sql</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>../p2-profile-gen/target/WSO2-CARBON-PATCH-4.2.0-0001/dbscripts</directory>
+            <outputDirectory>${pom.artifactId}-${pom.version}/dbscripts/registry</outputDirectory>
+            <includes>
+                <include>**/**.sql</include>
+            </includes>
+        </fileSet>
         <!-- copy cxf runtime -->
         <fileSet>
             <directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/lib/runtimes</directory>
@@ -391,26 +370,23 @@
                 <include>*/**</include>
             </includes>
         </fileSet>
-
         <!-- copy jaggery modules -->
         <fileSet>
             <directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/modules</directory>
             <outputDirectory>${pom.artifactId}-${pom.version}/modules</outputDirectory>
-	    <excludes>
+            <excludes>
                 <exclude>**/carbon/**</exclude>
-	    </excludes>
+            </excludes>
             <includes>
                 <include>*/**</include>
             </includes>
         </fileSet>
-
-		<!-- copy the billing h2 db -->
-		<fileSet>
-			<directory>target/database</directory>
-			<outputDirectory>${pom.artifactId}-${pom.version}/repository/database</outputDirectory>
-		</fileSet>
-
-        <!-- Kernel Patches-->       
+        <!-- copy the billing h2 db -->
+        <fileSet>
+            <directory>target/database</directory>
+            <outputDirectory>${pom.artifactId}-${pom.version}/repository/database</outputDirectory>
+        </fileSet>
+        <!-- Kernel Patches-->
         <fileSet>
             <directory>../p2-profile-gen/target/WSO2-CARBON-PATCH-4.2.0-0001</directory>
             <outputDirectory>${pom.artifactId}-${pom.version}/repository/components/patches</outputDirectory>
@@ -435,14 +411,14 @@
         <fileSet>
             <directory>../p2-profile-gen/target/WSO2-CARBON-PATCH-4.2.0-0004</directory>
             <outputDirectory>${pom.artifactId}-${pom.version}/repository/components/patches</outputDirectory>
-	    <excludes>
+            <excludes>
                 <exclude>**/org.wso2.carbon.ui_4.2.0.jar</exclude>
-	    </excludes>
+            </excludes>
             <includes>
                 <include>**/patch0004/*.*</include>
             </includes>
         </fileSet>
-	<fileSet>
+        <fileSet>
             <directory>../p2-profile-gen/target/WSO2-CARBON-PATCH-4.2.0-0005</directory>
             <outputDirectory>${pom.artifactId}-${pom.version}/repository/components/patches</outputDirectory>
             <includes>
@@ -459,7 +435,7 @@
         <fileSet>
             <directory>../p2-profile-gen/target/WSO2-CARBON-PATCH-4.2.0-0007</directory>
             <outputDirectory>${pom.artifactId}-${pom.version}/repository/components/patches</outputDirectory>
-	    <excludes>
+            <excludes>
                 <exclude>**/org.wso2.carbon.ui_4.2.0.jar</exclude>
             </excludes>
             <includes>
@@ -473,132 +449,110 @@
                 <include>**/patch0008/*.*</include>
             </includes>
         </fileSet>
-<!--
+        <!--
 		<fileSet>
                    <directory>../../dbscripts/</directory>
                    <outputDirectory>${pom.artifactId}-${pom.version}/dbscripts</outputDirectory>
                 </fileSet>
 -->
-		<fileSet>
-                   <directory>../../payload</directory>
-		   <includes>
-            		<include>user-data</include>
-        	   </includes>
-                   <outputDirectory>${pom.artifactId}-${pom.version}/repository/resources</outputDirectory>
-                </fileSet>
-                <fileSet>
-                   <directory>../../payload/user-data/</directory>
-                   <outputDirectory>${pom.artifactId}-${pom.version}/repository/resources/user-data</outputDirectory>
-                </fileSet> 
-	<fileSet>
+        <fileSet>
+            <directory>../../payload</directory>
+            <includes>
+                <include>user-data</include>
+            </includes>
+            <outputDirectory>${pom.artifactId}-${pom.version}/repository/resources</outputDirectory>
+        </fileSet>
+        <fileSet>
+            <directory>../../payload/user-data/</directory>
+            <outputDirectory>${pom.artifactId}-${pom.version}/repository/resources/user-data</outputDirectory>
+        </fileSet>
+        <fileSet>
             <directory>../../conf/temp-artifacts/sso</directory>
             <outputDirectory>${pom.artifactId}-${pom.version}/modules/sso</outputDirectory>
         </fileSet>
-	<fileSet>
+        <fileSet>
             <directory>../../conf/temp-artifacts/carbon</directory>
             <outputDirectory>${pom.artifactId}-${pom.version}/modules/carbon</outputDirectory>
         </fileSet>
-	<fileSet>
+        <fileSet>
             <directory>../../conf/temp-artifacts</directory>
             <outputDirectory>${pom.artifactId}-${pom.version}/repository/components/plugins</outputDirectory>
             <includes>
                 <include>org.wso2.store.sso.common_1.0.0.jar</include>
             </includes>
         </fileSet>
-	<fileSet>
+        <fileSet>
             <directory>../../conf/temp-artifacts</directory>
             <outputDirectory>${pom.artifactId}-${pom.version}/repository/components/plugins</outputDirectory>
             <includes>
                 <include>org.wso2.stratos.identity.saml2.sso.mgt_2.2.0.jar</include>
             </includes>
         </fileSet>
-
-    <!-- autoscaler -->
-    <fileSet>
-	  <directory>src/main/autoscale-policies</directory>
-	  <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/autoscale-policies</outputDirectory>
-	  <directoryMode>0600</directoryMode>
-           <includes>
-              <include>*.xml</include>
-           </includes>
-	</fileSet>
-
-	<fileSet>
-	  <directory>src/main/deployment-policies</directory>
-	  <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/deployment-policies</outputDirectory>
-	  <directoryMode>0600</directoryMode>
-           <includes>
-              <include>*.xml</include>
-           </includes>
-	</fileSet>
-
-	<fileSet>
-	  <directory>src/main/partitions</directory>
-	  <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/partitions</outputDirectory>
-	  <directoryMode>0600</directoryMode>
-           <includes>
-              <include>*.xml</include>
-           </includes>
-	</fileSet>
-
-    <!-- autoscaler -->
-	<fileSet>
+        <!-- autoscaler -->
+        <fileSet>
+            <directory>src/main/autoscale-policies</directory>
+            <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/autoscale-policies</outputDirectory>
+            <directoryMode>0600</directoryMode>
+            <includes>
+                <include>*.xml</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>src/main/deployment-policies</directory>
+            <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/deployment-policies</outputDirectory>
+            <directoryMode>0600</directoryMode>
+            <includes>
+                <include>*.xml</include>
+            </includes>
+        </fileSet>
+        <fileSet>
+            <directory>src/main/partitions</directory>
+            <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/partitions</outputDirectory>
+            <directoryMode>0600</directoryMode>
+            <includes>
+                <include>*.xml</include>
+            </includes>
+        </fileSet>
+        <!-- autoscaler -->
+        <fileSet>
             <directory>../../conf/temp-artifacts</directory>
             <outputDirectory>${pom.artifactId}-${pom.version}/repository/components/plugins</outputDirectory>
             <includes>
                 <include>org.jaggeryjs.hostobjects.xhr_0.9.0.ALPHA4_wso2v1.jar</include>
             </includes>
         </fileSet>
-
-    <!-- cep -->
-	<!--creating an empty input event adaptors directory-->
+        <!-- cep -->
+        <!--creating an empty input event adaptors directory-->
         <fileSet>
             <directory>../../../../extensions/cep/artifacts/inputeventadaptors</directory>
-            <outputDirectory>
-                ${pom.artifactId}-${pom.version}/repository/deployment/server/inputeventadaptors
-            </outputDirectory>
+            <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/inputeventadaptors</outputDirectory>
         </fileSet>
-
         <!--creating an empty output event adaptors directory-->
         <fileSet>
             <directory>../../../../extensions/cep/artifacts/outputeventadaptors</directory>
-            <outputDirectory>
-                ${pom.artifactId}-${pom.version}/repository/deployment/server/outputeventadaptors
-            </outputDirectory>
+            <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/outputeventadaptors</outputDirectory>
         </fileSet>
-
         <!--creating an empty event builders directory-->
         <fileSet>
             <directory>../../../../extensions/cep/artifacts/eventbuilders</directory>
-            <outputDirectory>
-                ${pom.artifactId}-${pom.version}/repository/deployment/server/eventbuilders
-            </outputDirectory>
+            <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/eventbuilders</outputDirectory>
         </fileSet>
-
         <!--creating an empty event formatters directory-->
         <fileSet>
             <directory>../../../../extensions/cep/artifacts/eventformatters</directory>
-            <outputDirectory>
-                ${pom.artifactId}-${pom.version}/repository/deployment/server/eventformatters
-            </outputDirectory>
+            <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/eventformatters</outputDirectory>
         </fileSet>
-
         <!--creating an empty execution plans directory-->
         <fileSet>
             <directory>../../../../extensions/cep/artifacts/executionplans</directory>
-            <outputDirectory>
-                ${pom.artifactId}-${pom.version}/repository/deployment/server/executionplans
-            </outputDirectory>
+            <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/executionplans</outputDirectory>
         </fileSet>
-
-	<!--customization scripts-->
+        <!--customization scripts-->
         <fileSet>
             <directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/scripts</directory>
             <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/scripts</outputDirectory>
         </fileSet>
-     </fileSets>
-
-
+    </fileSets>
     <dependencySets>
         <dependencySet>
             <outputDirectory>${pom.artifactId}-${pom.version}/repository/lib</outputDirectory>
@@ -606,7 +560,7 @@
                 <include>bouncycastle:bcprov-jdk15:jar</include>
             </includes>
         </dependencySet>
-	<!-- use the new tool to create a bundles -->
+        <!-- use the new tool to create a bundles -->
         <dependencySet>
             <outputDirectory>${pom.artifactId}-${pom.version}/lib/core/WEB-INF/lib</outputDirectory>
             <includes>
@@ -618,12 +572,10 @@
             <includes>
                 <include>bouncycastle:bcprov-jdk15:jar</include>
             </includes>
-            <outputFileNameMapping>${artifact.artifactId}.${artifact.extension}
-            </outputFileNameMapping>
+            <outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
         </dependencySet>
         <dependencySet>
-            <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/client/modules
-            </outputDirectory>
+            <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/client/modules</outputDirectory>
             <includes>
                 <include>org.apache.rampart:rampart:mar</include>
             </includes>
@@ -643,28 +595,27 @@
                 <include>org.apache.stratos:org.apache.stratos.cep.extension:jar</include>
             </includes>
         </dependencySet>
-         <dependencySet>
-          <outputDirectory>${pom.artifactId}-${pom.version}/lib/endorsed</outputDirectory>
+        <dependencySet>
+            <outputDirectory>${pom.artifactId}-${pom.version}/lib/endorsed</outputDirectory>
             <includes>
                 <include>org.apache.geronimo.specs:geronimo-jta_1.1_spec:jar</include>
             </includes>
         </dependencySet>
         <dependencySet>
-          <outputDirectory>${pom.artifactId}-${pom.version}/repository/components/dropins</outputDirectory>
+            <outputDirectory>${pom.artifactId}-${pom.version}/repository/components/dropins</outputDirectory>
             <includes>
                 <include>org.apache.stratos:org.wso2.carbon.ui:jar</include>
             </includes>
         </dependencySet>
     </dependencySets>
-
     <files>
-		<file>
+        <file>
             <source>src/main/conf/log4j.properties</source>
             <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf</outputDirectory>
             <filtered>true</filtered>
             <fileMode>600</fileMode>
         </file>
-	<!-- cep -->
+        <!-- cep -->
         <file>
             <source>src/main/conf/siddhi/siddhi.extension</source>
             <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/siddhi/</outputDirectory>
@@ -675,13 +626,13 @@
             <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/</outputDirectory>
             <filtered>true</filtered>
         </file>
-		<!-- cloud-controller -->
-		<file>
+        <!-- cloud-controller -->
+        <file>
             <source>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/cloud-controller.xml</source>
             <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf</outputDirectory>
         </file>
-		<!-- cloud-controller -->
-		<!-- autoscaler -->
+        <!-- cloud-controller -->
+        <!-- autoscaler -->
         <file>
             <source>src/main/conf/autoscaler.xml</source>
             <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf</outputDirectory>
@@ -694,7 +645,7 @@
             <filtered>true</filtered>
             <fileMode>600</fileMode>
         </file>
-	<!--iindentity.xml and application-authentication.xml for oAuth feature -->
+        <!--iindentity.xml and application-authentication.xml for oAuth feature -->
         <file>
             <source>src/main/conf/identity.xml</source>
             <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf</outputDirectory>
@@ -755,7 +706,7 @@
             <filtered>true</filtered>
             <fileMode>600</fileMode>
         </file>
-		<!-- autoscaler -->
+        <!-- autoscaler -->
         <file>
             <source>${project.basedir}/INSTALL.txt</source>
             <outputDirectory>${pom.artifactId}-${pom.version}</outputDirectory>
@@ -768,7 +719,7 @@
             <filtered>true</filtered>
             <fileMode>644</fileMode>
         </file>
-	<file>
+        <file>
             <source>src/main/resources/launch.ini</source>
             <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/etc</outputDirectory>
             <filtered>true</filtered>
@@ -780,7 +731,7 @@
             <filtered>true</filtered>
             <fileMode>644</fileMode>
         </file>
-	 <file>
+        <file>
             <source>src/main/license/LICENSE</source>
             <outputDirectory>apache-stratos-${pom.version}</outputDirectory>
             <filtered>true</filtered>
@@ -811,14 +762,13 @@
             <filtered>true</filtered>
             <fileMode>644</fileMode>
         </file>
-
-	<!--file>
+        <!--file>
             <source>../../conf/cartridge-config.properties</source>
             <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf</outputDirectory>
             <filtered>true</filtered>
             <fileMode>644</fileMode>
         </file-->
-	<file>
+        <file>
             <source>../../conf/cloud-services-desc.xml</source>
             <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/multitenancy</outputDirectory>
             <filtered>true</filtered>
@@ -838,7 +788,6 @@
         </file-->
         <file>
             <source>target/wso2carbon-core-${carbon.kernel.version}/bin/README.txt</source>
-
             <outputDirectory>${pom.artifactId}-${pom.version}/bin/</outputDirectory>
             <filtered>true</filtered>
             <fileMode>644</fileMode>
@@ -855,7 +804,7 @@
             <filtered>true</filtered>
             <fileMode>644</fileMode>
         </file-->
-	<!--file>
+        <!--file>
             <source>bam-resources/bam.xml</source>
             <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/</outputDirectory>
             <filtered>true</filtered>
@@ -866,43 +815,42 @@
             <outputDirectory>${pom.artifactId}-${pom.version}/repository/resources/security/</outputDirectory>
             <fileMode>644</fileMode>
         </file>
-	<!--file>
+        <!--file>
             <source>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/event-broker.xml</source>
             <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf</outputDirectory>
 	    <filtered>true</filtered>
 	    <fileMode>644</fileMode>	
         </file-->
-	
-	<!-- Including logging-config.xml file -->
- 	<file>
+        <!-- Including logging-config.xml file -->
+        <file>
             <source>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/etc/logging-config.xml</source>
             <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/etc/</outputDirectory>
         </file>
-	<file>
+        <file>
             <source>src/bin/stratos.sh</source>
             <outputDirectory>apache-stratos-${pom.version}/bin/</outputDirectory>
             <filtered>true</filtered>
             <fileMode>755</fileMode>
         </file>
-	<file>
+        <file>
             <source>src/bin/stratos.bat</source>
             <outputDirectory>apache-stratos-${pom.version}/bin/</outputDirectory>
             <filtered>true</filtered>
             <fileMode>755</fileMode>
         </file>
-	<file>
+        <file>
             <source>src/bin/git-folder-structure.sh</source>
             <outputDirectory>apache-stratos-${pom.version}/bin/</outputDirectory>
             <filtered>true</filtered>
             <fileMode>755</fileMode>
         </file>
-	<file>
+        <file>
             <source>src/bin/manage-git-repo.sh</source>
             <outputDirectory>apache-stratos-${pom.version}/bin/</outputDirectory>
             <filtered>true</filtered>
             <fileMode>755</fileMode>
         </file>
-	<file>
+        <file>
             <source>src/bin/set-mysql-password.sh</source>
             <outputDirectory>apache-stratos-${pom.version}/bin/</outputDirectory>
             <filtered>true</filtered>
@@ -920,30 +868,30 @@
             <filtered>true</filtered>
             <fileMode>755</fileMode>
         </file>
-	<file>
+        <file>
             <source>src/bin/update-instance.sh</source>
             <outputDirectory>apache-stratos-${pom.version}/bin/</outputDirectory>
             <filtered>true</filtered>
             <fileMode>755</fileMode>
         </file>
-	<file>
+        <file>
             <source>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/claim-config.xml</source>
             <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf</outputDirectory>
-	    <filtered>true</filtered>
-	    <fileMode>644</fileMode>	
+            <filtered>true</filtered>
+            <fileMode>644</fileMode>
         </file>
-	<file>
+        <file>
             <source>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/etc/tasks-config.xml</source>
             <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/etc</outputDirectory>
         </file>
-	<file>
+        <file>
             <source>../../conf/zoo.cfg</source>
             <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/etc</outputDirectory>
         </file>
-	<file>
+        <file>
             <source>../../conf/jaas.conf</source>
             <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/security</outputDirectory>
-	    <destName>jaas.conf</destName>
+            <destName>jaas.conf</destName>
             <filtered>true</filtered>
         </file>
         <file>
@@ -970,7 +918,7 @@
             <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/webapps/</outputDirectory>
             <fileMode>644</fileMode>
         </file>
-	    <!--oauth2.war and authenticationendpoint.war is related to oAuth feature  -->
+        <!--oauth2.war and authenticationendpoint.war is related to oAuth feature  -->
         <file>
             <source>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps/oauth2.war</source>
             <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/webapps/</outputDirectory>
@@ -982,12 +930,9 @@
             <fileMode>644</fileMode>
         </file>
         <!-- End of REST endpoint webapp -->
-
         <!-- Meta data service webapp -->
         <file>
-            <source>
-                ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps/metadata.war
-            </source>
+            <source>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps/metadata.war</source>
             <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/webapps/</outputDirectory>
             <fileMode>644</fileMode>
         </file>
@@ -1007,9 +952,8 @@
             <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/</outputDirectory>
             <fileMode>644</fileMode>
         </file>
-
-   <!--Copying config files from kernel patches -->
-<!--
+        <!--Copying config files from kernel patches -->
+        <!--
         <file>
             <source>../p2-profile-gen/target/WSO2-CARBON-PATCH-4.2.0-0001/dbscripts/mysql.sql</source>
             <outputDirectory>${pom.artifactId}-${pom.version}/dbscripts/registry</outputDirectory>
@@ -1026,13 +970,10 @@
             <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/security/</outputDirectory>
             <filtered>true</filtered>
         </file>
-
-
         <file>
             <source>../p2-profile-gen/target/WSO2-CARBON-PATCH-4.2.0-0004/repository/conf/carbon.xml</source>
             <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/</outputDirectory>
             <filtered>true</filtered>
         </file>
-
     </files>
 </assembly>