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

I am using jenkins with svn repository. Usually I want only to update svn
Using Jenkins or Hudson I would like to create a pipeline of builds with
We are planning on using Jenkins (used to be Hudson) for the automated builds
Currently my team is using Jenkins to do automated builds that are triggered by
I was wondering if there is a Hudson/Jenkins plugin that ties repository artifacts to
I'm using Jenkins and Bitbucket with the Mercurial plugin on windows. Every time I
I'm running a maven project using Jenkins. The project is using the checkstyle plugin
When using the Groovy Jenkins plugin (not the Groovy Post Build Plugin, which is
Is there any CI server (CruiseControl, Jenkins, Hudson, ...) that supports a proper DAG
Using the maven-dotnet-plugin I am getting the error shown at the end of this

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.