Re: Not getting "svnrevision" property in, builder

View: New views
3 Messages — Rating Filter:   Alert me  

Re: Not getting "svnrevision" property in, builder

by Dan Rollo-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It appears you are using Ant from Maven2, which should be fine, and the
svnrevision prop should be populated.
Are you sure any modifications are actually detected? If not, that might
explain why svnrevision is not populated.

Also, try adding the '-debug' command to your CC startup command. This
will increase logging and console ouput, which should show you the exact
command line used to invoke maven (including any properties being set).

Lastly, I don't remember if there where changes after v2.8.2 that affect
this, but you might want to try with the latest from svn (and/or the
release candidate for v2.8.3).

Please let us know how it turns out.

Dan



From: Ashok P <ashvitech@...>
Subject: [Cruisecontrol-user] Not getting "svnrevision" property in
        builder
To: cruisecontrol-user@...


Hi,

I am using CruiseControl 2.7.2 on Windows XP. I want to get "${svnrevision}"
property in my ant builder, but CC is not passing this property.  I am
getting all other properties such as label as shown below.

INFO] Executing tasks
      [echo] Label is build.1, svnrevision is ${svnrevision}
      [echo] cvstimestamp is 2009-10-30_06:54:25_GMT
      [echo] cctimestamp is 20091030025425
      [echo] cclastgoodbuildtimestamp is 20091030000000
      [echo] cclastbuildtimestamp is 20091030000000
      [echo] lastbuildsuccessful is false


Please correct and help me to resolve this problem.

Here are the details in config file and maven script.

CC-config.xml:
...
<cruisecontrol>
.....
.....
   <project name="hello" buildafterfailed="false">

     <bootstrappers>
       <currentbuildstatusbootstrapper file="logs/hello/buildstatus.txt"/>
     </bootstrappers>

     <schedule interval="1800">
       <maven2 mvnhome="C:/apache-maven-2.0.9"
pomfile="projects/${project.name}/pom.xml"
          goal="package" />
     </schedule>
     <bootstrappers>
       <svnbootstrapper localWorkingCopy="projects/${project.name}"
username="confluence"
password="asd"/>
     </bootstrappers>
     <modificationset quietperiod="30">
       <svn username="confluence" password="asd"
localWorkingCopy="projects/${project.name}"/>
     </modificationset>

.....
     <publishers>
       <currentbuildstatuspublisher file="logs/hello/buildstatus.txt" />
     </publishers>

   </project>
</cruisecontrol>


--------------------
pom.xml (builder file)

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">

........
........
   <build>
     <plugins>
       <plugin>
         <artifactId>maven-antrun-plugin</artifactId>
         <executions>
           <execution>
             <phase>package</phase>
             <configuration>
               <tasks>
                  <echo message="Label is ${label}, svnrevision is
${svnrevision}"/>
            <echo message="cvstimestamp is ${cvstimestamp}"/>
            <echo message="cctimestamp is ${cctimestamp}"/>
           <echo message="cclastgoodbuildtimestamp is
${cclastgoodbuildtimestamp}"/>
                 <echo message="cclastbuildtimestamp is
${cclastbuildtimestamp}"/>
           <echo message="lastbuildsuccessful is ${lastbuildsuccessful}"/>
             </tasks>
             </configuration>
             <goals>
               <goal>run</goal>
             </goals>
           </execution>
         </executions>
       </plugin>
     </plugins>
   </build>

</project>

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Cruisecontrol-user mailing list
Cruisecontrol-user@...
https://lists.sourceforge.net/lists/listinfo/cruisecontrol-user

Re: Not getting "svnrevision" property in, builder

by Ashok P :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Thanks Dan. I got it now. I was doing force build to test this. It is working fine if there are modifications, but with force build it is not passing this property, and I think it is expected.

I have a other question about SVNLabelIncrementor –

Why svnlabelincrementor adding “M” in labels? Its fine if it is forced build which adds extra part (.X), but I don’t want “M”. Can I avoid extra “M” from label by setting any property? I am using CC-2.8.2.

