Hi all, 

If there is no more object, I'm going to apply this patch, see below:
Index: parent/pom.xml
===================================================================
--- parent/pom.xml      (revision 19258)
+++ parent/pom.xml      (working copy)
@@ -118,6 +118,34 @@
                 <extensions>true</extensions>
             </plugin>
             <plugin>
+                <groupId>org.codehaus.groovy.maven</groupId>
+                <artifactId>gmaven-plugin</artifactId>
+                <version>1.0</version>
+                <executions>
+                    <execution>
+                        <phase>deploy</phase>
+                        <goals>
+                            <goal>execute</goal>
+                        </goals>
+                        <configuration>
+                            <source><![CDATA[
+                                                               def 
javaVersion=System.getProperty("java.version")
+                                                               def 
enforceJava5=System.getProperty("hibernate.enforce.deploy.notjdk5")
+                                                               
if(!javaVersion.startsWith("1.5")){
+                                                                       
if(enforceJava5==null || !enforceJava5.equalsIgnoreCase("true"))
+                                                                       
fail("Hi man, you're not using JDK5 for hibernate deploying!\n"+
+                                                                               
"Although Hibernate can be build on both jdk5 and jdk6 during "+
+                                                                               
"development, but we do need build it on jdk5 for releasing. "+
+                                                                               
"If you *really* want to do this deploy on a non-jdk5, "+
+                                                                               
"please add this property '-Dhibernate.enforce.deploy.notjdk5=true'.")
+                                                               }
+                                ]]>
+                            </source>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-enforcer-plugin</artifactId>
                 <executions>
@@ -132,7 +160,7 @@
                     <rules>
                         <requireJavaVersion>
                             <!-- require JDK 1.5 to run the build -->
-                            <version>[1.5,1.6)</version>
+                            <version>[1.5,)</version>
                         </requireJavaVersion>
                         <requireMavenVersion>
                             <!-- we need at least Maven 2.0.8 because of a bug 
fix affecting our antlr usage -->
--------------------------------------------
here is the result if you run "mvn clean deploy" on jdk6:

papa-pc:core-branch35 stliu$ java -version
java version "1.6.0_15"
Java(TM) SE Runtime Environment (build 1.6.0_15-b03-219)
Java HotSpot(TM) 64-Bit Server VM (build 14.1-b02-90, mixed mode)
papa-pc:core-branch35 stliu$ mvn clean deploy
...
[INFO] [deploy:deploy]
altDeploymentRepository = null
[INFO] Retrieving previous build number from snapshots.jboss.org
Uploading: 
file:///User/stliu/.m2/test/org/hibernate/hibernate-parent/3.5.2-SNAPSHOT/hibernate-parent-3.5.2-20100421.094808-19.pom
41K uploaded
[INFO] Retrieving previous metadata from snapshots.jboss.org
[INFO] Uploading repository metadata for: 'artifact 
org.hibernate:hibernate-parent'
[INFO] Retrieving previous metadata from snapshots.jboss.org
[INFO] Uploading repository metadata for: 'snapshot 
org.hibernate:hibernate-parent:3.5.2-SNAPSHOT'
[INFO] [groovy:execute {execution: default}]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] org.apache.maven.plugin.MojoExecutionException: Hi man, you're not using 
JDK5 for hibernate deploying!
Although Hibernate can be build on both jdk5 and jdk6 during development, but 
we do need build it on jdk5 for releasing. If you *really* want to do this 
deploy on a non-jdk5, please add this property 
'-Dhibernate.enforce.deploy.notjdk5=true'.

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14 seconds
[INFO] Finished at: Wed Apr 21 17:48:11 CST 2010
[INFO] Final Memory: 42M/88M
[INFO] ------------------------------------------------------------------------



-------------------------
Best Regards,

Strong Liu <stliu at redhat.com>



On Apr 19, 2010, at 4:33 PM, Strong Liu wrote:

