You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Jackson, Bruce" <br...@qualcomm.com> on 2010/01/22 17:41:40 UTC

Felix under 1.5 and Jetty

Hi All

I've just checked out and built the latest version of Felix from svn as per
the instructions at:

http://felix.apache.org/site/building-felix.html

When I look at the final compiled
org.apache.felix.http.jetty-2.0.5-SNAPSHOT.jar with javap, I see that this
has been compiled with the 1.4 compiler i.e. javap -verbose gives me:

minor version: 0
major version: 48

I've tried to locate where this is set in the POM files, but does anyone
happen to know how I can change this to compile under 1.5/1.6?

Thanks

Bruce


Re: Felix under 1.5 and Jetty

Posted by Sten Roger Sandvik <sr...@x3m.com>.
On Fri, Jan 22, 2010 at 6:20 PM, Jackson, Bruce <br...@qualcomm.com> wrote:
> I've stuck that in the pom.xml for http.jetty (i.e.
> felix/http.jetty/pom.xml) in the place you suggest, and rebuilt using
>
> mvn clean:clean
> mvn -Dpackaging=plugins install
> mvn -Dpackaging=bundle install
>
> and I still see the same thing. Have I missed something in forcing a rebuild
> of the jetty jar?
>

Just so you know. felix/http.jetty is the old jetty bundle
(1.1.0-SNAPSHOT) and felix/http/jetty is the new (2.0.5-SNAPSHOT). The
old one (felix/http.jetty directory) is not in the master pom module
list - only the new one. felix/http/jetty is dependent on the http
master pom under felix/http/pom.xml.


> Thanks
>
> Bruce
>
>
> On 22/01/2010 16:48, "Chris Custine" <ch...@gmail.com> wrote:
>
>> Just add this to the plugins section of the pom.xml:
>>
>>       <plugin>
>>         <groupId>org.apache.maven.plugins</groupId>
>>         <artifactId>maven-compiler-plugin</artifactId>
>>         <configuration>
>>           <source>1.5</source>
>>           <target>1.5</target>
>>         </configuration>
>>       </plugin>
>>
>> Looks like almost all modules already do this individually, so this should
>> probably be moved to the parent at some point.
>>
>> Chris
>> --
>> Chris Custine
>> FUSESource :: http://fusesource.com
>> My Blog :: http://blog.organicelement.com
>> Apache ServiceMix :: http://servicemix.apache.org
>> Apache Felix :: http://felix.apache.org
>> Apache Directory Server :: http://directory.apache.org
>>
>>
>> On Fri, Jan 22, 2010 at 9:41 AM, Jackson, Bruce <br...@qualcomm.com> wrote:
>>
>>> Hi All
>>>
>>> I've just checked out and built the latest version of Felix from svn as per
>>> the instructions at:
>>>
>>> http://felix.apache.org/site/building-felix.html
>>>
>>> When I look at the final compiled
>>> org.apache.felix.http.jetty-2.0.5-SNAPSHOT.jar with javap, I see that this
>>> has been compiled with the 1.4 compiler i.e. javap -verbose gives me:
>>>
>>> minor version: 0
>>> major version: 48
>>>
>>> I've tried to locate where this is set in the POM files, but does anyone
>>> happen to know how I can change this to compile under 1.5/1.6?
>>>
>>> Thanks
>>>
>>> Bruce
>>>
>>>
>
>

Re: Felix under 1.5 and Jetty

Posted by "Jackson, Bruce" <br...@qualcomm.com>.
The problem is that its REALLY hard to build the whole of Felix for a given
compiler version. Many of the projects have their own overrides to specific
JDK versions, and further, others use classes which are imported from
expanded jar files (as far as I can see) which are therefore not possible to
recompile to a particular version (http.jetty being a case in point).


On 26/01/2010 01:14, "Karl Pauls" <ka...@gmail.com> wrote:

