diff --git a/config/modules/curate.cfg b/config/modules/curate.cfg
index 5b698ce..c6cf63f 100644
--- a/config/modules/curate.cfg
+++ b/config/modules/curate.cfg
@@ -14,6 +14,8 @@ plugin.named.org.dspace.curate.CurationTask = org.dspace.ctask.general.RequiredM
#plugin.named.org.dspace.curate.CurationTask = org.dspace.ctask.general.ClamScan = vscan
#plugin.named.org.dspace.curate.CurationTask = org.dspace.ctask.general.MicrosoftTranslator = translate
plugin.named.org.dspace.curate.CurationTask = org.dspace.ctask.general.MetadataValueLinkChecker = checklinks
+plugin.named.org.dspace.curate.CurationTask = org.dspace.ctask.general.RegisterDOI = registerdoi
+#plugin.named.org.dspace.curate.CurationTask = org.dspace.ctask.general.CitationPage = citationpage
plugin.named.org.dspace.curate.CurationTask = org.dspace.ctask.replicate.EstimateAIPSize = estaipsize
plugin.named.org.dspace.curate.CurationTask = org.dspace.ctask.replicate.ReadOdometer = readodometer
plugin.named.org.dspace.curate.CurationTask = org.dspace.ctask.replicate.TransmitAIP = transmitaip
@@ -52,4 +54,4 @@ plugin.single.org.dspace.curate.TaskQueue = org.dspace.curate.FileTaskQueue
curate.taskqueue.dir = ${dspace.dir}/ctqueues
# (optional) directory location of scripted (non-java) tasks
-# curate.script.dir = ${dspace.dir}/ctscripts
+# curate.script.dir = ${dspace.dir}/ctscripts
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 8c94e8b..90d6a47 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,7 +7,7 @@
Replication Task Suite: A DSpace add-on providing Curation Tasks that perform replication
(backup and restore) of DSpace content to other locations or services.
https://wiki.lyrasis.org/display/DSPACE/ReplicationTaskSuite
- 7.3-SNAPSHOT
+ 7.6-SNAPSHOT
LYRASIS
@@ -36,7 +36,7 @@
org.apache.maven.plugins
maven-enforcer-plugin
- 1.4.1
+ 3.1.0
enforce-java
@@ -66,6 +66,21 @@
+
+ enforce-banned-dependencies
+
+ enforce
+
+
+
+
+
+ log4j:log4j
+
+
+
+
+
@@ -247,6 +262,10 @@
org.slf4j
slf4j-log4j12
+
+ log4j
+ log4j
+
@@ -288,6 +307,17 @@
+
+ org.apache.logging.log4j
+ log4j-api
+ 2.20.0
+
+
+ org.apache.logging.log4j
+ log4j-core
+ 2.20.0
+ test
+
diff --git a/src/main/java/org/dspace/ctask/replicate/AbstractPackagerTask.java b/src/main/java/org/dspace/ctask/replicate/AbstractPackagerTask.java
index f045f0a..8a385a9 100644
--- a/src/main/java/org/dspace/ctask/replicate/AbstractPackagerTask.java
+++ b/src/main/java/org/dspace/ctask/replicate/AbstractPackagerTask.java
@@ -9,7 +9,8 @@
import java.util.List;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.dspace.content.packager.PackageParameters;
import org.dspace.curate.AbstractCurationTask;
@@ -34,7 +35,7 @@ public abstract class AbstractPackagerTask extends AbstractCurationTask
// Name of useCollectionTemplate option configurable in curation task configuration file
private final String useCollectionTemplate = "useCollectionTemplate";
- private static Logger log = Logger.getLogger(AbstractPackagerTask.class);
+ private static Logger log = LogManager.getLogger();
/**
* Loads pre-configured PackageParameters settings from a given Module
diff --git a/src/main/java/org/dspace/ctask/replicate/BagItReplicateConsumer.java b/src/main/java/org/dspace/ctask/replicate/BagItReplicateConsumer.java
index f9e6b05..3acaa06 100644
--- a/src/main/java/org/dspace/ctask/replicate/BagItReplicateConsumer.java
+++ b/src/main/java/org/dspace/ctask/replicate/BagItReplicateConsumer.java
@@ -26,7 +26,8 @@
import java.util.Map;
import java.util.Set;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.Collection;
import org.dspace.content.Community;
@@ -62,7 +63,7 @@
*/
public class BagItReplicateConsumer implements Consumer {
- private Logger log = Logger.getLogger(BagItReplicateConsumer.class);
+ private Logger log = LogManager.getLogger();
private ConfigurationService configurationService = DSpaceServicesFactory.getInstance().getConfigurationService();
private PluginService pluginService = CoreServiceFactory.getInstance().getPluginService();
diff --git a/src/main/java/org/dspace/ctask/replicate/BagItRestoreFromAIP.java b/src/main/java/org/dspace/ctask/replicate/BagItRestoreFromAIP.java
index ac0bb7c..aca0748 100644
--- a/src/main/java/org/dspace/ctask/replicate/BagItRestoreFromAIP.java
+++ b/src/main/java/org/dspace/ctask/replicate/BagItRestoreFromAIP.java
@@ -19,7 +19,8 @@
import java.util.List;
import java.util.Properties;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.Collection;
import org.dspace.content.Community;
@@ -57,7 +58,7 @@
@Mutative
public class BagItRestoreFromAIP extends AbstractCurationTask {
- private static Logger log = Logger.getLogger(BagItRestoreFromAIP.class);
+ private static Logger log = LogManager.getLogger();
private String archFmt;
// Group where all AIPs are stored
diff --git a/src/main/java/org/dspace/ctask/replicate/FilteredFileTaskQueue.java b/src/main/java/org/dspace/ctask/replicate/FilteredFileTaskQueue.java
index 836fc3a..b0809e6 100644
--- a/src/main/java/org/dspace/ctask/replicate/FilteredFileTaskQueue.java
+++ b/src/main/java/org/dspace/ctask/replicate/FilteredFileTaskQueue.java
@@ -13,7 +13,8 @@
import java.util.List;
import java.util.Set;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.dspace.curate.FileTaskQueue;
import org.dspace.curate.TaskQueueEntry;
@@ -41,7 +42,7 @@
*/
public class FilteredFileTaskQueue extends FileTaskQueue
{
- private static Logger log = Logger.getLogger(FilteredFileTaskQueue.class);
+ private static Logger log = LogManager.getLogger();
/**
diff --git a/src/main/java/org/dspace/ctask/replicate/METSReplicateConsumer.java b/src/main/java/org/dspace/ctask/replicate/METSReplicateConsumer.java
index 6a8f8fd..302fb3b 100644
--- a/src/main/java/org/dspace/ctask/replicate/METSReplicateConsumer.java
+++ b/src/main/java/org/dspace/ctask/replicate/METSReplicateConsumer.java
@@ -27,7 +27,8 @@
import java.util.Map;
import java.util.Set;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.Collection;
import org.dspace.content.Community;
@@ -82,7 +83,7 @@
*/
public class METSReplicateConsumer implements Consumer {
- private Logger log = Logger.getLogger(METSReplicateConsumer.class);
+ private Logger log = LogManager.getLogger();
private ConfigurationService configurationService = DSpaceServicesFactory.getInstance().getConfigurationService();
private PluginService pluginService = CoreServiceFactory.getInstance().getPluginService();
diff --git a/src/main/java/org/dspace/ctask/replicate/METSRestoreFromAIP.java b/src/main/java/org/dspace/ctask/replicate/METSRestoreFromAIP.java
index 6a3be48..0bc7ded 100644
--- a/src/main/java/org/dspace/ctask/replicate/METSRestoreFromAIP.java
+++ b/src/main/java/org/dspace/ctask/replicate/METSRestoreFromAIP.java
@@ -12,7 +12,8 @@
import java.sql.SQLException;
import java.util.List;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.DSpaceObject;
import org.dspace.content.packager.PackageParameters;
@@ -33,7 +34,7 @@
@Mutative
public class METSRestoreFromAIP extends AbstractPackagerTask
{
- private Logger log = Logger.getLogger(METSRestoreFromAIP.class);
+ private Logger log = LogManager.getLogger();
private String archFmt;
diff --git a/src/main/java/org/dspace/ctask/replicate/MoveToTrashSingleAIP.java b/src/main/java/org/dspace/ctask/replicate/MoveToTrashSingleAIP.java
index 8782844..231c8b0 100644
--- a/src/main/java/org/dspace/ctask/replicate/MoveToTrashSingleAIP.java
+++ b/src/main/java/org/dspace/ctask/replicate/MoveToTrashSingleAIP.java
@@ -11,7 +11,8 @@
import java.io.IOException;
import java.sql.SQLException;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.dspace.content.DSpaceObject;
import org.dspace.core.Context;
import org.dspace.curate.AbstractCurationTask;
@@ -43,7 +44,7 @@ public class MoveToTrashSingleAIP extends AbstractCurationTask
private String archFmt;
- private static Logger log = Logger.getLogger(MoveToTrashSingleAIP.class);
+ private static Logger log = LogManager.getLogger();
@Override
public void init(Curator curator, String taskId) throws IOException {
diff --git a/src/main/java/org/dspace/ctask/replicate/ReplicaManager.java b/src/main/java/org/dspace/ctask/replicate/ReplicaManager.java
index 216c351..e7ae72b 100644
--- a/src/main/java/org/dspace/ctask/replicate/ReplicaManager.java
+++ b/src/main/java/org/dspace/ctask/replicate/ReplicaManager.java
@@ -16,7 +16,8 @@
import java.io.IOException;
import java.sql.SQLException;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.dspace.content.DSpaceObject;
import org.dspace.core.Constants;
import org.dspace.core.Context;
@@ -40,7 +41,7 @@ public class ReplicaManager {
private PluginService pluginService = CoreServiceFactory.getInstance().getPluginService();
private HandleService handleService = HandleServiceFactory.getInstance().getHandleService();
- private Logger log = Logger.getLogger(ReplicaManager.class);
+ private Logger log = LogManager.getLogger();
// singleton instance
private static ReplicaManager instance = null;
// the replica provider
diff --git a/src/main/java/org/dspace/ctask/replicate/checkm/TransmitManifest.java b/src/main/java/org/dspace/ctask/replicate/checkm/TransmitManifest.java
index b3b04d6..3c06df2 100644
--- a/src/main/java/org/dspace/ctask/replicate/checkm/TransmitManifest.java
+++ b/src/main/java/org/dspace/ctask/replicate/checkm/TransmitManifest.java
@@ -17,7 +17,8 @@
import java.util.Iterator;
import java.util.List;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.dspace.content.Bitstream;
import org.dspace.content.Bundle;
import org.dspace.content.Collection;
@@ -61,7 +62,7 @@ public class TransmitManifest extends AbstractCurationTask {
// Group where all Manifests will be stored
private String manifestGroupName;
- private static Logger log = Logger.getLogger(TransmitManifest.class);
+ private static Logger log = LogManager.getLogger();
private CommunityService communityService = ContentServiceFactory.getInstance().getCommunityService();
private ItemService itemService = ContentServiceFactory.getInstance().getItemService();
diff --git a/src/main/java/org/dspace/pack/mets/METSPacker.java b/src/main/java/org/dspace/pack/mets/METSPacker.java
index 1c3358b..c56229d 100644
--- a/src/main/java/org/dspace/pack/mets/METSPacker.java
+++ b/src/main/java/org/dspace/pack/mets/METSPacker.java
@@ -15,7 +15,8 @@
import java.util.Iterator;
import java.util.List;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.dspace.authorize.AuthorizeException;
import org.dspace.content.Bitstream;
import org.dspace.content.Bundle;
@@ -50,7 +51,7 @@ public class METSPacker implements Packer
private CommunityService communityService = ContentServiceFactory.getInstance().getCommunityService();
private ItemService itemService = ContentServiceFactory.getInstance().getItemService();
- private Logger log = Logger.getLogger(METSPacker.class);
+ private Logger log = LogManager.getLogger();
/** The context to use */
private Context context;
diff --git a/src/test/java/org/dspace/TestContentServiceFactory.java b/src/test/java/org/dspace/TestContentServiceFactory.java
index 6d2cdfb..1c6d46a 100644
--- a/src/test/java/org/dspace/TestContentServiceFactory.java
+++ b/src/test/java/org/dspace/TestContentServiceFactory.java
@@ -31,8 +31,8 @@
import org.dspace.content.service.RelationshipService;
import org.dspace.content.service.RelationshipTypeService;
import org.dspace.content.service.SiteService;
-import org.dspace.content.service.SupervisedItemService;
import org.dspace.content.service.WorkspaceItemService;
+import org.dspace.eperson.service.SubscribeService;
/**
* A {@link ContentServiceFactory} which returns mock services
@@ -119,13 +119,13 @@ public InstallItemService getInstallItemService() {
}
@Override
- public SupervisedItemService getSupervisedItemService() {
- throw new UnsupportedOperationException();
+ public SiteService getSiteService() {
+ return siteService;
}
@Override
- public SiteService getSiteService() {
- return siteService;
+ public SubscribeService getSubscribeService() {
+ throw new UnsupportedOperationException();
}
@Override
diff --git a/src/test/java/org/dspace/TestDSpaceServicesFactory.java b/src/test/java/org/dspace/TestDSpaceServicesFactory.java
index 8e74a44..c250ba2 100644
--- a/src/test/java/org/dspace/TestDSpaceServicesFactory.java
+++ b/src/test/java/org/dspace/TestDSpaceServicesFactory.java
@@ -8,7 +8,6 @@
package org.dspace;
import org.dspace.kernel.ServiceManager;
-import org.dspace.services.CachingService;
import org.dspace.services.ConfigurationService;
import org.dspace.services.EmailService;
import org.dspace.services.EventService;
@@ -26,11 +25,6 @@ public class TestDSpaceServicesFactory extends DSpaceServicesFactory {
public static final String DSPACE_SERVICES_FACTORY = "dSpaceServicesFactory";
- @Override
- public CachingService getCachingService() {
- throw new UnsupportedOperationException();
- }
-
@Override
public ConfigurationService getConfigurationService() {
return new DSpace().getConfigurationService();
diff --git a/src/test/java/org/dspace/TestEPersonServiceFactory.java b/src/test/java/org/dspace/TestEPersonServiceFactory.java
index 27e6e46..399e766 100644
--- a/src/test/java/org/dspace/TestEPersonServiceFactory.java
+++ b/src/test/java/org/dspace/TestEPersonServiceFactory.java
@@ -15,7 +15,6 @@
import org.dspace.eperson.service.GroupService;
import org.dspace.eperson.service.RegistrationDataService;
import org.dspace.eperson.service.SubscribeService;
-import org.dspace.eperson.service.SupervisorService;
/**
* {@link EPersonServiceFactory} for testing
@@ -52,8 +51,4 @@ public SubscribeService getSubscribeService() {
throw new UnsupportedOperationException();
}
- @Override
- public SupervisorService getSupervisorService() {
- throw new UnsupportedOperationException();
- }
}
diff --git a/src/test/java/org/dspace/pack/bagit/BagItPackerTest.java b/src/test/java/org/dspace/pack/bagit/BagItPackerTest.java
index ad248da..2b94f30 100644
--- a/src/test/java/org/dspace/pack/bagit/BagItPackerTest.java
+++ b/src/test/java/org/dspace/pack/bagit/BagItPackerTest.java
@@ -42,7 +42,7 @@
/**
* Base class for all BagIt packing/unpacking tests. This performs initial setup so that the DSpaceKernel is not null
- * and so that some of the that are used through static contexts or have static initializers (e.g.
+ * and so that classes used through static contexts or have static initializers (e.g.
* {@link org.dspace.services.factory.DSpaceServicesFactory}, {@link org.dspace.core.Context}) can initialize and
* retrieve any classes which are necessary for basic operations.
*