Skip to content

Commit 7d07e91

Browse files
committed
Merge metafacture-runner
2 parents c7384d0 + d534845 commit 7d07e91

File tree

88 files changed

+20689
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+20689
-4
lines changed

.gitattributes

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414

1515
# Platform-specific scripts should always use
1616
# their native end-of-line markers:
17-
*.bat eol=crlf
18-
*.sh eol=lf
17+
*.bat text eol=crlf
18+
*.sh text eol=lf
1919

2020
# The batch script can only handle the config
2121
# properly if it uses crlf as end-of-line marker:
22-
src/main/config/java-options.conf eol=crlf
22+
metafacture-runner/src/main/config/java-options.conf text eol=crlf
2323

2424
# Denote all files that are truly binary and should not be modified:
2525
*.bz2 binary

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,27 @@ You can use Metafacture either as a stand-alone application or as a Java library
1818

1919
## Metafacture as a stand-alone application
2020

21-
As of version 2.0.0 the stand-alone application is no longer part of the core library package. The application package can now be found at [culturegraph/metafacture-runner](https://github.com/culturegraph/metafacture-runner). If you are only interested in running Flux scripts without doing any Java programming you should head over there.
21+
If you are only interested in running Flux scripts without doing any Java programming this is the way to go. The instructions assume that you are using a *nix-like shell.
22+
23+
1. Download the latest distribution package from the [metafacture-core/releases](https://github.com/culturegraph/metafacture-core/releases) page. Make sure that you do download a distribution package and _not_ a source code package.
24+
25+
2. Extract the downloaded archive:
26+
```bash
27+
$ tar xzf metafacture-runner-VERSION-dist.tar.gz
28+
```
29+
This will create a new directory containing a ready-to-use metafacture distribution.
30+
3. Change into the newly created directory:
31+
```bash
32+
$ cd metafacture-runner-VERSION
33+
```
34+
4. Run one of the example scripts:
35+
```bash
36+
$ ./flux.sh examples/read/marc21/read-marc21.flux
37+
```
38+
This example will print a number of marc21 records on standard out.
39+
40+
The _examples_ folder contains many more examples which provide a good starting point for learning metafacture. If you have any questions please join our [mailing list](http://lists.dnb.de/mailman/listinfo/metafacture) or use our issue-based discussion forum over at [metafacture-documentation](https://github.com/culturegraph/metafacture-documentation).
41+
2242

2343
## Using Metafacture as a Java libary
2444

metafacture-runner/pom.xml

Lines changed: 303 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,303 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<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">
3+
<modelVersion>4.0.0</modelVersion>
4+
5+
<parent>
6+
<groupId>org.metafacture</groupId>
7+
<artifactId>metafacture-core</artifactId>
8+
<version>5.0.0-SNAPSHOT</version>
9+
</parent>
10+
11+
<artifactId>metafacture-runner</artifactId>
12+
13+
<name>Metafacture Runner</name>
14+
<description>Standalone application for working with Flux and Metamorph scripts</description>
15+
16+
<scm>
17+
<connection>${project.parent.scm.connection}</connection>
18+
<developerConnection>${project.parent.scm.developerConnection}</developerConnection>
19+
<tag>${project.parent.scm.tag}</tag>
20+
<url>${project.parent.scm.url}</url>
21+
</scm>
22+
23+
<dependencies>
24+
<dependency>
25+
<groupId>org.metafacture</groupId>
26+
<artifactId>metafacture-framework</artifactId>
27+
<version>${project.version}</version>
28+
</dependency>
29+
30+
<dependency>
31+
<groupId>org.metafacture</groupId>
32+
<artifactId>metafacture-commons</artifactId>
33+
<version>${project.version}</version>
34+
</dependency>
35+
36+
<dependency>
37+
<groupId>org.metafacture</groupId>
38+
<artifactId>metafacture-flux</artifactId>
39+
<version>${project.version}</version>
40+
</dependency>
41+
42+
<!-- Metafacture module packages -->
43+
44+
<dependency>
45+
<groupId>org.metafacture</groupId>
46+
<artifactId>metafacture-biblio</artifactId>
47+
<version>${project.version}</version>
48+
</dependency>
49+
50+
<dependency>
51+
<groupId>org.metafacture</groupId>
52+
<artifactId>metafacture-csv</artifactId>
53+
<version>${project.version}</version>
54+
</dependency>
55+
56+
<dependency>
57+
<groupId>org.metafacture</groupId>
58+
<artifactId>metafacture-elasticsearch</artifactId>
59+
<version>${project.version}</version>
60+
</dependency>
61+
62+
<dependency>
63+
<groupId>org.metafacture</groupId>
64+
<artifactId>metafacture-files</artifactId>
65+
<version>${project.version}</version>
66+
</dependency>
67+
68+
<dependency>
69+
<groupId>org.metafacture</groupId>
70+
<artifactId>metafacture-flowcontrol</artifactId>
71+
<version>${project.version}</version>
72+
</dependency>
73+
74+
<dependency>
75+
<groupId>org.metafacture</groupId>
76+
<artifactId>metafacture-formatting</artifactId>
77+
<version>${project.version}</version>
78+
</dependency>
79+
80+
<dependency>
81+
<groupId>org.metafacture</groupId>
82+
<artifactId>metafacture-formeta</artifactId>
83+
<version>${project.version}</version>
84+
</dependency>
85+
86+
<dependency>
87+
<groupId>org.metafacture</groupId>
88+
<artifactId>metafacture-io</artifactId>
89+
<version>${project.version}</version>
90+
</dependency>
91+
92+
<dependency>
93+
<groupId>org.metafacture</groupId>
94+
<artifactId>metafacture-javaintegration</artifactId>
95+
<version>${project.version}</version>
96+
</dependency>
97+
98+
<dependency>
99+
<groupId>org.metafacture</groupId>
100+
<artifactId>metafacture-jdom</artifactId>
101+
<version>${project.version}</version>
102+
</dependency>
103+
104+
<dependency>
105+
<groupId>org.metafacture</groupId>
106+
<artifactId>metafacture-json</artifactId>
107+
<version>${project.version}</version>
108+
</dependency>
109+
110+
<dependency>
111+
<groupId>org.metafacture</groupId>
112+
<artifactId>metafacture-linkeddata</artifactId>
113+
<version>${project.version}</version>
114+
</dependency>
115+
116+
<dependency>
117+
<groupId>org.metafacture</groupId>
118+
<artifactId>metafacture-mangling</artifactId>
119+
<version>${project.version}</version>
120+
</dependency>
121+
122+
<dependency>
123+
<groupId>org.metafacture</groupId>
124+
<artifactId>metafacture-monitoring</artifactId>
125+
<version>${project.version}</version>
126+
</dependency>
127+
128+
<dependency>
129+
<groupId>org.metafacture</groupId>
130+
<artifactId>metafacture-plumbing</artifactId>
131+
<version>${project.version}</version>
132+
</dependency>
133+
134+
<dependency>
135+
<groupId>org.metafacture</groupId>
136+
<artifactId>metafacture-scripting</artifactId>
137+
<version>${project.version}</version>
138+
</dependency>
139+
140+
<dependency>
141+
<groupId>org.metafacture</groupId>
142+
<artifactId>metafacture-statistics</artifactId>
143+
<version>${project.version}</version>
144+
</dependency>
145+
146+
<dependency>
147+
<groupId>org.metafacture</groupId>
148+
<artifactId>metafacture-strings</artifactId>
149+
<version>${project.version}</version>
150+
</dependency>
151+
152+
<dependency>
153+
<groupId>org.metafacture</groupId>
154+
<artifactId>metafacture-triples</artifactId>
155+
<version>${project.version}</version>
156+
</dependency>
157+
158+
<dependency>
159+
<groupId>org.metafacture</groupId>
160+
<artifactId>metafacture-xml</artifactId>
161+
<version>${project.version}</version>
162+
</dependency>
163+
164+
<dependency>
165+
<groupId>org.metafacture</groupId>
166+
<artifactId>metamorph</artifactId>
167+
<version>${project.version}</version>
168+
</dependency>
169+
170+
<!-- In a perfect world the slf4j binding would be a
171+
provided dependency so that the user can replace
172+
it easily with a different binding. However, slf4j
173+
does not use the context class loader for loading
174+
its binding but the same class loader which was
175+
used to load the classes of the slf4j-api. Until
176+
a solution is found for this problem, the binding
177+
need to be placed on the class path. -->
178+
<dependency>
179+
<groupId>org.slf4j</groupId>
180+
<artifactId>slf4j-log4j12</artifactId>
181+
<version>1.7.21</version>
182+
</dependency>
183+
184+
<!-- The following dependencies are placed in the "provided"
185+
scope to prevent them from being included in the class
186+
path but still have them available for building the
187+
distribution assembly.
188+
The reason for this is that an appropriate implementation
189+
for jndi depends on the runtime environment and
190+
should be chosen by the user of the package and not the
191+
package implementer. However, we also attempt to build
192+
a distribution package which should include everything
193+
that is required for metafacture-runner/Flux to work out
194+
of the box. By including the dependencies in the assembly
195+
without putting them on the class path, the user can
196+
replace them easily with other implementations if
197+
necessary. -->
198+
<dependency>
199+
<groupId>simple-jndi</groupId>
200+
<artifactId>simple-jndi</artifactId>
201+
<version>0.11.4.1</version>
202+
<scope>provided</scope>
203+
</dependency>
204+
205+
<dependency>
206+
<!-- Required for connection pooling with simple-jndi -->
207+
<groupId>commons-dbcp</groupId>
208+
<artifactId>commons-dbcp</artifactId>
209+
<version>1.4</version>
210+
<scope>provided</scope>
211+
</dependency>
212+
</dependencies>
213+
214+
<build>
215+
<resources>
216+
<resource>
217+
<directory>src/main/resources</directory>
218+
<filtering>true</filtering>
219+
<excludes>
220+
<exclude>assembly-resources/**/*</exclude>
221+
</excludes>
222+
</resource>
223+
</resources>
224+
225+
<plugins>
226+
<plugin>
227+
<groupId>org.apache.maven.plugins</groupId>
228+
<artifactId>maven-jar-plugin</artifactId>
229+
<configuration>
230+
<archive>
231+
<manifest>
232+
<addClasspath>true</addClasspath>
233+
<!-- Configures the classpath prefix. This configuration option is
234+
used to specify that all needed libraries are found under lib/ directory. -->
235+
<classpathPrefix>lib/</classpathPrefix>
236+
<!-- Specifies the main class of the application -->
237+
<mainClass>org.metafacture.runner.Flux</mainClass>
238+
</manifest>
239+
<manifestEntries>
240+
<git-commit>${buildNumber}</git-commit>
241+
</manifestEntries>
242+
</archive>
243+
</configuration>
244+
</plugin>
245+
246+
<plugin>
247+
<groupId>org.codehaus.mojo</groupId>
248+
<artifactId>buildnumber-maven-plugin</artifactId>
249+
<version>1.4</version>
250+
<executions>
251+
<execution>
252+
<phase>validate</phase>
253+
<goals>
254+
<goal>create</goal>
255+
</goals>
256+
</execution>
257+
</executions>
258+
</plugin>
259+
260+
<plugin>
261+
<artifactId>maven-dependency-plugin</artifactId>
262+
<version>2.10</version>
263+
<executions>
264+
<execution>
265+
<id>unpack-schemata</id>
266+
<phase>generate-resources</phase>
267+
<goals>
268+
<goal>unpack</goal>
269+
</goals>
270+
<configuration>
271+
<artifactItems>
272+
<artifactItem>
273+
<groupId>org.metafacture</groupId>
274+
<artifactId>metamorph</artifactId>
275+
</artifactItem>
276+
</artifactItems>
277+
<includes>schemata/**/*</includes>
278+
</configuration>
279+
</execution>
280+
</executions>
281+
</plugin>
282+
283+
<plugin>
284+
<artifactId>maven-assembly-plugin</artifactId>
285+
<version>3.0.0</version>
286+
<executions>
287+
<execution>
288+
<id>create-distribution-package</id>
289+
<phase>package</phase>
290+
<goals>
291+
<goal>single</goal>
292+
</goals>
293+
<configuration>
294+
<descriptors>
295+
<descriptor>/src/main/assembly/assembly.xml</descriptor>
296+
</descriptors>
297+
</configuration>
298+
</execution>
299+
</executions>
300+
</plugin>
301+
</plugins>
302+
</build>
303+
</project>

0 commit comments

Comments
 (0)