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

Merge pull request #1480 from katzyn/mvn

Update Maven build instruction and fix some problems
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.3/apache-maven-3.3.3-bin.zip
\ No newline at end of file
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
\ No newline at end of file
......@@ -5,24 +5,59 @@ Welcome to H2, the Java SQL database. The main features of H2 are:
* Very fast, open source, JDBC API
* Embedded and server modes; in-memory databases
* Browser based Console application
* Small footprint: around 1.5 MB jar file size
* Small footprint: around 2 MB jar file size
## Experimental Building & Testing with Maven
### Preparation
Use non-Maven build to create all necessary resources:
```Batchfile
./build.cmd compile
```
or
```sh
./build.sh compile
```
### Building
H2 uses [Maven Wrapper](https://github.com/takari/maven-wrapper) setup, you can instruct users to run wrapper scripts:
To build only the database jar use
```sh
mvn -Dmaven.test.skip=true package
```
> $ ./mvnw clean test
If you don't have Maven installed use included [Maven Wrapper](https://github.com/takari/maven-wrapper) setup:
```sh
./mvnw -Dmaven.test.skip=true package
```
or
> $ ./mvnw.cmd clean test
```Batchfile
./mvnw.cmd -Dmaven.test.skip=true package
```
Please note that jar generated with Maven is larger than official one and it does not include OSGi attributes.
Use build script with `jar` target instead if you need a compatible jar.
### Testing
To run the tests use
```sh
mvn clean test
```
### Running
You can run the server like this
```
```sh
mvn exec:java -Dexec.mainClass=org.h2.tools.Server
```
......@@ -210,7 +210,7 @@
<directory>src/test</directory>
<includes>
<include>org/h2/test/scripts/testSimple.in.txt</include>
<include>org/h2/test/scripts/testScript.sql</include>
<include>org/h2/test/scripts/**/*.sql</include>
<include>org/h2/samples/newsfeed.sql</include>
<include>org/h2/samples/optimizations.sql</include>
</includes>
......@@ -220,6 +220,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<archive>
<manifest>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论