You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by jh...@apache.org on 2023/01/26 22:08:30 UTC

[james-project] 01/01: [boyscout] removes conflicting persistence.xml

This is an automated email from the ASF dual-hosted git repository.

jhelou pushed a commit to branch remove-persistence-xml
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 2925f13e85add7fcf6e3222e9a767a3946c7c827
Author: Jean Helou <jh...@codamens.fr>
AuthorDate: Tue Nov 8 23:01:11 2022 +0100

    [boyscout] removes conflicting persistence.xml
    
    Libs should not expose default configuration files on the classpath,
    this makes it harder to diagnose invalid startup configuration.
---
 .../src/main/resources/META-INF/persistence.xml    | 52 ----------------------
 .../src/main/resources/META-INF/persistence.xml    | 46 -------------------
 2 files changed, 98 deletions(-)

diff --git a/mailbox/jpa/src/main/resources/META-INF/persistence.xml b/mailbox/jpa/src/main/resources/META-INF/persistence.xml
deleted file mode 100644
index bf27655a71..0000000000
--- a/mailbox/jpa/src/main/resources/META-INF/persistence.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?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
-  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.    
--->
-
-<persistence xmlns="http://java.sun.com/xml/ns/persistence"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
-    version="2.0">
-
-    <persistence-unit name="James" transaction-type="RESOURCE_LOCAL">
-        <class>org.apache.james.mailbox.jpa.mail.model.JPAMailbox</class>
-        <class>org.apache.james.mailbox.jpa.mail.model.JPAUserFlag</class>
-        <class>org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAMailboxMessage</class>
-        <class>org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMailboxMessage</class>
-        <class>org.apache.james.mailbox.jpa.mail.model.JPAProperty</class>
-        <class>org.apache.james.mailbox.jpa.user.model.JPASubscription</class>
-        <class>org.apache.james.mailbox.jpa.quota.model.MaxDomainMessageCount</class>
-        <class>org.apache.james.mailbox.jpa.quota.model.MaxDomainStorage</class>
-        <class>org.apache.james.mailbox.jpa.quota.model.MaxGlobalMessageCount</class>
-        <class>org.apache.james.mailbox.jpa.quota.model.MaxGlobalStorage</class>
-        <class>org.apache.james.mailbox.jpa.quota.model.MaxUserMessageCount</class>
-        <class>org.apache.james.mailbox.jpa.quota.model.MaxUserStorage</class>
-        <class>org.apache.james.mailbox.jpa.quota.model.JpaCurrentQuota</class>
-        <class>org.apache.james.mailbox.jpa.mail.model.JPAMailboxAnnotation</class>
-        <class>org.apache.james.mailbox.jpa.mail.model.JPAMailboxAnnotationId</class>
-        <class>org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAMailboxMessage$MailboxIdUidKey</class>
-        <properties>
-            <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
-            <property name="openjpa.jdbc.MappingDefaults" value="ForeignKeyDeleteAction=cascade, JoinForeignKeyDeleteAction=cascade"/>
-            <property name="openjpa.jdbc.SchemaFactory" value="native(ForeignKeys=true)"/>
-            <property name="openjpa.jdbc.QuerySQLCache" value="false"/>
-        </properties>
-
-    </persistence-unit>
-
-</persistence>
diff --git a/server/data/data-jpa/src/main/resources/META-INF/persistence.xml b/server/data/data-jpa/src/main/resources/META-INF/persistence.xml
deleted file mode 100644
index 6224adb74f..0000000000
--- a/server/data/data-jpa/src/main/resources/META-INF/persistence.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?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
-  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.    
--->
-
-<persistence xmlns="http://java.sun.com/xml/ns/persistence"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
-    version="2.0">
-
-    <persistence-unit name="James" transaction-type="JTA">
-       <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
-        <jta-data-source>osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=jdbc/james)</jta-data-source>
-        <class>org.apache.james.domainlist.jpa.model.JPADomain</class>
-        <class>org.apache.james.user.jpa.model.JPAUser</class>
-        <class>org.apache.james.rrt.jpa.model.JPARecipientRewrite</class>
-        <class>org.apache.james.mailrepository.jpa.model.JPAUrl</class>
-        <class>org.apache.james.mailrepository.jpa.model.JPAMail</class>
-        <class>org.apache.james.sieve.jpa.model.JPASieveQuota</class>
-        <class>org.apache.james.sieve.jpa.model.JPASieveScript</class>
-        <exclude-unlisted-classes>true</exclude-unlisted-classes>
-        <properties>
-            <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
-            <property name="openjpa.jdbc.MappingDefaults" value="ForeignKeyDeleteAction=cascade, JoinForeignKeyDeleteAction=cascade"/>
-            <property name="openjpa.jdbc.SchemaFactory" value="native(ForeignKeys=true)"/>
-            <property name="openjpa.jdbc.QuerySQLCache" value="false"/>
-        </properties>
-
-    </persistence-unit>
-
-</persistence>


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org