Skip to content
Snippets Groups Projects
Commit 5bf99ddb authored by Andreas Romeyke's avatar Andreas Romeyke
Browse files

- added META-INF

- added new target to generate JAR-file
- fixed Logger
parent 1569b44c
No related branches found
No related tags found
No related merge requests found
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: root
Build-Jdk: 1.6.0_30
Hudson-Build-Number: 367
Hudson-Project: Rosetta-3.2.1_Nightly
Hudson-Version: 1.500
Jenkins-Build-Number: 367
Jenkins-Project: Rosetta-3.2.1_Nightly
Jenkins-Version: 1.500
#Generated by Maven
#Tue Oct 22 15:44:06 IST 2013
version=3.2.1
groupId=com.exlibris.dps
artifactId=dps-plugins
This diff is collapsed.
...@@ -28,7 +28,7 @@ SOURCES=java/org/slub/rosetta/dps/repository/plugin/storage/nfs/SLUBStoragePlugi ...@@ -28,7 +28,7 @@ SOURCES=java/org/slub/rosetta/dps/repository/plugin/storage/nfs/SLUBStoragePlugi
OBJS=$(SOURCES:.java=.class) OBJS=$(SOURCES:.java=.class)
all: $(OBJS) all: SLUBStoragePlugin.jar
help: help:
@echo "erzeugt Storage-Plugin für Rosetta von Exlibris" @echo "erzeugt Storage-Plugin für Rosetta von Exlibris"
...@@ -37,12 +37,8 @@ help: ...@@ -37,12 +37,8 @@ help:
@echo "'compile' erzeugt ein JAR-File und ein Bash-Script welches das Java-Programm" @echo "'compile' erzeugt ein JAR-File und ein Bash-Script welches das Java-Programm"
@echo "aufruft." @echo "aufruft."
jarclean: jarclean:
@rm -Rf \ @rm -Rf build
com/ \
org/ gov/ srw/ uk/ nbnDe11112004033116 PLUGIN_INF repackage \
schemaorg_apache_xmlbeans META-INF NOTICE.txt \
dnx_profile.xls ExLibMessageFile.properties LICENSE.txt manifest.txt
test: $(OBJS) test: $(OBJS)
java -cp ${CLASSPATH}:$(JUNITCLASSPATH) org.junit.runner.JUnitCore org.slub.rosetta.dps.repository.plugin.storage.nfs.testSLUBStoragePlugin java -cp ${CLASSPATH}:$(JUNITCLASSPATH) org.junit.runner.JUnitCore org.slub.rosetta.dps.repository.plugin.storage.nfs.testSLUBStoragePlugin
...@@ -50,6 +46,7 @@ test: $(OBJS) ...@@ -50,6 +46,7 @@ test: $(OBJS)
clean: jarclean clean: jarclean
@rm -Rf doc/ @rm -Rf doc/
find ./ -name "*.class" -exec rm -f \{\} \; find ./ -name "*.class" -exec rm -f \{\} \;
@rm -Rf SLUBStoragePlugin.jar
distclean: clean distclean: clean
find ./ -name "*~" -exec rm -f \{\} \; find ./ -name "*~" -exec rm -f \{\} \;
...@@ -77,6 +74,13 @@ distclean: clean ...@@ -77,6 +74,13 @@ distclean: clean
schemaorg_apache_xmlbeans META-INF NOTICE.txt \ schemaorg_apache_xmlbeans META-INF NOTICE.txt \
dnx_profile.xls ExLibMessageFile.properties LICENSE.txt manifest.txt dnx_profile.xls ExLibMessageFile.properties LICENSE.txt manifest.txt
SLUBStoragePlugin.jar: $(OBJS)
@mkdir build;
@cp -r PLUGIN-INF/ build/
@cp -r META-INF/ build/
@cd java; find ./ -name "*.class" -print -exec cp --parents -r \{\} $(PWD)/build \; ; cd ..
@cd build; ${JAVAPATH}/jar cfv ../$@ ./* ; cd ..
%.class: %.java %.class: %.java
${JAVAPATH}/javac -classpath ${CLASSPATH}:${JUNITCLASSPATH} -Xlint:deprecation $< ${JAVAPATH}/javac -classpath ${CLASSPATH}:${JUNITCLASSPATH} -Xlint:deprecation $<
......
...@@ -23,7 +23,7 @@ import com.exlibris.digitool.infrastructure.utils.Checksummer; ...@@ -23,7 +23,7 @@ import com.exlibris.digitool.infrastructure.utils.Checksummer;
*/ */
public class SLUBStoragePlugin extends NFSStoragePlugin { public class SLUBStoragePlugin extends NFSStoragePlugin {
private static final String DIR_ROOT = "DIR_ROOT"; private static final String DIR_ROOT = "DIR_ROOT";
private static final ExLogger log = ExLogger.getExLogger(NFSStoragePlugin.class); private static final ExLogger log = ExLogger.getExLogger(SLUBStoragePlugin.class);
public SLUBStoragePlugin() { public SLUBStoragePlugin() {
super(); super();
} }
...@@ -57,13 +57,13 @@ public class SLUBStoragePlugin extends NFSStoragePlugin { ...@@ -57,13 +57,13 @@ public class SLUBStoragePlugin extends NFSStoragePlugin {
// get IE PID by calling IE-DNX record and search for ""internalIdentifierType" == "PID" // get IE PID by calling IE-DNX record and search for ""internalIdentifierType" == "PID"
DnxDocument iedoc = storedEntityMetaData.getIeDnx(); DnxDocument iedoc = storedEntityMetaData.getIeDnx();
String iepid = iedoc.getSectionKeyValue("internalIdentifierType", "PID"); String iepid = iedoc.getSectionKeyValue("internalIdentifierType", "PID");
log.debug("SLUBStoragePlugin iepid=" + iepid); log.error("SLUBStoragePlugin iepid=" + iepid);
String datestring = iedoc.getSectionKeyValue("objectCharacteristics", "creationDate"); String datestring = iedoc.getSectionKeyValue("objectCharacteristics", "creationDate");
Calendar date = Calendar.getInstance(); Calendar date = Calendar.getInstance();
// date: 2014-01-15 14:28:01 // date: 2014-01-15 14:28:01
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd HH:mm:ss"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd HH:mm:ss");
date.setTime(sdf.parse(datestring)); date.setTime(sdf.parse(datestring));
log.debug("SLUBStoragePlugin creation Date read=" + datestring + " parsed=" + date.toString()); log.error("SLUBStoragePlugin creation Date read=" + datestring + " parsed=" + date.toString());
relativeDirectoryPath = relativeDirectoryPath + new SimpleDateFormat("yyyy").format(date); relativeDirectoryPath = relativeDirectoryPath + new SimpleDateFormat("yyyy").format(date);
relativeDirectoryPath = relativeDirectoryPath + File.separator; relativeDirectoryPath = relativeDirectoryPath + File.separator;
relativeDirectoryPath = relativeDirectoryPath + new SimpleDateFormat("MM").format(date); relativeDirectoryPath = relativeDirectoryPath + new SimpleDateFormat("MM").format(date);
...@@ -72,7 +72,7 @@ public class SLUBStoragePlugin extends NFSStoragePlugin { ...@@ -72,7 +72,7 @@ public class SLUBStoragePlugin extends NFSStoragePlugin {
relativeDirectoryPath = relativeDirectoryPath + File.separator; relativeDirectoryPath = relativeDirectoryPath + File.separator;
relativeDirectoryPath = relativeDirectoryPath + iepid; relativeDirectoryPath = relativeDirectoryPath + iepid;
relativeDirectoryPath = relativeDirectoryPath + File.separator; relativeDirectoryPath = relativeDirectoryPath + File.separator;
log.debug("SLUBStoragePlugin relativeDirectoryPath=" + relativeDirectoryPath); log.error("SLUBStoragePlugin relativeDirectoryPath=" + relativeDirectoryPath);
return relativeDirectoryPath; return relativeDirectoryPath;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment