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 3977998
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:59:28+00:00 2026-05-20T04:59:28+00:00

I am using Jenkins (Hudson) with the Grails plugin to do builds as I

  • 0

I am using Jenkins (Hudson) with the Grails plugin to do builds as I update svn. I found this example script that allows you to incorporate a build number from an env var:

set-version 1.1.0.${env['BUILD_NUMBER']}

But as you see, the prefix is hard-coded. I’d like to use the version number set in the application.properties file. How can I do something like:

set-version ${app.version}.${env['BUILD_NUMBER']}

Have tried a variety of scopes/syntax to no avail.

  • 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-20T04:59:29+00:00Added an answer on May 20, 2026 at 4:59 am

    It is not possible out of the box. Jenkins or specifically the Grails plugin does not read the content of the application.properties file and hence the existing application version is not available as a variable.

    You might want to consider writing a custom script in your application (like append-version) that will read application.properties and append the value passed in. You can call the existing set-version script modifying the argument.

    I have also created a simple script that should do the job:

    includeTargets << grailsScript("Init")
    
    target(main: "Append a string to the existing version number") {
        depends(checkVersion, parseArguments)
    
        def newVersion = metadata.'app.version' + '-' + args
        metadata.'app.version' = newVersion
        metadata.persist()
    }
    
    setDefaultTarget(main)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently my team is using Jenkins to do automated builds that are triggered by
I'm just getting started using GitHub, Gerrit, and Hudson(Jenkins) together. And I need some
When setting up a new Hudson/Jenkins instance i run into the problem that i
I've been using Jenkins/Hudson CI for deploying my .NET web site project. I've been
I am using maven-buildnumber-plugin version 1.0-beta-4. This works fine on a project checked out
I've set up a job in Jenkins that polls my Mercurial repository, using the
Using ASP.NET MVC there are situations (such as form submission) that may require a
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
Using C#, I need a class called User that has a username, password, active
Using SVN you can right click a folder TEST and add it to 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.