Skip to content

Commit

Permalink
WL#14051, Upgrade Protocol Buffers dependency to protobuf-java-3.11.4.
Browse files Browse the repository at this point in the history
Includes project reorganization for 3rd-party libraries.
  • Loading branch information
fjssilva committed Apr 25, 2020
1 parent c6a027a commit 9c00501
Show file tree
Hide file tree
Showing 16 changed files with 4,648 additions and 2,740 deletions.
2 changes: 1 addition & 1 deletion .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
<classpathentry kind="src" path="src/main/resources"/>
<classpathentry kind="src" path="src/test/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/MySQL ConnectorJ Extra Libraries"/>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/MySQL ConnectorJ 8.0 Extra Libraries"/>
<classpathentry kind="output" path="bin"/>
</classpath>
2 changes: 2 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

Version 8.0.21

- WL#14051, Upgrade Protocol Buffers dependency to protobuf-java-3.11.4.

- WL#14042, Upgrade testsuite to JUnit 5.

- Fix for Bug#98237 (30911870), PREPAREDSTATEMENT.SETOBJECT(I, "FALSE", TYPES.BOOLEAN) ALWAYS SETS TRUE OR 1.
Expand Down
79 changes: 30 additions & 49 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o
<!-- Generate debugging info in compiled code. -->
<property name="com.mysql.cj.build.addDebugInfo" value="yes" />

<!-- Location of third-party libraries we don't distribute. -->
<!-- Location of third-party libraries we don't distribute and extra source files. -->
<property name="com.mysql.cj.extra.libs" value="lib" />

<!-- JVM used to execute the tests. -->
Expand All @@ -278,42 +278,35 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o
</propertyset>

<!-- Java compiler arguments to widen warnings detection and fail on warnings. -->
<condition property="javac.compilerarg" value="-Xlint:all -Werror" else="">
<condition property="javac.compilerarg" value="-Xlint:all,-path -Werror" else="">
<istrue value="${com.mysql.cj.build.failOnWarnings}" />
</condition>

<!-- Classpaths settings. -->
<path id="built.driver.only.classpath">
<pathelement location="${com.mysql.cj.build.dir.driver}" />
</path>

<path id="project.build.classpath">
<!-- Path settings. -->
<path id="com.mysql.cj.extra.libs.class.path" cache="true">
<fileset dir="${com.mysql.cj.extra.libs}">
<include name="**/*.jar" />
<exclude name="**/javassist-3.15.0-GA.jar" />
<exclude name="**/protobuf-java-2.6.0.jar" />
<exclude name="ant/**" />
<exclude name="jacoco/**" />
<exclude name="src/**" />
</fileset>
</path>

<path id="com.mysql.cj.build.class.path">
<path refid="com.mysql.cj.extra.libs.class.path" />
<pathelement location="${com.mysql.cj.build.dir.driver}" />
</path>

<path id="instrumentation.classpath">
<path refid="project.build.classpath" />

<path id="com.mysql.cj.build.instrumentation.class.path">
<path refid="com.mysql.cj.build.class.path" />
<pathelement location="${com.mysql.cj.build.compiler.output}" />
</path>

<path id="com.mysql.cj.testsuite.build.classpath">
<fileset dir="${com.mysql.cj.extra.libs}">
<include name="**/*.jar" />
<exclude name="**/javassist-3.15.0-GA.jar" />
<exclude name="**/protobuf-java-2.6.0.jar" />
</fileset>

<path refid="com.mysql.cj.extra.libs.class.path" />
<fileset dir="${com.mysql.cj.build.dir.driver}">
<include name="**/*.jar" />
</fileset>

<pathelement location="${com.mysql.cj.testsuite.build.dir}/${com.mysql.cj.build.driver.fullName}" />
</path>

