提交 066140f8 authored 作者: Thomas Mueller's avatar Thomas Mueller

Generate the source code jar file.

上级 24e04f58
...@@ -230,11 +230,7 @@ public class Build extends BuildBase { ...@@ -230,11 +230,7 @@ public class Build extends BuildBase {
} }
private String getJarSuffix() { private String getJarSuffix() {
String version = getVersion(); return "-" + getVersion() + ".jar";
if (version.startsWith("1.0.")) {
return ".jar";
}
return "-" + version + ".jar";
} }
/** /**
...@@ -249,7 +245,7 @@ public class Build extends BuildBase { ...@@ -249,7 +245,7 @@ public class Build extends BuildBase {
delete("docs/html/onePage.html"); delete("docs/html/onePage.html");
FileList files = files("../h2").keep("../h2/build.*"); FileList files = files("../h2").keep("../h2/build.*");
files.addAll(files("../h2/bin").keep("../h2/bin/h2*")); files.addAll(files("../h2/bin").keep("../h2/bin/h2*"));
files.addAll(files("../h2/docs")); files.addAll(files("../h2/docs").exclude("*.jar"));
files.addAll(files("../h2/service")); files.addAll(files("../h2/service"));
files.addAll(files("../h2/src")); files.addAll(files("../h2/src"));
zip("../h2web/h2.zip", files, "../", false, false); zip("../h2web/h2.zip", files, "../", false, false);
...@@ -270,7 +266,6 @@ public class Build extends BuildBase { ...@@ -270,7 +266,6 @@ public class Build extends BuildBase {
writeFile(new File("../h2web/h2-setup-" + buildDate + ".exe"), data); writeFile(new File("../h2web/h2-setup-" + buildDate + ".exe"), data);
} }
updateChecksum("../h2web/html/download.html", sha1Zip, sha1Exe); updateChecksum("../h2web/html/download.html", sha1Zip, sha1Exe);
updateChecksum("../h2web/html/download_ja.html", sha1Zip, sha1Exe);
} }
private void updateChecksum(String fileName, String sha1Zip, String sha1Exe) { private void updateChecksum(String fileName, String sha1Zip, String sha1Exe) {
...@@ -307,6 +302,14 @@ public class Build extends BuildBase { ...@@ -307,6 +302,14 @@ public class Build extends BuildBase {
filter("src/installer/h2w.bat", "bin/h2w.bat", "h2.jar", "h2" + getJarSuffix()); filter("src/installer/h2w.bat", "bin/h2w.bat", "h2.jar", "h2" + getJarSuffix());
} }
/**
* Create a jar file that contains the source code.
*/
public void jarSources() {
FileList files = files("src/main").keep("*.java");
jar("docs/h2-" + getVersion() + "-sources.jar", files, "src/main");
}
/** /**
* Create the h2client.jar. This only contains the remote JDBC * Create the h2client.jar. This only contains the remote JDBC
* implementation. * implementation.
...@@ -433,7 +436,7 @@ public class Build extends BuildBase { ...@@ -433,7 +436,7 @@ public class Build extends BuildBase {
*/ */
public void mavenDeployCentral() { public void mavenDeployCentral() {
jar(); jar();
String pom = new String(readFile(new File("src/installer/pom.xml"))); String pom = new String(readFile(new File("src/installer/pom-template.xml")));
pom = replaceAll(pom, "@version@", getVersion()); pom = replaceAll(pom, "@version@", getVersion());
writeFile(new File("bin/pom.xml"), pom.getBytes()); writeFile(new File("bin/pom.xml"), pom.getBytes());
execScript("mvn", args( execScript("mvn", args(
...@@ -445,6 +448,7 @@ public class Build extends BuildBase { ...@@ -445,6 +448,7 @@ public class Build extends BuildBase {
"-DpomFile=bin/pom.xml", "-DpomFile=bin/pom.xml",
"-DartifactId=h2", "-DartifactId=h2",
"-DgroupId=com.h2database")); "-DgroupId=com.h2database"));
int todoDeploySources;
} }
/** /**
...@@ -453,7 +457,7 @@ public class Build extends BuildBase { ...@@ -453,7 +457,7 @@ public class Build extends BuildBase {
*/ */
public void mavenInstallLocal() { public void mavenInstallLocal() {
jar(); jar();
String pom = new String(readFile(new File("src/installer/pom.xml"))); String pom = new String(readFile(new File("src/installer/pom-template.xml")));
pom = replaceAll(pom, "@version@", "1.0-SNAPSHOT"); pom = replaceAll(pom, "@version@", "1.0-SNAPSHOT");
writeFile(new File("bin/pom.xml"), pom.getBytes()); writeFile(new File("bin/pom.xml"), pom.getBytes());
execScript("mvn", args( execScript("mvn", args(
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论