Main issue with @Grab is: how do you resolve? Need to ensure you resolve it against prod compliant repos. That's why trunk resolver is now pluggable and really better than 1.7.x one which was quite static.
Main issue you'll get is then you need to add your jars in classloaders....ie in the finder as well...so too late. We could add an event at the same place as jars.txt parsing but then you'd need 2 finders so too much time spent - creating a finder is long - for poor gain compared to what we can already do IMHO, wdyt? That said if that's just for technical libs you can use previous hook to enrich the classloader but it will not be scanned - can be enough for most of technical cases. Last issue: you need to manage libraries conflicts Romain Manni-Bucau @rmannibucau http://www.tomitribe.com http://rmannibucau.wordpress.com https://github.com/rmannibucau 2014-10-24 9:01 GMT+02:00 Alex Soto <[email protected]>: > Well I would do some research on this direction, the question was because I > have wondered myself if it would be possible. > > 2014-10-24 8:56 GMT+02:00 Romain Manni-Bucau <[email protected]>: > >> Would be awesome indeed ;) >> >> just observe (openejb @Observes) BeforeAppInfoBuilderEvent in a custom >> extension and use modules (WebModule for you I guess) finder. >> Romain Manni-Bucau >> Twitter: @rmannibucau >> Blog: http://rmannibucau.wordpress.com/ >> LinkedIn: http://fr.linkedin.com/in/rmannibucau >> Github: https://github.com/rmannibucau >> >> >> >> 2014-10-24 8:52 GMT+02:00 Alex Soto <[email protected]>: >> > Hi, today I was thinking a way to implement some @Grab like annotation ( >> > http://groovy.codehaus.org/Grape) for Java EE. This could be useful for >> > example to add Hibernate as JavaEE provider or any other library. Because >> > TomEE supports jars.txt approach, I was thinking to use this approach. >> > Something like scan all classpath, finds the "@Grab" annotation crfeate >> the >> > jars.txt and TomEE well do the same. My question is that it would be >> > awesome if we could use the scanning process of TomEE (to not rescan the >> > whole classpath more thanone time). >> > >> > Do you think it is possible? >> > >> > -- >> > +----------------------------------------------------------+ >> > Alex Soto Bueno >> > www.lordofthejars.com >> > +----------------------------------------------------------+ >> > > > > -- > +----------------------------------------------------------+ > Alex Soto Bueno - Computer Engineer > www.lordofthejars.com > +----------------------------------------------------------+
