You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just stumbled on an issue with dynamic versioning. Some of our repos use Maven Wrapper and some don't.
The issue, from what I can see, is not related to Wrapper vs No-Wrapper but Maven version (3.8.2 vs 3.9.9).
As seen below the variable substitution works with 3.9.9 but not 3.8.2 (for the exact same project).
Reading the README it seems as if there is full support for 3.8.x.
Are we doing something wrong or is here a bug lurking somewhere?
Non-working example using pure Maven 3.8.2 (no Wrapper) installed by sdkman:
$mvn -V;mvn
Apache Maven 3.8.2 (ea98e05a04480131370aa0c110b8c54cf726c06f)
Maven home: /opt/dev/sdkman/candidates/maven/3.8.2
Java version: 21.0.5, vendor: Eclipse Adoptium, runtime: /opt/dev/sdkman/candidates/java/21.0.5-tem
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "6.8.0-49-generic", arch: "amd64", family: "unix"
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for se.lfv.maven.tiles:lfv-development-environment-tile:tile:${nisse.jgit.dynamicVersion}
[WARNING] 'version' contains an expression but should be a constant. @ line 16, column 14
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.461 s
[INFO] Finished at: 2024-12-18T13:43:09+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoGoalSpecifiedException
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for se.lfv.maven.tiles:lfv-development-environment-tile:tile:${nisse.jgit.dynamicVersion}
[WARNING] 'version' contains an expression but should be a constant. @ line 16, column 14
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.445 s
[INFO] Finished at: 2024-12-18T13:43:10+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoGoalSpecifiedException
Working example using pure Maven 3.9.9 (no Wrapper) installed by sdkman (version=0.0.1-151-SNAPSHOT):
$mvn -V;mvn
Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)
Maven home: /opt/dev/sdkman/candidates/maven/3.9.9
Java version: 21.0.5, vendor: Eclipse Adoptium, runtime: /opt/dev/sdkman/candidates/java/21.0.5-tem
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "6.8.0-49-generic", arch: "amd64", family: "unix"
[INFO] Maveniverse Nisse 0.3.3 loaded
[INFO] Nisse injecting 25 properties into User Properties
[INFO] Scanning for projects...
[INFO] Nisse inlining following properties:
[INFO] * ${nisse.jgit.dynamicVersion}=0.0.1-151-SNAPSHOT
[INFO] Checking POMs for inlining:
[INFO] * se.lfv.maven.tiles:lfv-development-environment-tile needs inlining
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.479 s
[INFO] Finished at: 2024-12-18T13:46:30+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: pre-clean, clean, post-clean, validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-site, site, post-site, site-deploy. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoGoalSpecifiedException
[INFO] Maveniverse Nisse 0.3.3 loaded
[INFO] Nisse injecting 25 properties into User Properties
[INFO] Scanning for projects...
[INFO] Nisse inlining following properties:
[INFO] * ${nisse.jgit.dynamicVersion}=0.0.1-151-SNAPSHOT
[INFO] Checking POMs for inlining:
[INFO] * se.lfv.maven.tiles:lfv-development-environment-tile needs inlining
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.492 s
[INFO] Finished at: 2024-12-18T13:46:32+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: pre-clean, clean, post-clean, validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-site, site, post-site, site-deploy. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoGoalSpecifiedException
u30576@DCL0004:~/dev/clones/sysdev/devops/java/maven/maven-poms/tiles/lfv-development-environment-tile (main)$
The text was updated successfully, but these errors were encountered:
Nisse ITs are running with Maven 3.8.8. Unsure why you need exactly 3.8.2. We usually say Maven 3.6, 3.8 or 3.9 or 4.0, and each means latest minor, so 3.8.8, 3.9.9 and ToBeDone 4.0.0.
Hi Tamas,
Just stumbled on an issue with dynamic versioning. Some of our repos use Maven Wrapper and some don't.
The issue, from what I can see, is not related to Wrapper vs No-Wrapper but Maven version (3.8.2 vs 3.9.9).
As seen below the variable substitution works with 3.9.9 but not 3.8.2 (for the exact same project).
Reading the README it seems as if there is full support for 3.8.x.
Are we doing something wrong or is here a bug lurking somewhere?
Non-working example using pure Maven 3.8.2 (no Wrapper) installed by sdkman:
Working example using pure Maven 3.9.9 (no Wrapper) installed by sdkman (version=0.0.1-151-SNAPSHOT):
The text was updated successfully, but these errors were encountered: