I did some investigation in the 4.1 branch.  The short of it if you're not 
interested is that everything works as expected.   Source and target are both 
set to 1.6 and are set in the parent pom.xml.

The long form of this is that I had thought the maven inheritance didn't work 
because Wido found the code not compiling against 1.6 JDK.  I did some test by 
specifically introducing switch on Strings (available only on 1.7 JDK) and that 
doesn't compile.  It looks like the problem is specifically with early versions 
of 1.6 JDK.  Given that I don't think there's any problems.  I will resolve 
CLOUDSTACK-1421 with these details.

--Alex

> -----Original Message-----
> From: Chip Childers [mailto:chip.child...@sungard.com]
> Sent: Wednesday, February 27, 2013 12:17 PM
> To: cloudstack-dev@incubator.apache.org
> Subject: Re: Adding a java compat level to our pom.xml
> 
> On Wed, Feb 27, 2013 at 12:08:04PM -0800, Alex Huang wrote:
> > Ok...sounds good to me.  I'll do that.
> 
> +1 to this approach.
> 
> >
> > --Alex
> >
> > > -----Original Message-----
> > > From: John Burwell [mailto:jburw...@basho.com]
> > > Sent: Wednesday, February 27, 2013 11:45 AM
> > > To: cloudstack-dev@incubator.apache.org
> > > Subject: Re: Adding a java compat level to our pom.xml
> > >
> > > Alex,
> > >
> > > There be dragons having separate source and target versions.
> > > Namely, with source compatibility at 1.7, developers must compile
> > > with a JDK 7 which can lead to usage of Java7 runtime features.
> > > Therefore, while the class files might technically run on JRE 6,
> > > link exceptions will crop up because of the
> > > Java6 runtime.
> > >
> > > My thought is to set source and target to 1.6.  Developers should
> > > compile with JDK 6 and run on JRE 7.  QA/integration tests on
> > > Jenkins should run both JRE 6 and 7.  This approach allows
> > > development to start migrating towards JRE
> > > 7 while maintaining backwards compatibility for JRE 6 users.
> > >
> > > Thanks,
> > > -John
> > >
> > > On Feb 27, 2013, at 2:19 PM, Alex Huang <alex.hu...@citrix.com> wrote:
> > >
> > > >> Does this imply that it requires 1.7 to compile, but should be
> > > >> compatible with 1.6?
> > > >
> > > > I'm open to requiring 1.6 instead of 1.7 for source.
> > > >
> > > >>
> > > >> Also, we're talking about master (i.e.: not 4.1), right?
> > > >
> > > > I actually want this in 4.1 not just master.  If a certain version
> > > > of cloudstack
> > > suddenly required jre 1.7, I think it will be very difficult to go
> > > back to jre 1.6 in a later version.  It also means anyone upgrading
> > > to 4.1 will require an upgrade to jre 1.7.  See the conclusion on this 
> > > thread
> [1].
> > > >
> > > > --Alex
> > > >
> > > > [1] http://markmail.org/thread/sryxuq6ks7ukpkp6
> >
> >

Reply via email to