提交 2a910f70 authored 作者: Thomas Mueller's avatar Thomas Mueller

--no commit message

--no commit message
上级 0844c811
<project name="h2" default="all" basedir=".">
<!-- jar files required by the benchmark -->
<path id="benchmark.drivers.path">
<pathelement location="bin"/>
<pathelement path="data/java"/>
<fileset dir="benchmark.drivers.dir">
<include name="**/*.jar"/>
</fileset>
</path>
<target name="all" depends="jar">
</target>
<target name="benchmark" depends="compile">
<java fork="true" classname="org.h2.test.bench.TestPerformance" classpathref="benchmark.drivers.path" maxmemory="128m"><arg line="-init -db 1"/></java>
<java fork="true" classname="org.h2.test.bench.TestPerformance" classpathref="benchmark.drivers.path" maxmemory="128m"><arg line="-db 2"/></java>
<java fork="true" classname="org.h2.test.bench.TestPerformance" classpathref="benchmark.drivers.path" maxmemory="128m"><arg line="-db 3 -out pe.html"/></java>
<java fork="true" classname="org.h2.test.bench.TestPerformance" classpathref="benchmark.drivers.path" maxmemory="128m"><arg line="-init -db 4"/></java>
<java fork="true" classname="org.h2.test.bench.TestPerformance" classpathref="benchmark.drivers.path" maxmemory="128m"><arg line="-db 5"/></java>
<java fork="true" classname="org.h2.test.bench.TestPerformance" classpathref="benchmark.drivers.path" maxmemory="128m"><arg line="-db 6"/></java>
<java fork="true" classname="org.h2.test.bench.TestPerformance" classpathref="benchmark.drivers.path" maxmemory="128m"><arg line="-db 7"/></java>
<java fork="true" classname="org.h2.test.bench.TestPerformance" classpathref="benchmark.drivers.path" maxmemory="128m"><arg line="-db 8"/></java>
<java fork="true" classname="org.h2.test.bench.TestPerformance" classpathref="benchmark.drivers.path" maxmemory="128m"><arg line="-db 9 -out ps.html"/></java>
</target>
<target name="clean" depends="init">
<mkdir dir="bin"/>
<mkdir dir="docs"/>
......
......@@ -86,7 +86,7 @@ Example:
&lt;dependency&gt;
&lt;groupId&gt;com.h2database&lt;/groupId&gt;
&lt;artifactId&gt;h2&lt;/artifactId&gt;
&lt;version&gt;1.0.71&lt;/version&gt;
&lt;version&gt;1.0.72&lt;/version&gt;
&lt;/dependency&gt;
</pre>
<p>
......
......@@ -33,6 +33,18 @@ Change Log
or if there was a comment on the table.
</li><li>Triggers are no longer executed when executing an changing the table
structure (ALTER TABLE).
</li><li>When setting BLOB or CLOB values larger than 65 KB using
a remote connection, temporary files were kept on the client
longer than required (until the connection was closed or the
object is garbage collected). Now they are removed as soon
as the PreparedStatement is closed, or when the value is
overwritten.
</li><li>Statements can now be cancelled remotely
(when using remote connections).
</li><li>The Shell tool now uses java.io.Console to read the password
when using JDK 1.6
</li><li>When using read-only databases and setting LOG=2, an exception
was written to the trace file when closing the database. Fixed.
</li></ul>
<h2>Version 1.0.71 (2008-04-25)</h2>
......
......@@ -17,16 +17,16 @@ H2 Database Engine
<h1>Downloads</h1>
<h3>Version 1.0.71 (2008-04-25, Current)</h3>
<h3>Version 1.0.72 (2008-05-10, Current)</h3>
<p>
<a href="http://www.h2database.com/h2-setup-2008-04-25.exe">Windows Installer</a><br />
<a href="http://www.h2database.com/h2-2008-04-25.zip">Platform-Independent Zip</a><br />
<a href="http://www.h2database.com/h2-setup-2008-05-10.exe">Windows Installer</a><br />
<a href="http://www.h2database.com/h2-2008-05-10.zip">Platform-Independent Zip</a><br />
</p>
<h3>Version 1.0.69 (2008-03-29, Last Stable)</h3>
<h3>Version 1.0.71 (2008-04-25, Last Stable)</h3>
<p>
<a href="http://www.h2database.com/h2-setup-2008-03-29.exe">Windows Installer</a><br />
<a href="http://www.h2database.com/h2-2008-03-29.zip">Platform-Independent Zip</a><br />
<a href="http://www.h2database.com/h2-setup-2008-04-25.exe">Windows Installer</a><br />
<a href="http://www.h2database.com/h2-2008-04-25.zip">Platform-Independent Zip</a><br />
</p>
<h3>Download Mirror and Older Versions</h3>
......
......@@ -34,17 +34,17 @@ Welcome to H2, the Java SQL database. The main feature of H2 are:
<table style="border: 0px; margin: 5px; background-color: #eee;">
<tr><td style="border: 0px; background-color: #eee;" colspan="2">
<h3>Download</h3>
Version 1.0.71 (2008-04-25):
Version 1.0.72 (2008-05-10):
</td></tr>
<tr><td style="border: 0px; background-color: #eee;">
<a href="http://www.h2database.com/h2-setup-2008-04-25.exe"><img border="1" src="images/download.png" alt="download" /></a>
<a href="http://www.h2database.com/h2-setup-2008-05-10.exe"><img border="1" src="images/download.png" alt="download" /></a>
</td><td style="vertical-align: middle; border: 0px; background-color: #eee;">
<a href="http://www.h2database.com/h2-setup-2008-04-25.exe">Windows Installer (3.1 MB)</a>
<a href="http://www.h2database.com/h2-setup-2008-05-10.exe">Windows Installer (3.1 MB)</a>
</td></tr>
<tr><td style="border: 0px; background-color: #eee;">
<a href="http://www.h2database.com/h2-2008-04-25.zip"><img border="1" src="images/download.png" alt="download" /></a>
<a href="http://www.h2database.com/h2-2008-05-10.zip"><img border="1" src="images/download.png" alt="download" /></a>
</td><td style="vertical-align: middle; border: 0px; background-color: #eee;">
<a href="http://www.h2database.com/h2-2008-04-25.zip">All platforms (zip, 4.5 MB)</a>
<a href="http://www.h2database.com/h2-2008-05-10.zip">All platforms (zip, 4.5 MB)</a>
</td></tr>
<tr><td style="border: 0px; background-color: #eee;" colspan="2">
<a href="download.html">All Downloads</a>
......
......@@ -6857,103 +6857,103 @@ Cluster: hot deploy (adding a node on runtime)
Test with PostgreSQL Version 8.2
@roadmap_1295_li
Submit again to http://www.docjar.com/
Website: Don't use frames.
@roadmap_1296_li
Website: Don't use frames.
Try again with Lobo browser (pure Java)
@roadmap_1297_li
Try again with Lobo browser (pure Java)
Recovery tool: bad blocks should be converted to INSERT INTO SYSTEM_ERRORS(...), and things should go into the .trace.db file
@roadmap_1298_li
Recovery tool: bad blocks should be converted to INSERT INTO SYSTEM_ERRORS(...), and things should go into the .trace.db file
RECOVER=2 to backup the database, run recovery, open the database
@roadmap_1299_li
RECOVER=2 to backup the database, run recovery, open the database
Recovery should work with encrypted databases
@roadmap_1300_li
Recovery should work with encrypted databases
Corruption: new error code, add help
@roadmap_1301_li
Corruption: new error code, add help
Space reuse: after init, scan all storages and free those that don't belong to a live database object
@roadmap_1302_li
Space reuse: after init, scan all storages and free those that don't belong to a live database object
SysProperties: change everything to H2_...
@roadmap_1303_li
SysProperties: change everything to H2_...
Use FilterIn / FilterOut putStream?
@roadmap_1304_li
Use FilterIn / FilterOut putStream?
Access rights: add missing features (users should be 'owner' of objects; missing rights for sequences; dropping objects)
@roadmap_1305_li
Access rights: add missing features (users should be 'owner' of objects; missing rights for sequences; dropping objects)
Support NOCACHE table option (Oracle)
@roadmap_1306_li
Support NOCACHE table option (Oracle)
Index usage for UPDATE ... WHERE .. IN (SELECT...)
@roadmap_1307_li
Index usage for UPDATE ... WHERE .. IN (SELECT...)
Add regular javadocs (using the default doclet, but another css) to the homepage.
@roadmap_1308_li
Add regular javadocs (using the default doclet, but another css) to the homepage.
The database should be kept open for a longer time when using the server mode.
@roadmap_1309_li
The database should be kept open for a longer time when using the server mode.
Javadocs: for each tool, add a copy &amp; paste sample in the class level.
@roadmap_1310_li
Javadocs: for each tool, add a copy &amp; paste sample in the class level.
Javadocs: add @author tags.
@roadmap_1311_li
Javadocs: add @author tags.
Fluent API for tools: Server.createTcpServer().setPort(9081).setPassword(password).start();
@roadmap_1312_li
Fluent API for tools: Server.createTcpServer().setPort(9081).setPassword(password).start();
MySQL compatibility: real SQL statements for SHOW TABLES, DESCRIBE TEST (then remove from Shell)
@roadmap_1313_li
MySQL compatibility: real SQL statements for SHOW TABLES, DESCRIBE TEST (then remove from Shell)
Use a default delay of 1 second before closing a database.
@roadmap_1314_li
Use a default delay of 1 second before closing a database.
Maven: upload source code and javadocs as well.
@roadmap_1315_li
Maven: upload source code and javadocs as well.
Write (log) to system table before adding to internal data structures.
@roadmap_1316_li
Write (log) to system table before adding to internal data structures.
Support very large deletes and updates.
@roadmap_1317_li
Support very large deletes and updates.
Doclet (javadocs): constructors are not listed.
@roadmap_1318_li
Doclet (javadocs): constructors are not listed.
Support direct lookup for MIN and MAX when using WHERE (see todo.txt / Direct Lookup).
@roadmap_1319_li
Support direct lookup for MIN and MAX when using WHERE (see todo.txt / Direct Lookup).
Support other array types (String[], double[]) in PreparedStatement.setObject(int, Object);
@roadmap_1320_li
Support other array types (String[], double[]) in PreparedStatement.setObject(int, Object);
MVCC should not be memory bound (uncommitted data is kept in memory in the delta index; maybe using a regular btree index solves the problem).
@roadmap_1321_li
MVCC should not be memory bound (uncommitted data is kept in memory in the delta index; maybe using a regular btree index solves the problem).
Support CREATE TEMPORARY LINKED TABLE.
@roadmap_1322_li
Support CREATE TEMPORARY LINKED TABLE.
MySQL compatibility: SELECT @variable := x FROM SYSTEM_RANGE(1, 50);
@roadmap_1323_li
MySQL compatibility: SELECT @variable := x FROM SYSTEM_RANGE(1, 50);
Oracle compatibility: support NLS_DATE_FORMAT.
@roadmap_1324_li
Oracle compatibility: support NLS_DATE_FORMAT.
Support flashback queries as in Oracle.
@roadmap_1325_li
Support flashback queries as in Oracle.
Import / Export of fixed with text files.
@roadmap_1326_li
Import / Export of fixed with text files.
Support for OUT parameters in user-defined procedures.
@roadmap_1327_li
Support for OUT parameters in user-defined procedures.
Support getGeneratedKeys to return multiple rows when used with batch updates. This is supported by MySQL, but not Derby. Both PostgreSQL and HSQLDB don't support getGeneratedKeys. Also support it when using INSERT ... SELECT.
@roadmap_1328_h2
Not Planned
......
......@@ -2284,39 +2284,39 @@ roadmap_1291_li=Translation\: use ${.} in help.csv
roadmap_1292_li=Translated .pdf
roadmap_1293_li=Cluster\: hot deploy (adding a node on runtime)
roadmap_1294_li=Test with PostgreSQL Version 8.2
roadmap_1295_li=Submit again to http\://www.docjar.com/
roadmap_1296_li=Website\: Don't use frames.
roadmap_1297_li=Try again with Lobo browser (pure Java)
roadmap_1298_li=Recovery tool\: bad blocks should be converted to INSERT INTO SYSTEM_ERRORS(...), and things should go into the .trace.db file
roadmap_1299_li=RECOVER\=2 to backup the database, run recovery, open the database
roadmap_1300_li=Recovery should work with encrypted databases
roadmap_1301_li=Corruption\: new error code, add help
roadmap_1302_li=Space reuse\: after init, scan all storages and free those that don't belong to a live database object
roadmap_1303_li=SysProperties\: change everything to H2_...
roadmap_1304_li=Use FilterIn / FilterOut putStream?
roadmap_1305_li=Access rights\: add missing features (users should be 'owner' of objects; missing rights for sequences; dropping objects)
roadmap_1306_li=Support NOCACHE table option (Oracle)
roadmap_1307_li=Index usage for UPDATE ... WHERE .. IN (SELECT...)
roadmap_1308_li=Add regular javadocs (using the default doclet, but another css) to the homepage.
roadmap_1309_li=The database should be kept open for a longer time when using the server mode.
roadmap_1310_li=Javadocs\: for each tool, add a copy &amp; paste sample in the class level.
roadmap_1311_li=Javadocs\: add @author tags.
roadmap_1312_li=Fluent API for tools\: Server.createTcpServer().setPort(9081).setPassword(password).start();
roadmap_1313_li=MySQL compatibility\: real SQL statements for SHOW TABLES, DESCRIBE TEST (then remove from Shell)
roadmap_1314_li=Use a default delay of 1 second before closing a database.
roadmap_1315_li=Maven\: upload source code and javadocs as well.
roadmap_1316_li=Write (log) to system table before adding to internal data structures.
roadmap_1317_li=Support very large deletes and updates.
roadmap_1318_li=Doclet (javadocs)\: constructors are not listed.
roadmap_1319_li=Support direct lookup for MIN and MAX when using WHERE (see todo.txt / Direct Lookup).
roadmap_1320_li=Support other array types (String[], double[]) in PreparedStatement.setObject(int, Object);
roadmap_1321_li=MVCC should not be memory bound (uncommitted data is kept in memory in the delta index; maybe using a regular btree index solves the problem).
roadmap_1322_li=Support CREATE TEMPORARY LINKED TABLE.
roadmap_1323_li=MySQL compatibility\: SELECT @variable \:\= x FROM SYSTEM_RANGE(1, 50);
roadmap_1324_li=Oracle compatibility\: support NLS_DATE_FORMAT.
roadmap_1325_li=Support flashback queries as in Oracle.
roadmap_1326_li=Import / Export of fixed with text files.
roadmap_1327_li=Support for OUT parameters in user-defined procedures.
roadmap_1295_li=Website\: Don't use frames.
roadmap_1296_li=Try again with Lobo browser (pure Java)
roadmap_1297_li=Recovery tool\: bad blocks should be converted to INSERT INTO SYSTEM_ERRORS(...), and things should go into the .trace.db file
roadmap_1298_li=RECOVER\=2 to backup the database, run recovery, open the database
roadmap_1299_li=Recovery should work with encrypted databases
roadmap_1300_li=Corruption\: new error code, add help
roadmap_1301_li=Space reuse\: after init, scan all storages and free those that don't belong to a live database object
roadmap_1302_li=SysProperties\: change everything to H2_...
roadmap_1303_li=Use FilterIn / FilterOut putStream?
roadmap_1304_li=Access rights\: add missing features (users should be 'owner' of objects; missing rights for sequences; dropping objects)
roadmap_1305_li=Support NOCACHE table option (Oracle)
roadmap_1306_li=Index usage for UPDATE ... WHERE .. IN (SELECT...)
roadmap_1307_li=Add regular javadocs (using the default doclet, but another css) to the homepage.
roadmap_1308_li=The database should be kept open for a longer time when using the server mode.
roadmap_1309_li=Javadocs\: for each tool, add a copy &amp; paste sample in the class level.
roadmap_1310_li=Javadocs\: add @author tags.
roadmap_1311_li=Fluent API for tools\: Server.createTcpServer().setPort(9081).setPassword(password).start();
roadmap_1312_li=MySQL compatibility\: real SQL statements for SHOW TABLES, DESCRIBE TEST (then remove from Shell)
roadmap_1313_li=Use a default delay of 1 second before closing a database.
roadmap_1314_li=Maven\: upload source code and javadocs as well.
roadmap_1315_li=Write (log) to system table before adding to internal data structures.
roadmap_1316_li=Support very large deletes and updates.
roadmap_1317_li=Doclet (javadocs)\: constructors are not listed.
roadmap_1318_li=Support direct lookup for MIN and MAX when using WHERE (see todo.txt / Direct Lookup).
roadmap_1319_li=Support other array types (String[], double[]) in PreparedStatement.setObject(int, Object);
roadmap_1320_li=MVCC should not be memory bound (uncommitted data is kept in memory in the delta index; maybe using a regular btree index solves the problem).
roadmap_1321_li=Support CREATE TEMPORARY LINKED TABLE.
roadmap_1322_li=MySQL compatibility\: SELECT @variable \:\= x FROM SYSTEM_RANGE(1, 50);
roadmap_1323_li=Oracle compatibility\: support NLS_DATE_FORMAT.
roadmap_1324_li=Support flashback queries as in Oracle.
roadmap_1325_li=Import / Export of fixed with text files.
roadmap_1326_li=Support for OUT parameters in user-defined procedures.
roadmap_1327_li=Support getGeneratedKeys to return multiple rows when used with batch updates. This is supported by MySQL, but not Derby. Both PostgreSQL and HSQLDB don't support getGeneratedKeys. Also support it when using INSERT ... SELECT.
roadmap_1328_h2=Not Planned
roadmap_1329_li=HSQLDB (did) support this\: select id i from test where i>0 (other databases don't). Supporting it may break compatibility.
roadmap_1330_li=String.intern (so that Strings can be compared with \=\=) will not be used because some VMs have problems when used extensively.
......
......@@ -84,7 +84,7 @@ public class Constants {
/**
* The build date is updated for each public release.
*/
private static final String BUILD_DATE = "2008-04-30";
private static final String BUILD_DATE = "2008-05-10";
/**
* The TCP protocol version number 5. This protocol is used by the TCP
......
......@@ -13,6 +13,50 @@ INSERT INTO CHANNEL VALUES('H2 Database Engine' ,
CREATE TABLE ITEM(ID INT PRIMARY KEY, TITLE VARCHAR, ISSUED TIMESTAMP, DESC VARCHAR);
INSERT INTO ITEM VALUES(42,
'New version available: 1.0.72 (2008-05-10)', '2008-05-10 12:00:00',
$$A new version of H2 is available for <a href="http://www.h2database.com">download</a>.
(You may have to click 'Refresh').
<br />
<b>Changes and new functionality:</b>
<ul><li>SLF4J is now supported by using adding TRACE_LEVEL_FILE=4
to the database URL.
</li><li>A subset of the PostgreSQL 'dollar quoting' feature is now supported.
</li><li>Updates made to updatable rows are now visible within the same result set.
DatabaseMetaData.ownUpdatesAreVisible now returns true.
</li><li>ParameterMetaData now returns the correct data
for INSERT and UPDATE statements.
</li><li>Shell tool: DESCRIBE now supports an schema name.
</li><li>The Shell tool now uses java.io.Console to read the password
when using JDK 1.6
</li><li>The Japanese translation of the error messages and the H2 Console
has been completed by Masahiro Ikemoto (Arizona Design Inc.)
</li><li>Statements can now be cancelled remotely
(when using remote connections).
</li><li>Triggers are no longer executed when executing an changing the table
structure (ALTER TABLE).
</li></ul>
<b>Bugfixes:</b>
<ul><li>Some databases could not be opened when appending
;RECOVER=1 to the database URL.
</li><li>The recovery tool did not work if the table name contained spaces
or if there was a comment on the table.
</li><li>When setting BLOB or CLOB values larger than 65 KB using
a remote connection, temporary files were kept on the client
longer than required (until the connection was closed or the
object is garbage collected). Now they are removed as soon
as the PreparedStatement is closed, or when the value is
overwritten.
</li><li>When using read-only databases and setting LOG=2, an exception
was written to the trace file when closing the database. Fixed.
</li></ul>
For details, see the 'Change Log' at
http://www.h2database.com/html/changelog.html
<br />
For future plans, see the 'Roadmap' page at
http://www.h2database.com/html/roadmap.html
$$);
INSERT INTO ITEM VALUES(41,
'New version available: 1.0.71 (2008-04-25)', '2008-04-25 12:00:00',
'A new version of H2 is available for <a href="http://www.h2database.com">download</a>.
......
......@@ -211,18 +211,6 @@ Add where required // TODO: change in version 1.1
http://www.w3schools.com/sql/
History:
When setting BLOB or CLOB values larger than 65 KB using
a remote connection, temporary files were kept on the client
longer than required (until the connection was closed or the
object is garbage collected). Now they are removed as soon
as the PreparedStatement is closed, or when the value is
overwritten.
Statements can now be cancelled remotely
(when using remote connections).
The Shell tool now uses java.io.Console to read the password
when using JDK 1.6
When using read-only databases and setting LOG=2, an exception
was written to the trace file when closing the database. Fixed.
Roadmap:
......
......@@ -25,6 +25,34 @@ public class Build extends BuildBase {
docs();
}
public void benchmark() {
download("ext/hsqldb-1.8.0.7.jar",
"http://repo1.maven.org/maven2/hsqldb/hsqldb/1.8.0.7/hsqldb-1.8.0.7.jar",
"20554954120b3cc9f08804524ec90113a73f3015");
download("ext/derby-10.4.1.3.jar",
"http://repo1.maven.org/maven2/org/apache/derby/derby/10.4.1.3/derby-10.4.1.3.jar",
"01c19aaea2e971203f410c5263214a890f340342");
download("ext/postgresql-8.3-603.jdbc4.jar",
"http://repo1.maven.org/maven2/postgresql/postgresql/8.3-603.jdbc4/postgresql-8.3-603.jdbc4.jar",
"c1545d956cc2013e8623f7cbc4de320be80ac646");
download("ext/mysql-connector-java-5.1.6.jar",
"http://repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.6/mysql-connector-java-5.1.6.jar",
"380ef5226de2c85ff3b38cbfefeea881c5fce09d");
String cp = "bin" + File.pathSeparator + "bin/h2.jar" + File.pathSeparator +
"ext/hsqldb-1.8.0.7.jar" + File.pathSeparator +
"ext/derby-10.4.1.3.jar" + File.pathSeparator +
"ext/postgresql-8.3-603.jdbc4.jar" + File.pathSeparator +
"ext/mysql-connector-java-5.1.6.jar";
exec("java", new String[]{"-Xmx128m", "-cp", cp, "org.h2.test.bench.TestPerformance", "-init", "-db", "1"});
exec("java", new String[]{"-Xmx128m", "-cp", cp, "org.h2.test.bench.TestPerformance", "-db", "2"});
exec("java", new String[]{"-Xmx128m", "-cp", cp, "org.h2.test.bench.TestPerformance", "-db", "3", "-out", "pe.html"});
exec("java", new String[]{"-Xmx128m", "-cp", cp, "org.h2.test.bench.TestPerformance", "-init", "-db", "4"});
exec("java", new String[]{"-Xmx128m", "-cp", cp, "org.h2.test.bench.TestPerformance", "-db", "5"});
exec("java", new String[]{"-Xmx128m", "-cp", cp, "org.h2.test.bench.TestPerformance", "-db", "6"});
exec("java", new String[]{"-Xmx128m", "-cp", cp, "org.h2.test.bench.TestPerformance", "-db", "7"});
exec("java", new String[]{"-Xmx128m", "-cp", cp, "org.h2.test.bench.TestPerformance", "-db", "8", "-out", "ps.html"});
}
public void clean() {
delete("temp");
delete("docs");
......@@ -212,14 +240,15 @@ public class Build extends BuildBase {
String pom = new String(readFile(new File("src/installer/pom.xml")));
pom = replaceAll(pom, "@version@", getVersion());
writeFile(new File("bin/pom.xml"), pom.getBytes());
execScript("mvn", "deploy:deploy-file " +
"-Dfile=bin/h2.jar " +
"-Durl=file:///data/h2database/m2-repo " +
"-Dpackaging=jar " +
"-Dversion=" + getVersion() + " " +
"-DpomFile=bin/pom.xml " +
"-DartifactId=h2 " +
"-DgroupId=com.h2database");
execScript("mvn", new String[] {
"deploy:deploy-file",
"-Dfile=bin/h2.jar",
"-Durl=file:///data/h2database/m2-repo",
"-Dpackaging=jar",
"-Dversion=" + getVersion(),
"-DpomFile=bin/pom.xml",
"-DartifactId=h2",
"-DgroupId=com.h2database" });
}
public void mavenInstallLocal() {
......@@ -227,13 +256,14 @@ public class Build extends BuildBase {
String pom = new String(readFile(new File("src/installer/pom.xml")));
pom = replaceAll(pom, "@version@", "1.0-SNAPSHOT");
writeFile(new File("bin/pom.xml"), pom.getBytes());
execScript("mvn", "install:install-file " +
"-Dversion=1.0-SNAPSHOT " +
"-Dfile=bin/h2.jar " +
"-Dpackaging=jar " +
"-DpomFile=bin/pom.xml " +
"-DartifactId=h2 " +
"-DgroupId=com.h2database");
execScript("mvn", new String[] {
"install:install-file",
"-Dversion=1.0-SNAPSHOT",
"-Dfile=bin/h2.jar",
"-Dpackaging=jar",
"-DpomFile=bin/pom.xml",
"-DartifactId=h2",
"-DgroupId=com.h2database" });
}
private void resources(boolean clientOnly) {
......
......@@ -149,12 +149,15 @@ public class BuildBase {
/**
* Execute a script in a separate process.
*
* @param script the script name (for example mvn or ant)
* @param args the command line parameters
* @param commandAndArgs the script name (for example mvn or ant) and the arguments
* @return the exit value
*/
protected int execScript(String script, String args) {
return exec(script + (isWindows() ? ".bat " : " ") + args, null);
protected int execScript(String command, String[] args) {
if (isWindows()) {
command = command + ".bat";
}
return exec(command, args);
}
/**
......@@ -168,16 +171,16 @@ public class BuildBase {
try {
out.print(command);
for (int i = 0; args != null && i < args.length; i++) {
out.print(" ");
out.print(args[i]);
out.print(" " + args[i]);
}
out.println();
Process p;
if (args == null) {
p = Runtime.getRuntime().exec(command);
} else {
p = Runtime.getRuntime().exec(command, args);
String[] cmdArray = new String[1 + (args == null ? 0 : args.length)];
cmdArray[0] = command;
if (args != null) {
System.arraycopy(args, 0, cmdArray, 1, args.length);
}
p = Runtime.getRuntime().exec(cmdArray);
copy(p.getInputStream(), out);
copy(p.getErrorStream(), out);
p.waitFor();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论