> yes, you're right, actually this is the main concern from Steve :)
> if we agree to do that, I will find a way to enforce the release must be done 
> on JDK5.
> maybe add some check script to the pom by gmaven
> 
> 
> On 2010-4-19, at 下午4:28, Emmanuel Bernard wrote:
> 
>> My only fear is that when releasing, someone (like me) would forget to force 
>> JDK 5. So would that be enforced in the new scheme for releases?
>> 
>> On 17 avr. 2010, at 20:29, Strong Liu wrote:
>> 
>>> Okay, after the discussion with Steve on IRC, here is the update:
>>> 
>>> 1. lots of intended contributors only has a JDK6, so with this change can 
>>> simplify the process to contribute to hibernate and simple is good :) 
>>> 2. there is no known issue/bug that blocks hibernate be built on jdk6.
>>> 3. we must make sure the release build is on jdk5, or the artifacts will 
>>> not run on jdk5, this is unacceptable 
>>> ( i will working on this to find a way to avoid this happens)
>>> 4. for hibernate commitors, we must make sure the code we check in keep 1.5 
>>> compatibility,  and we will explicitly set the java compile target and 
>>> source to 1.5( of course for those components that do not need jdk6 jvm)
>>> actually, there is no change for the commitors, you can still do what 
>>> you're doing, nothing changed
>>> 5.  for hudson job, we need it builds hibernate trunk code on jdk1.5 and 
>>> run the tests both on jdk1.5 and jdk6.
>>> Juca, you will help me on this, right? :D
>>> 
>>> so, what do you guys think?
>>> 
>>> -------------------------
>>> Best Regards,
>>> 
>>> Strong Liu <stliu at redhat.com>
>>> 
>>> On Apr 17, 2010, at 10:14 PM, Steve Ebersole wrote:
>>> 
>>>> Again, we need *both*. 
>>>> 
>>>> On Sat, 2010-04-17 at 21:59 +0800, Strong Liu wrote:
>>>>> the difference is with this change, if someone only has jdk6 installed, 
>>>>> then it can be used to build hibernate source code instead of installing 
>>>>> another jdk.
>>>>> 
>>>>> so the question is is there any known issue that causes hibernate 
>>>>> components, expect the ones that explicitly ask jdk6, *must* be build on 
>>>>> jdk5/4?
>>>>> -------------------------
>>>>> Best Regards,
>>>>> 
>>>>> Strong Liu <stliu at redhat.com>
>>>>> 
>>>>> On Apr 17, 2010, at 9:51 PM, Steve Ebersole wrote:
>>>>> 
>>>>>> We need both.  So really what is the difference?
>>>>>> 
>>>>>> On Sat, 2010-04-17 at 12:29 +0800, Strong Liu wrote:
>>>>>>> as that jdbc4 issue has been resolved, so i don't know if there is any 
>>>>>>> specific reason that we cant apply this :
>>>>>>> 
>>>>>>> Index: parent/pom.xml
>>>>>>> ===================================================================
>>>>>>> --- parent/pom.xml      (revision 19221)
>>>>>>> +++ parent/pom.xml      (working copy)
>>>>>>> @@ -132,7 +132,7 @@
>>>>>>>                 <rules>
>>>>>>>                     <requireJavaVersion>
>>>>>>>                         <!-- require JDK 1.5 to run the build -->
>>>>>>> -                            <version>[1.5,1.6)</version>
>>>>>>> +                            <version>[1.5,]</version>
>>>>>>>                     </requireJavaVersion>
>>>>>>>                     <requireMavenVersion>
>>>>>>>                         <!-- we need at least Maven 2.0.8 because of a 
>>>>>>> bug fix affecting our antlr usage -->
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> -------------------------
>>>>>>> Best Regards,
>>>>>>> 
>>>>>>> Strong Liu <stliu at redhat.com>
>>>>>>> 
>>>>>>> 
>>>>>>> _______________________________________________
>>>>>>> hibernate-dev mailing list
>>>>>>> hibernate-dev@lists.jboss.org
>>>>>>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>>>>>> 
>>>>>> 
>>>>>> -- 
>>>>>> Steve Ebersole <st...@hibernate.org>
>>>>>> http://hibernate.org
>>>>>> 
>>>>> 
>>>> 
>>>> 
>>>> -- 
>>>> Steve Ebersole <st...@hibernate.org>
>>>> http://hibernate.org
>>>> 
>>> 
>>> 
>>> _______________________________________________
>>> hibernate-dev mailing list
>>> hibernate-dev@lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>> 
> 
> 
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev


_______________________________________________
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev

Reply via email to