You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/03/04 08:43:46 UTC

[GitHub] [iotdb] jxlgzwh opened a new issue #2772: when running the program in IDE, we can not get the version info

jxlgzwh opened a new issue #2772:
URL: https://github.com/apache/iotdb/issues/2772


   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";
   
   ![image](https://user-images.githubusercontent.com/7359454/109935388-8173ea80-7d08-11eb-8239-cf01cb441fcf.png)
   
   ![image](https://user-images.githubusercontent.com/7359454/109935424-89338f00-7d08-11eb-9a93-b58ae75663af.png)
   
   Hope that the version information can be obtained normally in the development environment
   
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] jixuan1989 commented on issue #2772: when running the program in IDE, we can not get the version info

Posted by GitBox <gi...@apache.org>.
jixuan1989 commented on issue #2772:
URL: https://github.com/apache/iotdb/issues/2772#issuecomment-792625996


   Hi,
   
   Hm... actually this is an organizational problem.
   
   Let me introduce why and how we manage the version in CLI's output.
   
   1. Initially, we use a String constant "0.11.0" in a java file to reply to the printed content in CLI.
   3. 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.)
   4. 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.
   
   I think we do not need to fix that. How do you think?
   
   
   
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] jxlgzwh commented on issue #2772: when running the program in IDE, we can not get the version info

Posted by GitBox <gi...@apache.org>.
jxlgzwh commented on issue #2772:
URL: https://github.com/apache/iotdb/issues/2772#issuecomment-794817482


   I have a solution to the problem of forgetting to modify the version in the java file
   We can automatically generate a version number file based on the version of the pom file
   The reference information is as follows
   https://my.oschina.net/zhongwenhao/blog/4945383
   
   If we can get the version information in the development environment, it can be used for later version upgrades, such as version verification, etc.
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org