# IGNITE-32 Added Schema Load Utility to binary build.

Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/ba9336cb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/ba9336cb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/ba9336cb

Branch: refs/heads/ignite-96
Commit: ba9336cb52bfbe3ec0aca42f99900fea1b4d353f
Parents: 62ae0d7
Author: AKuznetsov <akuznet...@gridgain.com>
Authored: Sun Feb 8 09:27:16 2015 +0700
Committer: AKuznetsov <akuznet...@gridgain.com>
Committed: Sun Feb 8 09:27:16 2015 +0700

----------------------------------------------------------------------
 assembly/dependencies-schema-load.xml |  56 ++++++++++++++
 bin/ignite-schema-load.bat            | 116 +++++++++++++++++++++++++++++
 bin/ignite-schema-load.sh             |  78 +++++++++++++++++++
 pom.xml                               |  21 ++++++
 4 files changed, 271 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ba9336cb/assembly/dependencies-schema-load.xml
----------------------------------------------------------------------
diff --git a/assembly/dependencies-schema-load.xml 
b/assembly/dependencies-schema-load.xml
new file mode 100644
index 0000000..d741237
--- /dev/null
+++ b/assembly/dependencies-schema-load.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<assembly 
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2";
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+          
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
+          http://maven.apache.org/xsd/assembly-1.1.2.xsd";>
+    <id>dependencies-visor-console</id>
+
+    <formats>
+        <format>dir</format>
+    </formats>
+
+    <includeBaseDirectory>false</includeBaseDirectory>
+
+    <moduleSets>
+        <moduleSet>
+            <includes>
+                <include>org.apache.ignite:ignite-schema-load</include>
+            </includes>
+            <sources>
+                <includeModuleDirectory>false</includeModuleDirectory>
+                <fileSets>
+                    <fileSet>
+                        <directory>target</directory>
+                        <outputDirectory>/schema-load</outputDirectory>
+                        <includes>
+                            <include>*.jar</include>
+                        </includes>
+                        <excludes>
+                            <exclude>*-tests.jar</exclude>
+                            <exclude>*-javadoc.jar</exclude>
+                            <exclude>*-sources.jar</exclude>
+                        </excludes>
+                    </fileSet>
+                </fileSets>
+            </sources>
+        </moduleSet>
+    </moduleSets>
+</assembly>

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ba9336cb/bin/ignite-schema-load.bat
----------------------------------------------------------------------
diff --git a/bin/ignite-schema-load.bat b/bin/ignite-schema-load.bat
new file mode 100644
index 0000000..c753826
--- /dev/null
+++ b/bin/ignite-schema-load.bat
@@ -0,0 +1,116 @@
+::
+:: Licensed to the Apache Software Foundation (ASF) under one or more
+:: contributor license agreements.  See the NOTICE file distributed with
+:: this work for additional information regarding copyright ownership.
+:: The ASF licenses this file to You under the Apache License, Version 2.0
+:: (the "License"); you may not use this file except in compliance with
+:: the License.  You may obtain a copy of the License at
+::
+::      http://www.apache.org/licenses/LICENSE-2.0
+::
+:: Unless required by applicable law or agreed to in writing, software
+:: distributed under the License is distributed on an "AS IS" BASIS,
+:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+:: See the License for the specific language governing permissions and
+:: limitations under the License.
+::
+
+::
+:: Ignite Schema Load Utility.
+::
+
+@echo off
+
+if "%OS%" == "Windows_NT"  setlocal
+
+:: Check JAVA_HOME.
+if defined JAVA_HOME  goto checkJdk
+    echo %0, ERROR:
+    echo JAVA_HOME environment variable is not found.
+    echo Please point JAVA_HOME variable to location of JDK 1.7 or JDK 1.8.
+    echo You can also download latest JDK at http://java.com/download.
+goto error_finish
+
+:checkJdk
+:: Check that JDK is where it should be.
+if exist "%JAVA_HOME%\bin\java.exe" goto checkJdkVersion
+    echo %0, ERROR:
+    echo JAVA is not found in JAVA_HOME=%JAVA_HOME%.
+    echo Please point JAVA_HOME variable to installation of JDK 1.7 or JDK 1.8.
+    echo You can also download latest JDK at http://java.com/download.
+goto error_finish
+
+:checkJdkVersion
+"%JAVA_HOME%\bin\java.exe" -version 2>&1 | findstr "1\.[78]\." > nul
+if %ERRORLEVEL% equ 0 goto checkIgniteHome1
+    echo %0, ERROR:
+    echo The version of JAVA installed in %JAVA_HOME% is incorrect.
+    echo Please point JAVA_HOME variable to installation of JDK 1.7 or JDK 1.8.
+    echo You can also download latest JDK at http://java.com/download.
+goto error_finish
+
+:: Check IGNITE_HOME.
+:checkIgniteHome1
+if defined IGNITE_HOME goto checkIgniteHome2
+    pushd "%~dp0"/..
+    set IGNITE_HOME=%CD%
+    popd
+
+:checkIgniteHome2
+:: Strip double quotes from IGNITE_HOME
+set IGNITE_HOME=%IGNITE_HOME:"=%
+
+:: remove all trailing slashes from IGNITE_HOME.
+if %IGNITE_HOME:~-1,1% == \ goto removeTrailingSlash
+if %IGNITE_HOME:~-1,1% == / goto removeTrailingSlash
+goto checkIgniteHome3
+
+:removeTrailingSlash
+set IGNITE_HOME=%IGNITE_HOME:~0,-1%
+goto checkIgniteHome2
+
+:checkIgniteHome3
+if exist "%IGNITE_HOME%\config" goto checkIgniteHome4
+    echo %0, ERROR: Ignite installation folder is not found or IGNITE_HOME 
environment variable is not valid.
+    echo Please create IGNITE_HOME environment variable pointing to location of
+    echo Ignite installation folder.
+    goto error_finish
+
+:checkIgniteHome4
+
+::
+:: Set SCRIPTS_HOME - base path to scripts.
+::
+set SCRIPTS_HOME=%IGNITE_HOME%\bin
+
+:: Remove trailing spaces
+for /l %%a in (1,1,31) do if /i "%SCRIPTS_HOME:~-1%" == " " set 
SCRIPTS_HOME=%SCRIPTS_HOME:~0,-1%
+
+if /i "%SCRIPTS_HOME%\" == "%~dp0" goto run
+    echo %0, WARN: IGNITE_HOME environment variable may be pointing to wrong 
folder: %IGNITE_HOME%
+
+:run
+
+::
+:: Set IGNITE_LIBS
+::
+call "%SCRIPTS_HOME%\include\setenv.bat"
+call "%SCRIPTS_HOME%\include\target-classpath.bat" &:: Will be removed in 
release.
+
+::
+:: Set CLASS PATH
+::
+set 
CP=%JAVA_HOME%\jre\lib\jfxrt.jar;%IGNITE_LIBS%;%IGNITE_HOME%\bin\include\schema-load
+
+::
+:: JVM options. See 
http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp for more details.
+::
+:: ADD YOUR/CHANGE ADDITIONAL OPTIONS HERE
+::
+if "%JVM_OPTS%" == "" set JVM_OPTS=-Xms256m -Xmx1g
+
+"%JAVA_HOME%\bin\java.exe" %JVM_OPTS% -cp "%CP%" 
org.apache.ignite.schema.ui.SchemaLoadApp
+
+:error_finish
+
+goto :eof

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ba9336cb/bin/ignite-schema-load.sh
----------------------------------------------------------------------
diff --git a/bin/ignite-schema-load.sh b/bin/ignite-schema-load.sh
new file mode 100644
index 0000000..9840d0c
--- /dev/null
+++ b/bin/ignite-schema-load.sh
@@ -0,0 +1,78 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+#
+# Ignite Schema Load Utility.
+#
+
+#
+# Import common functions.
+#
+if [ "${IGNITE_HOME}" = "" ];
+    then IGNITE_HOME_TMP="$(dirname "$(cd "$(dirname "$0")"; "pwd")")";
+    else IGNITE_HOME_TMP=${IGNITE_HOME};
+fi
+
+#
+# Set SCRIPTS_HOME - base path to scripts.
+#
+SCRIPTS_HOME="${IGNITE_HOME_TMP}/bin"
+
+source "${SCRIPTS_HOME}"/include/functions.sh
+
+#
+# Discover path to Java executable and check it's version.
+#
+checkJava
+
+#
+# Discover IGNITE_HOME environment variable.
+#
+setIgniteHome
+
+#
+# Set IGNITE_LIBS.
+#
+. "${SCRIPTS_HOME}"/include/setenv.sh
+. "${SCRIPTS_HOME}"/include/target-classpath.sh # Will be removed in release.
+CP="${IGNITE_LIBS}"
+
+# Mac OS specific support to display correct name in the dock.
+osname=`uname`
+
+if [ "${DOCK_OPTS}" == "" ]; then
+    DOCK_OPTS="-Xdock:name=Ignite Schema Load Utility"
+fi
+
+#
+# JVM options. See 
http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp for more details.
+#
+# ADD YOUR/CHANGE ADDITIONAL OPTIONS HERE
+#
+if [ -z "$JVM_OPTS" ] ; then
+    JVM_OPTS="-Xms256m -Xmx1g"
+fi
+
+case $osname in
+    Darwin*)
+        "$JAVA" ${JVM_OPTS} "${DOCK_OPTS}" -cp "${CP}" 
org.apache.ignite.schema.ui.SchemaLoadApp
+        ;;
+   *)
+        "$JAVA" ${JVM_OPTS} -cp "${CP}" 
org.apache.ignite.schema.ui.SchemaLoadApp
+        ;;
+esac

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ba9336cb/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index ff39cfe..7f64c20 100644
--- a/pom.xml
+++ b/pom.xml
@@ -444,6 +444,23 @@
                     </execution>
 
                     <execution>
+                        <id>dependencies-schema-load</id>
+                        <phase>prepare-package</phase>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                        <configuration>
+                            <descriptors>
+                                
<descriptor>assembly/dependencies-schema-load.xml</descriptor>
+                            </descriptors>
+                            <outputDirectory>${basedir}/bin</outputDirectory>
+                            <finalName>include</finalName>
+                            <appendAssemblyId>false</appendAssemblyId>
+                            
<runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot>
+                        </configuration>
+                    </execution>
+
+                    <execution>
                         <id>release</id>
                         <phase>prepare-package</phase>
                         <goals>
@@ -636,6 +653,10 @@
                                         <fileset>
                                             
<directory>bin/include/visorui</directory>
                                         </fileset>
+
+                                        <fileset>
+                                            
<directory>bin/include/schema-load</directory>
+                                        </fileset>
                                     </filesets>
                                 </configuration>
                             </execution>

Reply via email to