You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Sandra Kosmalla <sk...@web.de> on 2015/01/27 15:18:56 UTC
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-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Question about Java version range using in Maven Enforcer Plugin
Posted by Sandra Kosmalla <sk...@web.de>.
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 <sk...@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-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Question about Java version range using in Maven Enforcer Plugin
Posted by Curtis Rueden <ct...@wisc.edu>.
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 <sk...@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-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>