【发布时间】:2025-12-10 12:25:02
【问题描述】:
当我们使用 svn 时,我们的项目有一个很好的 hack(虽然我猜有更好的方法)来将修订信息嵌入到工件(jar 等)中。
现在我们已经迁移到 mercurial,并且我们想要一个类似的东西,但是在我开始使用 mercurial 进行类似的 hack 之前,我想知道是否有更好的方法来做到这一点。
感谢您的回答!
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<phase>process-classes</phase>
<id>svninfo</id>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>svn</executable>
<arguments>
<argument>info</argument>
<argument>../</argument>
<argument>></argument>
<argument>target/some-project/META-INF/svninfo.txt</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
【问题讨论】:
标签: java svn maven-2 mercurial release-management