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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T21:09:32+00:00 2026-05-18T21:09:32+00:00

I set up Hudson for my project with the build goals mvn clean deploy

  • 0

I set up Hudson for my project with the build goals mvn clean deploy site:site, run a build every midnight and whenever there are new changes.

One thing I have been wondering is whether I should include deploy in the build goals because it could happen that if I had just released version 1.0.0 of my project (I’ve changed the pom to be version 1.0.0 and committed it) but not yet increased the version number to 1.0.1-SNAPSHOT for several days, I could end up with multiple different 1.0.0 builds being deployed at different times.

But I’ve seen people are using deploy in their Hudson’s build goals – I wonder how they deal with this issue.

What’s the correct way of doing a release with Maven actually? Thanks for any pointers!

  • 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-18T21:09:33+00:00Added an answer on May 18, 2026 at 9:09 pm

    You should continue to do automated nightly deploy(s) from Hudson, but the larger issue regarding how to handle version numbers and releases is intricately tied up with whatever your source code control system is. You didn’t mentioned what kind of source code control system you are using, but I can explain how to do this using Subversion.

    Firstly, for the reason you mentioned, you should never change the version identifier of your source code in trunk to anything other than a snapshot version (e.g. with a -SNAPSHOT on the end). Otherwise you will overwrite when you re-deploy. The best practice is to (temporarily) change the version identifiers in your trunk pom(s) to the version you want to release, tag the trunk, build from the tag, then deploy the build you made from the tag, then immediately bump up the snapshot version identifier in trunk, and finally commit the trunk with the newer, higher snapshot version number.

    If this seems like a hassle, then you should know that the Maven Release Plugin will do all this for you automatically by relying on the Maven SCM Plugin to do the work with your source control system.

    While I have grown to love invoking the Maven Release Plugin from Hudson, it is a very touchy thing. In order for it function properly here are a few tips:

    • Real releases need to be executed by Hudson, but developers can
      certainly also do them from their
      development machines to test out the
      release process. Just be sure to
      delete any tags in Subversion and any
      release artifacts in Nexus
      afterwards.
    • It uses the maven-scm-plugin which in turn requires an externally
      installed version of subversion to be
      on the current path. Thus version of
      subversion must also have already
      cached the credentials necessary to
      write into the subversion source
      repository.
    • If a release process aborts itself part way through you can do a
      release:rollback to fix the poms, but
      this won’t eliminate any bogus tags
      that have already been committed to
      subversion. These you’ll have to
      delete manually, after doing an svn
      update.
    • The release:rollback goal sometimes doesn’t return the pom.xml
      version back to a SNAPSHOT. If
      anything goes wrong, check the POM
      version to ensure "SNAPSHOT" is used.
    • The release:rollback goal sometimes doesn’t return the SCM URLs
      back to their original location. If
      anything goes wrong, check that these
      point to "trunk" or the originating
      branch.
    • Because we use Subversion our configuration of the maven-release-plugin enables the
      {{suppressCommitBeforeTag}} option
      which eliminates an extra commit that
      would other modify the trunk pom.xml
      files before modifying them back.

    Also note that there is a Maven Release Plugin integration with Hudson, but it is not required to invoke the Maven release plugin goals from Hudson, it just makes it easier, however, I have had no luck getting that plugin to work.

    So to summarize:

    1. Only deploy from trunk using
      SNAPSHOTS
    2. Use the Maven release
      plugin to deploy from a tag during a
      release.

    Hope this helps.

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

Sidebar

Related Questions

Problem I have a hudson build server set up on a windows server 2008.
I have just set up Hudson on my server. For some reason, my build
I want to set up a parameterized build in Hudson that only takes one
does anybody knows if there is a Jenkins /Hudson plugin that when the build
I've been using Jenkins/Hudson CI for deploying my .NET web site project. I've been
I've got Hudson running on TOMCAT, it can build my Netbeans project using the
After using Hudson for continuous integration with a prior project, I want to set
I would like to have a CI build (e.g., Hudson) set up and tear
I set up a Maven2/3 project in Hudson 2.0.1 deployed in Glassfish 3.0.1 and
I am currently trying to build my project using hudson to call maven. I

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.