Compiling MySQL Connector/J
===========================
MySQL Connector/J 8.0 supports JDBC4.2 and implements the X DevAPI. This product requires Java 8 for compiling the source code.
The variable 'com.mysql.cj.build.jdk' is used to specify the compiler when building the driver and the variable 'com.mysql.cj.extra.libs' must point to the
location of third-party libraries that aren't distributed but are required for compiling the source code. Further details can be found in
http://dev.mysql.com/doc/connector-j/en/connector-j-installing-source.html.
Targets: "clean", "compile", "build" (default), "package", "package-no-sources", "install"
Testing MySQL Connector/J
=========================
MySQL Connector/J 8.0 ships with an extensive test suite that can be run by providing a MySQL JDBC URL in the variable 'com.mysql.cj.testsuite.url' and by
running the target "test". If nothing else is set, the test suite runs with the JVM referred in the variable 'com.mysql.cj.build.jdk'.
Alternatively, all tests can be run with a distinct JVM, provided that it is pointed out in the variable 'com.mysql.cj.testsuite.jvm'.
Running only one test set is possible by setting the variable 'com.mysql.cj.testsuite.test.class' with the class' fully qualified name. If also a comma
separated list of test names is provided in the variable 'com.mysql.cj.testsuite.test.methods', then only those will be executed.
Targets: "test"
Coverage and instrumentation
============================
This file ships with target "test-coverage" for collecting coverage results and "report-coverage" for creating the HTML coverage report.
The JaCoCo library needed to run these targets can be found at https://github.com/jacoco/jacoco, its JARs should be placed into
${com.mysql.cj.extra.libs}/jacoco directory.
The "test-coverage" target enables tests execution-time JaCoCo instrumentation, runs tests collecting coverage info into a result file
which path is set as ${com.mysql.cj.coverage.result.dir}/${com.mysql.cj.coverage.result.name}.
The "report-coverage" target first merges coverage result files which are placed in 'com.mysql.cj.coverage.result.dir' directory and
their comma-delimited names are passed via 'com.mysql.cj.coverage.merge.files' property. Merge result file path is passed
via 'com.mysql.cj.coverage.merge.result' property. Finally this target builds the HTML report from
'com.mysql.cj.coverage.merge.result' file into the directory passed via 'com.mysql.cj.coverage.report.dir' property.
If some properties are not passed to ANT script then default values are used:
com.mysql.cj.coverage.result.dir - "${com.mysql.cj.testsuite.build.dir}/coverage"
com.mysql.cj.coverage.result.name - "jacoco.exec"
com.mysql.cj.coverage.merge.files - none, merge step is skipped
com.mysql.cj.coverage.merge.result - ${com.mysql.cj.coverage.result.dir}/jacoco.exec
com.mysql.cj.coverage.report.dir - ${com.mysql.cj.coverage.result.dir}/report
Targets: "test-coverage", "report-coverage"
Generate X DevAPI reference documentation
=========================================
The target "xdevapi-docs" generates the Javadocs for the X DevAPI classes. The property "com.mysql.cj.docs.xdevapi" can be used to set the destination of the
Javadoc HTML files.
Targets: "xdevapi-docs"
Sample 'build.properties' that can be used to compile, build and test
=====================================================================
~~~start cut here~~~
# Basic settings for 'compile', 'test' and targets that depend on these.
# External libraries needed for both compiling and testing:
# - Further details in http://dev.mysql.com/doc/connector-j/en/connector-j-installing-source.html
# - Mandatory.
com.mysql.cj.extra.libs=<full_path_to_connector-j-jardeps>
# JDKs needed for compiling:
# - Must point to JDK home directory.
# - Also used for testing if 'com.mysql.cj.testsuite.jvm' is not provided.
# - Mandatory.
com.mysql.cj.build.jdk=<full_path_to_jdk1.8>
# Single JVM/MySQL tests:
# - Must point to JDK or JRE home directory.
# - If not provided, JDBC tests are run with 'com.mysql.cj.build.jdk'.
# - Optional.
com.mysql.cj.testsuite.jvm=<full_path_to_a_jdk_or_jre>
# - URL to the test database.
# - Any of the current MySQL versions.
# - Mandatory for 'test' target.
com.mysql.cj.testsuite.url=jdbc:mysql://<host>:<port>/<testDB>?user=<user>&password=<pwd>
com.mysql.cj.testsuite.mysqlx.url=jdbc:mysql://<user>:<pwd>@<host>:<port>/<testDB>
# Cancels re-compiling between successive test executions.
# - Comment variable if not needed.
# - Optional.
com.mysql.cj.build.noCleanBetweenCompiles=yes
# Other targets may require specific settings. Check 'build.xml' for details.
~~~end cut here~~~
Available build properties
==========================
build.properties - path to properties file
com.mysql.cj.extra.libs - location of third-party libraries: [${com.mysql.cj.extra.libs}]
com.mysql.cj.build.jdk - path to JDK used for building driver: [${com.mysql.cj.build.jdk}]
com.mysql.cj.build.addDebugInfo - whether the driver be compiled with debugging info: [${com.mysql.cj.build.addDebugInfo}]
com.mysql.cj.build.noCleanBetweenCompiles - don't delete compiled classes from previous build: [_unset_]
com.mysql.cj.build.failOnWarnings - fail the build when any warning is found: [_unset_]
com.mysql.cj.build.verbose - log the extended build info: [_unset_]
com.mysql.cj.build.commercial - build commercial variant of the driver: [_unset_]
com.mysql.cj.build.filterLicense - build ISV variant of the driver: [_unset_]
com.mysql.cj.build.noCrypto - build the driver without SSL support: [_unset_]
com.mysql.cj.build.driver.version.major - major version: [${com.mysql.cj.build.driver.version.major}]
com.mysql.cj.build.driver.version.minor - minor version: [${com.mysql.cj.build.driver.version.minor}]
com.mysql.cj.build.driver.version.subminor - subminor version: [${com.mysql.cj.build.driver.version.subminor}]
com.mysql.cj.build.driver.version.status - version status, such as '-rc' or '-dmr': [${com.mysql.cj.build.driver.version.status}]
com.mysql.cj.build.driver.version.series - product series, i.e. x.y: [${com.mysql.cj.build.driver.version.major}.${com.mysql.cj.build.driver.version.minor}]
com.mysql.cj.build.driver.version.numeric - numeric version, i.e. x.y.z: [${com.mysql.cj.build.driver.version.series}.${com.mysql.cj.build.driver.version.subminor}]
com.mysql.cj.build.driver.version - standard version string (includes version status): [${com.mysql.cj.build.driver.version.numeric}${com.mysql.cj.build.driver.version.status}]
com.mysql.cj.build.driver.version.extra - optional version information appended to the version string: [${com.mysql.cj.build.driver.version.extra}]
com.mysql.cj.build.driver.version.snapshot - optional version snapshot marker: [${com.mysql.cj.build.driver.version.snapshot}]
com.mysql.cj.build.driver.version.full - full version string: [${com.mysql.cj.build.driver.version}${com.mysql.cj.build.driver.version.extra}${com.mysql.cj.build.driver.version.snapshot}]
com.mysql.cj.build.driver.displayName - product display name: [${com.mysql.cj.build.driver.displayName}]
com.mysql.cj.build.driver.name - product name: [${com.mysql.cj.build.driver.name}]
com.mysql.cj.build.driver.extraName - optional extension to product name: [${com.mysql.cj.build.driver.extraName}]
com.mysql.cj.build.driver.extendedName - final product name: [${com.mysql.cj.build.driver.name}${com.mysql.cj.build.driver.extraName}]
com.mysql.cj.build.driver.fullName - full product name (includes version): [${com.mysql.cj.build.driver.extendedName}-${com.mysql.cj.build.driver.version.full}]
com.mysql.cj.build.dir - root directory for driver build: [${com.mysql.cj.build.dir}]
com.mysql.cj.build.dir.driver - driver build directory: [${com.mysql.cj.build.dir}/${com.mysql.cj.build.driver.fullName}]
com.mysql.cj.dist.packageName - final package name: [${com.mysql.cj.build.driver.extendedName}${com.mysql.cj.dist.packageExtraName}-${com.mysql.cj.build.driver.version.full}]
com.mysql.cj.dist.packageExtraName - optional extension to package name: [${com.mysql.cj.dist.packageExtraName}]
com.mysql.cj.dist.noSources - don't include sources into dist archives: [_unset_]
com.mysql.cj.dist.noMaven - don't create Maven bundles: [_unset_]
com.mysql.cj.dist.licenseUrl - license book location: [${com.mysql.cj.dist.licenseUrl}]
com.mysql.cj.dist.archiveName - final archive name: [${com.mysql.cj.dist.packageName}[_src|_no-src|_none_]]
com.mysql.cj.dist.archiveSourcesSuffix - sources indicator suffix added to the archive name (depends on package type - GPL/Commercial): [_src|_no-src|_unset_]
com.mysql.cj.dist.dir - root directory for driver packaging: [${com.mysql.cj.dist.dir}]
com.mysql.cj.dist.dir.prepare - directory for preparing packages: [${com.mysql.cj.dist.dir.prepare}]
com.mysql.cj.dist.dir.package - directory for preparing packages for given package name: [${com.mysql.cj.dist.dir.prepare}/${com.mysql.cj.dist.packageName}]
com.mysql.cj.dist.dir.maven - directory for preparing Maven packages: [${com.mysql.cj.dist.dir.prepare}/${com.mysql.cj.dist.packageName}-maven]
com.mysql.cj.dist.deb.maintainerEmail - the deb package maintainer email: [${com.mysql.cj.dist.deb.maintainerEmail}]
com.mysql.cj.docs.xdevapi - destination of the X DevAPI Javadoc HTML files: [docs]
Available test properties
=========================
com.mysql.cj.testsuite.build.dir - root directory for building the test suite: [${com.mysql.cj.testsuite.build.dir}]
com.mysql.cj.testsuite.junit.results - where to put JUnit reports: [${com.mysql.cj.testsuite.junit.results}]
com.mysql.cj.testsuite.jvm - path to the JVM used to run the test suite: [${com.mysql.cj.testsuite.jvm}]
com.mysql.cj.testsuite.url - connection string to the test server: [_unset_]
com.mysql.cj.testsuite.mysqlx.url - connection string to the test server with X Plugin: [_unset_]
com.mysql.cj.testsuite.test.class - test class name to run: [_unset_]
com.mysql.cj.testsuite.test.methods - a comma separated list of test names existing in the class defined by 'com.mysql.cj.testsuite.test.class': [_unset_]
com.mysql.cj.testsuite.unavailable.host - a host:port pair used for tests checking socket connection timeout: [_unset_]
See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test options.
build-date: ${com.mysql.cj.build.time}${line.separator}
os-info: ${os.name} ${os.arch} ${os.version}${line.separator}
compiler: ${com.mysql.cj.dist.jdk.compilerVersion}${line.separator}
build-tool: ${ant.version}${line.separator}
## INFO_BIN ##${line.separator}${com.mysql.cj.build.infoBinFromFile}
version: ${com.mysql.cj.build.driver.version.full}${line.separator}
branch: ${com.mysql.cj.build.git.branch}${line.separator}
date: ${com.mysql.cj.build.git.date}${line.separator}
commit: ${com.mysql.cj.build.git.commit}${line.separator}
short: ${com.mysql.cj.build.git.short}${line.separator}
## INFO_SRC ##${line.separator}${com.mysql.cj.build.infoSrcFromFile}
Removing sources from '${com.mysql.cj.dist.dir.prepare}'
Compiling MySQL Connector/J with '${com.mysql.cj.build.jdk}' to '${com.mysql.cj.build.compiler.output}'
Compiling MySQL Connector/J testsuite with '${com.mysql.cj.build.jdk}' to '${com.mysql.cj.testsuite.compiler.output}'
Compiling MySQL Connector/J-c3p0 integration with '${com.mysql.cj.build.jdk}' to '${com.mysql.cj.build.compiler.output}'
${com.mysql.cj.testsuite.message.test.mode}
Using Commercial settings
Using GPL settings