If you want Java 5 minimum, then try this value "[1.5,)". If you want Java 
1.4.2 minimum, then try this value "[1.4.2,)". If you want Java 1.4.2 minimum, 
but less than Java 5, then try this value "[1.4.2,1.5)".

-----Original Message-----
From: Zemian Deng [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 22, 2008 8:49 AM
To: Maven Users List
Subject: jdk version range is not checking with dashes?

Hi,

If I have the following config, which I think it should restrict JDK1.5 or
higher:
                          <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>1.0-alpha-2</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>enforce-once</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireJavaVersion>
                                    <!-- minimum version is 1.4.2, Java 5
and higher not allowed -->
                                    <version>[1.5.0)</version>
                                </requireJavaVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

But this failed on my MacOSX, which has jdk 6:

$ java -version
java version "1.6.0_01-dp"
Java(TM) SE Runtime Environment (build 1.6.0_01-dp-b06-101)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_01-41-release, mixed mode)

I think the actual jdk version label is 1.6.0-1 and thus failed because of
the dash? So is this consider a bug for the plugin?

Thanks,
-Z
-- 
Sweet - a Scala web framework:
http://code.google.com/p/sweetscala

----------------------------------------------------------------------
CONFIDENTIALITY NOTICE This message and any included attachments are from 
Cerner Corporation and are intended only for the addressee. The information 
contained in this message is confidential and may constitute inside or 
non-public information under international, federal, or state securities laws. 
Unauthorized forwarding, printing, copying, distribution, or use of such 
information is strictly prohibited and may be unlawful. If you are not the 
addressee, please promptly delete this message and notify the sender of the 
delivery error by e-mail or you may call Cerner's corporate offices in Kansas 
City, Missouri, U.S.A at (+1) (816)221-1024.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to