changeset 785:e00866975421

Get rid of JDBC_DEF_PORT There is really no need to make that changeable.
author Joeri van Ruth <joeri.van.ruth@monetdbsolutions.com>
date Fri, 30 Jun 2023 11:16:23 +0200 (21 months ago)
parents f261fe3c7fe4
children f7df78989ac5
files Makefile build.properties build.xml build_jre17.xml src/main/java/org/monetdb/jdbc/MonetDriver.java.in
diffstat 5 files changed, 3 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@ jre17jars: src/main/java/org/monetdb/jdb
 	rm -rf build
 
 src/main/java/org/monetdb/jdbc/MonetDriver.java: build.properties src/main/java/org/monetdb/jdbc/MonetDriver.java.in
-	. ./build.properties; sed -e "s/@JDBC_MAJOR@/$$JDBC_MAJOR/g;s/@JDBC_MINOR@/$$JDBC_MINOR/g;s/@JDBC_VER_SUFFIX@/$$JDBC_VER_SUFFIX $$buildno/g;s/@JDBC_DEF_PORT@/$$JDBC_DEF_PORT/g" src/main/java/org/monetdb/jdbc/MonetDriver.java.in > src/main/java/org/monetdb/jdbc/MonetDriver.java
+	. ./build.properties; sed -e "s/@JDBC_MAJOR@/$$JDBC_MAJOR/g;s/@JDBC_MINOR@/$$JDBC_MINOR/g;s/@JDBC_VER_SUFFIX@/$$JDBC_VER_SUFFIX $$buildno/g" src/main/java/org/monetdb/jdbc/MonetDriver.java.in > src/main/java/org/monetdb/jdbc/MonetDriver.java
 
 testsjar:
 	cd tests; ant -f build.xml jar_jdbctests
--- a/build.properties
+++ b/build.properties
@@ -12,8 +12,6 @@ JDBC_MAJOR=3
 JDBC_MINOR=3
 # an additional identifying string
 JDBC_VER_SUFFIX=Liberica
-# the default port to connect on, if no port given when using SQL
-JDBC_DEF_PORT=50000
 
 
 ##
--- a/build.xml
+++ b/build.xml
@@ -255,12 +255,10 @@ Copyright 1997 - July 2008 CWI, August 2
     <filter token="JDBC_MINOR" value="${JDBC_MINOR}" />
     <filter token="MCL_MAJOR" value="${MCL_MAJOR}" />
     <filter token="MCL_MINOR" value="${MCL_MINOR}" />
-    <filter token="JDBC_DEF_PORT" value="${JDBC_DEF_PORT}" />
     <filter token="JDBC_VER_SUFFIX" value="${JDBC_VER_SUFFIX} ${TODAY}" />
 
     <fail unless="JDBC_MAJOR" message="'JDBC_MAJOR' undefined. Please follow the directions in build.properties."/>
     <fail unless="JDBC_MINOR" message="'JDBC_MINOR' undefined. Please follow the directions in build.properties."/>
-    <fail unless="JDBC_DEF_PORT" message="'JDBC_DEF_PORT' undefined. Please follow the directions in build.properties."/>
     <fail unless="JDBC_VER_SUFFIX" message="'JDBC_VER_SUFFIX' undefined. Please follow the directions in build.properties."/>
 
     <!-- now copy and filter the file -->
--- a/build_jre17.xml
+++ b/build_jre17.xml
@@ -258,12 +258,10 @@ Copyright 1997 - July 2008 CWI, August 2
     <filter token="JDBC_MINOR" value="${JDBC_MINOR}" />
     <filter token="MCL_MAJOR" value="${MCL_MAJOR}" />
     <filter token="MCL_MINOR" value="${MCL_MINOR}" />
-    <filter token="JDBC_DEF_PORT" value="${JDBC_DEF_PORT}" />
     <filter token="JDBC_VER_SUFFIX" value="${JDBC_VER_SUFFIX} ${TODAY}" />
 
     <fail unless="JDBC_MAJOR" message="'JDBC_MAJOR' undefined. Please follow the directions in build.properties."/>
     <fail unless="JDBC_MINOR" message="'JDBC_MINOR' undefined. Please follow the directions in build.properties."/>
-    <fail unless="JDBC_DEF_PORT" message="'JDBC_DEF_PORT' undefined. Please follow the directions in build.properties."/>
     <fail unless="JDBC_VER_SUFFIX" message="'JDBC_VER_SUFFIX' undefined. Please follow the directions in build.properties."/>
 
     <!-- now copy and filter the file -->
--- a/src/main/java/org/monetdb/jdbc/MonetDriver.java.in
+++ b/src/main/java/org/monetdb/jdbc/MonetDriver.java.in
@@ -34,7 +34,7 @@ import java.util.Properties;
  * This Driver supports MonetDB database URLs. MonetDB URLs are defined as:
  * <code>jdbc:monetdb://&lt;host&gt;[:&lt;port&gt;]/&lt;database&gt;</code>
  * where [:&lt;port&gt;] denotes that a port is optional. If not
- * given the default (@JDBC_DEF_PORT@) will be used.
+ * given, port 50000 will be used.
  *</pre>
  *
  * @author Fabian Groffen
@@ -101,7 +101,7 @@ public final class MonetDriver implement
 
 		final Properties props = new Properties();
 		// set the optional properties and their defaults here
-		props.put("port", "@JDBC_DEF_PORT@");
+		props.put("port", "50000");
 		props.put("debug", "false");
 		props.put("language", "sql");	// mal, sql, <future>
 		props.put("so_timeout", "0");