Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
The thrift-maven-plugin attempts to support building .thrift files that depend on other .thrift files provided in a dependency JAR. It does this by copying the dependency JAR's thrift files into a temporary directory then passing corresponding include directory options to the thrift compiler. However, the process of generating the include directory paths is faulty: there is a path for each and every directory that contains a .thrift file, rather than a single path to the root of the thrift file hierarchy. That means that any thrift files that reference others using paths relative to a root will fail. It may happen to work where the thrift files are all in a single directory, but not in the general case.
There are no tests of this support, so I've added a few in the pull request I'm preparing.
Somebody found the exact same problem and issued a pull request against this plugin's original repository on Github: https://github.com/dtrott/maven-thrift-plugin/pull/28. It went nowhere because the project was already pending ASF acceptance at that point, but it's worth looking at as an additional reference.
Thanks!
Attachments
Issue Links
- is duplicated by
-
THRIFT-4148 [maven-thrift-plugin] compile error while import a thrift in dependency jar file.
- Closed
- links to