Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
026493c1
提交
026493c1
authored
1月 27, 2016
作者:
Tomas Pospichal
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Ensure the build executes java from the current JRE
上级
fb9452c6
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
43 行增加
和
24 行删除
+43
-24
Build.java
h2/src/tools/org/h2/build/Build.java
+20
-24
BuildBase.java
h2/src/tools/org/h2/build/BuildBase.java
+23
-0
没有找到文件。
h2/src/tools/org/h2/build/Build.java
浏览文件 @
026493c1
...
...
@@ -12,8 +12,9 @@ import java.net.InetSocketAddress;
import
java.net.ServerSocket
;
import
java.net.Socket
;
import
java.util.HashMap
;
import
java.util.TreeMap
;
import
java.util.Map.Entry
;
import
java.util.TreeMap
;
import
org.h2.build.code.SwitchSource
;
import
org.h2.build.doc.XMLParser
;
...
...
@@ -69,14 +70,14 @@ public class Build extends BuildBase {
File
.
pathSeparator
+
"ext/mysql-connector-java-5.1.6.jar"
;
StringList
args
=
args
(
"-Xmx128m"
,
"-cp"
,
cp
,
"org.h2.test.bench.TestPerformance"
);
exec
(
"java"
,
args
.
plus
(
"-init"
,
"-db"
,
"1"
));
exec
(
"java"
,
args
.
plus
(
"-db"
,
"2"
));
exec
(
"java"
,
args
.
plus
(
"-db"
,
"3"
,
"-out"
,
"pe.html"
));
exec
(
"java"
,
args
.
plus
(
"-init"
,
"-db"
,
"4"
));
exec
(
"java"
,
args
.
plus
(
"-db"
,
"5"
,
"-exit"
));
exec
(
"java"
,
args
.
plus
(
"-db"
,
"6"
));
exec
(
"java"
,
args
.
plus
(
"-db"
,
"7"
));
exec
(
"java"
,
args
.
plus
(
"-db"
,
"8"
,
"-out"
,
"ps.html"
));
exec
Java
(
args
.
plus
(
"-init"
,
"-db"
,
"1"
));
exec
Java
(
args
.
plus
(
"-db"
,
"2"
));
exec
Java
(
args
.
plus
(
"-db"
,
"3"
,
"-out"
,
"pe.html"
));
exec
Java
(
args
.
plus
(
"-init"
,
"-db"
,
"4"
));
exec
Java
(
args
.
plus
(
"-db"
,
"5"
,
"-exit"
));
exec
Java
(
args
.
plus
(
"-db"
,
"6"
));
exec
Java
(
args
.
plus
(
"-db"
,
"7"
));
exec
Java
(
args
.
plus
(
"-db"
,
"8"
,
"-out"
,
"ps.html"
));
}
/**
...
...
@@ -132,10 +133,9 @@ public class Build extends BuildBase {
File
.
pathSeparator
+
"ext/jts-core-1.14.0.jar"
+
File
.
pathSeparator
+
"ext/slf4j-api-1.6.0.jar"
+
File
.
pathSeparator
+
"ext/slf4j-nop-1.6.0.jar"
+
File
.
pathSeparator
+
System
.
getProperty
(
"java.home"
)
+
"/../lib/tools.jar"
;
File
.
pathSeparator
+
javaToolsJar
;
// -XX:-UseSplitVerifier is for Java 7 compatibility
exec
(
"java"
,
args
(
exec
Java
(
args
(
"-Xmx128m"
,
"-XX:-UseSplitVerifier"
,
"-cp"
,
cp
,
"emma"
,
"run"
,
...
...
@@ -209,7 +209,7 @@ public class Build extends BuildBase {
File
.
pathSeparator
+
"ext/org.osgi.core-4.2.0.jar"
+
File
.
pathSeparator
+
"ext/org.osgi.enterprise-4.2.0.jar"
+
File
.
pathSeparator
+
"ext/jts-core-1.14.0.jar"
+
File
.
pathSeparator
+
System
.
getProperty
(
"java.home"
)
+
"/../lib/tools.jar"
;
File
.
pathSeparator
+
javaToolsJar
;
FileList
files
;
if
(
clientOnly
)
{
files
=
files
(
"src/main/org/h2/Driver.java"
);
...
...
@@ -610,8 +610,7 @@ public class Build extends BuildBase {
"-noindex"
,
"-tag"
,
"h2.resource"
,
"-d"
,
"docs/javadocImpl2"
,
"-classpath"
,
System
.
getProperty
(
"java.home"
)
+
"/../lib/tools.jar"
+
"-classpath"
,
javaToolsJar
+
File
.
pathSeparator
+
"ext/slf4j-api-1.6.0.jar"
+
File
.
pathSeparator
+
"ext/servlet-api-3.0.1.jar"
+
File
.
pathSeparator
+
"ext/lucene-core-3.0.2.jar"
+
...
...
@@ -626,8 +625,7 @@ public class Build extends BuildBase {
"-noindex"
,
"-tag"
,
"h2.resource"
,
"-d"
,
"docs/javadocImpl3"
,
"-classpath"
,
System
.
getProperty
(
"java.home"
)
+
"/../lib/tools.jar"
+
"-classpath"
,
javaToolsJar
+
File
.
pathSeparator
+
"ext/slf4j-api-1.6.0.jar"
+
File
.
pathSeparator
+
"ext/servlet-api-3.0.1.jar"
+
File
.
pathSeparator
+
"ext/lucene-core-3.0.2.jar"
+
...
...
@@ -642,8 +640,7 @@ public class Build extends BuildBase {
javadoc
(
"-sourcepath"
,
"src/main"
+
File
.
pathSeparator
+
"src/test"
+
File
.
pathSeparator
+
"src/tools"
,
"-classpath"
,
System
.
getProperty
(
"java.home"
)
+
"/../lib/tools.jar"
+
"-classpath"
,
javaToolsJar
+
File
.
pathSeparator
+
"ext/slf4j-api-1.6.0.jar"
+
File
.
pathSeparator
+
"ext/servlet-api-3.0.1.jar"
+
File
.
pathSeparator
+
"ext/lucene-core-3.0.2.jar"
+
...
...
@@ -922,15 +919,14 @@ public class Build extends BuildBase {
File
.
pathSeparator
+
"ext/jts-core-1.14.0.jar"
+
File
.
pathSeparator
+
"ext/slf4j-api-1.6.0.jar"
+
File
.
pathSeparator
+
"ext/slf4j-nop-1.6.0.jar"
+
File
.
pathSeparator
+
System
.
getProperty
(
"java.home"
)
+
"/../lib/tools.jar"
;
File
.
pathSeparator
+
javaToolsJar
;
if
(
fast
)
{
exec
(
"java"
,
args
(
exec
Java
(
args
(
"-Xmx128m"
,
"-cp"
,
cp
,
"org.h2.test.TestAll"
,
"fast"
));
}
else
{
exec
(
"java"
,
args
(
exec
Java
(
args
(
"-Xmx128m"
,
"-cp"
,
cp
,
"org.h2.test.TestAll"
));
...
...
@@ -1077,7 +1073,7 @@ public class Build extends BuildBase {
javac
(
args
,
files
);
String
cp
=
"bin"
+
File
.
pathSeparator
+
"temp"
+
File
.
pathSeparator
+
"ext/h2mig_pagestore_addon.jar"
;
exec
(
"java"
,
args
(
"-Xmx512m"
,
"-cp"
,
cp
,
exec
Java
(
args
(
"-Xmx512m"
,
"-cp"
,
cp
,
"-Dh2.ftpPassword="
+
password
,
"org.h2.build.doc.UploadBuild"
));
}
...
...
h2/src/tools/org/h2/build/BuildBase.java
浏览文件 @
026493c1
...
...
@@ -41,6 +41,7 @@ import java.util.zip.Deflater;
import
java.util.zip.ZipEntry
;
import
java.util.zip.ZipOutputStream
;
/**
* This class is a complete pure Java build tool. It allows to build this
* project without any external dependencies except a JDK.
...
...
@@ -173,6 +174,18 @@ public class BuildBase {
*/
protected
boolean
quiet
;
/**
* The full path to the executable of the current JRE.
*/
protected
String
javaExecutable
=
System
.
getProperty
(
"java.home"
)
+
File
.
separator
+
"bin"
+
File
.
separator
+
"java"
;
/**
* The full path to the tools jar of the current JDK.
*/
protected
String
javaToolsJar
=
System
.
getProperty
(
"java.home"
)
+
File
.
separator
+
".."
+
File
.
separator
+
"lib"
+
File
.
separator
+
"tools.jar"
;
/**
* This method should be called by the main method.
*
...
...
@@ -341,6 +354,16 @@ public class BuildBase {
return
exec
(
script
,
args
);
}
/**
* Execute java in a separate process, but using the java executable of the current JRE.
*
* @param args the command line parameters for the java command
* @return the exit value
*/
protected
int
execJava
(
StringList
args
)
{
return
exec
(
javaExecutable
,
args
);
}
/**
* Execute a program in a separate process.
*
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论