> We have the target and source level set to 1.4 by default. This is
> configured in the parent pom and can be overwritten on a project by
> project basis.
> 
> regards,
> 
> Karl
> 
> On Tue, Jan 26, 2010 at 7:19 AM, Jackson, Bruce <br...@qualcomm.com> wrote:
>> Its not just Jetty that I see this problem with (although to answer your
>> question, yes its Jetty 6), it seems to be with the framework too. I'm new
>> to building this from source, so I just followed the instructions at:
>> 
>> http://felix.apache.org/site/building-felix.html
>> 
>> My default JDK is:
>> 
>> brucej$ java -version
>> java version "1.6.0_17"
>> Java(TM) SE Runtime Environment (build 1.6.0_17-b04-248-10M3025)
>> Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01-101, mixed mode)
>> 
>> ...so I expected this to build under the JDK 6 compiler. However, whatever I
>> seem to do, when I look at the felix.jar in main/bin and unjar it, the
>> compiled classes seem to have been built under JDK 1.4. For example:
>> 
>> brucej$ javap -verbose -classpath . BundleContextImpl
>> Compiled from "BundleContextImpl.java"
>> class org.apache.felix.framework.BundleContextImpl extends java.lang.Object
>> implements org.apache.felix.framework.ext.FelixBundleContext
>>  SourceFile: "BundleContextImpl.java"
>>  minor version: 0
>>  major version: 47
>> 
>> What I think I should see is:
>> major version: 48 = Java SE 1.4.2
>> major version: 49 = Java SE 5
>> major version: 50 = Java SE 6
>> 
>> Any ideas what I'm doing wrong would be greatly appreciated.
>> 
>> 
>> On 25/01/2010 21:32, "Rob Walker" <ro...@ascert.com> wrote:
>> 
>>> Strange - is this the new Jetty6 based bundle, or the older original
>>> Jetty bundle?
>>> The reason I ask is that we updated and built a full Feilx build a week
>>> or so back under JDK 1.6.0_18 and it built and runs fine?
>>> Didn't do anything special - just updated my SVN and rebuilt
>>> - Rob
>>> 
>>> Jackson, Bruce wrote:
>>>> On further investigation, I can't get the main/framework of felix to build
>>>> using a 1.5 (or greater) compiler. Is there a top level switch for the
>>>> compiler version which I'm just missing? Does felix default to 1.4.2 for a
>>>> reason?
>>>> 
>>>> Thanks
>>>> 
>>>> Bruce
>>>> 
>>>> 
>>> 
>> 
>> 
> 
> 


Re: Felix under 1.5 and Jetty

Posted by Karl Pauls <ka...@gmail.com>.
We have the target and source level set to 1.4 by default. This is
configured in the parent pom and can be overwritten on a project by
project basis.

regards,

Karl

On Tue, Jan 26, 2010 at 7:19 AM, Jackson, Bruce <br...@qualcomm.com> wrote:
> Its not just Jetty that I see this problem with (although to answer your
> question, yes its Jetty 6), it seems to be with the framework too. I'm new
> to building this from source, so I just followed the instructions at:
>
> http://felix.apache.org/site/building-felix.html
>
> My default JDK is:
>
> brucej$ java -version
> java version "1.6.0_17"
> Java(TM) SE Runtime Environment (build 1.6.0_17-b04-248-10M3025)
> Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01-101, mixed mode)
>
> ...so I expected this to build under the JDK 6 compiler. However, whatever I
> seem to do, when I look at the felix.jar in main/bin and unjar it, the
> compiled classes seem to have been built under JDK 1.4. For example:
>
> brucej$ javap -verbose -classpath . BundleContextImpl
> Compiled from "BundleContextImpl.java"
> class org.apache.felix.framework.BundleContextImpl extends java.lang.Object
> implements org.apache.felix.framework.ext.FelixBundleContext
>  SourceFile: "BundleContextImpl.java"
>  minor version: 0
>  major version: 47
>
> What I think I should see is:
> major version: 48 = Java SE 1.4.2
> major version: 49 = Java SE 5
> major version: 50 = Java SE 6
>
> Any ideas what I'm doing wrong would be greatly appreciated.
>
>
> On 25/01/2010 21:32, "Rob Walker" <ro...@ascert.com> wrote:
>
>> Strange - is this the new Jetty6 based bundle, or the older original
>> Jetty bundle?
>> The reason I ask is that we updated and built a full Feilx build a week
>> or so back under JDK 1.6.0_18 and it built and runs fine?
>> Didn't do anything special - just updated my SVN and rebuilt
>> - Rob
>>
>> Jackson, Bruce wrote:
>>> On further investigation, I can't get the main/framework of felix to build
>>> using a 1.5 (or greater) compiler. Is there a top level switch for the
>>> compiler version which I'm just missing? Does felix default to 1.4.2 for a
>>> reason?
>>>
>>> Thanks
>>>
>>> Bruce
>>>
>>>
>>
>
>



