question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Update Maven plugin management to expose a configuration property for the Native Metadata Repository version

See original GitHub issue

As discussed with @odrotbohm, overriding the version of the metadata repository requires to redefine the plugin coordinates. There’s an interest that Spring Boot has an opinion about this. The NBT plugin hardcodes the version to use and it can lag with an older version of the plugin.

At the moment the version offered is 0.1.0 while 0.1.2 is available.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
snicollcommented, Sep 20, 2022

Because the default value would need to be defined in both the Maven parent POM and as some value within our Gradle plugin?

The plugin sets a version by default and we don’t want to override it. If a user applies version X.Y.Z of the plugin, they should get a certain version of the metadata OOTB and upgrading the plugin should upgrading the version of the metadata if they haven’t expressed an opinion. This makes the whole thing confusing if we expose a property. In retrospect, it’s not even related to Gradle at all as overriding the version of the plugin in Maven should give you that as well.

0reactions
wilkinsonacommented, Sep 20, 2022

Things would get complicated for users if they overrode the version of the NBT plugin. They’d then get a default version of the metadata that’s unexpected.

Taking a small step back from the metadata version, I’m not even sure that we should be managing the version of the NBT plugin. We don’t do so for Gradle and doing so for Maven may create more problems than it solves.

Both the NBT plugin and the metadata are evolving quite rapidly at the moment. If we manage the version in Boot, there becomes an expectation that the version will only be updated in line with our usual maintenance policy – we’d only pick up maintenance releases of the metadata and the build plugin in maintenance releases of Boot. I’m not sure that the build plugin is ready for that, even less so the metadata. We may be better avoiding this problem by not managing the versions at all but this will come at the code of making application poms more verbose. It’s unfortunate that Maven doesn’t allow us to provide some default configuration for a plugin without having to specify a version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Guide to Configuring Plug-ins - Apache Maven
Maven plugins (build and reporting) are configured by specifying a <configuration> element where the child elements of the <configuration> ...
Read more >
Spring Boot Maven Plugin Documentation
The plugin offers a number of user properties, starting with spring-boot , to let you customize the configuration from the command-line. For ...
Read more >
java - Maven clean install: Failed to execute goal org.apache ...
It might be a new bug coming with some latest release of Spring-boot (and then : Spring). I had it. The workaround is...
Read more >
Use Maven to Build a Native Executable from a Java Application
You do not have to configure anything manually: the Native Image Maven plugin can generate the required metadata for you by injecting the...
Read more >
Spring Boot 2.6 Release Notes - GitHub
This contributor exposes any property from the Spring Environment whose name ... Improved Configuration of the Maven Plugin's Start Goal.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found