qoomon / maven-git-versioning-extension

This extension will set project version, based on current Git branch or tag.
GNU General Public License v3.0
306 stars 87 forks source link

Maven 4.0.0-x compatibility #334

Open sureshg opened 2 months ago

sureshg commented 2 months ago

Getting this error when running on maven 4.0.0-Beta4

$ ./mvnw wrapper:wrapper -Dmaven=4.0.0-beta-4
Exception in thread "main" java.lang.AbstractMethodError: Receiver class me.qoomon.maven.gitversioning.GitVersioningModelProcessor does not define or inherit an implementation of the resolved method 'abstract java.nio.file.Path locateExistingPom(java.nio.file.Path)' of interface org.apache.maven.model.locator.ModelLocator.
        at org.apache.maven.model.locator.ModelLocator.locateExistingPom(ModelLocator.java:64)
        at org.apache.maven.cli.MavenCli.determinePom(MavenCli.java:1435)
        at org.apache.maven.cli.MavenCli.populateRequest(MavenCli.java:1323)
        at org.apache.maven.cli.MavenCli.populateRequest(MavenCli.java:1297)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:208)
        at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
        at java.base/java.lang.reflect.Method.invoke(Method.java:573)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:255)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:201)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:361)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:314)
`
qoomon commented 2 months ago

Although I fixed this issue, the extension is not loaded anymore. I assume maven 4.0.0 has changed how core extensions are working or how DI is done.