提交 45ebba7a authored 作者: Thomas Mueller's avatar Thomas Mueller

Issue 294: The Maven source bundle now contains a manifest file that allows…

Issue 294: The Maven source bundle now contains a manifest file that allows Eclipse to automatically attach the source code (if Maven is used).
上级 df90d961
......@@ -144,8 +144,8 @@ Example:
</pre>
<p>
New versions of this database are first uploaded to http://hsql.sourceforge.net/m2-repo/ and then automatically
synchronized with the main Maven repository; however after a new release it may take a few hours before
they are available there.
synchronized with the main <a href="http://repo2.maven.org/maven2/com/h2database/h2/">Maven repository</a>;
however after a new release it may take a few hours before they are available there.
</p>
<h3>Using Snapshot Version</h3>
......
......@@ -18,7 +18,9 @@ Change Log
<h1>Change Log</h1>
<h2>Next Version (unreleased)</h2>
<ul><li>A query with an explicit LIMIT 0 will now return no rows (so far it meant no limit),
<ul><li>Issue 294: The Maven source bundle now contains a manifest file that allows Eclipse to automatically
attach the source code (if Maven is used).
</li><li>A query with an explicit LIMIT 0 will now return no rows (so far it meant no limit),
which is compatible with PostgreSQL and MySQL.
A negative limit value, (as well as LIMIT NULL) mean no limit (so far a negative limit meant a limit of one row).
There were similar problems with OFFSET.
......
......@@ -43,6 +43,13 @@ Downloads
<a href="http://www.h2database.com/automated/h2-latest.jar">Latest Automated Build (not released)</a>
</p>
<h3>Maven Bundles (Binary, Javadoc, and Source)</h3>
<p>
<a href="http://repo2.maven.org/maven2/com/h2database/h2/${version}/h2-${version}.jar">Binary</a><br />
<a href="http://repo2.maven.org/maven2/com/h2database/h2/${version}/h2-${version}-javadoc.jar">Javadoc</a><br />
<a href="http://repo2.maven.org/maven2/com/h2database/h2/${version}/h2-${version}-sources.jar">Sources</a><br />
</p>
<h3>Database Upgrade Helper Files</h3>
<p>
<a href="http://h2database.com/h2mig_pagestore_addon.jar">Upgrade database from 1.1 to the current version</a>
......
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: H2 Database Engine Sources
Bundle-SymbolicName: org.h2.source
Bundle-Vendor: H2 Group
Bundle-Version: ${version}
Eclipse-SourceBundle: org.h2;version="${version}"
\ No newline at end of file
......@@ -485,10 +485,17 @@ public class Build extends BuildBase {
* a new H2 version is made.
*/
public void mavenDeployCentral() {
// generate and deploy h2*-sources.jar file
FileList files = files("src/main").keep("*.java");
jar("docs/h2-" + getVersion() + "-sources.jar", files, "src/main");
FileList files = files("src/main");
copy("docs", files, "src/main");
files = files("docs").keep("docs/org/*").keep("*.java");
files.addAll(files("docs").keep("docs/META-INF/*"));
String manifest = new String(readFile(new File("src/installer/source-manifest.mf")));
manifest = replaceAll(manifest, "${version}", getVersion());
writeFile(new File("docs/META-INF/MANIFEST.MF"), manifest.getBytes());
jar("docs/h2-" + getVersion() + "-sources.jar", files, "docs");
delete("docs/org");
delete("docs/META-INF");
// the option -DgeneratePom=false doesn't work with some versions of
// Maven because of bug http://jira.codehaus.org/browse/MDEPLOY-84
// as a workaround we generate the pom, but overwrite it later on
......
......@@ -762,6 +762,9 @@ public class BuildBase {
// normalize the path (replace / with \ if required)
basePath = new File(basePath).getPath();
try {
if (new File(destFile).isDirectory()) {
throw new IOException("Can't create the file as a directory with this name already exists: " + destFile);
}
OutputStream out = new BufferedOutputStream(new FileOutputStream(destFile));
ZipOutputStream zipOut;
if (jar) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论