提交 e584183b authored 作者: Thomas Mueller's avatar Thomas Mueller

Running code coverage is now automated.

上级 5c0650a7
......@@ -30,6 +30,8 @@ Build
Translating</a><br />
<a href="#providing_patches">
Providing Patches</a><br />
<a href="#code_coverage">
Code Coverage</a><br />
<br /><a name="portability"></a>
<h2>Portability</h2>
......@@ -48,13 +50,17 @@ To build the database executables, the following software stack was used.
Newer version or compatible software works too.
</p>
<ul><li>Mac OS X and Windows XP
</li><li>Sun JDK Version 1.4, 1.5, and 1.6
</li><li>Eclipse Version 3.4
</li><li>Eclipse Plugins: Subclipse 1.4.6, EclEmma Java Code Coverage 1.3.0, Eclipse Checkstyle Plug-in 4.4.2
</li><li>Mozilla Firefox 3.0
</li><li>OpenOffice 3.0
</li><li>NSIS 2.38 (Nullsoft Scriptable Install System)
</li><li>Maven 2.0.9
</li><li><a href="http://java.sun.com/javase/downloads">Sun JDK Version 1.4, 1.5, and 1.6</a>
</li><li><a href="http://www.eclipse.org">Eclipse Version 3.4</a>
</li><li>Eclipse Plugins:
<a href="http://subclipse.tigris.org">Subclipse 1.4.6</a>,
<a href="http://eclipse-cs.sourceforge.net">Eclipse Checkstyle Plug-in 4.4.2</a>,
<a href="http://www.eclemma.org">EclEmma Java Code Coverage 1.3.0</a>
</li><li><a href="http://emma.sourceforge.net">Emma Java Code Coverage</a>
</li><li><a href="http://www.mozilla.com/firefox">Mozilla Firefox 3.0</a>
</li><li><a href="http://www.openoffice.org">OpenOffice 3.0</a>
</li><li><a href="http://nsis.sourceforge.net">NSIS 2.38</a> (Nullsoft Scriptable Install System)
</li><li><a href="http://maven.apache.org">Maven 2.0.9</a>
</li></ul>
<br /><a name="building"></a>
......@@ -170,6 +176,7 @@ If you like to provide patches, please consider the following guidelines to simp
For Java level tests, see <code>src/test/org/h2/test/TestAll.java</code>.
For SQL level tests, see <code>src/test/org/h2/test/test.in.txt</code> or <code>testSimple.in.txt</code>.
</li><li>The test cases should cover at least 90% of the changed and new code; use a code coverage tool to verify that (see above).
or use the build target 'coverage'.
</li><li>Verify that you did not break other features: Run the test cases by executing <code>build test</code>.
</li><li>Provide end user documentation if required (<code>src/docsrc/html/*</code>).
</li><li>Document grammar changes in <code>src/main/org/h2/res/help.csv</code>
......@@ -180,5 +187,20 @@ If you like to provide patches, please consider the following guidelines to simp
</li><li>Submit patches as .patch files (compressed if big). To create a patch using Eclipse, use Team / Create Patch.
</li></ul>
<br /><a name="code_coverage"></a>
<h2>Code Coverage</h2>
<p>
To generate the code coverage data, execute the following command:
</p>
<pre>
build compile coverage
</pre>
<p>
The code coverage is run regularly, the last results are available here:
</p>
<ul><li><a href="http://h2database.com/coverage/overview.html">Overall Coverage Summary</a>
</li><li><a href="http://h2database.com/coverage/coverage.zip">Details (download, 1.3 MB)</a>
</li></ul>
<!-- [close] { --></div></td></tr></table><!-- } --><!-- analytics --></body></html>
......@@ -18,7 +18,8 @@ Change Log
<h1>Change Log</h1>
<h2>Next Version (unreleased)</h2>
<ul><li>A file system implementation can now be registered using FileSystem.register.
<ul><li>Running code coverage is now automated.
</li><li>A file system implementation can now be registered using FileSystem.register.
The database file system is no longer included in the jar file, it moved to the test section.
</li></ul>
......
......@@ -979,162 +979,186 @@ Translating
@build_1007_a
Providing Patches
@build_1008_h2
@build_1008_a
Code Coverage
@build_1009_h2
Portability
@build_1009_p
@build_1010_p
This database is written in Java and therefore works on many platforms. It can also be compiled to a native executable using GCJ.
@build_1010_h2
@build_1011_h2
Environment
@build_1011_p
@build_1012_p
A Java Runtime Environment (JRE) version 1.4 or higher is required to run this database.
@build_1012_p
@build_1013_p
To build the database executables, the following software stack was used. Newer version or compatible software works too.
@build_1013_li
@build_1014_li
Mac OS X and Windows XP
@build_1014_li
@build_1015_a
Sun JDK Version 1.4, 1.5, and 1.6
@build_1015_li
@build_1016_a
Eclipse Version 3.4
@build_1016_li
Eclipse Plugins: Subclipse 1.4.6, EclEmma Java Code Coverage 1.3.0, Eclipse Checkstyle Plug-in 4.4.2
@build_1017_li
Eclipse Plugins: <a href="http://subclipse.tigris.org">Subclipse 1.4.6</a> , <a href="http://eclipse-cs.sourceforge.net">Eclipse Checkstyle Plug-in 4.4.2</a> , <a href="http://www.eclemma.org">EclEmma Java Code Coverage 1.3.0</a>
@build_1018_a
Emma Java Code Coverage
@build_1019_a
Mozilla Firefox 3.0
@build_1018_li
@build_1020_a
OpenOffice 3.0
@build_1019_li
NSIS 2.38 (Nullsoft Scriptable Install System)
@build_1021_a
NSIS 2.38
@build_1022_li
(Nullsoft Scriptable Install System)
@build_1020_li
@build_1023_a
Maven 2.0.9
@build_1021_h2
@build_1024_h2
Building the Software
@build_1022_p
@build_1025_p
You need to install a JDK, for example the Sun JDK version 1.4, 1.5 or 1.6. On the command line, go to the directory h2 and execute the following command:
@build_1023_p
@build_1026_p
For Linux and OS X, use <code>./build.sh</code> instead of <code>build</code> .
@build_1024_p
@build_1027_p
You will get a list of targets. If you want to build the jar file, execute (Windows):
@build_1025_h3
@build_1028_h3
Switching the Source Code
@build_1026_p
@build_1029_p
By default the source code uses Java 1.5 features, however Java 1.4 and 1.5 are supported as well. To switch the source code to the install version of Java, run:
@build_1027_h2
@build_1030_h2
Build Targets
@build_1028_p
@build_1031_p
The build system can generate smaller jar files as well. The following targets are currently supported:
@build_1029_li
@build_1032_li
jarClient: Create the h2client.jar. This only contains the JDBC client.
@build_1030_li
@build_1033_li
jarSmall: Create the file h2small.jar. This only contains the embedded database. Debug information is disabled.
@build_1031_li
@build_1034_li
jarJaqu: Create the file h2jaqu.jar. This only contains the JaQu (Java Query) implementation. All other jar files do not include JaQu.
@build_1032_li
@build_1035_li
javadocImpl: Create the Javadocs of the implementation.
@build_1033_p
@build_1036_p
To create the h2client.jar file, go to the directory h2 and execute the following command:
@build_1034_h2
@build_1037_h2
Using Maven 2
@build_1035_h3
@build_1038_h3
Using a Central Repository
@build_1036_p
@build_1039_p
You can include the database in your Maven 2 project as a dependency. Example:
@build_1037_p
@build_1040_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.
@build_1038_h3
@build_1041_h3
Using Snapshot Version
@build_1039_p
@build_1042_p
To build a 'snapshot' H2 .jar file and upload it the to the local Maven 2 repository, execute the following command:
@build_1040_p
@build_1043_p
Afterwards, you can include the database in your Maven 2 project as a dependency:
@build_1041_h2
@build_1044_h2
Translating
@build_1042_p
@build_1045_p
The translation of this software is split into the following parts:
@build_1043_li
@build_1046_li
H2 Console: src/main/org/h2/server/web/res/_text_*.properties
@build_1044_li
@build_1047_li
Error messages: src/main/org/h2/res/_messages_*.properties
@build_1045_li
@build_1048_li
Web site: src/docsrc/text/_docs_*.utf8.txt
@build_1046_p
@build_1049_p
To translate the H2 Console, start it and select Preferences / Translate. The conversion between UTF-8 and Java encoding (using the \u syntax), as well as the HTML entities (&amp;#..;) is automated by running the tool PropertiesToUTF8. The web site translation is automated as well, using <code>build docs</code> .
@build_1047_h2
@build_1050_h2
Providing Patches
@build_1048_p
@build_1051_p
If you like to provide patches, please consider the following guidelines to simplify merging them:
@build_1049_li
@build_1052_li
Only use Java 1.4 features (do not use Java 1.5 or 1.6) (see Environment).
@build_1050_li
@build_1053_li
Follow the coding style used in the project, and use Checkstyle (see above) to verify. For example, do not use tabs (use spaces instead). The checkstyle configuration is in <code>src/installer/checkstyle.xml</code> .
@build_1051_li
@build_1054_li
Please provide test cases and integrate them into the test suite. For Java level tests, see <code>src/test/org/h2/test/TestAll.java</code> . For SQL level tests, see <code>src/test/org/h2/test/test.in.txt</code> or <code>testSimple.in.txt</code> .
@build_1052_li
The test cases should cover at least 90% of the changed and new code; use a code coverage tool to verify that (see above).
@build_1055_li
The test cases should cover at least 90% of the changed and new code; use a code coverage tool to verify that (see above). or use the build target 'coverage'.
@build_1053_li
@build_1056_li
Verify that you did not break other features: Run the test cases by executing <code>build test</code> .
@build_1054_li
@build_1057_li
Provide end user documentation if required ( <code>src/docsrc/html/*</code> ).
@build_1055_li
@build_1058_li
Document grammar changes in <code>src/main/org/h2/res/help.csv</code>
@build_1056_li
@build_1059_li
Provide a change log entry ( <code>src/docsrc/html/changelog.html</code> ).
@build_1057_li
@build_1060_li
Verify the spelling using <code>build spellcheck</code> . If required add the new words to <code>src/tools/org/h2/build/doc/dictionary.txt</code> .
@build_1058_li
@build_1061_li
Verify the formatting using <code>build docs</code> and <code>build javadoc</code> .
@build_1059_li
@build_1062_li
Submit patches as .patch files (compressed if big). To create a patch using Eclipse, use Team / Create Patch.
@build_1063_h2
Code Coverage
@build_1064_p
To generate the code coverage data, execute the following command:
@build_1065_p
The code coverage is run regularly, the last results are available here:
@build_1066_a
Overall Coverage Summary
@build_1067_a
Details (download, 1.3 MB)
@changelog_1000_h1
Change Log
......@@ -1142,7 +1166,7 @@ Change Log
Next Version (unreleased)
@changelog_1002_li
-
A file system implementation can now be registered using FileSystem.register. The database file system is no longer included in the jar file, it moved to the test section.
@changelog_1003_h2
Version 1.1.111 (2009-04-10)
......
......@@ -981,162 +981,186 @@ Maven 2 の利用
@build_1007_a
#Providing Patches
@build_1008_h2
@build_1008_a
#Code Coverage
@build_1009_h2
ポータビリティ
@build_1009_p
@build_1010_p
このデータベースはJavaによって記述されているため、多くのプラットフォームで動作します。また、GCJを利用することで、ネイティブでも実行可能に(ネイティブコードに)コンパイルすることが可能です
@build_1010_h2
@build_1011_h2
環境
@build_1011_p
@build_1012_p
#A Java Runtime Environment (JRE) version 1.4 or higher is required to run this database.
@build_1012_p
@build_1013_p
#To build the database executables, the following software stack was used. Newer version or compatible software works too.
@build_1013_li
@build_1014_li
#Mac OS X and Windows XP
@build_1014_li
@build_1015_a
#Sun JDK Version 1.4, 1.5, and 1.6
@build_1015_li
@build_1016_a
#Eclipse Version 3.4
@build_1016_li
#Eclipse Plugins: Subclipse 1.4.6, EclEmma Java Code Coverage 1.3.0, Eclipse Checkstyle Plug-in 4.4.2
@build_1017_li
#Eclipse Plugins: <a href="http://subclipse.tigris.org">Subclipse 1.4.6</a> , <a href="http://eclipse-cs.sourceforge.net">Eclipse Checkstyle Plug-in 4.4.2</a> , <a href="http://www.eclemma.org">EclEmma Java Code Coverage 1.3.0</a>
@build_1018_a
#Emma Java Code Coverage
@build_1019_a
#Mozilla Firefox 3.0
@build_1018_li
@build_1020_a
#OpenOffice 3.0
@build_1019_li
#NSIS 2.38 (Nullsoft Scriptable Install System)
@build_1021_a
#NSIS 2.38
@build_1022_li
#(Nullsoft Scriptable Install System)
@build_1020_li
@build_1023_a
#Maven 2.0.9
@build_1021_h2
@build_1024_h2
ソフトウェアのビルド
@build_1022_p
@build_1025_p
#You need to install a JDK, for example the Sun JDK version 1.4, 1.5 or 1.6. On the command line, go to the directory h2 and execute the following command:
@build_1023_p
@build_1026_p
#For Linux and OS X, use <code>./build.sh</code> instead of <code>build</code> .
@build_1024_p
@build_1027_p
#You will get a list of targets. If you want to build the jar file, execute (Windows):
@build_1025_h3
@build_1028_h3
#Switching the Source Code
@build_1026_p
@build_1029_p
#By default the source code uses Java 1.5 features, however Java 1.4 and 1.5 are supported as well. To switch the source code to the install version of Java, run:
@build_1027_h2
@build_1030_h2
#Build Targets
@build_1028_p
@build_1031_p
#The build system can generate smaller jar files as well. The following targets are currently supported:
@build_1029_li
@build_1032_li
#jarClient: Create the h2client.jar. This only contains the JDBC client.
@build_1030_li
@build_1033_li
#jarSmall: Create the file h2small.jar. This only contains the embedded database. Debug information is disabled.
@build_1031_li
@build_1034_li
#jarJaqu: Create the file h2jaqu.jar. This only contains the JaQu (Java Query) implementation. All other jar files do not include JaQu.
@build_1032_li
@build_1035_li
#javadocImpl: Create the Javadocs of the implementation.
@build_1033_p
@build_1036_p
#To create the h2client.jar file, go to the directory h2 and execute the following command:
@build_1034_h2
@build_1037_h2
Maven 2 の利用
@build_1035_h3
@build_1038_h3
Centralリポジトリの利用
@build_1036_p
@build_1039_p
依存関係を取ることで、Maven 2プロジェクトでデータベースを組み込むことも可能です。例:
@build_1037_p
@build_1040_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.
@build_1038_h3
@build_1041_h3
スナップショットバージョンの利用
@build_1039_p
@build_1042_p
スナップショット版のH2.jarファイルをビルドし、ローカルのMaven2リポジトリを更新するには以下のコマンドを実行します:
@build_1040_p
@build_1043_p
実行後、Maven2プロジェクトにH2DBを依存させ組み込むことが出来るようになります:
@build_1041_h2
@build_1044_h2
#Translating
@build_1042_p
@build_1045_p
#The translation of this software is split into the following parts:
@build_1043_li
@build_1046_li
#H2 Console: src/main/org/h2/server/web/res/_text_*.properties
@build_1044_li
@build_1047_li
#Error messages: src/main/org/h2/res/_messages_*.properties
@build_1045_li
@build_1048_li
#Web site: src/docsrc/text/_docs_*.utf8.txt
@build_1046_p
@build_1049_p
#To translate the H2 Console, start it and select Preferences / Translate. The conversion between UTF-8 and Java encoding (using the \u syntax), as well as the HTML entities (&amp;#..;) is automated by running the tool PropertiesToUTF8. The web site translation is automated as well, using <code>build docs</code> .
@build_1047_h2
@build_1050_h2
#Providing Patches
@build_1048_p
@build_1051_p
#If you like to provide patches, please consider the following guidelines to simplify merging them:
@build_1049_li
@build_1052_li
#Only use Java 1.4 features (do not use Java 1.5 or 1.6) (see Environment).
@build_1050_li
@build_1053_li
#Follow the coding style used in the project, and use Checkstyle (see above) to verify. For example, do not use tabs (use spaces instead). The checkstyle configuration is in <code>src/installer/checkstyle.xml</code> .
@build_1051_li
@build_1054_li
#Please provide test cases and integrate them into the test suite. For Java level tests, see <code>src/test/org/h2/test/TestAll.java</code> . For SQL level tests, see <code>src/test/org/h2/test/test.in.txt</code> or <code>testSimple.in.txt</code> .
@build_1052_li
#The test cases should cover at least 90% of the changed and new code; use a code coverage tool to verify that (see above).
@build_1055_li
#The test cases should cover at least 90% of the changed and new code; use a code coverage tool to verify that (see above). or use the build target 'coverage'.
@build_1053_li
@build_1056_li
#Verify that you did not break other features: Run the test cases by executing <code>build test</code> .
@build_1054_li
@build_1057_li
#Provide end user documentation if required ( <code>src/docsrc/html/*</code> ).
@build_1055_li
@build_1058_li
#Document grammar changes in <code>src/main/org/h2/res/help.csv</code>
@build_1056_li
@build_1059_li
#Provide a change log entry ( <code>src/docsrc/html/changelog.html</code> ).
@build_1057_li
@build_1060_li
#Verify the spelling using <code>build spellcheck</code> . If required add the new words to <code>src/tools/org/h2/build/doc/dictionary.txt</code> .
@build_1058_li
@build_1061_li
#Verify the formatting using <code>build docs</code> and <code>build javadoc</code> .
@build_1059_li
@build_1062_li
#Submit patches as .patch files (compressed if big). To create a patch using Eclipse, use Team / Create Patch.
@build_1063_h2
#Code Coverage
@build_1064_p
#To generate the code coverage data, execute the following command:
@build_1065_p
#The code coverage is run regularly, the last results are available here:
@build_1066_a
#Overall Coverage Summary
@build_1067_a
#Details (download, 1.3 MB)
@changelog_1000_h1
変更履歴
......@@ -1144,7 +1168,7 @@ Centralリポジトリの利用
#Next Version (unreleased)
@changelog_1002_li
#-
#A file system implementation can now be registered using FileSystem.register. The database file system is no longer included in the jar file, it moved to the test section.
@changelog_1003_h2
#Version 1.1.111 (2009-04-10)
......
......@@ -323,61 +323,69 @@ build_1004_a=Build Targets
build_1005_a=Using Maven 2
build_1006_a=Translating
build_1007_a=Providing Patches
build_1008_h2=Portability
build_1009_p=This database is written in Java and therefore works on many platforms. It can also be compiled to a native executable using GCJ.
build_1010_h2=Environment
build_1011_p=A Java Runtime Environment (JRE) version 1.4 or higher is required to run this database.
build_1012_p=To build the database executables, the following software stack was used. Newer version or compatible software works too.
build_1013_li=Mac OS X and Windows XP
build_1014_li=Sun JDK Version 1.4, 1.5, and 1.6
build_1015_li=Eclipse Version 3.4
build_1016_li=Eclipse Plugins\: Subclipse 1.4.6, EclEmma Java Code Coverage 1.3.0, Eclipse Checkstyle Plug-in 4.4.2
build_1017_li=Mozilla Firefox 3.0
build_1018_li=OpenOffice 3.0
build_1019_li=NSIS 2.38 (Nullsoft Scriptable Install System)
build_1020_li=Maven 2.0.9
build_1021_h2=Building the Software
build_1022_p=You need to install a JDK, for example the Sun JDK version 1.4, 1.5 or 1.6. On the command line, go to the directory h2 and execute the following command\:
build_1023_p=For Linux and OS X, use <code>./build.sh</code> instead of <code>build</code> .
build_1024_p=You will get a list of targets. If you want to build the jar file, execute (Windows)\:
build_1025_h3=Switching the Source Code
build_1026_p=By default the source code uses Java 1.5 features, however Java 1.4 and 1.5 are supported as well. To switch the source code to the install version of Java, run\:
build_1027_h2=Build Targets
build_1028_p=The build system can generate smaller jar files as well. The following targets are currently supported\:
build_1029_li=jarClient\: Create the h2client.jar. This only contains the JDBC client.
build_1030_li=jarSmall\: Create the file h2small.jar. This only contains the embedded database. Debug information is disabled.
build_1031_li=jarJaqu\: Create the file h2jaqu.jar. This only contains the JaQu (Java Query) implementation. All other jar files do not include JaQu.
build_1032_li=javadocImpl\: Create the Javadocs of the implementation.
build_1033_p=To create the h2client.jar file, go to the directory h2 and execute the following command\:
build_1034_h2=Using Maven 2
build_1035_h3=Using a Central Repository
build_1036_p=You can include the database in your Maven 2 project as a dependency. Example\:
build_1037_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.
build_1038_h3=Using Snapshot Version
build_1039_p=To build a 'snapshot' H2 .jar file and upload it the to the local Maven 2 repository, execute the following command\:
build_1040_p=Afterwards, you can include the database in your Maven 2 project as a dependency\:
build_1041_h2=Translating
build_1042_p=The translation of this software is split into the following parts\:
build_1043_li=H2 Console\: src/main/org/h2/server/web/res/_text_*.properties
build_1044_li=Error messages\: src/main/org/h2/res/_messages_*.properties
build_1045_li=Web site\: src/docsrc/text/_docs_*.utf8.txt
build_1046_p=To translate the H2 Console, start it and select Preferences / Translate. The conversion between UTF-8 and Java encoding (using the \\u syntax), as well as the HTML entities (&amp;\#..;) is automated by running the tool PropertiesToUTF8. The web site translation is automated as well, using <code>build docs</code> .
build_1047_h2=Providing Patches
build_1048_p=If you like to provide patches, please consider the following guidelines to simplify merging them\:
build_1049_li=Only use Java 1.4 features (do not use Java 1.5 or 1.6) (see Environment).
build_1050_li=Follow the coding style used in the project, and use Checkstyle (see above) to verify. For example, do not use tabs (use spaces instead). The checkstyle configuration is in <code>src/installer/checkstyle.xml</code> .
build_1051_li=Please provide test cases and integrate them into the test suite. For Java level tests, see <code>src/test/org/h2/test/TestAll.java</code> . For SQL level tests, see <code>src/test/org/h2/test/test.in.txt</code> or <code>testSimple.in.txt</code> .
build_1052_li=The test cases should cover at least 90% of the changed and new code; use a code coverage tool to verify that (see above).
build_1053_li=Verify that you did not break other features\: Run the test cases by executing <code>build test</code> .
build_1054_li=Provide end user documentation if required ( <code>src/docsrc/html/*</code> ).
build_1055_li=Document grammar changes in <code>src/main/org/h2/res/help.csv</code>
build_1056_li=Provide a change log entry ( <code>src/docsrc/html/changelog.html</code> ).
build_1057_li=Verify the spelling using <code>build spellcheck</code> . If required add the new words to <code>src/tools/org/h2/build/doc/dictionary.txt</code> .
build_1058_li=Verify the formatting using <code>build docs</code> and <code>build javadoc</code> .
build_1059_li=Submit patches as .patch files (compressed if big). To create a patch using Eclipse, use Team / Create Patch.
build_1008_a=Code Coverage
build_1009_h2=Portability
build_1010_p=This database is written in Java and therefore works on many platforms. It can also be compiled to a native executable using GCJ.
build_1011_h2=Environment
build_1012_p=A Java Runtime Environment (JRE) version 1.4 or higher is required to run this database.
build_1013_p=To build the database executables, the following software stack was used. Newer version or compatible software works too.
build_1014_li=Mac OS X and Windows XP
build_1015_a=Sun JDK Version 1.4, 1.5, and 1.6
build_1016_a=Eclipse Version 3.4
build_1017_li=Eclipse Plugins\: <a href\="http\://subclipse.tigris.org">Subclipse 1.4.6</a> , <a href\="http\://eclipse-cs.sourceforge.net">Eclipse Checkstyle Plug-in 4.4.2</a> , <a href\="http\://www.eclemma.org">EclEmma Java Code Coverage 1.3.0</a>
build_1018_a=Emma Java Code Coverage
build_1019_a=Mozilla Firefox 3.0
build_1020_a=OpenOffice 3.0
build_1021_a=NSIS 2.38
build_1022_li=(Nullsoft Scriptable Install System)
build_1023_a=Maven 2.0.9
build_1024_h2=Building the Software
build_1025_p=You need to install a JDK, for example the Sun JDK version 1.4, 1.5 or 1.6. On the command line, go to the directory h2 and execute the following command\:
build_1026_p=For Linux and OS X, use <code>./build.sh</code> instead of <code>build</code> .
build_1027_p=You will get a list of targets. If you want to build the jar file, execute (Windows)\:
build_1028_h3=Switching the Source Code
build_1029_p=By default the source code uses Java 1.5 features, however Java 1.4 and 1.5 are supported as well. To switch the source code to the install version of Java, run\:
build_1030_h2=Build Targets
build_1031_p=The build system can generate smaller jar files as well. The following targets are currently supported\:
build_1032_li=jarClient\: Create the h2client.jar. This only contains the JDBC client.
build_1033_li=jarSmall\: Create the file h2small.jar. This only contains the embedded database. Debug information is disabled.
build_1034_li=jarJaqu\: Create the file h2jaqu.jar. This only contains the JaQu (Java Query) implementation. All other jar files do not include JaQu.
build_1035_li=javadocImpl\: Create the Javadocs of the implementation.
build_1036_p=To create the h2client.jar file, go to the directory h2 and execute the following command\:
build_1037_h2=Using Maven 2
build_1038_h3=Using a Central Repository
build_1039_p=You can include the database in your Maven 2 project as a dependency. Example\:
build_1040_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.
build_1041_h3=Using Snapshot Version
build_1042_p=To build a 'snapshot' H2 .jar file and upload it the to the local Maven 2 repository, execute the following command\:
build_1043_p=Afterwards, you can include the database in your Maven 2 project as a dependency\:
build_1044_h2=Translating
build_1045_p=The translation of this software is split into the following parts\:
build_1046_li=H2 Console\: src/main/org/h2/server/web/res/_text_*.properties
build_1047_li=Error messages\: src/main/org/h2/res/_messages_*.properties
build_1048_li=Web site\: src/docsrc/text/_docs_*.utf8.txt
build_1049_p=To translate the H2 Console, start it and select Preferences / Translate. The conversion between UTF-8 and Java encoding (using the \\u syntax), as well as the HTML entities (&amp;\#..;) is automated by running the tool PropertiesToUTF8. The web site translation is automated as well, using <code>build docs</code> .
build_1050_h2=Providing Patches
build_1051_p=If you like to provide patches, please consider the following guidelines to simplify merging them\:
build_1052_li=Only use Java 1.4 features (do not use Java 1.5 or 1.6) (see Environment).
build_1053_li=Follow the coding style used in the project, and use Checkstyle (see above) to verify. For example, do not use tabs (use spaces instead). The checkstyle configuration is in <code>src/installer/checkstyle.xml</code> .
build_1054_li=Please provide test cases and integrate them into the test suite. For Java level tests, see <code>src/test/org/h2/test/TestAll.java</code> . For SQL level tests, see <code>src/test/org/h2/test/test.in.txt</code> or <code>testSimple.in.txt</code> .
build_1055_li=The test cases should cover at least 90% of the changed and new code; use a code coverage tool to verify that (see above). or use the build target 'coverage'.
build_1056_li=Verify that you did not break other features\: Run the test cases by executing <code>build test</code> .
build_1057_li=Provide end user documentation if required ( <code>src/docsrc/html/*</code> ).
build_1058_li=Document grammar changes in <code>src/main/org/h2/res/help.csv</code>
build_1059_li=Provide a change log entry ( <code>src/docsrc/html/changelog.html</code> ).
build_1060_li=Verify the spelling using <code>build spellcheck</code> . If required add the new words to <code>src/tools/org/h2/build/doc/dictionary.txt</code> .
build_1061_li=Verify the formatting using <code>build docs</code> and <code>build javadoc</code> .
build_1062_li=Submit patches as .patch files (compressed if big). To create a patch using Eclipse, use Team / Create Patch.
build_1063_h2=Code Coverage
build_1064_p=To generate the code coverage data, execute the following command\:
build_1065_p=The code coverage is run regularly, the last results are available here\:
build_1066_a=Overall Coverage Summary
build_1067_a=Details (download, 1.3 MB)
changelog_1000_h1=Change Log
changelog_1001_h2=Next Version (unreleased)
changelog_1002_li=-
changelog_1002_li=A file system implementation can now be registered using FileSystem.register. The database file system is no longer included in the jar file, it moved to the test section.
changelog_1003_h2=Version 1.1.111 (2009-04-10)
changelog_1004_li=In-memory databases can now run inside the Google App Engine.
changelog_1005_li=Queries that are ordered by an indexed column returned no rows in certain cases (if all rows were deleted from the table previously, and there is a low number of rows in the table, and when not using other conditions, and when using the default b tree index).
......
......@@ -282,8 +282,7 @@ java org.h2.test.TestAll timer
/*
automated tests (status on web site)
EclEmma
automated tests: code coverage
documentation: rolling review at features.html: 612
......
......@@ -89,6 +89,42 @@ public class Build extends BuildBase {
compile(true, false, false);
}
/**
* Run the Emma code coverage.
*/
public void coverage() {
download("ext/emma-2.0.5312.jar",
"http://repo2.maven.org/maven2/emma/emma/2.0.5312/emma-2.0.5312.jar",
"30a40933caf67d88d9e75957950ccf353b181ab7");
String cp = "temp" + File.pathSeparator + "bin" +
File.pathSeparator + "ext/emma-2.0.5312.jar" +
File.pathSeparator + "ext/postgresql-8.3-603.jdbc3.jar" +
File.pathSeparator + "ext/servlet-api-2.4.jar" +
File.pathSeparator + "ext/lucene-core-2.2.0.jar" +
File.pathSeparator + "ext/org.osgi.core-1.2.0.jar" +
File.pathSeparator + "ext/slf4j-api-1.5.0.jar";
exec("java", new String[] { "-Xmx128m", "-cp", cp, "emma", "run",
"-cp", "bin",
"-sp", "src/main",
"-r", "html,txt",
"-ix", "-org.h2.test.*,-org.h2.dev.*,-org.h2.jaqu.*,-org.h2.index.Page*,-org.h2.mode.*",
"org.h2.test.TestAll" });
}
/**
* Upload the Emma code coverage results to the web site.
*/
public void coverageUpload() {
String password = System.getProperty("h2.ftpPassword");
if (password == null) {
throw new Error("h2.ftpPassword not set");
}
String cp = "temp" + File.pathSeparator + "bin";
exec("java", new String[] { "-Xmx128m", "-cp", cp,
"-Dh2.ftpPassword=" + password,
"org.h2.build.doc.UploadCoverage" });
}
/**
* Switch the source code to the current JDK.
*/
......
......@@ -98,6 +98,17 @@ public class BuildBase {
String a = args[i];
if ("-quiet".equals(a)) {
quiet = true;
} else if (a.startsWith("-D")) {
String value;
String key = a.substring(2);
int valueIndex = key.indexOf('=');
if (valueIndex >= 0) {
value = key.substring(valueIndex + 1);
key = key.substring(0, valueIndex);
} else {
value = "true";
}
System.setProperty(key, value);
} else {
Method m = null;
try {
......
package org.h2.build.doc;
/*
* Copyright 2004-2009 H2 Group. Multiple-Licensed under the H2 License,
* Version 1.0, and under the Eclipse Public License, Version 1.0
* (http://h2database.com/html/license.html).
* Initial Developer: H2 Group
*/
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.zip.CRC32;
import java.util.zip.Deflater;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
import org.h2.dev.ftp.FtpClient;
import org.h2.util.FileUtils;
import org.h2.util.IOUtils;
import org.h2.util.StringUtils;
/**
* Upload the code coverage result to the H2 web site.
*/
public class UploadCoverage {
/**
* This method is called when executing this application from the command
* line.
*
* @param args the command line parameters
*/
public static void main(String[] args) throws Exception {
byte[] data = IOUtils.readBytesAndClose(new FileInputStream("coverage/index.html"), -1);
String index = new String(data, "ISO-8859-1");
while (true) {
int idx = index.indexOf("<A HREF=\"");
if (idx < 0) {
break;
}
int end = index.indexOf('>', idx) + 1;
index = index.substring(0, idx) + index.substring(end);
idx = index.indexOf("</A>");
index = index.substring(0, idx) + index.substring(idx + "</A>".length());
}
index = StringUtils.replaceAll(index, "[all", "");
index = StringUtils.replaceAll(index, "classes]", "");
FileOutputStream out = new FileOutputStream("coverage/overview.html");
out.write(index.getBytes("ISO-8859-1"));
out.close();
new File("details").mkdir();
zip("details/coverage_files.zip", "coverage", true);
zip("coverage.zip", "details", false);
FileUtils.delete("coverage.txt");
FileUtils.delete("details/coverage_files.zip");
FileUtils.delete("details");
String password = System.getProperty("h2.ftpPassword");
if (password != null) {
FtpClient ftp = FtpClient.open("h2database.com");
ftp.login("h2database", password);
ftp.changeWorkingDirectory("/httpdocs");
if (ftp.exists("/httpdocs", "coverage")) {
ftp.removeDirectoryRecursive("/httpdocs/coverage");
}
ftp.makeDirectory("/httpdocs/coverage");
ftp.store("/httpdocs/coverage/overview.html", new FileInputStream("coverage/overview.html"));
ftp.store("/httpdocs/coverage/coverage.zip", new FileInputStream("coverage.zip"));
ftp.close();
FileUtils.delete("coverage.zip");
}
}
private static void zip(String destFile, String directory, boolean storeOnly) throws IOException {
OutputStream out = new FileOutputStream(destFile);
ZipOutputStream zipOut = new ZipOutputStream(out);
if (storeOnly) {
zipOut.setMethod(ZipOutputStream.STORED);
}
zipOut.setLevel(Deflater.BEST_COMPRESSION);
addFiles(new File(directory), new File(directory), zipOut);
zipOut.finish();
zipOut.close();
}
private static void addFiles(File base, File file, ZipOutputStream out) throws IOException {
if (file.isDirectory()) {
File[] files = file.listFiles();
for (int i = 0; i < files.length; i++) {
addFiles(base, files[i], out);
}
} else {
String path = file.getAbsolutePath().substring(base.getAbsolutePath().length());
path = path.replace('\\', '/');
if (path.startsWith("/")) {
path = path.substring(1);
}
byte[] data = IOUtils.readBytesAndClose(new FileInputStream(file), -1);
ZipEntry entry = new ZipEntry(path);
CRC32 crc = new CRC32();
crc.update(data);
entry.setSize(file.length());
entry.setCrc(crc.getValue());
out.putNextEntry(entry);
out.write(data);
out.closeEntry();
}
}
}
......@@ -585,4 +585,5 @@ versus extracts squirrel misdirected rle looking arc addressed european
soerensen favicon glass restarts flexive fish resulted vpda mvc kotek jan
consistently springfuse grep signatures wrote symbolic parents caches readers
animate scaladoc models disadvantages vladykin sergi trims requesting
handing bonita placed euros embeds reliability singular unregister
\ No newline at end of file
handing bonita placed euros embeds reliability singular unregister quotas
overall httpdocs tigris eclemma
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论