我正在使用maven-buildnumer-plugin
添加我的SVN修订版本和构建日期到Spring MVC项目中的网页页脚。一切都很好...我想。
我没有错误,但是:
我的配置看起来像
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<version>1.0-beta-4</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<!-- Username/password stored in personal settings.xml -->
<username>${plott.scm.username}</username>
<password>${plott.scm.password}</password>
<revisionOnScmFailure>0</revisionOnScmFailure>
<buildNumberPropertyName>buildRevision</buildNumberPropertyName>
<timestampPropertyName>buildDateTime</timestampPropertyName>
<timestampFormat>{0,date,yyyy-MM-dd HH:mm:ss}</timestampFormat>
<doCheck>true</doCheck>
<doUpdate>false</doUpdate>
<getRevisionOnlyOnce>false</getRevisionOnlyOnce>
<useLastCommittedRevision>false</useLastCommittedRevision>
</configuration>
这会生成控制台输出,如:
macbookpro:com.platt.myproject john$ mvn clean tomcat:redeploy
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Mereko
[INFO] task-segment: [clean, tomcat:redeploy]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] Deleting directory /Users/john/Documents/Workspace/Eclipse/3.6_Helios/com.platt.myproject/target
[INFO] Preparing tomcat:redeploy
[INFO] [buildnumber:create {execution: default}]
[INFO] Verifying there are no local modifications ...
[INFO] Executing: /bin/sh -c cd /Users/john/Documents/Workspace/Eclipse/3.6_Helios/com.platt.myproject && svn --username doe.john --password '*****' --non-interactive status
[INFO] Working directory: /Users/john/Documents/Workspace/Eclipse/3.6_Helios/com.platt.myproject
[INFO] Updating project files from SCM: skipped.
[INFO] Executing: /bin/sh -c cd /Users/john/Documents/Workspace/Eclipse/3.6_Helios/com.platt.myproject && svn --username doe.john --password '*****' --non-interactive info
[INFO] Working directory: /Users/john/Documents/Workspace/Eclipse/3.6_Helios/com.platt.myproject
[INFO] Storing buildNumber: 56 at timestamp: 2011-01-20 11:35:48
[INFO] Executing: /bin/sh -c cd /Users/john/Documents/Workspace/Eclipse/3.6_Helios/com.platt.myproject && svn --username doe.john --password '*****' --non-interactive info
[INFO] Working directory: /Users/john/Documents/Workspace/Eclipse/3.6_Helios/com.platt.myproject
[INFO] Storing buildScmBranch: trunk
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 6 resources
(...Continueing and finishing build and deployment)
关于我如何
的任何想法PROD
版本感谢