# HG changeset patch # User František Kučera # Date 1431800716 -7200 # Node ID 54bacc7ed42bed426cab1a60b8a07037fcd44e1c # Parent 65d1eb327cb1d5040f981a3e0a5f53422c200c8d jdbc-dk-driver: include main project sources diff -r 65d1eb327cb1 -r 54bacc7ed42b distributions/debian/build.sh --- a/distributions/debian/build.sh Sat May 16 20:13:43 2015 +0200 +++ b/distributions/debian/build.sh Sat May 16 20:25:16 2015 +0200 @@ -51,7 +51,7 @@ Package: sql-dk Version: $VERSION Maintainer: $NAME -Depends: java7-runtime-headless | java7-runtime +Depends: java7-runtime-headless | java7-runtime | java8-runtime-headless | java8-runtime Suggests: libpostgresql-jdbc-java,libmysql-java Copyright: $COPYRIGHT_FILE Extra-Files: config.xsd, config.rnc, config.xsl diff -r 65d1eb327cb1 -r 54bacc7ed42b distributions/fedora/build.sh --- a/distributions/fedora/build.sh Sat May 16 20:13:43 2015 +0200 +++ b/distributions/fedora/build.sh Sat May 16 20:25:16 2015 +0200 @@ -1,6 +1,22 @@ #!/bin/bash -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +# SQL-DK +# Copyright © 2014 František Kučera (frantovo.cz) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +DIR="$( cd "$( dirname "$0" )" && pwd )" TOPDIR="$DIR/TMP"; DBPATH="$DIR/TMP/RPMDB"; @@ -12,4 +28,4 @@ -bb \ "$DIR/sql-dk.spec"; -cp "$TOPDIR"/RPMS/*/sql-dk-*.rpm . +cp "$TOPDIR"/RPMS/*/sql-dk-*.rpm $DIR/ diff -r 65d1eb327cb1 -r 54bacc7ed42b distributions/fedora/sql-dk.spec --- a/distributions/fedora/sql-dk.spec Sat May 16 20:13:43 2015 +0200 +++ b/distributions/fedora/sql-dk.spec Sat May 16 20:25:16 2015 +0200 @@ -1,10 +1,62 @@ +# SQL-DK +# Copyright © 2014 František Kučera (frantovo.cz) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + Name: sql-dk Summary: SQL batch client +Group: Applications/Databases +BuildArch: noarch Version: 0.10 -Release: 1 +Release: 3 License: GNU GPLv3+ -# TODO: Java 7 or Java 8+ -#Requires: java >= 1:1.7.0 +URL: https://sql-dk.globalcode.info/ +#Requires: sql-dk-java = %{version} +Requires: /usr/bin/java + + +# --- Dependencies ----------------------------------------------------------- +# SQL-DK requires Java 7 or Java 8 (or maybe higher). +# But simple +# Requires: java >= 1:1.7.0 +# is not working in Fedora 20 +# because java-1.8.0-openjdk here provides „java8“ not „java“ in version 1.8 +# see https://www.abclinuxu.cz/poradna/linux/show/396144#1 (in Czech) + +%package java7 +Summary: Java 7 +Group: Development/Languages +Requires: java >= 1:1.7.0 +Provides: sql-dk-java = %{version} + +%description java7 +virtual package for dependency on Java 7 + +%files java7 + +%package java8 +Summary: Java 8 +Group: Development/Languages +Requires: java8 >= 1:1.8.0 +Provides: sql-dk-java = %{version} + +%description java8 +virtual package for dependency on Java 8 + +%files java8 +# ---------------------------------------------------------------------------- + %description SQL-DK is a command-line client for relational databases. diff -r 65d1eb327cb1 -r 54bacc7ed42b java/jdbc-dk-driver/libs/sql-dk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java/jdbc-dk-driver/libs/sql-dk Sat May 16 20:25:16 2015 +0200 @@ -0,0 +1,1 @@ +../../sql-dk/src \ No newline at end of file diff -r 65d1eb327cb1 -r 54bacc7ed42b java/jdbc-dk-driver/nbproject/build-impl.xml --- a/java/jdbc-dk-driver/nbproject/build-impl.xml Sat May 16 20:13:43 2015 +0200 +++ b/java/jdbc-dk-driver/nbproject/build-impl.xml Sat May 16 20:25:16 2015 +0200 @@ -128,6 +128,7 @@ + @@ -224,6 +225,7 @@ Must set src.dir + Must set src.sql-dk.dir Must set test.src.dir Must set build.dir Must set dist.dir @@ -245,7 +247,7 @@ - + @@ -286,7 +288,7 @@ - + @@ -319,7 +321,7 @@ - + @@ -917,12 +919,13 @@ - + + @@ -943,7 +946,7 @@ Must select some files in the IDE or set javac.includes - + @@ -1212,6 +1215,9 @@ + + + @@ -1222,6 +1228,9 @@ + + + diff -r 65d1eb327cb1 -r 54bacc7ed42b java/jdbc-dk-driver/nbproject/genfiles.properties --- a/java/jdbc-dk-driver/nbproject/genfiles.properties Sat May 16 20:13:43 2015 +0200 +++ b/java/jdbc-dk-driver/nbproject/genfiles.properties Sat May 16 20:25:16 2015 +0200 @@ -1,8 +1,8 @@ -build.xml.data.CRC32=a8f4d4a7 +build.xml.data.CRC32=64e20838 build.xml.script.CRC32=3b53b17c build.xml.stylesheet.CRC32=8064a381@1.75.2.48 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=a8f4d4a7 -nbproject/build-impl.xml.script.CRC32=2ad2d140 +nbproject/build-impl.xml.data.CRC32=64e20838 +nbproject/build-impl.xml.script.CRC32=01f7bc2f nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48 diff -r 65d1eb327cb1 -r 54bacc7ed42b java/jdbc-dk-driver/nbproject/project.properties --- a/java/jdbc-dk-driver/nbproject/project.properties Sat May 16 20:13:43 2015 +0200 +++ b/java/jdbc-dk-driver/nbproject/project.properties Sat May 16 20:25:16 2015 +0200 @@ -1,9 +1,10 @@ annotation.processing.enabled=true annotation.processing.enabled.in.editor=false -annotation.processing.processor.options= annotation.processing.processors.list= annotation.processing.run.all.processors=true annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +application.title=jdbc-dk-driver +application.vendor=fiki build.classes.dir=${build.dir}/classes build.classes.excludes=**/*.java,**/*.form # This directory is removed when the project is cleaned: @@ -26,6 +27,7 @@ dist.dir=dist dist.jar=${dist.dir}/jdbc-dk-driver.jar dist.javadoc.dir=${dist.dir}/javadoc +endorsed.classpath= excludes= includes=** jar.compress=false @@ -68,4 +70,5 @@ ${build.test.classes.dir} source.encoding=UTF-8 src.dir=src +src.sql-dk.dir=libs/sql-dk test.src.dir=test diff -r 65d1eb327cb1 -r 54bacc7ed42b java/jdbc-dk-driver/nbproject/project.xml --- a/java/jdbc-dk-driver/nbproject/project.xml Sat May 16 20:13:43 2015 +0200 +++ b/java/jdbc-dk-driver/nbproject/project.xml Sat May 16 20:25:16 2015 +0200 @@ -6,6 +6,7 @@ jdbc-dk-driver + diff -r 65d1eb327cb1 -r 54bacc7ed42b java/sql-dk/src/info/globalcode/sql/dk/configuration/Configuration.java --- a/java/sql-dk/src/info/globalcode/sql/dk/configuration/Configuration.java Sat May 16 20:13:43 2015 +0200 +++ b/java/sql-dk/src/info/globalcode/sql/dk/configuration/Configuration.java Sat May 16 20:25:16 2015 +0200 @@ -19,6 +19,7 @@ import static info.globalcode.sql.dk.Xmlns.CONFIGURATION; import static info.globalcode.sql.dk.Functions.findByName; +import info.globalcode.sql.dk.formatting.DsvFormatter; import info.globalcode.sql.dk.formatting.SilentFormatter; import info.globalcode.sql.dk.formatting.SingleValueFormatter; import info.globalcode.sql.dk.formatting.TabularFormatter; @@ -70,6 +71,7 @@ l.add(new FormatterDefinition(TabularPrefetchingFormatter.NAME, TabularPrefetchingFormatter.class.getName())); l.add(new FormatterDefinition(TabularWrappingFormatter.NAME, TabularWrappingFormatter.class.getName())); l.add(new FormatterDefinition(TeXFormatter.NAME, TeXFormatter.class.getName())); + l.add(new FormatterDefinition(DsvFormatter.NAME, DsvFormatter.class.getName())); buildInFormatters = Collections.unmodifiableCollection(l); } diff -r 65d1eb327cb1 -r 54bacc7ed42b java/sql-dk/src/info/globalcode/sql/dk/configuration/DatabaseDefinition.java --- a/java/sql-dk/src/info/globalcode/sql/dk/configuration/DatabaseDefinition.java Sat May 16 20:13:43 2015 +0200 +++ b/java/sql-dk/src/info/globalcode/sql/dk/configuration/DatabaseDefinition.java Sat May 16 20:25:16 2015 +0200 @@ -87,12 +87,17 @@ /** * @param properties ad-hoc properties from CLI options (for the JDBC driver) * @param jmxBean JMX management bean for progress reporting | null = disable JMX + * @return + * @throws java.sql.SQLException */ public DatabaseConnection connect(Properties properties, ConnectionManagement jmxBean) throws SQLException { return new DatabaseConnection(this, properties, jmxBean); } /** + * @param properties + * @return + * @throws java.sql.SQLException * @see #connect(info.globalcode.sql.dk.configuration.Properties, java.lang.String) * With disabled JMX reporting. */ diff -r 65d1eb327cb1 -r 54bacc7ed42b java/sql-dk/src/info/globalcode/sql/dk/configuration/FormatterDefinition.java --- a/java/sql-dk/src/info/globalcode/sql/dk/configuration/FormatterDefinition.java Sat May 16 20:13:43 2015 +0200 +++ b/java/sql-dk/src/info/globalcode/sql/dk/configuration/FormatterDefinition.java Sat May 16 20:25:16 2015 +0200 @@ -18,7 +18,6 @@ package info.globalcode.sql.dk.configuration; import static info.globalcode.sql.dk.Xmlns.CONFIGURATION; -import info.globalcode.sql.dk.DKException; import info.globalcode.sql.dk.formatting.Formatter; import info.globalcode.sql.dk.formatting.FormatterContext; import info.globalcode.sql.dk.formatting.FormatterException; @@ -91,7 +90,7 @@ /** * @param context * @return - * @throws DKException + * @throws FormatterException */ public Formatter getInstance(FormatterContext context) throws FormatterException { context.getProperties().setDefaults(properties); diff -r 65d1eb327cb1 -r 54bacc7ed42b scripts/sql-dk.sh --- a/scripts/sql-dk.sh Sat May 16 20:13:43 2015 +0200 +++ b/scripts/sql-dk.sh Sat May 16 20:25:16 2015 +0200 @@ -5,8 +5,8 @@ . ~/.sql-dk/environment.sh else mkdir -p ~/.sql-dk/ - touch ~/.sql-dk/environment.sh # link/copy support files for configuration: + [ -f ~/.sql-dk/environment.sh ] || touch ~/.sql-dk/environment.sh [ -f ~/.sql-dk/config.xsd ] || ln -s /usr/share/doc/sql-dk/config.xsd ~/.sql-dk/config.xsd [ -f ~/.sql-dk/config.rnc ] || ln -s /usr/share/doc/sql-dk/config.rnc ~/.sql-dk/config.rnc [ -f ~/.sql-dk/config.xsl ] || gunzip < /usr/share/doc/sql-dk/config.xsl.gz > ~/.sql-dk/config.xsl # might not work in www browser if just symlinked