« Return to Thread: [jira] Created: (AMQ-1903) Add a Version class to easily output the version of ActiveMQ

[jira] Commented: (AMQ-1903) Add a Version class to easily output the version of ActiveMQ

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View in Thread


    [ https://issues.apache.org/activemq/browse/AMQ-1903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54815#action_54815 ]

Gary Tully commented on AMQ-1903:
---------------------------------

the buildnumber plugin will pull the revision from svn in the ${buildNumber} property
{code}
         <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>buildnumber-maven-plugin</artifactId>
          <executions>
            <execution>
              <phase>validate</phase>
              <goals>
                <goal>create</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <doCheck>false</doCheck>
            <doUpdate>false</doUpdate>
          </configuration>
        </plugin>
        <plugin>
{code}

and it can be used from the bundle plugin to add entries to the manifest - think it can also produce a buildnumber.properties file with svn revision and timestamp.

{code}
             <Implementation-Version>${project.version}</Implementation-Version>
+            <Implementation-SCM>${buildNumber}</Implementation-SCM>
             <_versionpolicy>[$(version;==;$(@)),$(version;=+;$(@)))</_versionpolicy>  
{code}

I guess this makes sense in the manifest of all jars that are produced. For each module, the buildnumber plugin needs to be pulled into the the build phase. or it could just be in the core and the activemq-all jar


> Add a Version class to easily output the version of ActiveMQ
> -------------------------------------------------------------
>
>                 Key: AMQ-1903
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1903
>             Project: ActiveMQ
>          Issue Type: New Feature
>    Affects Versions: 5.1.0
>            Reporter: Bruce Snyder
>            Assignee: Bruce Snyder
>             Fix For: 5.4.0
>
>         Attachments: Version.diff.txt
>
>
> I've found that in some environments version numbers are stripped from jar files making it difficult to determine the version of ActiveMQ someone is running. So I created a little Version class that reads properties from a file that is created by the build process. Then you just execute the main method in the Version class to get the following project output:
> {code}
> Apache ActiveMQ
>   Project Version: 5.2-SNAPSHOT
>   Build Timestamp: 2008.08.20 11:39:47 MDT
>       Java Vendor: Apple Inc.
>      Java Version: 1.5.0_13-119
>   OS Architecture: i386
>           OS Name: Mac OS X
>        OS Version: 10.5.4
> {code}
> The only thing missing is the SVN revision number. That's more difficult to add.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

 « Return to Thread: [jira] Created: (AMQ-1903) Add a Version class to easily output the version of ActiveMQ