buildnumber-maven-plugin

Obtaining the Build ID in a Java Application

半腔热情 提交于 2020-01-23 08:31:36
问题 Does anyone have a simple suggestion for recording a build ID (generated at compile time) which is displayed in the title bar of the app at runtime? Building from within Eclipse, all I need is the ID, I can then pass it up to the title. 回答1: If you are using Ant, you can easily set up your "jar" or "package" target so that it generates a file including the current timestamp and include this in your jar output. If using Maven, there are a few ways to achieve something similar, such as dropping

Obtaining the Build ID in a Java Application

落花浮王杯 提交于 2020-01-23 08:30:12
问题 Does anyone have a simple suggestion for recording a build ID (generated at compile time) which is displayed in the title bar of the app at runtime? Building from within Eclipse, all I need is the ID, I can then pass it up to the title. 回答1: If you are using Ant, you can easily set up your "jar" or "package" target so that it generates a file including the current timestamp and include this in your jar output. If using Maven, there are a few ways to achieve something similar, such as dropping

Hot to disable buildnumber-maven-plugin through cmd

情到浓时终转凉″ 提交于 2019-12-19 19:56:33
问题 I have question about maven. How can I disable buildnumber-maven-plugin through command line option. I want to run "mvn test" command on our continuous integration server, but this cmd failed because it trying to build a version and haven't access permission to our vcs (which is configured in tag). So it is possible disable it through cmd option or run only the tests without building new release version? Thanks for any help. 回答1: Use a profile to control which plug-ins are enabled during the

How to display SVN version in Maven usng the build-number plugin

元气小坏坏 提交于 2019-12-19 10:01:50
问题 How do display the svn version and the timestamp using build number plugin. Currently I have the following <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>buildnumber-maven-plugin</artifactId> <configuration> <format>At {0,time} on {0,date} : SVN Revision {1,number}</format> <items> <item>timestamp</item> <item>buildNumber</item> </items> <doCheck>false</doCheck> <doUpdate>false</doUpdate> </configuration> </plugin> </plugins> Which shows up as follows: At 8:02:51 AM on

maven-buildnumber-plugin svn revision available only when not using format

与世无争的帅哥 提交于 2019-12-18 16:07:58
问题 While using the maven-buildnumber-plugin 1.0 beta 4, it seems that I can get the svn revision unless I use a <format> tag within the configuration. Once I use <format> and <item>buildnumber</item> tag, I get an auto-incrementing number, but it no longer corresponds to svn revision and I don't know how to get it back. Is there a way to use the svn revision number within the <format> ? The documentation isn't very clear. 回答1: The buildnumber-maven-plugin is pretty darn quirky, which is probably

Is it possible to use maven buildnumber plugin to generate build number without any scm check?

我们两清 提交于 2019-12-18 11:09:02
问题 Getting the following exception while using maven build number plugin. Is it possible to disable SCM check while using the build number plugin? Can we use this plugin to generate build number on non SCM build? Exception while doing the build: [ERROR] Failed to execute goal org.codehaus.mojo:buildnumber-maven-plugin:1.0:create (default) on project projectname: Execution default of goal org.codehaus.mojo:buildnumber-maven-plugin:1.0:create failed: The scm url cannot be null. -> [Help 1] org

Jenkins and maven-buildnumber-plugin

ぃ、小莉子 提交于 2019-12-12 15:55:05
问题 I am using maven-buildnumber-plugin version 1.0-beta-4. This works fine on a project checked out of Subversion, but fails in Jenkins. I assume this problem is due to Jenkins somehow removing the .svn folders. I assumed wrong. Here is the error I got: maven builder waiting mavenExecutionResult exceptions not empty org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:buildnumber-maven-plugin:1.0-beta-4:create (default) on project swift-core: Cannot

turn off buildnumber-maven-plugin for submodules

自作多情 提交于 2019-12-11 08:25:50
问题 Parent: <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>buildnumber-maven-plugin</artifactId> <version>1.0</version> <executions> <execution> **<inherited>false</inherited>** <goals> <goal>create</goal> </goals> </execution> </executions> <configuration> <format>${project.version}-b{0,number}</format> <items> <item>buildNumber0</item> </items> <doCheck>false</doCheck> <doUpdate>false</doUpdate> </configuration> </plugin> </plugins> <modules> <module>module1</module>

Visibility of buildnumber-maven-plugin property ${buildNumber}

我的梦境 提交于 2019-12-11 03:25:09
问题 I am trying to use buildnumber-maven-plugin to append the SCM build number to the WAR artifact name and then use tomcat7-maven-plugin to deploy it but in a context path that doesn't include the build number. So I am making foo-r1234.war where foo is my project and 1234 is the revision number in Subversion but I want to deploy it in a Tomcat context foo . I got the war generation to reflect the build number but the problem is that the Tomcat plugin doesn't see the ${buildNumber} property

SVN revision number and timestamp

核能气质少年 提交于 2019-12-09 18:30:04
问题 I'm trying to display the latest SVN revision number and timestamp on the title bar of a web application. My current code displays the revision number but not timestamp. Both are not coming together. I'm using the following code. <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>buildnumber-maven-plugin</artifactId> <version>1.2</version> <executions> <execution> <phase>validate</phase> <goals> <goal>create</goal> </goals> <configuration> <useLastCommittedRevision>true<