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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:14:34+00:00 2026-06-13T07:14:34+00:00

I am attempting to create a way in which hermetic builds can be achieved

  • 0

I am attempting to create a way in which hermetic builds can be achieved while still relying on SNAPSHOT dependencies in your project.

For the purposes of example, say I have a project which has a dependency structure like this:

             ┌ other-1.2-SNAPSHOT
mine-1.2.3 ──┤
             └ thing-3.1-SNAPSHOT ── gizmo-6.1.3-SNAPSHOT

What I would like to do is resolve all the SNAPSHOT dependencies locally to something which is related to my current version and then deploy those as releases to my Nexus’ release repository. Not all of these dependencies are internal so I cannot simply just make a release on each.

So, in this example, other-1.2-SNAPSHOT would become something like other-1.2-mine-1.2.3 and thing-3.1-SNAPSHOT would become thing-3.1-mine-1.2.3. This is relatively trivial in about 60 lines of python.

The problem, however, is in resolving transitive SNAPSHOTs to concrete versions. So I also need to convert gizmo-6.1.3-SNAPSHOT to gizmo-6.1.3-mine.1.2.3 and have thing-3.1-mine-1.2.3 depend on it.

This is only an example of one way in which to achieve what I want. The goal is that in a year or two down the road I can checkout my release branch for version 1.2.3 and be able to run mvn clean package or the like without having to worry about resolving long-since-gone SNAPSHOT dependencies.

It’s important that this branch be compilable and not just retain all dependencies using something like the jar-and-dependencies functionality of the assembly plugin. I’d like to potentially be able to modify the source files and make another release build (e.g., applying a hotfix).

So,

  • Is there anything like this available that will be able to convert SNAPSHOT dependencies in a recursive fashion to be concrete?
  • Are there any plugins which manage this kind of thing for you? The release plugin had promise with some configuration options on its branch goal but it doesn’t resolve external deps to the degree that I want.
  • Are other techniques available for creating hermetic Maven builds?
  • 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-13T07:14:35+00:00Added an answer on June 13, 2026 at 7:14 am

    This is not a widely used technique, but you can always check your specific SNAPSHOT dependencies into your project as a “project” repository, as described in this blog post: Maven is to Ant as a Nail Gun is to a Hammer

    In short, use the Dependencies Plugin to create repository located in your project directory. The below is copied from the linked blog post (which you should read):

    1) Run mvn -Dmdep.useRepositoryLayout=true -Dmdep.copyPom=true dependency:copy-dependencies

    “This creates /target/dependencies with a repo-like layout of all your projects dependencies”

    2) Copy target/dependencies/ to something like libs/

    3) Add a repository declaration like the following to your POM:

    <repositories>
      <repository>
        <releases />
        <id>snapshots-I-need-forever</id>
        <name>snapshots-I-need-forever</name>
        <url>file:///${basedir}/libs</url>
      </repository>
    </repositories>
    

    You make this an automated part of your build/release process: step 1 by configuring the Dependencies plugin to a lifecycle phasephase, and step 2 using AntRun Plugin to move the downloaded dependencies to the right place..

    Hope this works for you. I have to go take a shower now…

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

Sidebar

Related Questions

I'm attempting to create a small application in which I can make a poul
I'm attempting to create a table/grid like view which i can use for displaying
While attempting to create a replacement tablespace for USER, I accidentally created a datafile
Im attempting to create a new operator :? on lists, which operates the same
I'm attempting to create a CustomControl which will have various properties affected by an
I'm attempting to create a backup of my client's existing svn repositories, which is
I am attempting to create a list of dicts which will have the following
I am attempting to create a UIView (and associated UIViewController ) which mimic the
I am attempting to create a visual element using DIV elements and CSS which
I am attempting to create an onclick function which has 1 of 2 outcomes

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.