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

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

I have prepared a gigantic rototill of the source tree, 
derby-6945-37-aa-renameSourceRootsToModuleNames.diff. It is so big (67M) that 
JIRA will not let me attach the patch. This patch renames the source roots so 
that each one has the name of its module. That is, this patch renames source 
directories as follows: 

{noformat}
java/client   -> java/org.apache.derby.client
java/shared   -> java/org.apache.derby.commons
java/engine   -> java/org.apache.derby.engine
java/optional -> java/org.apache.derby.optionaltools
java/run      -> java/org.apache.derby.runner
java/drda     -> java/org.apache.derby.server
java/testing  -> java/org.apache.derby.tests
java/tools    -> java/org.apache.derby.tools
{noformat}

This change is needed so that javadoc can run on the codeline now that we have 
added module descriptors. We must get over a couple hurdles in order to build 
javadoc on the modularized codeline:

1) We need to rename the source directories as noted above. This is apparently 
described in the "Compile time" section of http://openjdk.java.net/jeps/261, as 
explained to me in an email thread titled "running javadoc against multiple 
modules" on the javadoc-dev mailing list (javadoc-dev at openjdk dot java dot 
net).

2) For the time being, we will need to invoke javadoc via ant's <exec> task 
rather than via ant's <javadoc> task. That is because ant does not yet support 
any of the module-aware switches of the javadoc tool. For more context, see the 
email thread titled "generating module-aware javadoc with ant" on the Apache 
ant user mailing list (user at ant dot apache dot org).

Tests passed cleanly for me on this patch.

This patch touches every production source file in the codeline. That is 
because the patch renames the top level source directories, with cascading 
consequences. I used the "svn move" command, so that backporting and code 
archaeology will survive this rototill. The most important changes are: 

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

A  +    java/org.apache.derby.client
A  +    java/org.apache.derby.commons
A  +    java/org.apache.derby.engine
A  +    java/org.apache.derby.optionaltools
A  +    java/org.apache.derby.runner
A  +    java/org.apache.derby.server
A  +    java/org.apache.derby.tests
D       java/client
D       java/engine
D       java/shared
D       java/optional
D       java/run
D       java/drda
D       java/testing

Rename the source roots so that they match their module names.

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

M  +    java/org.apache.derby.engine/build.xml
M  +    java/org.apache.derby.tools/build.xml

Adjust the javacc targets to refer to the new source directory names.

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

M       tools/ant/properties/dirs.properties

Adjust the build variables which point at the source roots.
{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
>            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-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)

Reply via email to