From 36e04fba9526213b1c59f3ecefd1e81ec39c7d9c Mon Sep 17 00:00:00 2001 From: Pascal-Nicolas Becker Date: Sat, 25 May 2019 11:53:02 +0200 Subject: [PATCH] DS-4260: Remove non-existing command from oai harvester's help --- .../src/main/java/org/dspace/app/harvest/Harvest.java | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/dspace-api/src/main/java/org/dspace/app/harvest/Harvest.java b/dspace-api/src/main/java/org/dspace/app/harvest/Harvest.java index 3b324f2763..0ae992d26e 100644 --- a/dspace-api/src/main/java/org/dspace/app/harvest/Harvest.java +++ b/dspace-api/src/main/java/org/dspace/app/harvest/Harvest.java @@ -60,7 +60,6 @@ public class Harvest { options.addOption("p", "purge", false, "delete all items in the collection"); options.addOption("r", "run", false, "run the standard harvest procedure"); options.addOption("g", "ping", false, "test the OAI server and set"); - options.addOption("o", "once", false, "run the harvest procedure with specified parameters"); options.addOption("s", "setup", false, "Set the collection up for harvesting"); options.addOption("S", "start", false, "start the harvest loop"); options.addOption("R", "reset", false, "reset harvest status on all collections"); @@ -97,9 +96,6 @@ public class Harvest { HelpFormatter myhelp = new HelpFormatter(); myhelp.printHelp("Harvest\n", options); System.out.println("\nPING OAI server: Harvest -g -a oai_source -i oai_set_id"); - System.out.println( - "RUNONCE harvest with arbitrary options: Harvest -o -e eperson -c collection -t harvest_type -a " + - "oai_source -i oai_set_id -m metadata_format"); System.out.println( "SETUP a collection for harvesting: Harvest -s -c collection -t harvest_type -a oai_source -i " + "oai_set_id -m metadata_format"); @@ -125,9 +121,6 @@ public class Harvest { if (line.hasOption('g')) { command = "ping"; } - if (line.hasOption('o')) { - command = "runOnce"; - } if (line.hasOption('S')) { command = "start"; } @@ -246,6 +239,10 @@ public class Harvest { } pingResponder(oaiSource, oaiSetID, metadataKey); + } else { + System.out.println("Error - your command '" + command + "' was not recoginzed properly"); + System.out.println(" (run with -h flag for details)"); + System.exit(1); } }