-- 
Karl Pauls
karlpauls@gmail.com

Re: Felix under 1.5 and Jetty

Posted by "Jackson, Bruce" <br...@qualcomm.com>.
Its not just Jetty that I see this problem with (although to answer your
question, yes its Jetty 6), it seems to be with the framework too. I'm new
to building this from source, so I just followed the instructions at:

http://felix.apache.org/site/building-felix.html

My default JDK is:

brucej$ java -version
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04-248-10M3025)
Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01-101, mixed mode)

...so I expected this to build under the JDK 6 compiler. However, whatever I
seem to do, when I look at the felix.jar in main/bin and unjar it, the
compiled classes seem to have been built under JDK 1.4. For example:

brucej$ javap -verbose -classpath . BundleContextImpl
Compiled from "BundleContextImpl.java"
class org.apache.felix.framework.BundleContextImpl extends java.lang.Object
implements org.apache.felix.framework.ext.FelixBundleContext
  SourceFile: "BundleContextImpl.java"
  minor version: 0
  major version: 47

What I think I should see is:
major version: 48 = Java SE 1.4.2
major version: 49 = Java SE 5
major version: 50 = Java SE 6

Any ideas what I'm doing wrong would be greatly appreciated.


On 25/01/2010 21:32, "Rob Walker" <ro...@ascert.com> wrote:

> Strange - is this the new Jetty6 based bundle, or the older original
> Jetty bundle?
> The reason I ask is that we updated and built a full Feilx build a week
> or so back under JDK 1.6.0_18 and it built and runs fine?
> Didn't do anything special - just updated my SVN and rebuilt
> - Rob
> 
> Jackson, Bruce wrote:
>> On further investigation, I can't get the main/framework of felix to build
>> using a 1.5 (or greater) compiler. Is there a top level switch for the
>> compiler version which I'm just missing? Does felix default to 1.4.2 for a
>> reason?
>> 
>> Thanks
>> 
>> Bruce
>> 
>>   
> 


Re: Felix under 1.5 and Jetty

Posted by Rob Walker <ro...@ascert.com>.
Strange - is this the new Jetty6 based bundle, or the older original 
Jetty bundle?
The reason I ask is that we updated and built a full Feilx build a week 
or so back under JDK 1.6.0_18 and it built and runs fine?
Didn't do anything special - just updated my SVN and rebuilt
- Rob

Jackson, Bruce wrote:
> On further investigation, I can't get the main/framework of felix to build
> using a 1.5 (or greater) compiler. Is there a top level switch for the
> compiler version which I'm just missing? Does felix default to 1.4.2 for a
> reason?
>
> Thanks
>
> Bruce
>
>   


Re: Felix under 1.5 and Jetty

Posted by "Jackson, Bruce" <br...@qualcomm.com>.
On further investigation, I can't get the main/framework of felix to build
using a 1.5 (or greater) compiler. Is there a top level switch for the
compiler version which I'm just missing? Does felix default to 1.4.2 for a
reason?

