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

  • Home
  • SEARCH
  • 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 7850293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T18:48:10+00:00 2026-06-02T18:48:10+00:00

Is there a way to change the version number without editing the POM? <groupId>org.example</groupId>

  • 0

Is there a way to change the version number without editing the POM?

<groupId>org.example</groupId>
<artifactId>example</artifactId>
<version>1.0.0</version>

We have a CI system where we want to release nightly builds, but without using the -SNAPSHOT solution of Maven, so if 1.0.0 is the current version, we just want to have CI-NIGHTLY-BIULD-20120426.

I suggested this would be possible with something like mvn deploy -Dversion=CI-NIGHTLY-BIULD-20120426, but obviously not. The bad solution would be to let the CI server edit the pom.xml every time, but I think this is very unhandy.

Thank you!

  • 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-06-02T18:48:12+00:00Added an answer on June 2, 2026 at 6:48 pm

    I suggest to use classifier.

    <groupId>foo</groupId>
    <artifactId>bar</artifactId>
    <version>1.0</version>
    
    <properties>
        <!-- default classifier is empty -->
        <my.project.classifier></my.project.classifier>
    </properties>
    
    <build>
    ...
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>2.3.1</version>
        <configuration>
          <classifier>${my.project.classifier}</classifier>
        </configuration>
        <executions>...</executions>
      </plugin>
    </plugins>
    </build>
    

    and

    mvn package -Dmy.project.classifier=NIGHTLY-2012-04-26_02-30
    

    Maven documentation says about classifier:

    classifier: You may occasionally find a fifth element on the
    coordinate, and that is the classifier. We will visit the classifier
    later, but for now it suffices to know that those kinds of projects
    are displayed as groupId:artifactId:packaging:classifier:version.

    and

    The classifier allows to distinguish artifacts that were built from
    the same POM but differ in their content. It is some optional and
    arbitrary string that – if present – is appended to the artifact name
    just after the version number. As a motivation for this element,
    consider for example a project that offers an artifact targeting JRE
    1.5 but at the same time also an artifact that still supports JRE 1.4. The first artifact could be equipped with the classifier jdk15 and the
    second one with jdk14 such that clients can choose which one to use.

    Another common use case for classifiers is the need to attach
    secondary artifacts to the project’s main artifact. If you browse the
    Maven central repository, you will notice that the classifiers sources
    and javadoc are used to deploy the project source code and API docs
    along with the packaged class files.

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

Sidebar

Related Questions

I have a Delphi XE project and I'm trying to change the version number
Is there any way to change the version in a comment block? For e.g.
Using online interfaces to a version control system is a nice way to have
Scenario: The system has number of components, each with its own POM. There are
Is there any way to change the BackColor of the border of a panel
Is there any way to change the icon of an application after it is
Is there a way to change location of IsolatedStorage files? I am using .NET
Is there a way to change the root folder for the views to the
Is there a way to change the alignment of the icon or text of
Is there a way to change the value contained in an NSNumber after it

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.