Example:
•  22 minutes ago svn.9096M.1
•  about 1 hour ago svn.9096M
•  2 days ago svn.9068M
•  2 days ago svn.9064M
•  3 days ago svn.9058


Thanks and I appreciate your help.



Dan Rollo-2 wrote:
It appears you are using Ant from Maven2, which should be fine, and the
svnrevision prop should be populated.
Are you sure any modifications are actually detected? If not, that might
explain why svnrevision is not populated.

Also, try adding the '-debug' command to your CC startup command. This
will increase logging and console ouput, which should show you the exact
command line used to invoke maven (including any properties being set).

Lastly, I don't remember if there where changes after v2.8.2 that affect
this, but you might want to try with the latest from svn (and/or the
release candidate for v2.8.3).

Please let us know how it turns out.

Dan



From: Ashok P <ashvitech@gmail.com>
Subject: [Cruisecontrol-user] Not getting "svnrevision" property in
        builder
To: cruisecontrol-user@lists.sourceforge.net


Hi,

I am using CruiseControl 2.7.2 on Windows XP. I want to get "${svnrevision}"
property in my ant builder, but CC is not passing this property.  I am
getting all other properties such as label as shown below.

INFO] Executing tasks
      [echo] Label is build.1, svnrevision is ${svnrevision}
      [echo] cvstimestamp is 2009-10-30_06:54:25_GMT
      [echo] cctimestamp is 20091030025425
      [echo] cclastgoodbuildtimestamp is 20091030000000
      [echo] cclastbuildtimestamp is 20091030000000
      [echo] lastbuildsuccessful is false


Please correct and help me to resolve this problem.

Here are the details in config file and maven script.

CC-config.xml:
...
<cruisecontrol>
.....
.....
   <project name="hello" buildafterfailed="false">

     <bootstrappers>
       <currentbuildstatusbootstrapper file="logs/hello/buildstatus.txt"/>
     </bootstrappers>

     <schedule interval="1800">
       <maven2 mvnhome="C:/apache-maven-2.0.9"
pomfile="projects/${project.name}/pom.xml"
          goal="package" />
     </schedule>
     <bootstrappers>
       <svnbootstrapper localWorkingCopy="projects/${project.name}"
username="confluence"
password="asd"/>
     </bootstrappers>
     <modificationset quietperiod="30">
       <svn username="confluence" password="asd"
localWorkingCopy="projects/${project.name}"/>
     </modificationset>

.....
     <publishers>
       <currentbuildstatuspublisher file="logs/hello/buildstatus.txt" />
     </publishers>

   </project>
</cruisecontrol>


--------------------
pom.xml (builder file)

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">

........
........
   <build>
     <plugins>
       <plugin>
         <artifactId>maven-antrun-plugin</artifactId>
         <executions>
           <execution>
             <phase>package</phase>
             <configuration>
               <tasks>
                  <echo message="Label is ${label}, svnrevision is
${svnrevision}"/>
            <echo message="cvstimestamp is ${cvstimestamp}"/>
            <echo message="cctimestamp is ${cctimestamp}"/>
           <echo message="cclastgoodbuildtimestamp is
${cclastgoodbuildtimestamp}"/>
                 <echo message="cclastbuildtimestamp is
${cclastbuildtimestamp}"/>
           <echo message="lastbuildsuccessful is ${lastbuildsuccessful}"/>
             </tasks>
             </configuration>
             <goals>
               <goal>run</goal>
             </goals>
           </execution>
         </executions>
       </plugin>
     </plugins>
   </build>

</project>

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Cruisecontrol-user mailing list
Cruisecontrol-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cruisecontrol-user

Re: Not getting "svnrevision" property in, builder

by Ashok P :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


I think "M" stands for SVN modification which subversion adds it. Sorry for asking question without investigations.  


Thanks....  // Ashok




