Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
5752fb83
提交
5752fb83
authored
4月 24, 2008
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
--no commit message
上级
40263158
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
181 行增加
和
213 行删除
+181
-213
ant-build.properties
h2/ant-build.properties
+0
-4
build.xml
h2/build.xml
+7
-131
build.html
h2/src/docsrc/html/build.html
+7
-7
history.html
h2/src/docsrc/html/history.html
+1
-0
roadmap.html
h2/src/docsrc/html/roadmap.html
+1
-0
pomUpload.xml
h2/src/installer/pomUpload.xml
+0
-22
Build.java
h2/src/tools/org/h2/build/Build.java
+129
-42
BuildBase.java
h2/src/tools/org/h2/build/BuildBase.java
+34
-6
dictionary.txt
h2/src/tools/org/h2/build/doc/dictionary.txt
+2
-1
没有找到文件。
h2/ant-build.properties
deleted
100644 → 0
浏览文件 @
40263158
#Sat Mar 29 10:53:56 CET 2008
benchmark.drivers.dir
=
C
\:
/data/java
javac
=
javac
version.name.maven
=
1.0.70
h2/build.xml
浏览文件 @
5752fb83
<project
name=
"h2"
default=
"all"
basedir=
"."
>
<property
file=
"ant-build.properties"
/>
<!-- jar files required by the benchmark -->
<path
id=
"benchmark.drivers.path"
>
<pathelement
location=
"bin"
/>
<pathelement
path=
"
${java.class.path}/
"
/>
<fileset
dir=
"
${benchmark.drivers.dir}
"
>
<pathelement
path=
"
data/java
"
/>
<fileset
dir=
"
benchmark.drivers.dir
"
>
<include
name=
"**/*.jar"
/>
</fileset>
</path>
<target
name=
"all"
depends=
"jar, javadoc, docs"
>
<delete
includeemptydirs=
"true"
>
<fileset
dir=
"bin"
includes=
"**/*.txt"
/>
<fileset
dir=
"bin"
includes=
"org/**/*"
/>
<fileset
dir=
"bin"
includes=
"org"
/>
<fileset
dir=
"bin"
includes=
"META-INF/**/*"
/>
<fileset
dir=
"bin"
includes=
"META-INF"
/>
<fileset
dir=
"docs/html"
includes=
"onePage.html"
/>
</delete>
<target
name=
"all"
depends=
"jar"
>
</target>
<target
name=
"benchmark"
depends=
"compile"
>
...
...
@@ -45,7 +35,7 @@
</target>
<target
name=
"compile"
depends=
"switchSourceAuto, resources, downloadServletJar, downloadLuceneJar"
>
<javac
executable=
"${javac}"
destdir=
"bin"
debug=
"true"
debuglevel=
"lines,source"
>
<javac
destdir=
"bin"
debug=
"true"
debuglevel=
"lines,source"
>
<classpath
location=
"ext/servlet-api-2.4.jar"
/>
<classpath
location=
"ext/lucene-core-2.2.0.jar"
/>
<src
path=
"src/main"
/>
...
...
@@ -67,24 +57,8 @@
<java
classname=
"org.h2.test.coverage.Coverage"
classpath=
"."
dir=
"bin"
fork=
"true"
>
<arg
line=
"-r org/h2"
/>
</java>
<javac
executable=
"${javac}"
srcdir=
"bin"
destdir=
"bin"
debug=
"true"
debuglevel=
"lines,source"
includes=
"org/h2/**"
/>
<javac
srcdir=
"bin"
destdir=
"bin"
debug=
"true"
debuglevel=
"lines,source"
includes=
"org/h2/**"
/>
</target>
<target
name=
"docs"
depends=
"clean, javadoc, compile"
>
<copy
todir=
"docs"
>
<fileset
dir=
"src/docsrc"
includes=
"index.html"
/>
</copy>
<java
classname=
"org.h2.build.code.CheckJavadoc"
classpath=
"bin"
/>
<java
classname=
"org.h2.build.code.CheckTextFiles"
classpath=
"bin"
/>
<java
classname=
"org.h2.build.doc.GenerateDoc"
classpath=
"bin"
/>
<java
classname=
"org.h2.build.i18n.PrepareTranslation"
classpath=
"bin"
/>
<java
classname=
"org.h2.build.indexer.Indexer"
classpath=
"bin"
/>
<java
classname=
"org.h2.build.doc.MergeDocs"
classpath=
"bin"
/>
<java
classname=
"org.h2.build.doc.WebSite"
classpath=
"bin"
/>
<java
classname=
"org.h2.build.doc.LinkChecker"
classpath=
"bin"
/>
<java
classname=
"org.h2.build.doc.XMLChecker"
classpath=
"bin"
/>
<java
classname=
"org.h2.build.doc.SpellChecker"
classpath=
"bin"
/>
</target>
<target
name=
"downloadServletJar"
depends=
"init"
unless=
"servlet.jar.present"
>
<get
dest=
"ext/servlet-api-2.4.jar"
...
...
@@ -118,21 +92,8 @@
</jar>
</target>
<target
name=
"jarClient"
depends=
"switchSourceAuto, resources, manifest"
>
<javac
executable=
"${javac}"
srcdir=
"src/main"
destdir=
"bin"
debug=
"true"
debuglevel=
"lines,source"
>
<include
name=
"org/h2/*"
/>
<include
name=
"org/h2/jdbc/**"
/>
<include
name=
"org/h2/jdbcx/**"
/>
</javac>
<jar
jarfile=
"bin/h2client.jar"
basedir=
"bin"
manifest=
"bin/META-INF/MANIFEST.MF"
>
<include
name=
"**/*.*"
/>
<exclude
name=
"**/*.bat"
/>
<exclude
name=
"**/*.sh"
/>
</jar>
</target>
<target
name=
"jarDb"
depends=
"resources, manifest"
>
<javac
executable=
"${javac}"
srcdir=
"src/main"
destdir=
"bin"
debug=
"false"
>
<javac
srcdir=
"src/main"
destdir=
"bin"
debug=
"false"
>
<include
name=
"org/h2/*"
/>
<include
name=
"org/h2/engine/**"
/>
<include
name=
"org/h2/jdbc/**"
/>
...
...
@@ -145,88 +106,14 @@
</jar>
</target>
<target
name=
"javadoc"
>
<javac
executable=
"${javac}"
srcdir=
"src/main"
destdir=
"bin"
debug=
"true"
debuglevel=
"lines,source"
includes=
"org/h2/util/StringUtils.java"
/>
<javac
executable=
"${javac}"
srcdir=
"src/test"
destdir=
"bin"
debug=
"true"
debuglevel=
"lines,source"
includes=
"org/h2/test/bnf/*.java"
/>
<javac
executable=
"${javac}"
srcdir=
"src/tools"
destdir=
"bin"
debug=
"true"
debuglevel=
"lines,source"
includes=
"org/h2/build/doclet/*.java"
/>
<mkdir
dir=
"docs/javadoc"
/>
<javadoc
sourcepath=
"src/main"
packagenames=
"org.h2.jdbc.*,org.h2.jdbcx.*,org.h2.tools.*,org.h2.api.*,org.h2.constant.*"
doclet=
"org.h2.build.doclet.Doclet"
docletpath=
"bin"
/>
<copy
todir=
"docs/javadoc"
>
<fileset
dir=
"src/docsrc/javadoc"
includes=
"**/*"
/>
</copy>
</target>
<target
name=
"javadocImpl"
depends=
"javadoc"
>
<mkdir
dir=
"docs/javadocImpl"
/>
<javadoc
sourcepath=
"src/main;src/test;src/tools"
classpath=
"ext/servlet-api-2.4.jar;ext/lucene-core-2.2.0.jar;${java.class.path}"
packagenames=
"org.h2.*"
doclet=
"org.h2.build.doclet.Doclet"
docletpath=
"bin"
additionalparam=
"-J-Dh2.interfacesOnly=false -J-Dh2.destDir=docs/javadocImpl"
/>
<javadoc
sourcepath=
"src/main;src/test;src/tools"
noindex=
"true"
packagenames=
"org.h2.*"
excludepackagenames=
"org.h2.build.*,org.h2.dev.*"
classpath=
"ext/servlet-api-2.4.jar;ext/lucene-core-2.2.0.jar;${java.class.path}"
destDir=
"docs/javadocImpl"
/>
<copy
todir=
"docs/javadoc"
>
<fileset
dir=
"src/docsrc/javadoc"
includes=
"**/*"
/>
</copy>
</target>
<target
name=
"manifest"
>
<mkdir
dir=
"bin/META-INF"
/>
<manifest
file=
"bin/META-INF/MANIFEST.MF"
>
<!--
<attribute name="Bundle-Activator" value="org.h2.osgi.Activator"/>
-->
<attribute
name=
"Implementation-Title"
value=
"H2 Database Engine"
/>
<attribute
name=
"Implementation-URL"
value=
"http://www.h2database.com"
/>
<attribute
name=
"Implementation-Version"
value=
"${version.name.maven}"
/>
<attribute
name=
"Build-Jdk"
value=
"${java.specification.version}"
/>
</manifest>
</target>
<target
name=
"mavenDeployCentral"
depends=
"jar"
>
<copy
tofile=
"bin/h2-${version.name.maven}.jar"
file=
"bin/h2.jar"
/>
<copy
tofile=
"bin/pom.xml"
filtering=
"true"
file=
"src/installer/pomUpload.xml"
>
<filterset>
<filter
token=
"version"
value=
"${version.name.maven}"
/>
</filterset>
</copy>
<exec
executable=
"mvn.bat"
>
<arg
value=
"deploy:deploy-file"
/>
<arg
value=
"-Dfile=bin/h2.jar"
/>
<arg
value=
"-Durl=file://C:/data/h2database/m2-repo"
/>
<arg
value=
"-Dpackaging=jar"
/>
<arg
value=
"-DpomFile=bin/pom.xml"
/>
</exec>
</target>
<target
name=
"mavenInstallLocal"
depends=
"jar"
>
<copy
tofile=
"bin/pom.xml"
filtering=
"true"
file=
"src/installer/pom.xml"
>
<filterset>
<filter
token=
"version"
value=
"1.0-SNAPSHOT"
/>
</filterset>
</copy>
<exec
executable=
"mvn.bat"
>
<arg
value=
"install:install-file"
/>
<arg
value=
"-Dversion=1.0-SNAPSHOT"
/>
<arg
value=
"-Dfile=bin/h2.jar"
/>
<arg
value=
"-Dpackaging=jar"
/>
<arg
value=
"-DpomFile=bin/pom.xml"
/>
</exec>
</target>
<target
name=
"resources"
depends=
"clean"
>
<mkdir
dir=
"bin/org/h2/util"
/>
...
...
@@ -237,7 +124,7 @@
</target>
<target
name=
"switchSourcePrepare"
depends=
"clean"
>
<javac
executable=
"${javac}"
srcdir=
"src/tools"
destdir=
"bin"
debug=
"true"
debuglevel=
"lines,source"
includes=
"org/h2/build/code/SwitchSource.java"
/>
<javac
srcdir=
"src/tools"
destdir=
"bin"
debug=
"true"
debuglevel=
"lines,source"
includes=
"org/h2/build/code/SwitchSource.java"
/>
</target>
<target
name=
"switchSourceAndroid"
depends=
"switchSourcePrepare"
>
...
...
@@ -286,15 +173,4 @@
</war>
</target>
<target
name=
"zip"
>
<zip
destfile=
"../h2.zip"
>
<fileset
dir=
".."
includes=
"h2/build.*"
/>
<fileset
dir=
".."
includes=
"h2/ant-build.properties"
/>
<fileset
dir=
".."
includes=
"h2/bin/**/*"
/>
<fileset
dir=
".."
includes=
"h2/docs/**/*"
/>
<fileset
dir=
".."
includes=
"h2/service/**/*"
/>
<fileset
dir=
".."
includes=
"h2/src/**/*"
/>
</zip>
</target>
</project>
\ No newline at end of file
h2/src/docsrc/html/build.html
浏览文件 @
5752fb83
...
...
@@ -44,10 +44,10 @@ Newer version or compatible software works too.
<ul>
<li>
Windows XP
</li><li>
Sun JDK Version 1.4
</li><li>
Apache Ant Version 1.6.5
</li><li>
Mozilla Firefox 1.5
</li><li>
Eclipse Version 3.2.2
</li><li>
YourKit Java Profiler
</li><li>
Apache Ant Version 1.6.5
</li></ul>
<br
/><a
name=
"building"
></a>
...
...
@@ -56,20 +56,20 @@ Newer version or compatible software works too.
On the command line, go to the directory src and execute the following command:
</p>
<pre>
ant -projecthelp
build -?
</pre>
<p>
You will get a list of targets. If you want to build the jar file
s
, execute:
You will get a list of targets. If you want to build the jar file, execute:
</p>
<pre>
ant
jar
build
jar
</pre>
<p>
To create a jar file with the JDBC API and the classes required to connect to a server only,
use the target jarClient:
</p>
<pre>
ant
jarClient
build
jarClient
</pre>
<p>
The other targets may be used as well.
...
...
@@ -100,7 +100,7 @@ they are available there.
To build a 'snapshot' H2 .jar file and upload it the to the local Maven 2 repository, execute the following command:
</p>
<pre>
ant
mavenInstallLocal
build
mavenInstallLocal
</pre>
<p>
Afterwards, you can include the database in your Maven 2 project as a dependency:
...
...
@@ -126,7 +126,7 @@ The translation of this software is split into the following parts:
<p>
The conversion between UTF-8 and Java encoding (using the \u syntax), as well as the HTML entities (
&
#..;)
is automated by running the tool PropertiesToUTF8. The web site translation is automated as well,
using
<code>
ant
docs
</code>
.
using
<code>
build
docs
</code>
.
</p>
</div></td></tr></table>
<!-- analytics -->
</body></html>
h2/src/docsrc/html/history.html
浏览文件 @
5752fb83
...
...
@@ -107,6 +107,7 @@ via PayPal:
</li><li>
Harpal Grover Consulting Inc., USA
</li><li>
Elisabetta Berlini, Italy
</li><li>
William Gilbert, USA
</li><li>
Antonio Dieguez, Chile
</li></ul>
</div></td></tr></table>
<!-- analytics -->
</body></html>
h2/src/docsrc/html/roadmap.html
浏览文件 @
5752fb83
...
...
@@ -410,6 +410,7 @@ Roadmap
</li><li>
Support CREATE TEMPORARY LINKED TABLE.
</li><li>
MySQL compatibility: SELECT @variable := x FROM SYSTEM_RANGE(1, 50);
</li><li>
Oracle compatibility: support NLS_DATE_FORMAT.
</li><li>
Support flashback queries as in Oracle.
</li></ul>
<h2>
Not Planned
</h2>
...
...
h2/src/installer/pomUpload.xml
deleted
100644 → 0
浏览文件 @
40263158
<project>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.h2database
</groupId>
<artifactId>
h2
</artifactId>
<version>
@version@
</version>
<packaging>
jar
</packaging>
<name>
H2 Database Engine
</name>
<url>
http://www.h2database.com
</url>
<description>
H2 Database Engine
</description>
<licenses>
<license>
<name>
The H2 License, Version 1.0
</name>
<url>
http://h2database.com/html/license.html
</url>
<distribution>
repo
</distribution>
</license>
</licenses>
<scm>
<url>
http://h2database.googlecode.com/svn/trunk
</url>
</scm>
<dependencies>
</dependencies>
</project>
\ No newline at end of file
h2/src/tools/org/h2/build/Build.java
浏览文件 @
5752fb83
...
...
@@ -21,12 +21,15 @@ public class Build extends BuildBase {
}
public
void
all
()
{
jar
Small
();
jar
();
docs
();
}
public
void
spellcheck
()
{
java
(
"org.h2.build.doc.SpellChecker"
,
null
);
public
void
clean
()
{
delete
(
"temp"
);
delete
(
"docs"
);
mkdir
(
"docs"
);
mkdir
(
"bin"
);
}
public
void
docs
()
{
...
...
@@ -44,6 +47,15 @@ public class Build extends BuildBase {
java
(
"org.h2.build.doc.SpellChecker"
,
null
);
}
public
void
download
()
{
download
(
"ext/servlet-api-2.4.jar"
,
"http://repo1.maven.org/maven2/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar"
,
"3fc542fe8bb8164e8d3e840fe7403bc0518053c0"
);
download
(
"ext/lucene-core-2.2.0.jar"
,
"http://repo1.maven.org/maven2/org/apache/lucene/lucene-core/2.2.0/lucene-core-2.2.0.jar"
,
"47b6eee2e17bd68911e7045896a1c09de0b2dda8"
);
}
public
void
javadoc
()
{
delete
(
"docs"
);
mkdir
(
"docs/javadoc"
);
...
...
@@ -52,19 +64,50 @@ public class Build extends BuildBase {
"-doclet"
,
"org.h2.build.doclet.Doclet"
});
copy
(
"docs/javadoc"
,
getFiles
(
"src/docsrc/javadoc"
),
"src/docsrc/javadoc"
);
}
public
void
resources
()
{
public
void
javadocImpl
()
{
mkdir
(
"docs/javadocImpl"
);
System
.
setProperty
(
"h2.interfacesOnly"
,
"false"
);
System
.
setProperty
(
"h2.destDir"
,
"docs/javadocImpl"
);
javadoc
(
new
String
[]
{
"-sourcepath"
,
"src/main"
+
File
.
pathSeparator
+
"src/test"
+
File
.
pathSeparator
+
"src/tools"
,
"-classpath"
,
"ext/servlet-api-2.4.jar"
+
File
.
pathSeparator
+
"ext/lucene-core-2.2.0.jar"
+
File
.
pathSeparator
+
System
.
getProperty
(
"java.home"
)
+
"/../lib/tools.jar"
,
"-subpackages"
,
"org.h2"
,
"-doclet"
,
"org.h2.build.doclet.Doclet"
});
javadoc
(
new
String
[]
{
"-sourcepath"
,
"src/main"
+
File
.
pathSeparator
+
"src/test"
+
File
.
pathSeparator
+
"src/tools"
,
"-noindex"
,
"-classpath"
,
"ext/servlet-api-2.4.jar"
+
File
.
pathSeparator
+
"ext/lucene-core-2.2.0.jar"
+
File
.
pathSeparator
+
System
.
getProperty
(
"java.home"
)
+
"/../lib/tools.jar"
,
"-subpackages"
,
"org.h2"
,
"-exclude"
,
"org.h2.build.*,org.h2.dev.*"
,
"-doclet"
,
"org.h2.build.doclet.Doclet"
});
copy
(
"docs/javadocImpl"
,
getFiles
(
"src/docsrc/javadoc"
),
"src/docsrc/javadoc"
);
}
private
void
resources
(
boolean
clientOnly
)
{
FileList
files
=
getFiles
(
"src/main"
).
exclude
(
"*.java"
).
exclude
(
"*/package.html"
).
exclude
(
"*/java.sql.Driver"
);
if
(
clientOnly
)
{
files
=
files
.
exclude
(
"src/main/org/h2/server/*"
);
}
zip
(
"temp/org/h2/util/data.zip"
,
files
,
"src/main"
,
true
,
false
);
}
public
void
spellcheck
()
{
java
(
"org.h2.build.doc.SpellChecker"
,
null
);
}
private
String
getVersion
()
{
return
getStaticField
(
"org.h2.engine.Constants"
,
"VERSION"
);
}
private
void
manifest
(
String
mainClassName
)
{
String
manifest
=
new
String
(
readFile
(
new
File
(
"src/main/META-INF/MANIFEST.MF"
)));
String
version
=
getStaticField
(
"org.h2.engine.Constants"
,
"VERSION"
);
manifest
=
replaceAll
(
manifest
,
"${version}"
,
version
);
manifest
=
replaceAll
(
manifest
,
"${version}"
,
getVersion
());
manifest
=
replaceAll
(
manifest
,
"${buildJdk}"
,
getJavaSpecVersion
());
String
createdBy
=
System
.
getProperty
(
"java.runtime.version"
)
+
" ("
+
System
.
getProperty
(
"java.vm.vendor"
)
+
")"
;
...
...
@@ -73,6 +116,35 @@ public class Build extends BuildBase {
manifest
=
replaceAll
(
manifest
,
"${mainClassTag}"
,
mainClassTag
);
writeFile
(
new
File
(
"temp/META-INF/MANIFEST.MF"
),
manifest
.
getBytes
());
}
public
void
mavenInstallLocal
()
{
jar
();
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"
);
}
public
void
mavenDeployCentral
()
{
jar
();
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"
);
}
public
void
jar
()
{
compile
();
...
...
@@ -88,8 +160,21 @@ public class Build extends BuildBase {
jar
(
"bin/h2.jar"
,
files
,
"temp"
);
}
public
void
jarClient
()
{
compile
(
true
,
true
);
FileList
files
=
getFiles
(
"temp"
).
exclude
(
"temp/org/h2/dev/*"
).
exclude
(
"temp/org/h2/build/*"
).
exclude
(
"temp/org/h2/samples/*"
).
exclude
(
"temp/org/h2/test/*"
).
exclude
(
"*.bat"
).
exclude
(
"*.sh"
).
exclude
(
"*.txt"
);
jar
(
"bin/h2client.jar"
,
files
,
"temp"
);
}
public
void
jarSmall
()
{
compile
(
false
);
compile
(
false
,
false
);
FileList
files
=
getFiles
(
"temp"
).
exclude
(
"temp/org/h2/dev/*"
).
exclude
(
"temp/org/h2/build/*"
).
...
...
@@ -106,20 +191,11 @@ public class Build extends BuildBase {
jar
(
"bin/h2small.jar"
,
files
,
"temp"
);
}
public
void
download
()
{
download
(
"ext/servlet-api-2.4.jar"
,
"http://repo1.maven.org/maven2/javax/servlet/servlet-api/2.4/servlet-api-2.4.jar"
,
"3fc542fe8bb8164e8d3e840fe7403bc0518053c0"
);
download
(
"ext/lucene-core-2.2.0.jar"
,
"http://repo1.maven.org/maven2/org/apache/lucene/lucene-core/2.2.0/lucene-core-2.2.0.jar"
,
"47b6eee2e17bd68911e7045896a1c09de0b2dda8"
);
}
public
void
compile
()
{
compile
(
true
);
compile
(
true
,
false
);
}
private
void
compile
(
boolean
debugInfo
)
{
private
void
compile
(
boolean
debugInfo
,
boolean
clientOnly
)
{
try
{
SwitchSource
.
main
(
new
String
[]
{
"-dir"
,
"src"
,
"-auto"
});
}
catch
(
IOException
e
)
{
...
...
@@ -127,46 +203,57 @@ public class Build extends BuildBase {
}
clean
();
mkdir
(
"temp"
);
resources
();
resources
(
clientOnly
);
download
();
String
classpath
=
"temp"
+
File
.
pathSeparatorChar
+
"ext/servlet-api-2.4.jar"
+
File
.
pathSeparatorChar
+
"ext/lucene-core-2.2.0.jar"
+
File
.
pathSeparator
+
System
.
getProperty
(
"java.home"
)
+
"/../lib/tools.jar"
;
FileList
files
=
getFiles
(
"src/main"
);
FileList
files
;
if
(
clientOnly
)
{
files
=
getFiles
(
"src/main/org/h2/Driver.java"
);
files
.
addAll
(
getFiles
(
"src/main/org/h2/jdbc"
));
files
.
addAll
(
getFiles
(
"src/main/org/h2/jdbcx"
));
}
else
{
files
=
getFiles
(
"src/main"
);
}
if
(
debugInfo
)
{
javac
(
new
String
[]
{
"-d"
,
"temp"
,
"-sourcepath"
,
"src/main"
,
"-classpath"
,
classpath
},
files
);
}
else
{
javac
(
new
String
[]
{
"-g:none"
,
"-d"
,
"temp"
,
"-sourcepath"
,
"src/main"
,
"-classpath"
,
classpath
},
files
);
}
files
=
getFiles
(
"src/test"
);
files
.
addAll
(
getFiles
(
"src/tools"
));
javac
(
new
String
[]
{
"-d"
,
"temp"
,
"-sourcepath"
,
"src/test"
+
File
.
pathSeparator
+
"src/tools"
,
"-classpath"
,
classpath
},
files
);
files
=
getFiles
(
"src/main/META-INF/services"
);
copy
(
"temp"
,
files
,
"src/main"
);
files
=
getFiles
(
"src/installer"
).
keep
(
"*.bat"
);
files
.
addAll
(
getFiles
(
"src/installer"
).
keep
(
"*.sh"
));
copy
(
"temp"
,
files
,
"src/installer"
);
if
(!
clientOnly
)
{
files
=
getFiles
(
"src/test"
);
files
.
addAll
(
getFiles
(
"src/tools"
));
javac
(
new
String
[]
{
"-d"
,
"temp"
,
"-sourcepath"
,
"src/test"
+
File
.
pathSeparator
+
"src/tools"
,
"-classpath"
,
classpath
},
files
);
files
=
getFiles
(
"src/test"
).
exclude
(
"*.java"
).
exclude
(
"*/package.html"
);
copy
(
"temp"
,
files
,
"src/test"
);
}
public
void
clean
()
{
delete
(
"temp"
);
delete
(
"docs"
);
mkdir
(
"docs"
);
mkdir
(
"bin"
);
files
=
getFiles
(
"src/installer"
).
keep
(
"*.bat"
);
files
.
addAll
(
getFiles
(
"src/installer"
).
keep
(
"*.sh"
));
copy
(
"temp"
,
files
,
"src/installer"
);
files
=
getFiles
(
"src/test"
).
exclude
(
"*.java"
).
exclude
(
"*/package.html"
);
copy
(
"temp"
,
files
,
"src/test"
);
}
}
public
void
test
()
{
}
public
void
zip
()
{
FileList
files
=
getFiles
(
"../h2"
).
keep
(
"../h2/build.*"
);
files
.
addAll
(
getFiles
(
"../h2/bin"
).
keep
(
"../h2/bin/h2.*"
));
files
.
addAll
(
getFiles
(
"../h2/docs"
));
files
.
addAll
(
getFiles
(
"../h2/service"
));
files
.
addAll
(
getFiles
(
"../h2/src"
));
zip
(
"../h2.zip"
,
files
,
"../"
,
false
,
false
);
}
}
h2/src/tools/org/h2/build/BuildBase.java
浏览文件 @
5752fb83
...
...
@@ -141,8 +141,31 @@ public class BuildBase {
}
out
.
println
();
}
private
boolean
isWindows
()
{
return
System
.
getProperty
(
"os.name"
).
toLowerCase
().
indexOf
(
"windows"
)
>=
0
;
}
/**
* Execute a script in a separate process.
*
* @param script the script name (for example mvn or ant)
* @param args the command line parameters
* @return the exit value
*/
protected
int
execScript
(
String
script
,
String
args
)
{
int
testLinux
;
return
exec
(
isWindows
()
?
".bat"
:
".sh"
+
" "
+
args
,
null
);
}
private
int
exec
(
String
command
,
String
[]
args
)
{
/**
* Execute a program in a separate process.
*
* @param command the program to run
* @param args the command line parameters
* @return the exit value
*/
protected
int
exec
(
String
command
,
String
[]
args
)
{
try
{
out
.
print
(
command
);
for
(
int
i
=
0
;
args
!=
null
&&
i
<
args
.
length
;
i
++)
{
...
...
@@ -150,7 +173,12 @@ public class BuildBase {
out
.
print
(
args
[
i
]);
}
out
.
println
();
Process
p
=
Runtime
.
getRuntime
().
exec
(
command
,
args
);
Process
p
;
if
(
args
==
null
)
{
p
=
Runtime
.
getRuntime
().
exec
(
command
);
}
else
{
p
=
Runtime
.
getRuntime
().
exec
(
command
,
args
);
}
copy
(
p
.
getInputStream
(),
out
);
copy
(
p
.
getErrorStream
(),
out
);
return
p
.
exitValue
();
...
...
@@ -261,7 +289,7 @@ public class BuildBase {
if
(
targetFile
.
exists
())
{
return
;
}
targetFile
.
getParentFile
().
mkdirs
();
targetFile
.
get
AbsoluteFile
().
get
ParentFile
().
mkdirs
();
ByteArrayOutputStream
buff
=
new
ByteArrayOutputStream
();
try
{
out
.
println
(
"Downloading "
+
fileURL
);
...
...
@@ -335,7 +363,7 @@ public class BuildBase {
throw
new
Error
(
"Unsupported pattern, may only start or end with *:"
+
pattern
);
}
// normalize / and \
pattern
=
new
File
(
pattern
).
getPath
(
);
pattern
=
replaceAll
(
pattern
,
"/"
,
File
.
separator
);
FileList
list
=
new
FileList
();
for
(
int
i
=
0
;
i
<
files
.
size
();
i
++)
{
File
f
=
(
File
)
files
.
get
(
i
);
...
...
@@ -444,7 +472,7 @@ public class BuildBase {
}
});
}
new
File
(
destFile
).
getParentFile
().
mkdirs
();
new
File
(
destFile
).
get
AbsoluteFile
().
get
ParentFile
().
mkdirs
();
// normalize the path (replace / with \ if required)
basePath
=
new
File
(
basePath
).
getPath
();
try
{
...
...
@@ -593,7 +621,7 @@ public class BuildBase {
* @param after the new substring
* @return the string with the string replaced
*/
protected
String
replaceAll
(
String
s
,
String
before
,
String
after
)
{
protected
static
String
replaceAll
(
String
s
,
String
before
,
String
after
)
{
int
index
=
0
;
while
(
true
)
{
int
next
=
s
.
indexOf
(
before
,
index
);
...
...
h2/src/tools/org/h2/build/doc/dictionary.txt
浏览文件 @
5752fb83
...
...
@@ -505,4 +505,5 @@ material hereto equipment copyrighted enforceability excludes licensees
estoppel manner reserves defense complies suitable identify infringe
originator brought contribution effectively assumes waives conjunction
informs negotiations collectively omissions trial nor qualify steward neither
worldwide everyone additions expense lawsuit checksums jazoon
worldwide everyone additions expense lawsuit checksums jazoon flashback
dieguez dfile mvn dversion dgroup dpackaging dartifact durl dpom pom
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论