Re: Compilation failure: org.osgi.framework.Constants stuff
Just in case someone has the same problem as I did with org.osgi.framework.Constants: My problem disappeared when upgrading to Maven 2.0.10. On Tue, Feb 17, 2009 at 5:12 PM, Vidar Ramdal wrote: > Hi, > > I'm unable to build Sling at the moment (fresh checkout, clean install): > INFO] Compilation failure > > /Users/vramdal/dev/sling-trunk/launchpad/base/src/main/java/org/apache/sling/launchpad/base/impl/Sling.java:[396,68] > cannot find symbol > symbol : variable FRAMEWORK_STORAGE > location: interface org.osgi.framework.Constants > > /Users/vramdal/dev/sling-trunk/launchpad/base/src/main/java/org/apache/sling/launchpad/base/impl/Sling.java:[397,72] > cannot find symbol > symbol : variable FRAMEWORK_BEGINNING_STARTLEVEL > location: interface org.osgi.framework.Constants > > > I see Felix (Meschberger) has updated the dependency to (Apache) Felix > Framework 1.5.0-SNAPSHOT - maybe something has changed in > 1.5.0-SNAPSHOT since then? > > -- > Vidar S. Ramdal - http://www.idium.no > Akersgata 16, N-0158 Oslo, Norway > -- Vidar S. Ramdal - http://www.idium.no Akersgata 16, N-0158 Oslo, Norway
Re: Compilation failure: org.osgi.framework.Constants stuff
Hi John, John Langley schrieb: > I ran into something similar yesterday, however in my case a command > line driven maven build was fine, whereas a maven build from within > eclipse was failing in the way that Vidar describes. Failure to compile inside Eclipse but not on the command line might be related to the fact, that depending on the Maven plugin you are using, the Eclipse-integrated Maven version operates differently than your command line Maven version with respect to class path ordering. Regards Felix > > I considered it an unfortunate eclipse idiosyncrasy and moved on using > just command line based maven builds. However, I was hoping that the > problem could be resolved as "giving up" on the capabilities that > eclipse brings in terms of navigating and discovering the relationships > between objects in the source in invaluable. > > -- Langley > > > On Wed, 2009-02-18 at 10:42 -0500, Vidar Ramdal wrote: > >>> Vidar Ramdal schrieb: I'm unable to build Sling at the moment (fresh checkout, clean install): INFO] Compilation failure [...] I see Felix (Meschberger) has updated the dependency to (Apache) Felix Framework 1.5.0-SNAPSHOT - maybe something has changed in 1.5.0-SNAPSHOT since then? >>> What platform (OS, Java Version, Maven Version) are you using in this >>> failed build ? >> OS X 10.5.6, Java 1.6 (also tried 1.5, same result), Maven 2.0.7 >> >> I looked into the .jars downloaded by Maven (both >> org.apache.felix.framework-1.5.0-SNAPSHOT.jar and >> org.apache.felix.framework-1.5.0-20090217.191803-5.jar), and they both >> include the two missing constants in org.osgi.framework.Constants. >> >> Can we exclude the OSGi Core jar from the launchpad/base build? >> >
Re: Compilation failure: org.osgi.framework.Constants stuff
Hi Vidar, Vidar Ramdal schrieb: >> Vidar Ramdal schrieb: >>> I'm unable to build Sling at the moment (fresh checkout, clean install): >>> INFO] Compilation failure >>> [...] >>> I see Felix (Meschberger) has updated the dependency to (Apache) Felix >>> Framework 1.5.0-SNAPSHOT - maybe something has changed in >>> 1.5.0-SNAPSHOT since then? > >> What platform (OS, Java Version, Maven Version) are you using in this >> failed build ? > > OS X 10.5.6, Java 1.6 (also tried 1.5, same result), Maven 2.0.7 > > I looked into the .jars downloaded by Maven (both > org.apache.felix.framework-1.5.0-SNAPSHOT.jar and > org.apache.felix.framework-1.5.0-20090217.191803-5.jar), and they both > include the two missing constants in org.osgi.framework.Constants. > > Can we exclude the OSGi Core jar from the launchpad/base build? No, this is not an option, since the framework jar does not contain the complete OSGi core library, just the stuff, which is extended/overwritten. I would assume that this problem is a consequence of Maven's age old issue of not guaranteeing the order of the dependencies for the class path. As Carsten tells me Maven 2.0.9 contains some ordering fixes while Maven 2.0.10 which has just been releaed is more complete in this respect. Also, since Carsten and others using OSX (I am running Linux) with Maven 2.0.9 never had the issue, you might want to try that or even Maven 2.0.10. Hope this helps. Regards Felix
Re: Compilation failure: org.osgi.framework.Constants stuff
On Wed, Feb 18, 2009 at 9:01 PM, John Langley wrote: > I ran into something similar yesterday, however in my case a command > line driven maven build was fine, whereas a maven build from within > eclipse was failing in the way that Vidar describes. In my (failing) case I was already running maven from the command line, so I didn't even have that option left :( But you inspired me to try running maven through my IDE (Intellij IDEA), and that actually works. Weird. -- Vidar S. Ramdal - http://www.idium.no Akersgata 16, N-0158 Oslo, Norway
Re: Compilation failure: org.osgi.framework.Constants stuff
I ran into something similar yesterday, however in my case a command line driven maven build was fine, whereas a maven build from within eclipse was failing in the way that Vidar describes. I considered it an unfortunate eclipse idiosyncrasy and moved on using just command line based maven builds. However, I was hoping that the problem could be resolved as "giving up" on the capabilities that eclipse brings in terms of navigating and discovering the relationships between objects in the source in invaluable. -- Langley On Wed, 2009-02-18 at 10:42 -0500, Vidar Ramdal wrote: > > Vidar Ramdal schrieb: > >> I'm unable to build Sling at the moment (fresh checkout, clean install): > >> INFO] Compilation failure > >> [...] > >> I see Felix (Meschberger) has updated the dependency to (Apache) Felix > >> Framework 1.5.0-SNAPSHOT - maybe something has changed in > >> 1.5.0-SNAPSHOT since then? > > > What platform (OS, Java Version, Maven Version) are you using in this > > failed build ? > > OS X 10.5.6, Java 1.6 (also tried 1.5, same result), Maven 2.0.7 > > I looked into the .jars downloaded by Maven (both > org.apache.felix.framework-1.5.0-SNAPSHOT.jar and > org.apache.felix.framework-1.5.0-20090217.191803-5.jar), and they both > include the two missing constants in org.osgi.framework.Constants. > > Can we exclude the OSGi Core jar from the launchpad/base build? >
Re: Compilation failure: org.osgi.framework.Constants stuff
> Vidar Ramdal schrieb: >> I'm unable to build Sling at the moment (fresh checkout, clean install): >> INFO] Compilation failure >> [...] >> I see Felix (Meschberger) has updated the dependency to (Apache) Felix >> Framework 1.5.0-SNAPSHOT - maybe something has changed in >> 1.5.0-SNAPSHOT since then? > What platform (OS, Java Version, Maven Version) are you using in this > failed build ? OS X 10.5.6, Java 1.6 (also tried 1.5, same result), Maven 2.0.7 I looked into the .jars downloaded by Maven (both org.apache.felix.framework-1.5.0-SNAPSHOT.jar and org.apache.felix.framework-1.5.0-20090217.191803-5.jar), and they both include the two missing constants in org.osgi.framework.Constants. Can we exclude the OSGi Core jar from the launchpad/base build? -- Vidar S. Ramdal - http://www.idium.no Akersgata 16, N-0158 Oslo, Norway
Re: Compilation failure: org.osgi.framework.Constants stuff
Hi Vidar, This is strange and never has been reported... But it may be related to how maven resolves dependencies :-( The point is that this property is rather new, so Framework 1.5-SNAPSHOT has it. But the property is in the org.osgi.framework.Constants interface which is both in the Apache Felix framework and the OSGi Core JAR Files. Thus if maven uses the framework first, the constant resolves. If maven uses the OSGi Core library first in the class path, the constant does not resolve. What platform (OS, Java Version, Maven Version) are you using in this failed build ? Regards Felix Vidar Ramdal schrieb: > Hi, > > I'm unable to build Sling at the moment (fresh checkout, clean install): > INFO] Compilation failure > > /Users/vramdal/dev/sling-trunk/launchpad/base/src/main/java/org/apache/sling/launchpad/base/impl/Sling.java:[396,68] > cannot find symbol > symbol : variable FRAMEWORK_STORAGE > location: interface org.osgi.framework.Constants > > /Users/vramdal/dev/sling-trunk/launchpad/base/src/main/java/org/apache/sling/launchpad/base/impl/Sling.java:[397,72] > cannot find symbol > symbol : variable FRAMEWORK_BEGINNING_STARTLEVEL > location: interface org.osgi.framework.Constants > > > I see Felix (Meschberger) has updated the dependency to (Apache) Felix > Framework 1.5.0-SNAPSHOT - maybe something has changed in > 1.5.0-SNAPSHOT since then? >