Hi yeah since tomee 1.0. Not in tomcat where org.apache.catalina.util.ServerInfo is the thing to check. I guess detection can test both without much issues no?
Romain Manni-Bucau Twitter: @rmannibucau Blog: http://rmannibucau.wordpress.com/ LinkedIn: http://fr.linkedin.com/in/rmannibucau Github: https://github.com/rmannibucau 2014-08-28 16:35 GMT+02:00 Kay Wrobel <[email protected]>: > Thanks, Romain. > > Has this resource been in TomEE since the beginning? And also, is the > resource available in Tomcat? The reason I ask is that the plug-in that does > all of the support is the Tomcat Support plugin (tomcat5). It handles > everything including TomEE. So if the detection gets changed, it needs to be > flexible enough to also support Tomcat, I guess. > > I don't intend to re-write the code for that plug-in, but as soon as the > aforementioned bug report gets assigned to somebody (presumably it'll be > Petr Heijl who's been assigned to the other bug report I mentioned), I will > point him to this post. I might change the code locally to play around with > an alternative approach, but the run it by Petr as a proposed solution. > > So thanks again. > > > On 08/28/2014 03:36 AM, Romain Manni-Bucau wrote: >> >> create a classloader with all jars then getResource >> META-INF/maven/org.apache.openejb/tomee-catalina/pom.properties >> >> reading it is enough to get all you want: >> >> #Generated by Maven >> #Sun Aug 10 00:58:10 CEST 2014 >> version=1.7.0 >> groupId=org.apache.openejb >> artifactId=tomee-catalina >> >> >> Romain Manni-Bucau >> Twitter: @rmannibucau >> Blog: http://rmannibucau.wordpress.com/ >> LinkedIn: http://fr.linkedin.com/in/rmannibucau >> Github: https://github.com/rmannibucau >> >> >> 2014-08-28 10:22 GMT+02:00 Kay Wrobel <[email protected]>: >>> >>> Does that require a running TomEE instance? If so, it's not going to work >>> with Netbeans. They look at the project classpath. >>> >>> But if there is a class that reports TomEE version, one might be able to >>> look up that class and instantiate it. >>> >>> Howard, could you please point me to that code you're referring to? I >>> might wanna take a look. Maybe I can assist the Netbeans team with this. >>> >>> Kay >>> >>> Sent from my iPhone >>> >>> On Aug 27, 2014, at 8:32 AM, "Howard W. Smith, Jr." >>> <[email protected]> wrote: >>> >>>> Okay, Romain. Open source. NetBeans can reuse tomee code that detects >>>> and >>>> reports tomcat tomee version at (NetBeans) runtime, too. >>>> On Aug 27, 2014 7:51 AM, "Romain Manni-Bucau" <[email protected]> >>>> wrote: >>>> >>>>> @Howard: netbeans can't rely on startup since it needs available libs >>>>> for development + we change this version at runtime. >>>>> >>>>> but maven metadata are reliable >>>>> >>>>> >>>>> Romain Manni-Bucau >>>>> Twitter: @rmannibucau >>>>> Blog: http://rmannibucau.wordpress.com/ >>>>> LinkedIn: http://fr.linkedin.com/in/rmannibucau >>>>> Github: https://github.com/rmannibucau >>>>> >>>>> >>>>> 2014-08-27 13:42 GMT+02:00 Howard W. Smith, Jr. >>>>> <[email protected]>: >>>>>> >>>>>> Kay, atmosphere library had a fix for detecting tomcat and tomee >>>>> >>>>> versions. >>>>>> >>>>>> Romain may remember that discussion. Add atmosphere runtime dependency >>>>>> to >>>>>> your app, start tomee and look for tomee tomcat version in a one line >>>>>> string in atmosphere log lines in log file. >>>>>> On Aug 27, 2014 5:06 AM, "Kay Wrobel" <[email protected]> wrote: >>>>>> >>>>>>> Thanks, Romain. >>>>>>> >>>>>>> Kay >>>>>>> >>>>>>> On 08/27/2014 04:00 AM, Romain Manni-Bucau wrote: >>>>>>> >>>>>>>> FYI informations are in maven properties in jars so it is surely an >>>>>>>> easier way to support coming version. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Romain Manni-Bucau >>>>>>>> Twitter: @rmannibucau >>>>>>>> Blog: http://rmannibucau.wordpress.com/ >>>>>>>> LinkedIn: http://fr.linkedin.com/in/rmannibucau >>>>>>>> Github: https://github.com/rmannibucau >>>>>>>> >>>>>>>> >>>>>>>> 2014-08-27 10:53 GMT+02:00 Kay Wrobel <[email protected]>: >>>>>>>> >>>>>>>>> Hi. >>>>>>>>> >>>>>>>>> I am the author of the PrimeFaces CRUD Generator dedicated plugin >>>>> >>>>> (a.k.a. >>>>>>>>> >>>>>>>>> nbpfcrudgen, not the one that's built into NetBeans since 8 but the >>>>> >>>>> one >>>>>>>>> >>>>>>>>> I'm >>>>>>>>> hosting on SourceForge) and have been asked this question recently >>>>>>>>> on >>>>>>>>> Facebook. The problem is with NetBeans 8 and how it detects a >>>>>>>>> proper >>>>>>>>> TomEE >>>>>>>>> version. Unfortunately, the team has hard-coded version strings in >>>>> >>>>> their >>>>>>>>> >>>>>>>>> source. They are looking for the tomee-common-x.x.x.jar and make a >>>>>>>>> determination from that version. But they only test for 1.5.x and >>>>> >>>>> 1.6.x, >>>>>>>>> >>>>>>>>> not >>>>>>>>> 1.7.x. I have filed a bug report with NetBeans here: >>>>>>>>> https://netbeans.org/bugzilla/show_bug.cgi?id=246523 >>>>>>>>> >>>>>>>>> As a workaround, and I know the TomEE team discourages this, you >>>>>>>>> could >>>>>>>>> rename the tomee-common-1.7.0.jar to tomee-common-1.6.0.jar and >>>>> >>>>> NetBeans >>>>>>>>> >>>>>>>>> will detect it properly. TomEE will not fail to start up in my >>>>>>>>> experience. >>>>>>>>> NetBeans has not yet acknowledged the bug report and no one is >>>>> >>>>> assigned >>>>>>>>> >>>>>>>>> to >>>>>>>>> it. >>>>>>>>> >>>>>>>>> Try renaming that file and see what your experience is with it. >>>>>>>>> >>>>>>>>> Kay >>>>>>>>> >>>>>>>>> >>>>>>>>> On 08/27/2014 03:43 AM, User57 wrote: >>>>>>>>> >>>>>>>>>> I am trying to generate PrimeFaces pages from Entity classes for a >>>>> >>>>> Java >>>>>>>>>> >>>>>>>>>> EE >>>>>>>>>> web project. My web server is Apache TomEE 1.7 and I'm using >>>>> >>>>> Netbeans 8 >>>>>>>>>> >>>>>>>>>> as >>>>>>>>>> an IDE. >>>>>>>>>> >>>>>>>>>> When I run the wizard to generate the pages I get this error >>>>>>>>>> Cannot >>>>> >>>>> be >>>>>>>>>> >>>>>>>>>> generated for Java EE 6 sources without server with complete Java >>>>> >>>>> EE 6 >>>>>>>>>> >>>>>>>>>> Web >>>>>>>>>> Profile support (at least EJB Lite support). >>>>>>>>>> >>>>>>>>>> Netbeans 8 supports TomEE and posts about this error say that it >>>>> >>>>> should >>>>>>>>>> >>>>>>>>>> be >>>>>>>>>> fixed with the release of the 8th version of Netbeans. >>>>>>>>>> >>>>>>>>>> What should I do to fix this problem ? >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> View this message in context: >>>>>>>>>> http://tomee-openejb.979440.n4.nabble.com/Apache-TomEE- >>>>>>>>>> web-server-does-not-allow-generation-of-Primefaces- >>>>>>>>>> pages-from-Entity-Classes-tp4671397.html >>>>>>>>>> Sent from the TomEE Users mailing list archive at Nabble.com. >>>>>>>>>> >>>>>>>>> >
