You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by rv...@apache.org on 2015/06/29 14:14:44 UTC
jena git commit: Fix script usage in dev environment (JENA-977)
Repository: jena
Updated Branches:
refs/heads/JENA-977 7770596bc -> 3c59213e2
Fix script usage in dev environment (JENA-977)
This commit enhances the distribution module to make it much easier to
use in dev environments. The dependency plugin is used with the
copy-dependencies goal to produce the lib/ directory during a package
phase and then clean plugin is configured to clean the lib/ directory
during a clean. This means that developers can now set JENA_HOME to the
distribution module directory in their working copy and provided they
have done a mvn package all the scripts should work.
This also allows the temporary hacks in the new tdbloader2 scripts to be
removed so these scripts now run against Jena 3 libraries and don't need
the path to the new scripts to be hacked.
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/3c59213e
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/3c59213e
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/3c59213e
Branch: refs/heads/JENA-977
Commit: 3c59213e273711836628d9d030df23dac142ee1b
Parents: 7770596
Author: Rob Vesse <rv...@apache.org>
Authored: Mon Jun 29 13:12:03 2015 +0100
Committer: Rob Vesse <rv...@apache.org>
Committed: Mon Jun 29 13:12:03 2015 +0100
----------------------------------------------------------------------
apache-jena/bin/tdbloader2 | 12 +++---
apache-jena/bin/tdbloader2data | 2 -
apache-jena/bin/tdbloader2index | 2 -
apache-jena/pom.xml | 78 +++++++++++++++++++++++++++---------
4 files changed, 64 insertions(+), 30 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/3c59213e/apache-jena/bin/tdbloader2
----------------------------------------------------------------------
diff --git a/apache-jena/bin/tdbloader2 b/apache-jena/bin/tdbloader2
index 9508031..55a0faf 100755
--- a/apache-jena/bin/tdbloader2
+++ b/apache-jena/bin/tdbloader2
@@ -198,19 +198,17 @@ DATE="+%H:%M:%S"
log "-- TDB Bulk Loader Start"
TIME1="$(date +%s)"
-TOOL_DIR=$JENA_HOME/bin/
-# DEV - Following is just for debugging
-TOOL_DIR=
+TOOL_DIR="$JENA_HOME/bin"
case "$PHASE" in
all)
- exec "${TOOL_DIR}tdbloader2data" $COMMON_ARGS --loc "$LOC" "$@"
- exec "${TOOL_DIR}tdbloader2index" $COMMON_ARGS --loc "$LOC"
+ exec "${TOOL_DIR}/tdbloader2data" $COMMON_ARGS --loc "$LOC" "$@"
+ exec "${TOOL_DIR}/tdbloader2index" $COMMON_ARGS --loc "$LOC"
;;
data)
- exec "${TOOL_DIR}tdbloader2data" $COMMON_ARGS --loc "$LOC" "$@"
+ exec "${TOOL_DIR}/tdbloader2data" $COMMON_ARGS --loc "$LOC" "$@"
;;
index)
- exec "${TOOL_DIR}tdbloader2index" $COMMON_ARGS --loc "$LOC"
+ exec "${TOOL_DIR}/tdbloader2index" $COMMON_ARGS --loc "$LOC"
;;
*)
echo "Unrecognized phase $PHASE" 1>&2
http://git-wip-us.apache.org/repos/asf/jena/blob/3c59213e/apache-jena/bin/tdbloader2data
----------------------------------------------------------------------
diff --git a/apache-jena/bin/tdbloader2data b/apache-jena/bin/tdbloader2data
index efb590a..eaf9069 100755
--- a/apache-jena/bin/tdbloader2data
+++ b/apache-jena/bin/tdbloader2data
@@ -83,8 +83,6 @@ function debug() {
DATE="+%H:%M:%S"
PKG=org.apache.jena.tdb.store.bulkloader2
-#DEV - Allows use against Jena 2 API
-PKG=com.hp.hpl.jena.tdb.store.bulkloader2
# Process Arguments
LOC=
http://git-wip-us.apache.org/repos/asf/jena/blob/3c59213e/apache-jena/bin/tdbloader2index
----------------------------------------------------------------------
diff --git a/apache-jena/bin/tdbloader2index b/apache-jena/bin/tdbloader2index
index 971b824..f506df9 100755
--- a/apache-jena/bin/tdbloader2index
+++ b/apache-jena/bin/tdbloader2index
@@ -90,8 +90,6 @@ function getSize() {
DATE="+%H:%M:%S"
PKG=org.apache.jena.tdb.store.bulkloader2
-#DEV - Allows use against Jena 2 API
-PKG=com.hp.hpl.jena.tdb.store.bulkloader2
# Process Arguments
LOC=
http://git-wip-us.apache.org/repos/asf/jena/blob/3c59213e/apache-jena/pom.xml
----------------------------------------------------------------------
diff --git a/apache-jena/pom.xml b/apache-jena/pom.xml
index b718501..cd91792 100644
--- a/apache-jena/pom.xml
+++ b/apache-jena/pom.xml
@@ -16,7 +16,8 @@
limitations under the License.
-->
-<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/maven-v4_0_0.xsd">
+<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/maven-v4_0_0.xsd">
<!-- Build the Jena download file.
Assumes it is run as part of the module build (not run standalone)
@@ -39,7 +40,7 @@
<artifactId>jena-parent</artifactId>
<version>14-SNAPSHOT</version>
<relativePath>../jena-parent</relativePath>
- </parent>
+ </parent>
<organization>
<name>Apache Jena</name>
@@ -123,23 +124,62 @@
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
- <configuration>
- <tarLongFileMode>gnu</tarLongFileMode>
- </configuration>
- <executions>
- <execution>
- <id>create-jena-download</id>
- <phase>package</phase>
- <goals><goal>single</goal></goals>
- <configuration>
- <appendAssemblyId>false</appendAssemblyId>
- <descriptors>
- <descriptor>assembly-jena-zip.xml</descriptor>
- </descriptors>
- <tarLongFileFormat>gnu</tarLongFileFormat>
- </configuration>
- </execution>
- </executions>
+ <configuration>
+ <tarLongFileMode>gnu</tarLongFileMode>
+ </configuration>
+ <executions>
+ <execution>
+ <id>create-jena-download</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <appendAssemblyId>false</appendAssemblyId>
+ <descriptors>
+ <descriptor>assembly-jena-zip.xml</descriptor>
+ </descriptors>
+ <tarLongFileFormat>gnu</tarLongFileFormat>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <!--
+ Use the dependencies plugin to copy the dependencies into the lib/ directory which makes the scripts work in dev enivronments
+ -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-libs-for-scripts</id>
+ <phase>package</phase>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <configuration>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ <includeScope>runtime</includeScope>
+ <includeTypes>jar</includeTypes>
+ <outputDirectory>lib/</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <!--
+ As we copy dependencies into lib/ to make scripts work in dev environments we also need to clean up that directory
+ -->
+ <plugin>
+ <artifactId>maven-clean-plugin</artifactId>
+ <configuration>
+ <filesets>
+ <fileset>
+ <directory>lib/</directory>
+ </fileset>
+ </filesets>
+ </configuration>
</plugin>
</plugins>
</build>