Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6368243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:39:02+00:00 2026-05-25T00:39:02+00:00

I have a GWT project which has its source managed in SVN, is packaged

  • 0

I have a GWT project which has its source managed in SVN, is packaged using Maven and has its builds managed via Hudson. I want to get the SVN revision number of the latest check-in/build to be visible in a comment at the bottom of the application root HTML file. I don’t care where in the development process this happens!

Here are the options I’ve Googled for so far, with no success:

  • Can I get Hudson to, after building, write the build/revision number
    to one of its build output files (namely the application root HTML
    file)? I’ve seen no way to do this.
  • Can I get Maven to write the SVN revision number to one of its build
    output files (namely the application root HTML file)? I’ve seen ways
    of Maven writing this to a JAR/WAR manifest file (which can then be
    accessed in the Java code), but I’m not sure that this works in GWT
    (I’m not particularly knowledgeable about the internals of GWT).
  • Can I get SubVersion to, as a pre-commit hook, write the version number to a particular file? I know it’s easy to write the version number to the file you’re editing, but not so sure about writing to a totally separate file (so that it’s updated on every commit, regardless of whether it was changed in that commit).

Does anyone have a complete, end-to-end example of how to get any of these working? I keep finding little snippets of code/config which do one part of the job, but not anything that is exactly what I’m looking for.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T00:39:03+00:00Added an answer on May 25, 2026 at 12:39 am

    You can achieve what you’re looking for with a combination of Maven and Hudson. In this example let’s imagine you want the file version.txt at the root of your web app to contain the revision.

    version.txt:

    ${SVN_REVISION}
    

    In your project’s pom.xml enable filtering in the maven-war-plugin:

    <plugin>
      <artifactId>maven-war-plugin</artifactId>
      <version>2.1</version>
      <configuration>
        <webResources>
          <webResource>
            <directory>src/main/webapp</directory>
            <filtering>true</filtering>
            <includes>
              <include>version.txt</include>
            </includes>
          </webResource>
        </webResources>
      </configuration>
    </plugin>
    

    Make sure that Hudson is building your project via. Subversion checkout and it will set the SVN_REVISION environment variable for every build and Maven will fill it in.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using gwt project. In which I have different type of label question
I'm playing with a GWT/GAE project which will have three different pages, although it
I have a GWT project in Eclipse to which i try to add a
I have a project which consists of GWT client end and a Tomcat server
We have a GWT application which draws some resources from a separate servlet via
I've got a project which uses GWT. I use maven to manage dependencies, so
Have you tried using MVC or any other UI pattern for GWT client code.
Have just started using Visual Studio Professional's built-in unit testing features, which as I
I have an external Jar , which is in the Project BuildPath which is
I've been using GWT for quite some time now and have only used the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.