Expand All @@ -330,10 +323,9 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o
<not>
<and>
<available file="${com.mysql.cj.extra.libs}" type="dir" />
<or>
<available file="${com.mysql.cj.extra.libs}/8.0/javassist.jar" type="file" />
<available file="${com.mysql.cj.extra.libs}/javassist.jar" type="file" />
</or>
<available classname="javassist.CtClass" ignoresystemclasses="true">
<classpath refid="com.mysql.cj.extra.libs.class.path" />
</available>
</and>
</not>
</condition>
Expand Down Expand Up @@ -420,10 +412,10 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o
<!-- The following is needed for source distributions as the classpath can't be dynamically altered, and not having this directory present causes the
build to fail. -->
<available property="com.mysql.cj.prebuiltDocsPresent" file="${com.mysql.cj.dist.dir.prebuilt.docs}" />
<available property="com.mysql.cj.c3p0Present" classname="com.mchange.v2.c3p0.QueryConnectionTester" classpathref="project.build.classpath" />
<available property="com.mysql.cj.c3p0Present" classname="com.mchange.v2.c3p0.QueryConnectionTester" classpathref="com.mysql.cj.build.class.path" />
<available property="com.mysql.cj.jbossPresent"
classname="org.jboss.resource.adapter.jdbc.ValidConnectionChecker"
classpathref="project.build.classpath" />
classpathref="com.mysql.cj.build.class.path" />
</target>

<!-- Load revision details either from git repository or from a revision-info.properties file. -->
Expand Down Expand Up @@ -632,31 +624,31 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o

<!-- Add commercial license configuration class (Build). -->
<target name="-init-filter-license" if="${com.mysql.cj.build.filterLicense}">
<copy file="${com.mysql.cj.extra.libs}/8.0/CommercialLicenseConfiguration.notjava"
<copy file="${com.mysql.cj.extra.libs}/src/CommercialLicenseConfiguration.notjava"
tofile="${com.mysql.cj.build.dir.driver}/com/mysql/cj/LicenseConfiguration.java"
overwrite="true" />
</target>


<!-- Add no-crypto export control class (Build). -->
<target name="-init-no-crypto" if="${com.mysql.cj.build.noCrypto}">
<copy file="${com.mysql.cj.extra.libs}/8.0/ExportControlledNoCrypto.notjava"
<copy file="${com.mysql.cj.extra.libs}/src/ExportControlledNoCrypto.notjava"
tofile="${com.mysql.cj.build.dir.driver}/com/mysql/cj/protocol/ExportControlled.java"
overwrite="true" />
</target>


<!-- Copy commercial license configuration class (Package). -->
<target name="-copy-filter-license" if="${com.mysql.cj.build.filterLicense}">
<copy file="${com.mysql.cj.extra.libs}/8.0/CommercialLicenseConfiguration.notjava"
<copy file="${com.mysql.cj.extra.libs}/src/CommercialLicenseConfiguration.notjava"
tofile="${com.mysql.cj.dist.dir.package}/src/main/core-impl/java/com/mysql/cj/LicenseConfiguration.java"
overwrite="true" />
</target>


<!-- Copy no-crypto export control class (Package). -->
<target name="-copy-no-crypto" if="${com.mysql.cj.build.noCrypto}">
<copy file="${com.mysql.cj.extra.libs}/8.0/ExportControlledNoCrypto.notjava"
<copy file="${com.mysql.cj.extra.libs}/src/ExportControlledNoCrypto.notjava"
tofile="${com.mysql.cj.dist.dir.package}/src/main/core-impl/java/com/mysql/cj/protocol/ExportControlled.java"
overwrite="true" />
</target>
Expand Down Expand Up @@ -694,7 +686,7 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o
<get src="${com.mysql.cj.dist.licenseUrl}" dest="${com.mysql.cj.build.dir.driver}/LICENSE" verbose="true" />
<fixcrlf file="${com.mysql.cj.build.dir.driver}/LICENSE" tab="remove" tablength="8" eol="lf" />