Thanks Dan. I got it now. I was doing force build to test this. It is working fine if there are modifications, but with force build it is not passing this property, and I think it is expected.

I have a other question about SVNLabelIncrementor –

Why svnlabelincrementor adding “M” in labels? Its fine if it is forced build which adds extra part (.X), but I don’t want “M”. Can I avoid extra “M” from label by setting any property? I am using CC-2.8.2.

Example:
•  22 minutes ago svn.9096M.1
•  about 1 hour ago svn.9096M
•  2 days ago svn.9068M
•  2 days ago svn.9064M
•  3 days ago svn.9058


Thanks and I appreciate your help.



Dan Rollo-2 wrote:
It appears you are using Ant from Maven2, which should be fine, and the
svnrevision prop should be populated.
Are you sure any modifications are actually detected? If not, that might
explain why svnrevision is not populated.

Also, try adding the '-debug' command to your CC startup command. This
will increase logging and console ouput, which should show you the exact
command line used to invoke maven (including any properties being set).

Lastly, I don't remember if there where changes after v2.8.2 that affect
this, but you might want to try with the latest from svn (and/or the
release candidate for v2.8.3).

Please let us know how it turns out.

Dan



From: Ashok P <ashvitech@gmail.com>
Subject: [Cruisecontrol-user] Not getting "svnrevision" property in
        builder
To: cruisecontrol-user@lists.sourceforge.net


Hi,

I am using CruiseControl 2.7.2 on Windows XP. I want to get "${svnrevision}"
property in my ant builder, but CC is not passing this property.  I am
getting all other properties such as label as shown below.

INFO] Executing tasks
      [echo] Label is build.1, svnrevision is ${svnrevision}
      [echo] cvstimestamp is 2009-10-30_06:54:25_GMT
      [echo] cctimestamp is 20091030025425
      [echo] cclastgoodbuildtimestamp is 20091030000000
      [echo] cclastbuildtimestamp is 20091030000000
      [echo] lastbuildsuccessful is false


Please correct and help me to resolve this problem.

Here are the details in config file and maven script.

CC-config.xml:
...
<cruisecontrol>
.....
.....
   <project name="hello" buildafterfailed="false">

     <bootstrappers>
       <currentbuildstatusbootstrapper file="logs/hello/buildstatus.txt"/>
     </bootstrappers>

     <schedule interval="1800">
       <maven2 mvnhome="C:/apache-maven-2.0.9"
pomfile="projects/${project.name}/pom.xml"
          goal="package" />
     </schedule>
     <bootstrappers>
       <svnbootstrapper localWorkingCopy="projects/${project.name}"
username="confluence"
password="asd"/>
     </bootstrappers>
     <modificationset quietperiod="30">
       <svn username="confluence" password="asd"
localWorkingCopy="projects/${project.name}"/>
     </modificationset>

.....
     <publishers>
       <currentbuildstatuspublisher file="logs/hello/buildstatus.txt" />
     </publishers>

   </project>
</cruisecontrol>


--------------------
pom.xml (builder file)

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">

........
........
   <build>
     <plugins>
       <plugin>
         <artifactId>maven-antrun-plugin</artifactId>
         <executions>
           <execution>
             <phase>package</phase>
             <configuration>
               <tasks>
                  <echo message="Label is ${label}, svnrevision is
${svnrevision}"/>
            <echo message="cvstimestamp is ${cvstimestamp}"/>
            <echo message="cctimestamp is ${cctimestamp}"/>
           <echo message="cclastgoodbuildtimestamp is
${cclastgoodbuildtimestamp}"/>
                 <echo message="cclastbuildtimestamp is
${cclastbuildtimestamp}"/>
           <echo message="lastbuildsuccessful is ${lastbuildsuccessful}"/>
             </tasks>
             </configuration>
             <goals>
               <goal>run</goal>
             </goals>
           </execution>
         </executions>
       </plugin>
     </plugins>
   </build>

</project>

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Cruisecontrol-user mailing list
Cruisecontrol-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cruisecontrol-user