[
https://issues.apache.org/jira/browse/DERBY-6471?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Myrna van Lunteren updated DERBY-6471:
--------------------------------------
Attachment: DERBY-6471.diff
DERBY-6471.stat
Attaching a patch which contains an initial attempt to address this.
It introduces a new class, org.apache.derbyBuild.JarDriftTest, and a file for
the contents of each jar file - once for sane and once for insane.
The content of the new jar file(s) is compared with the matching *.lastcontents
file and if there is a new class it will fail in the build.
This class is called from the buildjars target as jardriftcheck.
There is also a target, refreshjardriftcheck, which will update/overwrite the
*.lastcontents files.
I made some choices while putting this together and they're currently listed as
comments towards the bottom of the new class:
/* Notes:
* -- this needs to be hanging off the ant buildjars target at the
* main level build.xml
* It needs to be the very last thing in that target.
* As a result of hanging this in the build.xml, we know the location
* of the jar files.
* -- we check on sane or insane by looking in the file
* generated/java/org/apache/derby/shared/common/sanity/state.properties
* -- contents get checked every time anyone builds jars.
* -- source file and '*lastcontents files need to be in the source distro.
* (they do not need to go in any jar files).
* -- TODO: check on that
* -- presence of derbyTesting.jar is optional
* -- we are saving the lastcontents list in subversion.
* -- we are only worrying about class files, and also ignoring inner
classes
* * -- we're not unravelling any jars from inside the jars
* -- this implementation should work with just 1.6, although I think then
* a number of classes (Java 8 support) will not get built and the
* check will fail.
* TODO: Should we only do this if we have java 8 available?
* -- currently putting the output in the same dir as this class.
* TODO: should there be an extra directory for these files?
*/
I would appreciate input from the community.
> Create a regression test which will fail if classes from one Derby jar file
> leak into another jar file
> ------------------------------------------------------------------------------------------------------
>
> Key: DERBY-6471
> URL: https://issues.apache.org/jira/browse/DERBY-6471
> Project: Derby
> Issue Type: Improvement
> Components: Test
> Affects Versions: 10.11.1.1
> Reporter: Rick Hillegas
> Assignee: Myrna van Lunteren
> Attachments: DERBY-6471.diff, DERBY-6471.stat
>
>
> We should write a test so that we find out early on when a checkin breaks the
> separation between Derby jar files.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)