Thanks

Bruce


On 22/01/2010 18:20, "Bruce Jackson" <br...@qualcomm.com> wrote:

> Hi Chris
> 
> If I put it back in from the top level pom.xml so I now have:
> 
> <module>http.jetty</module>
> 
> I get the following error:
> 
> brucej$ mvn -Dpackaging=bundle install
> [INFO] Scanning for projects...
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Project 'org.apache.felix:org.apache.felix.http.jetty' is duplicated
> in the reactor
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time: 2 seconds
> [INFO] Finished at: Fri Jan 22 18:17:09 GMT 2010
> [INFO] Final Memory: 17M/79M
> [INFO] 
> ------------------------------------------------------------------------
> 
> 
> 
> 
> On 22/01/2010 18:06, "Chris Custine" <ch...@gmail.com> wrote:
> 
>> packaging-bundle
> 


Re: Felix under 1.5 and Jetty

Posted by "Jackson, Bruce" <br...@qualcomm.com>.
Hi Chris

If I put it back in from the top level pom.xml so I now have:

<module>http.jetty</module>

I get the following error:

brucej$ mvn -Dpackaging=bundle install
[INFO] Scanning for projects...
[INFO] 
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] 
------------------------------------------------------------------------
[INFO] Project 'org.apache.felix:org.apache.felix.http.jetty' is duplicated
in the reactor
[INFO] 
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] 
------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Fri Jan 22 18:17:09 GMT 2010
[INFO] Final Memory: 17M/79M
[INFO] 
------------------------------------------------------------------------




On 22/01/2010 18:06, "Chris Custine" <ch...@gmail.com> wrote:

> packaging-bundle


Re: Felix under 1.5 and Jetty

Posted by Chris Custine <ch...@gmail.com>.
Looks like the http.jetty bundle is commented out from the
"packaging-bundle" profile.  You can either uncomment it or go directly to
http.jetty module and rebuild from there.  Either way should get it re-built
for you with the new compiler settings.

Chris
--
Chris Custine
FUSESource :: http://fusesource.com
My Blog :: http://blog.organicelement.com
Apache ServiceMix :: http://servicemix.apache.org
Apache Felix :: http://felix.apache.org
Apache Directory Server :: http://directory.apache.org


On Fri, Jan 22, 2010 at 10:20 AM, Jackson, Bruce <br...@qualcomm.com>wrote:

> I've stuck that in the pom.xml for http.jetty (i.e.
> felix/http.jetty/pom.xml) in the place you suggest, and rebuilt using
>
> mvn clean:clean
> mvn -Dpackaging=plugins install
> mvn -Dpackaging=bundle install
>
> and I still see the same thing. Have I missed something in forcing a
> rebuild
> of the jetty jar?
>
> Thanks
>
> Bruce
>
>
> On 22/01/2010 16:48, "Chris Custine" <ch...@gmail.com> wrote:
>
> > Just add this to the plugins section of the pom.xml:
> >
> >       <plugin>
> >         <groupId>org.apache.maven.plugins</groupId>
> >         <artifactId>maven-compiler-plugin</artifactId>
> >         <configuration>
> >           <source>1.5</source>
> >           <target>1.5</target>
> >         </configuration>
> >       </plugin>
> >
> > Looks like almost all modules already do this individually, so this
> should
> > probably be moved to the parent at some point.
> >
> > Chris
> > --
> > Chris Custine
> > FUSESource :: http://fusesource.com
> > My Blog :: http://blog.organicelement.com
> > Apache ServiceMix :: http://servicemix.apache.org
> > Apache Felix :: http://felix.apache.org
> > Apache Directory Server :: http://directory.apache.org
> >
> >
> > On Fri, Jan 22, 2010 at 9:41 AM, Jackson, Bruce <br...@qualcomm.com>
> wrote:
> >
> >> Hi All
> >>
> >> I've just checked out and built the latest version of Felix from svn as
> per
> >> the instructions at:
> >>
> >> http://felix.apache.org/site/building-felix.html
> >>
> >> When I look at the final compiled
> >> org.apache.felix.http.jetty-2.0.5-SNAPSHOT.jar with javap, I see that
> this
> >> has been compiled with the 1.4 compiler i.e. javap -verbose gives me:
> >>
> >> minor version: 0
> >> major version: 48
> >>
> >> I've tried to locate where this is set in the POM files, but does anyone
> >> happen to know how I can change this to compile under 1.5/1.6?
> >>
> >> Thanks
> >>
> >> Bruce
> >>
> >>
>
>

