[jira] [Commented] (DERBY-6945) Re-package Derby as a collection of jigsaw modules

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (DERBY-6945) Re-package Derby as a collection of jigsaw modules

JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/DERBY-6945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16608558#comment-16608558 ]

Rick Hillegas commented on DERBY-6945:
--------------------------------------

Attaching derby-6945-51-ab-runUpgradeTestsWithModulePath.diff. With this patch, the JUnit upgrade tests run cleanly when run with a module path as follows;

{noformat}
java -Xmx1024m \
  $debugFlag \
  $oldReleaseDirectoryFlag $startingPointsFlag \
  -p $MODULEPATH \
  --add-modules org.apache.derby.tests \
  -m junit/junit.textui.TestRunner \
  org.apache.derbyTesting.functionTests.tests.upgradeTests._Suite
{noformat}

This patch makes the following high level changes:

1) Exposes two more engine packages to reflective access by generated classes.

2) Exposes the Lucene optional tool to reflective access by the engine module.

3) Revamps the upgrade tests to run old releases in a remote server when running from the module path. This has to be done because old releases will not run on a module-aware JVM. This forces certain upgrade phases to use the client driver rather than the embedded driver. Upgrade tests cannot be run from starting points older than 10.2.2.0. This is because old logic in the upgrade tests forces those tests to use the embedded driver.

The upgrade tests ran cleanly for me with a module path when starting from the following old Derby releases:

{noformat}
10.2.2.0
10.2.2.1
10.3.3.0
10.4.1.3
10.4.2.0
10.4.2.1
10.5.1.1
10.5.3.0
10.6.1.0
10.6.2.1
10.7.1.1
10.8.1.2
10.8.2.2
10.9.1.0
10.10.1.1
10.10.1.2
10.10.1.3
10.10.2.0
10.11.1.1
10.12.1.1
10.13.1.1
10.14.1.0
10.14.2.0
{noformat}

Regression tests passed cleanly for me when run from the classpath.

Touches the following files:

{noformat}
--------------------------------

M       java/org.apache.derby.engine/module-info.java

(1) Expose more packages for use by the generated classes used by query plans.

--------------------------------

M       java/org.apache.derby.optionaltools/module-info.java

(2) Grant the engine reflective access to the Lucene optional tool.

--------------------------------

M       java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeClassLoader.java
M       java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeRun.java
M       java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/tests/upgradeTests/Version.java
M       java/org.apache.derby.tests/org/apache/derbyTesting/junit/BaseTestCase.java
M       java/org.apache.derby.tests/org/apache/derbyTesting/junit/NetworkServerTestSetup.java
M       java/org.apache.derby.tests/org/apache/derbyTesting/junit/TestConfiguration.java

(3) When running with a module path, boot old releases in a remote
server.

--------------------------------

M       java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/tests/upgradeTests/BasicSetup.java
M       java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/tests/upgradeTests/Changes10_10.java
M       java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/tests/upgradeTests/Changes10_6.java
M       java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/tests/upgradeTests/Changes10_9.java
M       java/org.apache.derby.tests/org/apache/derbyTesting/functionTests/tests/upgradeTests/PhaseChanger.java

(3) Adjust several tests to handle the fact that the connection to the
database is now a client connection rather than an embedded connection
when upgrade tests run with a module path and boot the old release.
{noformat}


