Maven Lockfile #22383
Replies: 4 comments 10 replies
-
Consider the scenario where someone declares their dependencies with constraint ranges, e.g.
|
Beta Was this translation helpful? Give feedback.
-
As an update, we also now have a goal to rebuild your artifacts with the exact versions from the lockfile. We call this freeze, and this replaces every version in the pom with the version from the lockfile. Also, every transitive dependency is added to the pom. This way, maven resolves exactly these versions. |
Beta Was this translation helpful? Give feedback.
-
Sure. I thought lockfiles were managed by managers. And my understanding was the integration shouldn't change critical code. This lead me to create a new manager. What's your opinion on integrating it and at which place? |
Beta Was this translation helpful? Give feedback.
-
I took a look at the code and to my current understanding the workflow of renovate is: |
Beta Was this translation helpful? Give feedback.
-
Type of discussion.
I'm proposing an idea
Tell us more.
Renovate supports lockfiles for different build tools and languages. For maven there is none. We have created a lockfile for maven https://github.com/chains-project/maven-lockfile. For an example lockfile see https://github.com/chains-project/maven-lockfile/blob/main/maven_plugin/lockfile.json.
Goals as maven plugin
Our maven plugin has 2 goals,
mvn io.github.chains-project:maven-lockfile:generate
andmvn io.github.chains-project:maven-lockfile:validate
.It looks like renovate can update lockfiles after a dependency update. So only an invocation of the generate goal is needed.
Beta Was this translation helpful? Give feedback.
All reactions