Hi Rhett, Of course! you're absolutely right. I think I took the problem the wrong way. I'm going to try to put my dependencies in my WEB-INF/lib.... Looks evident once said ^_^
Thank you very much for your clue, Keno. On Wed, Jul 28, 2010 at 6:12 AM, Rhett Sutphin <[email protected]>wrote: > Hi Keno, > > On Jul 27, 2010, at 2:31 PM, Johan Venant wrote: > > > Hi everybody, > > > > I'm trying to start a personal project using some "alternative" java > tools. > > My dream team is composed of [ivy, buildr, jetty, jersey, freemarker, > > guice2, google apps api]. > > I'm facing some huge difficulties trying to manage my ivy repositories > from > > buildr. Especially with ivysettings.xml > > > > Basically, it seems that the buidr ivy extension try to get the > > ivysettings.xml from the ant-scripts project subfolder. > > This is not a problem for me because I need my own settings to add > > java.netand google maven repositories. > > So I put my own ivysettings in ant-scripts > > And it worked like a charme... At least to compile the project. > > I use also the jetty buildr plugin to manage jetty server. This plugin > > use Java.classpath to know which libraries to load on startup. This > variable > > is not set by ivy extension so I have to do it myself. > > I assume that I will have to use the ivy filter or deps methods to > retrieve > > the compile classpath and to inject it in the Java.classpath. Thus, jetty > > should by launch with a valid classpath. > > I think you have a chicken and egg problem here. Changes to Java.classpath > only take effect if they are made before the java subsystem is initialized. > Running ant tasks will initialize the java subsystem. Ivy4r is built on > ant tasks. So you can't use ivy4r to determine what should go in > Java.classpath. > > What kind of application are you trying to launch using Jetty? If it's a > standard J2EE webapp, you can put the dependencies in WEB-INF/lib and > they'll be available. > > Rhett > > > > > My main problem is that if the compile action use the good ivysettings > > located in ant-scripts, the ivy extension methods seems to use the > default > > one located in the ivy jar file. And I didn't find any way to change this > > behavior. > > > > This is the kind of output I have using a ivy.deps inside my project : > > :: Ivy 2.1.0 - 20090925235825 :: http://ant.apache.org/ivy/ :: > > [ivy_cachepath] :: loading settings :: url = > > > jar:file:/var/lib/gems/1.9.1/gems/ivy4r-jars-1.1.0/lib/ivy-2.1.0.jar!/org/apache/ivy/core/settings/ivysettings.xml > > [ivy_cachepath] :: resolving dependencies :: > > org.apache#hello-ivy;work...@keno-desktop > > [ivy_cachepath] confs: [compile] > > [ivy_cachepath] found javax.servlet#servlet-api;2.5 in public > > ... > > Finishing by an unresolved dependencies errors on libraries from > > java.netand google repositories > > > > And this is the output without the deps (only compiling, no jetty stuff) > > :: Ivy 2.1.0 - 20090925235825 :: http://ant.apache.org/ivy/ :: > > [ivy_resolve] :: loading settings :: file = > > /home/keno/workspace/gbill/ant-scripts/ivysettings.xml > > [ivy_resolve] :: resolving dependencies :: > > org.apache#hello-ivy;work...@keno-desktop > > [ivy_resolve] confs: [compile] > > [ivy_resolve] found javax.servlet#servlet-api;2.5 in maven > > ... > > This works very well > > > > I'm a beginner on all those technologies. So any help is welcome. > > Thank you very much, > > Keno. > > > > PS : I also didn't find a clean way to overload the jetty version used by > > the buildr plugin. The only way I found is by change the VERSION constant > > directly inside the plugin sources. > > > > -- > > KenoKles > > -- KenoKles