<copy file="${com.mysql.cj.extra.libs}/8.0/README-commercial" tofile="${com.mysql.cj.build.dir.driver}/README" overwrite="true" />
<copy file="${com.mysql.cj.extra.libs}/README-commercial" tofile="${com.mysql.cj.build.dir.driver}/README" overwrite="true" />
</target>


Expand Down Expand Up @@ -1076,29 +1068,28 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o
<include name="**/*.java" />
<exclude name="testsuite/**" />
<exclude name="com/mysql/cj/jdbc/integration/**" />
<exclude name="com/mysql/cj/jdbc/log/Log4JLogger.java" />
<classpath refid="project.build.classpath" />
<classpath refid="com.mysql.cj.build.class.path" />
<compilerarg line="${javac.compilerarg}" />
</javac>
<java jvm="${com.mysql.cj.build.jdk.java}"
classname="instrumentation.CommonChecks"
classpathref="instrumentation.classpath"
classpathref="com.mysql.cj.build.instrumentation.class.path"
fork="yes"
failonerror="true">
<arg value="${com.mysql.cj.build.compiler.output}" />
<arg value="${com.mysql.cj.build.verbose}" />
</java>
<java jvm="${com.mysql.cj.build.jdk.java}"
classname="instrumentation.TranslateExceptions"
classpathref="instrumentation.classpath"
classpathref="com.mysql.cj.build.instrumentation.class.path"
fork="yes"
failonerror="true">
<arg value="${com.mysql.cj.build.compiler.output}" />
<arg value="${com.mysql.cj.build.verbose}" />
</java>
<java jvm="${com.mysql.cj.build.jdk.java}"
classname="instrumentation.AddMethods"
classpathref="instrumentation.classpath"
classpathref="com.mysql.cj.build.instrumentation.class.path"
fork="yes"
failonerror="true">
<arg value="${com.mysql.cj.build.compiler.output}" />
Expand Down Expand Up @@ -1148,7 +1139,7 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o
includeantruntime="false"
encoding="UTF-8">
<include name="com/mysql/cj/jdbc/integration/c3p0/**" />
<classpath refid="project.build.classpath" />
<classpath refid="com.mysql.cj.build.class.path" />
<compilerarg line="${javac.compilerarg}" />
</javac>
</target>
Expand All @@ -1169,7 +1160,7 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o
includeantruntime="false"
encoding="UTF-8">
<include name="com/mysql/cj/jdbc/integration/jboss/**" />
<classpath refid="project.build.classpath" />
<classpath refid="com.mysql.cj.build.class.path" />
<compilerarg line="${javac.compilerarg}" />
</javac>
</target>
Expand Down Expand Up @@ -1330,16 +1321,7 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o
</condition>

<junitlauncher haltOnFailure="false" printSummary="true" failureProperty="com.mysql.cj.testsuite.junit.fail">
<classpath>
<fileset dir="${com.mysql.cj.extra.libs}">
<include name="**/*.jar" />
<exclude name="**/protobuf-java-2.6.0.jar" />
</fileset>
<pathelement location="${com.mysql.cj.build.dir.driver}" />
<pathelement location="${com.mysql.cj.testsuite.build.dir}/${com.mysql.cj.build.driver.fullName}" />
<pathelement path="${com.mysql.cj.testsuite.build.classpath}" />
<pathelement path="${java.class.path}" />
</classpath>
<classpath refid="com.mysql.cj.testsuite.build.classpath" />

<test if="${com.mysql.cj.testsuite.test.methods.enabled}"
name="${com.mysql.cj.testsuite.test.class}"
Expand Down Expand Up @@ -1449,7 +1431,6 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o
</structure>

<html destdir="${com.mysql.cj.coverage.report.dir.final}" />

</jacoco:report>
</target>

Expand Down
2 changes: 1 addition & 1 deletion src/build/misc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>3.6.1</version>
<version>3.11.4</version>
</dependency>
</dependencies>
</project>
Loading

0 comments on commit 9c00501

Please sign in to comment.