Question about Java version range using in Maven Enforcer Plugin
Hi, I want to set the RequiredJavaVersion rule in Maven Enforcer Plugin with the requirement that using Java in versions 1.6, 1.7 and 1.8 is possible (independent of update version). So I set the value [1.6,1.8] in the property version in the RequiredJavaVersion rule. If I configure Java 8 in my JAVA_HOME, the build failed because of the rule RequiredJavaVersion. The goal enforcer:display-info prints following information [INFO] --- maven-enforcer-plugin:1.3.1:display-info (default-cli) @ --- [INFO] Maven Version: 3.2.5 [INFO] JDK Version: 1.8.0_31 normalized as: 1.8.0-31 [INFO] OS Info: Arch: amd64 Family: unix Name: linux Version: 3.13.0-37-generic I have to set the range value to [1.6,1.8.0.*] so that the build runs successfully. I discussed with my team how they interprets the range value [1.6,1.8]. They would interpret this as every Java 8 version is possible. Is this a misinterpretation of us? What do you say about it? Thanks and best regards, Sandra Kosmalla - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Question about Java version range using in Maven Enforcer Plugin
Hi Curtis, thanks for your explanation. Your suggestion works. Regards, Sandra Am 27.01.2015 um 15:35 schrieb Curtis Rueden: Hi Sandra, I discussed with my team how they interprets the range value [1.6,1.8]. They would interpret this as every Java 8 version is possible. Is this a misinterpretation of us? For the most part, the RequireMavenVersion and RequireJavaVersion rules use the standard Maven version range syntax [1]. So try writing: [1.6, 1.9) Where the closing paren means up to, but not including, 1.9. Regards, Curtis [1] http://maven.apache.org/enforcer/enforcer-rules/versionRanges.html On Tue, Jan 27, 2015 at 3:18 PM, Sandra Kosmalla skosma...@web.de wrote: Hi, I want to set the RequiredJavaVersion rule in Maven Enforcer Plugin with the requirement that using Java in versions 1.6, 1.7 and 1.8 is possible (independent of update version). So I set the value [1.6,1.8] in the property version in the RequiredJavaVersion rule. If I configure Java 8 in my JAVA_HOME, the build failed because of the rule RequiredJavaVersion. The goal enforcer:display-info prints following information [INFO] --- maven-enforcer-plugin:1.3.1:display-info (default-cli) @ --- [INFO] Maven Version: 3.2.5 [INFO] JDK Version: 1.8.0_31 normalized as: 1.8.0-31 [INFO] OS Info: Arch: amd64 Family: unix Name: linux Version: 3.13.0-37-generic I have to set the range value to [1.6,1.8.0.*] so that the build runs successfully. I discussed with my team how they interprets the range value [1.6,1.8]. They would interpret this as every Java 8 version is possible. Is this a misinterpretation of us? What do you say about it? Thanks and best regards, Sandra Kosmalla - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Antwort: mvn release:prepare does not update parent version
Hi Markus using mvn release:prepare -DautoVersionSubmodules=true should solve your problem. Greetz, Sandra Von:Markus Karg k...@quipsy.de An: users@maven.apache.org, Datum: 22.07.2013 09:47 Betreff:mvn release:prepare does not update parent version I'm driving nuts with mvn release:prepare...: When I do mvn release:prepare, Maven asks whether I want to update all SNAPSHOT version referenced in the POM. I say yes and confirm all suggested replacement versions unchanged. When Maven is done, I check the POM.xml. It is correctly rewritten for all references, but not for the parent version. The parent version still references the *old* SNAPSHOT, while obviously it should now name the *next* SNAPSHOT. Can somebody tell me what I have to do so that mvn release:prepare will also make the parent version point tot he *next* SNAPSHOT, as it does it correctly with the dependencies and the project's own version? Thanks! -Markus
Right behaviour of versions:update-properties?
Hi all, I made some tests with the Versions Maven Plugin and the behaviour of the goal versions:update-properties is different from my expectation. I have two artifacts in my repository: 1. pom-projet-a with the version 1.4.0 and 1.5.0-SNAPSHOT 2. jar-project-b with the version 1.11.0 and 1.12.0-SNAPSHOT In a third project I have following pom definition: parent groupIdmycompany/groupId artifactIdpom-project-a/artifactId version1.5.0-SNAPSHOT/version /parent packagingpom/packaging artifactIdrelease-test/artifactId version1.0.0-SNAPSHOT/version properties jar.version1.12.0-SNAPSHOT/jar.version /properties nameRelease Test/name dependencies dependency groupIdmycompany/groupId artifactIdjar-project-b/artifactId version${jar.version}/version /dependency /dependencies When I call the goal versions:update-parent, the Versions Maven Plugin changes the version number to the last release version (here 1.4.0). This is what I expect. When I call the goal versions:update-properties, the version in the property jar.version isn't changed. I would expect, that the plugin would change the version number to the last release version (here 1.11.0) , too. I made another test. I put the artifact jar-project-b with the version 1.12.0 in my repository, so I have the version 1.11.0, 1.12.0, 1.12.0-SNAPSHOT in my repository. When I call now the goal versions:update-properties, the version in the property jar.version is changed to 1.12.0. (the last release version). Now my question is: Is this a bug in the plugin or is my expectation wrong? Kind regards Sandra IT Solutions / Software Development Rhenus Freight Logistics GmbH Co.KG, Rhenus-Platz 1, 59439 Holzwickede, Deutschland www.rhenus.com; Sitz: Unna, AG Hamm, HRA 2089; phG: Rhenus Freight Logistics Verwaltungs GmbH, Unna, AG Hamm HRB 3422; Geschäftsführer: Petra Finke, Herbert Joeres, Dr.Martin Neese, Lutz Welter
Antwort: Re: Right behaviour of versions:update-properties?
On Friday, 13 July 2012, wrote: Hi all, I made some tests with the Versions Maven Plugin and the behaviour of the goal versions:update-properties is different from my expectation. I have two artifacts in my repository: 1. pom-projet-a with the version 1.4.0 and 1.5.0-SNAPSHOT 2. jar-project-b with the version 1.11.0 and 1.12.0-SNAPSHOT In a third project I have following pom definition: parent groupIdmycompany/groupId artifactIdpom-project-a/artifactId version1.5.0-SNAPSHOT/version /parent packagingpom/packaging artifactIdrelease-test/artifactId version1.0.0-SNAPSHOT/version properties jar.version1.12.0-SNAPSHOT/jar.version /properties nameRelease Test/name dependencies dependency groupIdmycompany/groupId artifactIdjar-project-b/artifactId version${jar.version}/version /dependency /dependencies When I call the goal versions:update-parent, the Versions Maven Plugin changes the version number to the last release version (here 1.4.0). This is what I expect. If 1.5.0-SNAPSHOT is in the reactor/local/remote repo it should leave as is. If this is not the case then you have a bug It is. When I call the goal versions:update-properties, the version in the property jar.version isn't changed. I would expect, that the plugin would change the version number to the last release version (here 1.11.0) , too. Should never downgrade to older versions, so FAD Usually I agree with you, but both projects (pom-project-a and jar-project-b) are under my control. The use case I tried is I don't make change in pom-project-a and jar-project-b but in release-test. So I want to release release-test. Because of no change in pom-project-a and jar-project-b I can downgrade to older versions. Perhaps Versions Maven Plugin is not the right tool for my use case. I made another test. I put the artifact jar-project-b with the version 1.12.0 in my repository, so I have the version 1.11.0, 1.12.0, 1.12.0-SNAPSHOT in my repository. When I call now the goal versions:update-properties, the version in the property jar.version is changed to 1.12.0. (the last release version). FAD Now my question is: Is this a bug in the plugin or is my expectation wrong? Update-* should only move forward Maybe I missunderstand the documentation of the goal because of the flag -DallowsSnapshot. Update-parent has a special case where it will try to fix child projects so they can be built, a side-effect is that it might downgrade to a real version... Perhaps that feature could be moved to a fix-parent goal Kind regards Sandra IT Solutions / Software Development Rhenus Freight Logistics GmbH Co.KG, Rhenus-Platz 1, 59439 Holzwickede, Deutschland www.rhenus.com; Sitz: Unna, AG Hamm, HRA 2089; phG: Rhenus Freight Logistics Verwaltungs GmbH, Unna, AG Hamm HRB 3422; Geschäftsführer: Petra Finke, Herbert Joeres, Dr.Martin Neese, Lutz Welter