开发者

Maven build plugin and Bamboo build

I'm using the maven build plugin with the following configuration:

<plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>buildnumber-maven-plugin</artifactId>
                <version>1.0</version>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>create</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
  开发者_StackOverflow社区                  <timestampFormat>
                        {0,date,yyyy-MM-dd HH:mm}
                    </timestampFormat>
                    <doCheck>false</doCheck>
                    <doUpdate>false</doUpdate>
                    <revisionOnScmFailure>0</revisionOnScmFailure>
                </configuration>
            </plugin>

and then I use the version number in

release-version=${project.version}-Revision:${buildNumber}-Branch:${scmBranch}-Date:${timestamp}

format. It is working perfectly if I build it on my PC, but it does not access the revision number when building it on Bamboo. I think Bamboo is using it's own SVN client to get the revision number, but I don not understand why it can not pass it to the release-version property. Thanks Zoltan


Often times, in cases like Team City, the remote agent runs the files that were checked out by the CI machine, but does not have the .svn files (code is checked out in one place, but run in another). Such setups often have an option to do "Agent Side Checkout", which will checkout the code on the remote agent and thus bring the .svn folders to agent so that it can run relevant build number information functions.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