Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Changed build process to use Maven
To Rebuild: mvn clean package
To Run: same as before, must rebuild first though.
  • Loading branch information
peterdietz committed Jul 3, 2014
1 parent 5c6f3d1 commit fae8c56
Show file tree
Hide file tree
Showing 12 changed files with 61 additions and 30 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -10,9 +10,12 @@ build/
dist/
out/
*.class
target

#Local stash for .jars
lib-files/

#Created Output, only really used if you build the sample_data.
SimpleArchiveFormat/

.DS_Store
11 changes: 6 additions & 5 deletions README
Expand Up @@ -3,7 +3,7 @@ SimpleArchiveFormat Builder

A standalone Java tool to build Simple Archive Format packages which are used to easily ingest items into a document management system, such as an institutional repository like DSpace. The use case satisfied by this SAFBuilder is that someone has a spreadsheet filled with metadata as well as content files such as images and PDFs and wishes to then bulk import this into a document management system. Users find it easy to create spreadsheets, this tool makes it easy to then import it into their system.

Author: Peter Dietz - The Ohio State University Libraries
Author: Peter Dietz - [Longsight](http://longsight.com)

[Wiki entry on Simple Archive Format Packager](https://wiki.duraspace.org/display/DSPACE/Simple+Archive+Format+Packager "Simple Archive Format Package wiki entry")

Expand Down Expand Up @@ -35,18 +35,19 @@ Instructions
The commands below will: check out the code from Git, download the external java libraries used to make the tool, compile the source code, and execute it. The exact commands below are specific to Linux, other users should be able to deduce what it means.
git clone git://github.com/peterdietz/SAFBuilder.git
cd SAFBuilder
javac -classpath javacsv-2.0.jar:commons-io-1.4.jar:xmlwriter-2.2.jar src/edu/osu/kb/batch/*.java -d classes
java -cp classes edu.osu.kb.batch.BatchProcess
mvn clean package
./safbuilder.sh

With no arguments the system will print out the help.
> USAGE: BatchProcess /path/to/directory metadatafilename.csv
> Hint -- directory: Use absolute path and no trailing slashes
> Hint -- metadatafilename: needs to be in the directory, as do the content files

Included is some sample data to get started using the tool.
java -cp classes:javacsv-2.0.jar:commons-io-1.4.jar:xmlwriter-2.2.jar edu.osu.kb.batch.BatchProcess /home/peter/NetBeansProjects/SAFBuilder/src/edu/osu/kb/sample_data AAA_batch-metadata.csv
./safbuilder src/sample_data AAA_batch-metadata.csv

Running the tool against the sample data will create a directory "SimpleArchiveFormat" in the directory you previously specified. In this example it is: /home/peter/NetBeansProjects/SAFBuilder/src/edu/kb/sample_data/SimpleArchiveFormat, and the contents of the directory SimpleArchiveFormat is of the format of what was described above in the "Output" section.
The output is a directory "SimpleArchiveFormat" in the directory you previously specified.
There will also be some on-screen text, usually indicating what it encountered.

Additionally, there are installation guides for installing the SAFBuilder for your Operating System (Windows + Linux).
https://github.com/peterdietz/SAFBuilder/wiki
Empty file removed classes/.gitignore
Empty file.
Binary file removed commons-io-1.4.jar
Binary file not shown.
Binary file removed commons-logging-1.1.1.jar
Binary file not shown.
Binary file removed commons-vfs-1.0.jar
Binary file not shown.
Binary file removed javacsv-2.0.jar
Binary file not shown.
50 changes: 50 additions & 0 deletions pom.xml
@@ -0,0 +1,50 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>safbuilder</groupId>
<artifactId>safbuilder</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>safbuilder</name>
<url>http://maven.apache.org</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>commons-vfs</groupId>
<artifactId>commons-vfs</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>net.sourceforge.javacsv</groupId>
<artifactId>javacsv</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>xmlwriter</groupId>
<artifactId>xmlwriter</artifactId>
<version>2.2.2</version>
</dependency>
</dependencies>
</project>
22 changes: 0 additions & 22 deletions recompile.bat

This file was deleted.

2 changes: 0 additions & 2 deletions recompile.sh

This file was deleted.

3 changes: 2 additions & 1 deletion safbuilder.sh
@@ -1 +1,2 @@
java -cp classes:javacsv-2.0.jar:commons-io-1.4.jar:xmlwriter-2.2.jar:commons-vfs-1.0.jar:commons-logging-1.1.1.jar safbuilder.BatchProcess $1 $2
#!/bin/sh
mvn --quiet exec:java -Dexec.mainClass="safbuilder.BatchProcess" -Dexec.args="$1 $2"
Binary file removed xmlwriter-2.2.jar
Binary file not shown.

0 comments on commit fae8c56

Please sign in to comment.