wg1026688210 commented on issue #1820:
URL: 
https://github.com/apache/incubator-paimon/issues/1820#issuecomment-1685782202

   > @wg1026688210 use the `git-commit-id-plugin` , then add `SCM-Revision` 
property to the `maven-jar-plugin`, here is the patch 
[scm.patch](https://github.com/apache/incubator-paimon/files/12390405/scm.patch)
   > 
   > ```
   > diff --git a/pom.xml b/pom.xml
   > index bf5d808d..38a6f8e6 100644
   > --- a/pom.xml
   > +++ b/pom.xml
   > @@ -305,6 +305,9 @@ under the License.
   >                  <version>2.4</version><!--$NO-MVN-MAN-VER$-->
   >                  <configuration>
   >                      <archive>
   > +                        <manifestEntries>
   > +                            <SCM-Revision>${git.commit.id}</SCM-Revision>
   > +                        </manifestEntries>
   >                          <manifest>
   >                              
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
   >                              
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
   > @@ -312,6 +315,23 @@ under the License.
   >                      </archive>
   >                  </configuration>
   >              </plugin>
   > +            <plugin>
   > +                <groupId>pl.project13.maven</groupId>
   > +                <artifactId>git-commit-id-plugin</artifactId>
   > +                <version>4.0.0</version>
   > +                <executions>
   > +                    <execution>
   > +                        <id>get-the-git-infos</id>
   > +                        <goals>
   > +                            <goal>revision</goal>
   > +                        </goals>
   > +                        <phase>validate</phase>
   > +                    </execution>
   > +                </executions>
   > +                <configuration>
   > +                    
<dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
   > +                </configuration>
   > +            </plugin>
   >  
   >              <plugin>
   >                  <groupId>org.apache.maven.plugins</groupId>
   > ```
   
   Thanks for your help . I think it's also helpful for others . Can this 
modification be merged into the master branch @JingsongLi @zhu3pang 


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

Reply via email to