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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:55:14+00:00 2026-06-17T15:55:14+00:00

Note: long question, so in essence: I wish to know how to release, via

  • 0

Note: long question, so in essence: I wish to know how to release, via maven, a sanctified release of an existing project under my control. I use sonatype and its plugin at the moment, but their release plugin just won’t let me push a SHA1 as a release. If ready-made solutions exist, I adopt them any day, provided you tell me how to modify my pom.xml, linked below

I have a Java project (available on GitHub and in use already) which I develop using Intellij IDEA 12.0.1 (community version) on Ubuntu 12.10, 64bit. The installed version of maven is the one bundled by my distribution (3.0.4).

The problem I have lies with the pom.xml of the project:

https://raw.github.com/fge/json-schema-validator/master/pom.xml

I followed SonaType’s release guide. I have set up GPG, etc, all work OK. I can release using their plugin which, I surmise, is triggered by the following lines in pom.xml:

<parent>
    <groupId>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>7</version>
</parent>

However, I have several problems with this plugin (but is it really that one?):

  • it creates garbage commits, always prefixed with [mvn-release-plugin], and I don’t want that;
  • it clones from the developerConnection URI each time it wants to release, which is, frankly, stupid for anyone knowing how git works (a simple fetch and SHA1 compare can detect discrepancies) — and this behaviour is all the more annoying that my net connection is poor, to put it mildly;
  • it asks to create a tag: I don’t want that, I can create it myself, thank you very much;
  • it won’t even let you customize the release commit message (and I want to include a shortlog in there).

Therefore, when I am ready for a release, I go through these steps:

  1. create a tag on HEAD, called before
  2. git cherry-pick a commit (which I know the SHA1 of) which replaces, in pom.xml, all git repository URIs to a local repository of mine, which I sync as needed;
  3. at the shell prompt, let the plugin to its stuff so that the release get available “at large”:

    mvn release:clean
    mvn release:prepare
    mvn release:perform
    
  4. git rebase before: get rid of the commit changing the git URIs, squash/reword etc so that the garbage commits disappear and that the release message contains a shortlog of changes instead;

  5. create the real tag;
  6. push to github.

Of course, this means that the Maven release, which I guarantee to be sound and sane, does not match the SHA1 of the equivalent version on the Github project. And I’d like to get rid of that discrepancy.

So, how do I get the Sonatype release plugin to behave? That is, how do I tell it to:

  • trust the local git repository instead of git cloneing from developerConnection,
  • not create useless commits,
  • let me customize the release message?

Or is there a better alternative which would allow me not to go through this cumbersome processs?

Details available on demand.

  • 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-17T15:55:15+00:00Added an answer on June 17, 2026 at 3:55 pm

    The release plugin is the “official” maven-release-plugin, not a special Sonatype version.
    Check out the docs for the prepare and perform goals, especially localCheckout, pushChanges and suppressCommitBeforeTag (although I’m not sure the last one will do what you need).

    If you prepare your project manually by changing to a release version and adding a tag, you might even be able to omit release:prepare and only run release:perform -DlocalCheckout=true, which (in theory 😉 would build from your tag and push those artifacts to OSSRH.

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

Sidebar

Related Questions

NOTE: This is a long question. I've explained all the 'basics' at the top
Note: I know exactly what a property is. This question is about performance. Using
NOTE: I completely revised the question and turned it into an example project specifically
Note: this question is a bit long I have a PHP-based system with Service-Dao-Model
Note: This is a long winded question and requires a good understanding of the
(Edited) NOTE: this question is NOT about how Eclipse's code formatter wrap long String
NOTE: Sorry for the long question! I'm trying to understand some key areas behind
Please note that this question is about CGLayer (which you typically use to draw
Note: Although I use a zipcode database with Dutch zipcodes, this question is country
I know its a long question, so allow me to explain as best as

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.