imbajin commented on code in PR #2528:
URL: 
https://github.com/apache/incubator-hugegraph/pull/2528#discussion_r1573823996


##########
hugegraph-pd/hg-pd-service/src/main/java/org/apache/hugegraph/pd/rest/API.java:
##########
@@ -31,7 +32,8 @@
 
 public class API {
 
-    public static final String VERSION = "3.6.3";
+    // Currently reading directly from the pom.
+    public static final String VERSION = VersionUtil.getPomVersion();

Review Comment:
   or may consider using this way:
   ```xml
   <build>
       <plugins>
           <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-jar-plugin</artifactId>
               <configuration>
                   <archive>
                       <manifest>
                           
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                       </manifest>
                   </archive>
               </configuration>
           </plugin>
       </plugins>
   </build>
   ```
   
   ```java
   public static String getPomVersion() {
       // read the version in *.jar (can't read it in IDE runtime)
       return VersionUtil.class.getPackage().getImplementationVersion();
   }
   ```
   
   Update the implement in the common-module



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to