[jboss-dev] Enforcing JDK6 in AS trunk

Paul Gier pgier at redhat.com
Tue Sep 15 12:31:16 EDT 2009


Did he give any reasons for this?  I upgraded the AS build in trunk to use 2.2.1 
a few weeks ago and haven't seen any problems.

Jesper found one issue in 2.2.1 related to checksum generation when deploying 
over webdav [1], but it can be fixed with a workaround to your maven settings [2].

[1]http://jira.codehaus.org/browse/MNG-4301
[2]http://www.jboss.org/community/wiki/MavenSettings

Pete Muir wrote:
> When I asked Jason (Van Zyl) about this at JBW, he recommended staying  
> on 2.0 and waiting for 3.0 rather than switching to 2.1.
> 
> On 15 Sep 2009, at 09:49, Max Rydahl Andersen wrote:
> 
>> btw. why are we not just using Maven 2.1+ instead of Maven 2.0 ?
>>
>> /max
>>
>> Jaikiran Pai wrote:
>>> Ian Springer wrote:
>>>
>>>
>>>> Maybe:
>>>>
>>>> [1.6,1.8)
>>>>
>>>> would work?
>>>>
>>>>
>>> After reading the profile activation doc, it turns out that for Maven
>>> 2.0.x version the <jdk> doesn't recognize version ranges (Maven 2.1
>>> does)
>>>
>>> http://maven.apache.org/guides/introduction/introduction-to-profiles.html
>>> .
>>> The workaround is to introduce a new (duplicate) profile similar to
>>> jdk1.6 profile which will be activated on JDK-1.7:
>>>
>>>  <!-- Maven 2.0.x does not allow version ranges for <jdk> for  
>>> activating
>>> profiles.
>>>         Maven 2.1 does
>>>
>>> http://maven.apache.org/guides/introduction/introduction-to-profiles.html
>>>
>>>         So for Maven 2.0.x we create another profile which will do  
>>> the same
>>>         as the jdk6 profile, except that it will be activated for JDK
>>> 1.7 version -->
>>>     <profile>
>>>       <id>jdk7</id>
>>>       <activation>
>>>         <jdk>1.7</jdk>
>>>       </activation>
>>>       <build>
>>>         <plugins>
>>>           <plugin>
>>>             <groupId>org.apache.maven.plugins</groupId>
>>>             <artifactId>maven-compiler-plugin</artifactId>
>>>             <configuration>
>>>               <source>1.7</source>
>>>               <target>1.7</target>
>>>               <excludes>
>>>                 <exclude>org/jboss/resource/adapter/jdbc/jdk5/**</ 
>>> exclude>
>>>               </excludes>
>>>             </configuration>
>>>           </plugin>
>>>         </plugins>
>>>       </build>
>>>     </profile>
>>>
>>>
>>> Adding this to the "connector" and a similar one to the "varia"
>>> component pom.xml should get us past the profile activation issues.
>>>
>>> After these changes however, i am running into a (Sun) JDK 1.7 bug  
>>> which
>>> causes an Ant "unzip" task to fail:
>>>
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [ERROR] BUILD ERROR
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] An Ant BuildException has occured: The following error  
>>> occurred
>>> while executing this line:
>>> /home/jpai/jbossas/trunk/build/build.xml:2302:
>>> java.lang.IllegalArgumentException: invalid entry crc-32
>>>
>>> Sun Bug reference:
>>>
>>> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6869274
>>>
>>>
>>> java -version
>>>
>>> java version "1.7.0-ea"
>>> Java(TM) SE Runtime Environment (build 1.7.0-ea-b66)
>>> Java HotSpot(TM) Server VM (build 16.0-b06, mixed mode)
>>>
>>> As for the "profile" activation changes, i'll be committing them this
>>> week after a quick discussion Paul Gier. The JIRA for this is
>>>
>>> https://jira.jboss.org/jira/browse/JBAS-7243
>>>
>>>
>>> regards,
>>> -Jaikiran
>>>
>>>
>>>
>>>
>>>> On 9/12/2009 1:11 PM, Jaikiran Pai wrote:
>>>>
>>>>
>>>>> Ian Springer wrote:
>>>>>
>>>>>
>>>>>> Building AS trunk w/ JDK7 also fails for me
>>>>>> (
>>>>>> http://wwwapps.rdu.redhat.com/w3xpastebin/pastebin.php?show=13872
>>>>>> ).
>>>>>>
>>>>>>
>>>>> This one is because of the way the profile activation configuration
>>>>> in connector/pom.xml
>>>>>
>>>>> http://anonsvn.jboss.org/repos/jbossas/trunk/connector/pom.xml:
>>>>>
>>>>>
>>>>> <profiles>
>>>>> <profile>
>>>>> <id>jdk6</id>
>>>>> <activation>
>>>>> <jdk>1.6</jdk>
>>>>> </activation>
>>>>> <build>
>>>>> <plugins>
>>>>> <plugin>
>>>>> <groupId>org.apache.maven.plugins</groupId>
>>>>> <artifactId>maven-compiler-plugin</artifactId>
>>>>> <configuration>
>>>>> <source>1.6</source>
>>>>> <target>1.6</target>
>>>>> <excludes>
>>>>> <exclude>org/jboss/resource/adapter/jdbc/jdk5/**</exclude>
>>>>> </excludes>
>>>>>
>>>>>
>>>>> This profile is activated only with JDK-6 because of the
>>>>> configuration. I tried changing it to :
>>>>>
>>>>> <activation>
>>>>> <jdk>[1.6,)</jdk>
>>>>> </activation>
>>>>>
>>>>> to activate it even with JDK-7 but for some reason Maven doesn't
>>>>> activate this profile. I'll discuss with Paul Gier to see what  
>>>>> can be
>>>>> done.
>>>>>
>>>>> regards,
>>>>> -Jaikiran
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> If this is expected, we should also disallow JDK7, e.g.:
>>>>>>
>>>>>> <requireJavaVersion>
>>>>>> <version>[1.5,1.7)</version> <!-- 1.5.x, 1.6.x -->
>>>>>> </requireJavaVersion>
>>>>>>
>>>>>> On 9/9/2009 11:43 AM, Jaikiran Pai wrote:
>>>>>>
>>>>>>
>>>>>>> Stan Silvert wrote:
>>>>>>>
>>>>>>>
>>>>>>>> Is it possible to require a certain revision (or higher) of  
>>>>>>>> 1.6?  I
>>>>>>>> can remember that the build wouldn't work with some older
>>>>>>>> revisions of
>>>>>>>> 1.6.
>>>>>>>>
>>>>>>>> Stan
>>>>>>>>
>>>>>>>>
>>>>>>> That should be possible
>>>>>>>
>>>>>>> http://maven.apache.org/enforcer/enforcer-rules/requireJavaVersion.html
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> -Jaikiran
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> Jaikiran Pai wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>> Resending, since the previous mail never made it to the list.
>>>>>>>>>
>>>>>>>>> -Jaikiran
>>>>>>>>>
>>>>>>>>> Jaikiran Pai wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> Hello everyone,
>>>>>>>>>>
>>>>>>>>>> Half way while building a clean AS trunk today, the build  
>>>>>>>>>> failed
>>>>>>>>>> with
>>>>>>>>>> incompatible class versions. With the recent changes to AS
>>>>>>>>>> trunk, JDK6
>>>>>>>>>> is now mandatory for the build to complete successfully. If no
>>>>>>>>>> one has
>>>>>>>>>> any objections, i'll update the parent pom.xml in AS trunk to
>>>>>>>>>> enforce
>>>>>>>>>> this through the enforcer plugin:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Index: pom.xml
>>>>>>>>>> = 
>>>>>>>>>> = 
>>>>>>>>>> = 
>>>>>>>>>> = 
>>>>>>>>>> = 
>>>>>>>>>> ==============================================================
>>>>>>>>>> --- pom.xml     (revision 93223)
>>>>>>>>>> +++ pom.xml     (working copy)
>>>>>>>>>> @@ -609,7 +609,7 @@
>>>>>>>>>> <version>2.0.9</version>
>>>>>>>>>> </requireMavenVersion>
>>>>>>>>>> <requireJavaVersion>
>>>>>>>>>> -<version>1.5</version>
>>>>>>>>>> +<version>1.6</version>
>>>>>>>>>> </requireJavaVersion>
>>>>>>>>>> </rules>
>>>>>>>>>> </configuration>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> regards,
>>>>>>>>>> -Jaikiran
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> jboss-development mailing list
>>>>>>>>>
>>>>>>>>> jboss-development at lists.jboss.org
>>>>>>>>> https://lists.jboss.org/mailman/listinfo/jboss-development
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> jboss-development mailing list
>>>>>>>
>>>>>>> jboss-development at lists.jboss.org
>>>>>>> https://lists.jboss.org/mailman/listinfo/jboss-development
>>>>>>>
>>>>>>>
>>>>>>>
>>> _______________________________________________
>>> jboss-development mailing list
>>>
>>> jboss-development at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/jboss-development
>>>
>>>
>>>
>> _______________________________________________
>> jboss-development mailing list
>> jboss-development at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/jboss-development
> 
> _______________________________________________
> jboss-development mailing list
> jboss-development at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-development




More information about the jboss-development mailing list