Unverified 提交 217abf45 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov 提交者: GitHub

Merge pull request #1364 from katzyn/build

Add names of modules and missing manifests
Manifest-Version: 1.0
Implementation-Title: H2 Database Client
Implementation-URL: http://www.h2database.com
Implementation-Version: ${version}
Build-Jdk: ${buildJdk}
Created-By: ${createdBy}
Automatic-Module-Name: com.h2database.client
Bundle-ManifestVersion: 2
Bundle-Name: H2 Database Client
Bundle-SymbolicName: com.h2database.client
Bundle-Vendor: H2 Group
Bundle-Version: ${version}
Bundle-License: http://www.h2database.com/html/license.html
Bundle-Category: jdbc
Multi-Release: true
Import-Package: javax.crypto,
javax.crypto.spec,
javax.naming;resolution:=optional,
javax.naming.spi;resolution:=optional,
javax.net,
javax.net.ssl,
javax.sql,
javax.transaction.xa;resolution:=optional,
javax.xml.parsers;resolution:=optional,
javax.xml.stream;resolution:=optional,
javax.xml.transform;resolution:=optional,
javax.xml.transform.dom;resolution:=optional,
javax.xml.transform.sax;resolution:=optional,
javax.xml.transform.stax;resolution:=optional,
javax.xml.transform.stream;resolution:=optional,
org.w3c.dom;resolution:=optional,
org.xml.sax;resolution:=optional,
org.locationtech.jts.geom;version="1.15.0";resolution:=optional,
org.locationtech.jts.io;version="1.15.0";resolution:=optional
Export-Package: org.h2;version="${version}",
org.h2.api;version="${version}",
org.h2.jdbc;version="${version}",
org.h2.jdbcx;version="${version}",
org.h2.tools;version="${version}"
...@@ -4,15 +4,18 @@ Implementation-URL: http://www.h2database.com ...@@ -4,15 +4,18 @@ Implementation-URL: http://www.h2database.com
Implementation-Version: ${version} Implementation-Version: ${version}
Build-Jdk: ${buildJdk} Build-Jdk: ${buildJdk}
Created-By: ${createdBy} Created-By: ${createdBy}
Automatic-Module-Name: com.h2database.mvstore
Bundle-Description: The MVStore is a persistent, log structured key-value store. Bundle-Description: The MVStore is a persistent, log structured key-value store.
Bundle-DocURL: http://h2database.com/html/mvstore.html Bundle-DocURL: http://h2database.com/html/mvstore.html
Bundle-ManifestVersion: 2 Bundle-ManifestVersion: 2
Bundle-Name: H2 MVStore Bundle-Name: H2 MVStore
Bundle-SymbolicName: org.h2.mvstore Bundle-SymbolicName: com.h2database.mvstore
Bundle-Vendor: H2 Group Bundle-Vendor: H2 Group
Bundle-Version: ${version} Bundle-Version: ${version}
Bundle-License: http://www.h2database.com/html/license.html Bundle-License: http://www.h2database.com/html/license.html
Bundle-Category: utility Bundle-Category: utility
Import-Package: javax.crypto,
javax.crypto.spec
Export-Package: org.h2.mvstore;version="${version}", Export-Package: org.h2.mvstore;version="${version}",
org.h2.mvstore.type;version="${version}", org.h2.mvstore.type;version="${version}",
org.h2.mvstore.rtree;version="${version}" org.h2.mvstore.rtree;version="${version}"
Manifest-Version: 1.0
Implementation-Title: H2 Database embedded Engine
Implementation-URL: http://www.h2database.com
Implementation-Version: ${version}
Build-Jdk: ${buildJdk}
Created-By: ${createdBy}
Automatic-Module-Name: com.h2database.small
Bundle-Activator: org.h2.util.DbDriverActivator
Bundle-ManifestVersion: 2
Bundle-Name: H2 Database embedded Engine
Bundle-SymbolicName: com.h2database.small
Bundle-Vendor: H2 Group
Bundle-Version: ${version}
Bundle-License: http://www.h2database.com/html/license.html
Bundle-Category: jdbc
Multi-Release: true
Import-Package: javax.crypto,
javax.crypto.spec,
javax.management,
javax.naming;resolution:=optional,
javax.naming.directory;resolution:=optional,
javax.net,
javax.net.ssl,
javax.script;resolution:=optional,
javax.security.auth.callback;resolution:=optional,
javax.security.auth.login;resolution:=optional,
javax.sql,
javax.tools;resolution:=optional,
javax.xml.parsers;resolution:=optional,
javax.xml.stream;resolution:=optional,
javax.xml.transform;resolution:=optional,
javax.xml.transform.dom;resolution:=optional,
javax.xml.transform.sax;resolution:=optional,
javax.xml.transform.stax;resolution:=optional,
javax.xml.transform.stream;resolution:=optional,
org.w3c.dom;resolution:=optional,
org.xml.sax;resolution:=optional,
org.xml.sax.helpers;resolution:=optional,
org.locationtech.jts.geom;version="1.15.0";resolution:=optional,
org.locationtech.jts.io;version="1.15.0";resolution:=optional,
org.osgi.framework;version="1.5",
org.osgi.service.jdbc;version="1.0";resolution:=optional,
org.slf4j;version="[1.6.0,1.7.0)";resolution:=optional
Export-Package: org.h2;version="${version}",
org.h2.api;version="${version}",
org.h2.jdbc;version="${version}",
org.h2.tools;version="${version}"
Provide-Capability: osgi.service;objectClass:List<String>=org.osgi.service.jdbc.DataSourceFactory
Manifest-Version: 1.0 Manifest-Version: 1.0
Implementation-Title: ${title} Implementation-Title: H2 Database Engine
Implementation-URL: http://www.h2database.com Implementation-URL: http://www.h2database.com
Implementation-Version: ${version} Implementation-Version: ${version}
Build-Jdk: ${buildJdk} Build-Jdk: ${buildJdk}
Created-By: ${createdBy} Created-By: ${createdBy}
${mainClassTag} Main-Class: org.h2.tools.Console
Automatic-Module-Name: com.h2database
Bundle-Activator: org.h2.util.DbDriverActivator Bundle-Activator: org.h2.util.DbDriverActivator
Bundle-ManifestVersion: 2 Bundle-ManifestVersion: 2
Bundle-Name: H2 Database Engine Bundle-Name: H2 Database Engine
Bundle-SymbolicName: org.h2 Bundle-SymbolicName: com.h2database
Bundle-Vendor: H2 Group Bundle-Vendor: H2 Group
Bundle-Version: ${version} Bundle-Version: ${version}
Bundle-License: http://www.h2database.com/html/license.html Bundle-License: http://www.h2database.com/html/license.html
Bundle-Category: jdbc Bundle-Category: jdbc
Multi-Release: true Multi-Release: true
Import-Package: javax.management, Import-Package: javax.crypto,
javax.crypto.spec,
javax.management,
javax.naming;resolution:=optional, javax.naming;resolution:=optional,
javax.naming.directory;resolution:=optional,
javax.naming.spi;resolution:=optional, javax.naming.spi;resolution:=optional,
javax.net, javax.net,
javax.net.ssl, javax.net.ssl,
javax.script;resolution:=optional,
javax.security.auth.callback;resolution:=optional,
javax.security.auth.login;resolution:=optional,
javax.servlet;resolution:=optional, javax.servlet;resolution:=optional,
javax.servlet.http;resolution:=optional, javax.servlet.http;resolution:=optional,
javax.sql, javax.sql,
javax.tools;resolution:=optional, javax.tools;resolution:=optional,
javax.transaction.xa;resolution:=optional, javax.transaction.xa;resolution:=optional,
javax.xml.parsers;resolution:=optional,
javax.xml.stream;resolution:=optional,
javax.xml.transform;resolution:=optional,
javax.xml.transform.dom;resolution:=optional,
javax.xml.transform.sax;resolution:=optional,
javax.xml.transform.stax;resolution:=optional,
javax.xml.transform.stream;resolution:=optional,
org.w3c.dom;resolution:=optional,
org.xml.sax;resolution:=optional,
org.xml.sax.helpers;resolution:=optional,
org.apache.lucene.analysis;version="[3.6.2,4.0.0)";resolution:=optional, org.apache.lucene.analysis;version="[3.6.2,4.0.0)";resolution:=optional,
org.apache.lucene.analysis.standard;version="[3.6.2,4.0.0)";resolution:=optional, org.apache.lucene.analysis.standard;version="[3.6.2,4.0.0)";resolution:=optional,
org.apache.lucene.document;version="[3.6.2,4.0.0)";resolution:=optional, org.apache.lucene.document;version="[3.6.2,4.0.0)";resolution:=optional,
...@@ -33,13 +50,7 @@ Import-Package: javax.management, ...@@ -33,13 +50,7 @@ Import-Package: javax.management,
org.apache.lucene.store;version="[3.6.2,4.0.0)";resolution:=optional, org.apache.lucene.store;version="[3.6.2,4.0.0)";resolution:=optional,
org.apache.lucene.util;version="[3.6.2,4.0.0)";resolution:=optional, org.apache.lucene.util;version="[3.6.2,4.0.0)";resolution:=optional,
org.locationtech.jts.geom;version="1.15.0";resolution:=optional, org.locationtech.jts.geom;version="1.15.0";resolution:=optional,
org.h2;version="[${version},1.5.0)", org.locationtech.jts.io;version="1.15.0";resolution:=optional,
org.h2.api;version="[${version},1.5.0)",
org.h2.fulltext;version="[${version},1.5.0)",
org.h2.jdbcx;version="[${version},1.5.0)",
org.h2.tools;version="[${version},1.5.0)",
org.h2.util;version="[${version},1.5.0)",
org.h2.value;version="[${version},1.5.0)",
org.osgi.framework;version="1.5", org.osgi.framework;version="1.5",
org.osgi.service.jdbc;version="1.0";resolution:=optional, org.osgi.service.jdbc;version="1.0";resolution:=optional,
org.slf4j;version="[1.6.0,1.7.0)";resolution:=optional org.slf4j;version="[1.6.0,1.7.0)";resolution:=optional
...@@ -55,7 +66,7 @@ Export-Package: org.h2;version="${version}", ...@@ -55,7 +66,7 @@ Export-Package: org.h2;version="${version}",
org.h2.bnf;version="${version}", org.h2.bnf;version="${version}",
org.h2.bnf.context;version="${version}", org.h2.bnf.context;version="${version}",
org.h2.mvstore;version="${version}", org.h2.mvstore;version="${version}",
org.h2.mvstore.db;version="${version}", org.h2.mvstore.tx;version="${version}",
org.h2.mvstore.type;version="${version}", org.h2.mvstore.type;version="${version}",
org.h2.mvstore.rtree;version="${version}" org.h2.mvstore.rtree;version="${version}"
Provide-Capability: osgi.service;objectClass:List<String>=org.osgi.service.jdbc.DataSourceFactory Provide-Capability: osgi.service;objectClass:List<String>=org.osgi.service.jdbc.DataSourceFactory
......
...@@ -15,6 +15,7 @@ import java.net.InetAddress; ...@@ -15,6 +15,7 @@ import java.net.InetAddress;
import java.net.InetSocketAddress; import java.net.InetSocketAddress;
import java.net.ServerSocket; import java.net.ServerSocket;
import java.net.Socket; import java.net.Socket;
import java.nio.charset.StandardCharsets;
import java.util.Enumeration; import java.util.Enumeration;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map.Entry; import java.util.Map.Entry;
...@@ -239,7 +240,8 @@ public class Build extends BuildBase { ...@@ -239,7 +240,8 @@ public class Build extends BuildBase {
String classpath = "temp"; String classpath = "temp";
FileList files; FileList files;
files = files("src/main/org/h2/mvstore"). files = files("src/main/org/h2/mvstore").
exclude("src/main/org/h2/mvstore/db/*"); exclude("src/main/org/h2/mvstore/db/*").
exclude("src/main/org/h2/mvstore/tx/*");
StringList args = args(); StringList args = args();
if (debugInfo) { if (debugInfo) {
args = args.plus("-Xlint:unchecked", "-d", "temp", "-sourcepath", args = args.plus("-Xlint:unchecked", "-d", "temp", "-sourcepath",
...@@ -517,7 +519,7 @@ public class Build extends BuildBase { ...@@ -517,7 +519,7 @@ public class Build extends BuildBase {
public void jar() { public void jar() {
compile(); compile();
addVersions(true); addVersions(true);
manifest("H2 Database Engine", "org.h2.tools.Console"); manifest("src/main/META-INF/MANIFEST.MF");
FileList files = files("temp"). FileList files = files("temp").
exclude("temp/org/h2/build/*"). exclude("temp/org/h2/build/*").
exclude("temp/org/h2/dev/*"). exclude("temp/org/h2/dev/*").
...@@ -546,6 +548,7 @@ public class Build extends BuildBase { ...@@ -546,6 +548,7 @@ public class Build extends BuildBase {
public void jarClient() { public void jarClient() {
compile(true, true, false); compile(true, true, false);
addVersions(false); addVersions(false);
manifest("src/installer/client/MANIFEST.MF");
FileList files = files("temp"). FileList files = files("temp").
exclude("temp/org/h2/build/*"). exclude("temp/org/h2/build/*").
exclude("temp/org/h2/dev/*"). exclude("temp/org/h2/dev/*").
...@@ -572,7 +575,7 @@ public class Build extends BuildBase { ...@@ -572,7 +575,7 @@ public class Build extends BuildBase {
public void jarMVStore() { public void jarMVStore() {
compileMVStore(true); compileMVStore(true);
addVersions(false); addVersions(false);
manifestMVStore(); manifest("src/installer/mvstore/MANIFEST.MF");
FileList files = files("temp"); FileList files = files("temp");
files.exclude("*.DS_Store"); files.exclude("*.DS_Store");
files = excludeTestMetaInfFiles(files); files = excludeTestMetaInfFiles(files);
...@@ -587,6 +590,7 @@ public class Build extends BuildBase { ...@@ -587,6 +590,7 @@ public class Build extends BuildBase {
public void jarSmall() { public void jarSmall() {
compile(false, false, true); compile(false, false, true);
addVersions(true); addVersions(true);
manifest("src/installer/small/MANIFEST.MF");
FileList files = files("temp"). FileList files = files("temp").
exclude("temp/org/h2/build/*"). exclude("temp/org/h2/build/*").
exclude("temp/org/h2/dev/*"). exclude("temp/org/h2/dev/*").
...@@ -687,23 +691,8 @@ public class Build extends BuildBase { ...@@ -687,23 +691,8 @@ public class Build extends BuildBase {
copy("docs/javadocImpl", files("src/docsrc/javadoc"), "src/docsrc/javadoc"); copy("docs/javadocImpl", files("src/docsrc/javadoc"), "src/docsrc/javadoc");
} }
private static void manifest(String title, String mainClassName) { private static void manifest(String path) {
String manifest = new String(readFile(new File( String manifest = new String(readFile(new File(path)), StandardCharsets.UTF_8);
"src/main/META-INF/MANIFEST.MF")));
manifest = replaceAll(manifest, "${title}", title);
manifest = replaceAll(manifest, "${version}", getVersion());
manifest = replaceAll(manifest, "${buildJdk}", getJavaSpecVersion());
String createdBy = System.getProperty("java.runtime.version") +
" (" + System.getProperty("java.vm.vendor") + ")";
manifest = replaceAll(manifest, "${createdBy}", createdBy);
String mainClassTag = manifest == null ? "" : "Main-Class: " + mainClassName;
manifest = replaceAll(manifest, "${mainClassTag}", mainClassTag);
writeFile(new File("temp/META-INF/MANIFEST.MF"), manifest.getBytes());
}
private static void manifestMVStore() {
String manifest = new String(readFile(new File(
"src/installer/mvstore/MANIFEST.MF")));
manifest = replaceAll(manifest, "${version}", getVersion()); manifest = replaceAll(manifest, "${version}", getVersion());
manifest = replaceAll(manifest, "${buildJdk}", getJavaSpecVersion()); manifest = replaceAll(manifest, "${buildJdk}", getJavaSpecVersion());
String createdBy = System.getProperty("java.runtime.version") + String createdBy = System.getProperty("java.runtime.version") +
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论