Re: Felix under 1.5 and Jetty

Posted by "Jackson, Bruce" <br...@qualcomm.com>.
I've stuck that in the pom.xml for http.jetty (i.e.
felix/http.jetty/pom.xml) in the place you suggest, and rebuilt using

mvn clean:clean
mvn -Dpackaging=plugins install
mvn -Dpackaging=bundle install

and I still see the same thing. Have I missed something in forcing a rebuild
of the jetty jar?

Thanks

Bruce


On 22/01/2010 16:48, "Chris Custine" <ch...@gmail.com> wrote:

> Just add this to the plugins section of the pom.xml:
> 
>       <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-compiler-plugin</artifactId>
>         <configuration>
>           <source>1.5</source>
>           <target>1.5</target>
>         </configuration>
>       </plugin>
> 
> Looks like almost all modules already do this individually, so this should
> probably be moved to the parent at some point.
> 
> Chris
> --
> Chris Custine
> FUSESource :: http://fusesource.com
> My Blog :: http://blog.organicelement.com
> Apache ServiceMix :: http://servicemix.apache.org
> Apache Felix :: http://felix.apache.org
> Apache Directory Server :: http://directory.apache.org
> 
> 
> On Fri, Jan 22, 2010 at 9:41 AM, Jackson, Bruce <br...@qualcomm.com> wrote:
> 
>> Hi All
>> 
>> I've just checked out and built the latest version of Felix from svn as per
>> the instructions at:
>> 
>> http://felix.apache.org/site/building-felix.html
>> 
>> When I look at the final compiled
>> org.apache.felix.http.jetty-2.0.5-SNAPSHOT.jar with javap, I see that this
>> has been compiled with the 1.4 compiler i.e. javap -verbose gives me:
>> 
>> minor version: 0
>> major version: 48
>> 
>> I've tried to locate where this is set in the POM files, but does anyone
>> happen to know how I can change this to compile under 1.5/1.6?
>> 
>> Thanks
>> 
>> Bruce
>> 
>> 


Re: Felix under 1.5 and Jetty

Posted by Chris Custine <ch...@gmail.com>.
Just add this to the plugins section of the pom.xml:

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.5</source>
          <target>1.5</target>
        </configuration>
      </plugin>

Looks like almost all modules already do this individually, so this should
probably be moved to the parent at some point.

Chris
--
Chris Custine
FUSESource :: http://fusesource.com
My Blog :: http://blog.organicelement.com
Apache ServiceMix :: http://servicemix.apache.org
Apache Felix :: http://felix.apache.org
Apache Directory Server :: http://directory.apache.org


On Fri, Jan 22, 2010 at 9:41 AM, Jackson, Bruce <br...@qualcomm.com> wrote:

> Hi All
>
> I've just checked out and built the latest version of Felix from svn as per
> the instructions at:
>
> http://felix.apache.org/site/building-felix.html
>
> When I look at the final compiled
> org.apache.felix.http.jetty-2.0.5-SNAPSHOT.jar with javap, I see that this
> has been compiled with the 1.4 compiler i.e. javap -verbose gives me:
>
> minor version: 0
> major version: 48
>
> I've tried to locate where this is set in the POM files, but does anyone
> happen to know how I can change this to compile under 1.5/1.6?
>
> Thanks
>
> Bruce
>
>