> Re-package Derby as a collection of jigsaw modules
> --------------------------------------------------
>
>                 Key: DERBY-6945
>                 URL: https://issues.apache.org/jira/browse/DERBY-6945
>             Project: Derby
>          Issue Type: Improvement
>    Affects Versions: 10.13.1.2
>            Reporter: Rick Hillegas
>            Assignee: Rick Hillegas
>            Priority: Major
>         Attachments: derby-6945-01-aa-remove_derbyPreBuild_dep.diff, derby-6945-02-ab-newDerbySharedJar.diff, derby-6945-02-ac-newDerbySharedJar.diff, derby-6945-03-aa-partitionTest.diff, derby-6945-04-aa-moveRunClass.diff, derby-6945-05-aa-removeRedundant_Attribute_SQLState.diff, derby-6945-06-aa-removeOtherSharedDuplicates.diff, derby-6945-07-aa-net_client_overlap.diff, derby-6945-08-aa-move_shared_iapi_under_shared.diff, derby-6945-08-ab-move_shared_iapi_under_shared.diff, derby-6945-08-ad-move_shared_iapi_under_shared.diff, derby-6945-09-ab-moveInternalDriver.diff, derby-6945-10-aa-moveDriver42.diff, derby-6945-11-ab-moveAutoloadedDriver.diff, derby-6945-12-ab-moveClientDataSourceInterface.diff, derby-6945-13-aa-create-ClientAutoloadedDriver.diff, derby-6945-14-aa-moveMoreEmbeddedClassesOutOfPublicAPI.diff, derby-6945-15-aa-moveMoreClientClassesOutOfPublicAPI.diff, derby-6945-16-aa-consolidatePublicAPI.diff, derby-6945-17-aa-resealPackagesIn-derbyshared.diff, derby-6945-18-aa-resealLocalizationPackage.diff, derby-6945-19-ad-movePublicAPIintoToolsJar.diff, derby-6945-20-aa-removeClasslister.diff, derby-6945-21-aa-simplifyBuildScripts.diff, derby-6945-21-ab-simplifyBuildScripts.diff, derby-6945-22-ad-isolateClassesByArtifact.diff, derby-6945-22-ae-isolateClassesByArtifact.diff, derby-6945-22-af-isolateClassesByArtifact.diff, derby-6945-23-aa-upgradeToAnt_1.10.2.diff, derby-6945-24-aa-fixNativeAuthenticationServiceTest.diff, derby-6945-25-ab-moduleDescriptors.diff, derby-6945-26-aa-packagePrivateTests.diff, derby-6945-27-aa-adjustModulesForTests.diff, derby-6945-28-aa-testingModuleDescriptor.diff, derby-6945-29-aa-disable-SimpleApp-test.diff, derby-6945-30-ab-move-clientmessages-toolsmessages.diff, derby-6945-31-aa-clientmessages-ResourceBundleProvider.diff, derby-6945-32-aa-messageLookupCleanup.diff, derby-6945-33-ab-moveLocalizations.diff, derby-6945-34-aa-licenseHeaders.diff, derby-6945-35-aa-removeSpuriousCharacter.diff, derby-6945-36-aa-moduleDescriptorsForLocaleJars.diff, derby-6945-38-aa-javadocCleanup.diff, derby-6945-39-aa-javadocCleanup.diff, derby-6945-40-aa-generatedSource-dirNames.diff, derby-6945-41-ac-cleanupProductJavadoc.diff, derby-6945-42-aa-cleanupTestJavadoc.diff, derby-6945-43-aa-cleanupPublicAPIforJavadoc.diff, derby-6945-44-aa-moduleAwareJavadoc.diff, derby-6945-45-aa-fixWarnings.diff, derby-6945-46-aa-jacocoSourceRoots.diff, derby-6945-47-aa-runModulesWithLocalizations.diff, derby-6945-48-ac-serverWithSecurityPolicy.diff, derby-6945-49-aa-runSomeTestsWithModulePath.diff, derby-6945-50-aa-runOldTestHarnessWithModulePath.diff, derby-6945-51-ab-runUpgradeTestsWithModulePath.diff, derby-6945-XX-moveDataSourceFactories, jdeps.out.tar, weirdAnt.out
>
>
> Once we commit to building with Java 9 (see DERBY-6856), we should consider re-packaging Derby as a set of jigsaw modules. This would result in a different set of release artifacts. This might be a good opportunity to address the Tomcat artifactory issues raised by issue DERBY-6944.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)