'when running the program in IDE, we can not get the version info with apache iotdb database
in IoTDBConstant class
//when running the program in IDE, we can not get the version info using getImplementationVersion()
public static final String VERSION =
IoTDBConstant.class.getPackage().getImplementationVersion() != null ? IoTDBConstant.class
.getPackage().getImplementationVersion() : "UNKNOWN";

Solution 1:[1]
Hm... actually this is an organizational problem. Let me introduce why and how we manage the version in CLI's output. Initially, we use a String constant "0.11.0" in a java file to reply to the printed content in CLI. When releasing a new version, we have occurred several times that forgeting modifying the String.... (IoTDB's version in the pom is modifyed automatically in a script. And it is not allowed to modify the java file in the script.) Then we come up a new method: when packaging the jar files, a version can be written directly into the jar file (MAINFACT), and it will always be consistent with the jar version. So we read the version from the jar file. But in IDE, the jar file is not generated, that is why there is version info in the IDE.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Lawrence Morton |
