summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/apex-pdp-package-full/pom.xml14
-rw-r--r--packages/apex-pdp-package-full/src/main/resources/META-INF/persistence.xml50
-rw-r--r--packages/apex-pdp-package-full/src/main/resources/properties/db.properties6
3 files changed, 44 insertions, 26 deletions
diff --git a/packages/apex-pdp-package-full/pom.xml b/packages/apex-pdp-package-full/pom.xml
index c2fb7e8e0..5dc4f88be 100644
--- a/packages/apex-pdp-package-full/pom.xml
+++ b/packages/apex-pdp-package-full/pom.xml
@@ -1,7 +1,7 @@
<!--
============LICENSE_START=======================================================
Copyright (C) 2018 Ericsson. All rights reserved.
- Modifications Copyright (C) 2019-2020 Nordix Foundation
+ Modifications Copyright (C) 2019-2020, 2022 Nordix Foundation
Modifications Copyright (C) 2019-2020 Bell Canada.
Modifications Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
================================================================================
@@ -245,6 +245,18 @@
</dependencies>
<build>
+ <filters>
+ <filter>src/main/resources/properties/db.properties</filter>
+ </filters>
+ <resources>
+ <resource>
+ <directory>src/main/resources/META-INF</directory>
+ <filtering>true</filtering>
+ <includes>
+ <include>**/*.xml</include>
+ </includes>
+ </resource>
+ </resources>
<plugins>
<!-- Copy required resources and examples -->
<plugin>
diff --git a/packages/apex-pdp-package-full/src/main/resources/META-INF/persistence.xml b/packages/apex-pdp-package-full/src/main/resources/META-INF/persistence.xml
index 61f5409bd..23c70b18b 100644
--- a/packages/apex-pdp-package-full/src/main/resources/META-INF/persistence.xml
+++ b/packages/apex-pdp-package-full/src/main/resources/META-INF/persistence.xml
@@ -2,7 +2,7 @@
<!--
============LICENSE_START=======================================================
Copyright (C) 2016-2018 Ericsson. All rights reserved.
- Modifications Copyright (C) 2019-2021 Nordix Foundation.
+ Modifications Copyright (C) 2019-2021, 2022 Nordix Foundation.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -59,18 +59,18 @@
<class>org.onap.policy.apex.domains.aadm.concepts.IMSIStatus</class>
<class>org.onap.policy.apex.domains.aadm.concepts.IPAddressStatus</class>
<class>org.onap.policy.apex.domains.adaptive.concepts.AnomalyDetection</class>
- <class>org.onap.policy.apex.domains.adaptive.concepts.AutoLearn</class>
- <class>org.onap.policy.apex.domains.vpn.concepts.VPNCustomer</class>
+ <class>org.onap.policy.apex.domains.adaptive.concepts.Autmer</class>
+ <class>org.onap.policy.apex.domains.vpn.concepts.VPNCustooLearn</class>
<class>org.onap.policy.apex.domains.vpn.concepts.VPNLink</class>
<class>org.onap.policy.apex.domains.vpn.concepts.VPNProblem</class>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
- <property name="eclipselink.target-database" value="MySQL" />
- <property name="javax.persistence.jdbc.driver" value="org.mariadb.jdbc.Driver" />
- <property name="javax.persistence.jdbc.url" value="jdbc:mariadb://localhost:5432/apex" />
- <property name="javax.persistence.jdbc.user" value="policy" />
- <property name="javax.persistence.jdbc.password" value="P01icY" />
+ <property name="eclipselink.target-database" value="${database.target-database}" />
+ <property name="javax.persistence.jdbc.driver" value="${database.jdbc.driver}" />
+ <property name="javax.persistence.jdbc.url" value="${database.jdbc.url}" />
+ <property name="javax.persistence.jdbc.user" value="${database.jdbc.user}" />
+ <property name="javax.persistence.jdbc.password" value="${database.jdbc.password}" />
<property name="eclipselink.ddl-generation" value="create-or-extend-tables" />
<property name="eclipselink.logging.level" value="INFO" />
@@ -123,11 +123,11 @@
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
- <property name="eclipselink.target-database" value="MySQL" />
- <property name="javax.persistence.jdbc.driver" value="org.mariadb.jdbc.Driver" />
- <property name="javax.persistence.jdbc.url" value="jdbc:mariadb://localhost:5432/apex_test" />
- <property name="javax.persistence.jdbc.user" value="policy" />
- <property name="javax.persistence.jdbc.password" value="P01icY" />
+ <property name="eclipselink.target-database" value="${database.target-database}" />
+ <property name="javax.persistence.jdbc.driver" value="${database.jdbc.driver}" />
+ <property name="javax.persistence.jdbc.url" value="${database.jdbc.url}" />
+ <property name="javax.persistence.jdbc.user" value="${database.jdbc.user}" />
+ <property name="javax.persistence.jdbc.password" value="${database.jdbc.password}" />
<property name="eclipselink.ddl-generation" value="drop-and-create-tables" />
<property name="eclipselink.logging.level" value="INFO" />
@@ -178,13 +178,13 @@
<class>org.onap.policy.apex.domains.vpn.concepts.VPNProblem</class>
<properties>
- <property name="eclipselink.target-database" value="MySQL" />
- <property name="javax.persistence.jdbc.driver" value="org.mariadb.jdbc.Driver" />
- <property name="javax.persistence.jdbc.url" value="jdbc:mariadb://localhost:5432/apex" />
- <property name="javax.persistence.jdbc.user" value="policy" />
- <property name="javax.persistence.jdbc.password" value="P01icY" />
+ <property name="eclipselink.target-database" value="${database.target-database}" />
+ <property name="javax.persistence.jdbc.driver" value="${database.jdbc.driver}" />
+ <property name="javax.persistence.jdbc.url" value="${database.jdbc.url}" />
+ <property name="javax.persistence.jdbc.user" value="${database.jdbc.user}" />
+ <property name="javax.persistence.jdbc.password" value="${database.jdbc.password}" />
- <property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5Dialect" />
+ <property name="hibernate.dialect" value="${database.dialect}" />
<property name="hibernate.hbm2ddl.auto" value="update" />
<property name="hibernate.connection.provider_class"
value="org.hibernate.connection.C3P0ConnectionProvider" />
@@ -241,12 +241,12 @@
<class>org.onap.policy.apex.domains.vpn.concepts.VPNProblem</class>
<properties>
- <property name="eclipselink.target-database" value="MySQL" />
- <property name="javax.persistence.jdbc.driver" value="org.mariadb.jdbc.Driver" />
- <property name="javax.persistence.jdbc.url" value="jdbc:mariadb://localhost:5432/apex_test" />
- <property name="javax.persistence.jdbc.user" value="policy" />
- <property name="javax.persistence.jdbc.password" value="P01icY" />
- <property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5Dialect" />
+ <property name="eclipselink.target-database" value="${database.target-database}" />
+ <property name="javax.persistence.jdbc.driver" value="${database.jdbc.driver}" />
+ <property name="javax.persistence.jdbc.url" value="${database.jdbc.url}" />
+ <property name="javax.persistence.jdbc.user" value="${database.jdbc.user}" />
+ <property name="javax.persistence.jdbc.password" value="${database.jdbc.password}" />
+ <property name="hibernate.dialect" value="${database.dialect}" />
<property name="hibernate.hbm2ddl.auto" value="create" />
<property name="hibernate.connection.provider_class"
value="org.hibernate.connection.C3P0ConnectionProvider" />
diff --git a/packages/apex-pdp-package-full/src/main/resources/properties/db.properties b/packages/apex-pdp-package-full/src/main/resources/properties/db.properties
new file mode 100644
index 000000000..db536d65e
--- /dev/null
+++ b/packages/apex-pdp-package-full/src/main/resources/properties/db.properties
@@ -0,0 +1,6 @@
+database.target-database=MySQL
+database.jdbc.driver=org.mariadb.jdbc.Driver
+database.jdbc.url=jdbc:mariadb://localhost:5432/apex
+database.jdbc.user=policy
+database.jdbc.password=P01icY
+database.dialect=org.hibernate.dialect.MySQL5Dialect \ No newline at end of file