Skip to content

Commit

Permalink
feat: Upgrade Persistence API and Move log4j artifact - Meeds-io/MIPs#57
Browse files Browse the repository at this point in the history
  • Loading branch information
boubaker committed Dec 27, 2023
1 parent be3d2cb commit ac00ac2
Show file tree
Hide file tree
Showing 17 changed files with 40 additions and 19 deletions.
8 changes: 8 additions & 0 deletions exo.jcr.component.core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-to-slf4j</artifactId>
</dependency>
<dependency>
<groupId>org.apache.tika</groupId>
<artifactId>tika-core</artifactId>
Expand Down Expand Up @@ -189,6 +193,10 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
</dependency>

<dependency>
<groupId>org.exoplatform.gatein.portal</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import org.exoplatform.services.rpc.TopologyChangeListener;
import org.exoplatform.services.rpc.jgv3.RPCServiceImpl;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.jboss.util.file.Files;
import org.jgroups.Address;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.exoplatform.services.jcr.impl.core.query;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.exoplatform.services.jcr.config.QueryHandlerEntry;
import org.exoplatform.services.jcr.config.RepositoryConfigurationException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
package org.exoplatform.services.jcr.impl.dataflow;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.exoplatform.commons.utils.PropertyManager;
import org.exoplatform.services.jcr.impl.util.io.FileCleaner;
import org.exoplatform.services.jcr.impl.util.io.FileCleanerHolder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
package org.exoplatform.services.jcr.impl.storage.jdbc.optimisation;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;

import org.exoplatform.services.jcr.access.AccessControlEntry;
import org.exoplatform.services.jcr.access.AccessControlList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
package org.exoplatform.services.jcr.impl.util;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;

import org.exoplatform.commons.utils.ISO8601;
import org.exoplatform.commons.utils.Tools;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
package org.exoplatform.services.jcr.api.namespaces;

import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.lucene.search.BooleanQuery;
import org.exoplatform.services.jcr.JcrAPIBaseTest;
import org.exoplatform.services.jcr.core.WorkspaceContainerFacade;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import java.io.IOException;

import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.lucene.analysis.TokenFilter;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
Expand Down Expand Up @@ -47,7 +47,7 @@ public final boolean incrementToken() throws IOException {

String tokenText = new String(buffer);
tokenText = tokenText.replaceAll("</?\\s*\\w*\\s*/?>", ""); // Remove all HTML Tags
tokenText = StringEscapeUtils.unescapeHtml(tokenText);
tokenText = StringEscapeUtils.unescapeHtml4(tokenText);
tokenText = tokenText.replaceAll("<|>", ""); // Remove trailing HTML character
tokenText = tokenText.trim();// Remove empty characters replaced by regex to get the right term length

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import javax.jcr.*;
import javax.jcr.nodetype.NoSuchNodeTypeException;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.picocontainer.Startable;

import org.exoplatform.commons.utils.PropertyManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import javax.ws.rs.*;
import javax.ws.rs.core.*;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;

import org.exoplatform.common.http.HTTPStatus;
import org.exoplatform.common.util.HierarchicalProperty;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
package org.exoplatform.services.jcr.webdav.command;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.exoplatform.common.http.HTTPStatus;
import org.exoplatform.services.jcr.ext.utils.VersionHistoryUtils;
import org.exoplatform.services.jcr.webdav.MimeTypeRecognizer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
package org.exoplatform.services.jcr.webdav.resource;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.exoplatform.common.util.HierarchicalProperty;
import org.exoplatform.services.jcr.webdav.xml.WebDavNamespaceContext;
import org.exoplatform.services.log.ExoLogger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import javax.jcr.Node;
import javax.jcr.RepositoryException;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.w3c.dom.Document;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,27 @@
*/
package org.exoplatform.services.jcr.ext.index.persistent.entity;

import java.util.*;

import javax.persistence.*;
import java.util.Calendar;
import java.util.HashSet;
import java.util.Set;

import org.exoplatform.commons.api.persistence.ExoEntity;
import org.exoplatform.services.jcr.ext.index.persistent.JCRIndexingOperationType;

import jakarta.persistence.CollectionTable;
import jakarta.persistence.Column;
import jakarta.persistence.ElementCollection;
import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.NamedQueries;
import jakarta.persistence.NamedQuery;
import jakarta.persistence.SequenceGenerator;
import jakarta.persistence.Table;

@Entity(name = "JCRIndexingQueue")
@ExoEntity
@Table(name = "JCR_INDEXING_QUEUE")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import javax.jcr.RepositoryException;

import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.picocontainer.Startable;

import org.exoplatform.commons.api.persistence.ExoTransactional;
Expand Down
1 change: 0 additions & 1 deletion jcr-packaging/src/main/assemblies/jcr-addon-package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
<exclude>commons-logging:*</exclude>
<!-- log4j is forbidden and must be replaced by org.slf4j:log4j-over-slf4j -->
<exclude>log4j:*</exclude>
<exclude>org.apache.logging.log4j:*</exclude>
<!-- We use jcl-over-slf4j, thus this one is forbidden to avoid infinite loops -->
<exclude>org.slf4j:slf4j-jcl:*</exclude>
<!-- We use log4j-over-slf4j, thus this one is forbidden to avoid infinite loops -->
Expand Down

0 comments on commit ac00ac2

Please sign in to comment.