stevedlawrence opened a new pull request, #1022: URL: https://github.com/apache/daffodil/pull/1022
Daffodil has a Misc.getDaffodilVersion() function which gets the daffodil version from the package manifest. This is used in places like the CLI --version option, when writing the version to a saved parser, or checking the version when reloading a parser. But if Daffodil is assembled into a fat jar, that manifest file is usually replaced, which means the wrong version can be found when saving or reloading parsers. To avoid this, this modifies the SBT configuration to write the version to a resource file in org/apache/daffodil/lib/VERSION using a resource generator. The Misc.getDaffodilVersion() function is modified to read the contents of this resource to get the version. This no longer depends on the manifest file and uses a resource path that should never be discarded or overwritten when creating a fat jar. Also modifies the genManaged task to use the managedSources/Resources tasks so we don't need to update it if we add more source/resource generators. And remove the type since it isn't needed--this is just a convenience to generate all managed files. DAFFODIL-2816 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
