buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Assaf Arkin" <ar...@intalio.com>
Subject Re: jetty:start task not seeing Java.classpath
Date Thu, 10 Jul 2008 00:54:27 GMT
On Wed, Jul 9, 2008 at 1:21 PM, Kent Smith <kent@starlinginteractive.com>
wrote:

> Hello,
>
> I need to append the classpath with my src and target directories to
> enable certain extra features for the framework I utilize for my web
> app.
>
> I've added the following to my buildfile:
>
> Java.classpath << _("src", "main", "java") << _("target", "classes")
> << _("src", "main", "resources")


That's the top-most classpath that Buildr (and various extensions) use. Once
Buildr loads the JVM (compiling, testing, etc) the classpath is set and
adding anything after the fact has no affect on the JVM. It's not meant to
be used for loading libraries into Jetty.

Assaf


>
>
> And when I run 'buildr jetty:start' I get the following output
>
> classpath [["/home/kent/Projects/Sxorch/sxorch/lib/scala-library.jar",
> "/home/kent/Projects/Sxorch/sxorch/lib/scala-compiler.jar"],
> ["org.apache.ant:ant:jar:1.7.0",
> "org.apache.ant:ant-launcher:jar:1.7.0",
> "xerces:xercesImpl:jar:2.6.2"],
> "/usr/lib/ruby/gems/1.8/gems/buildr-1.3.1.1/lib/buildr/java",
> "org.apache.ant:ant-trax:jar:1.7.0",
> "org.apache.ant:ant-junit:jar:1.7.0",
> ["org.mortbay.jetty:jetty:jar:6.1.3",
> "org.mortbay.jetty:jetty-util:jar:6.1.3",
> "org.mortbay.jetty:servlet-api-2.5:jar:6.1.3",
> "org.slf4j:slf4j-api:jar:1.4.3", "org.slf4j:slf4j-simple:jar:1.4.3",
> "org.slf4j:jcl104-over-slf4j:jar:1.4.3"],
> "/usr/lib/ruby/gems/1.8/gems/buildr-1.3.1.1/addon/buildr",
> "/usr/lib/jvm/java-6-sun/lib/tools.jar",
> "/home/kent/Projects/Sxorch/sxorch/store/src/main/java",
> "/home/kent/Projects/Sxorch/sxorch/store/target/classes",
> "/home/kent/Projects/Sxorch/sxorch/store/src/main/resources"]
> Starting Jetty at http://localhost:8080
> etc...
>
> Which looks like it should work (it lists those 3 paths at the end),
> but when I deploy the .war to jetty, and print the classpath from my
> web app I get:
>
> /home/kent/Projects/Sxorch/sxorch/lib/scala-library.jar
> /home/kent/Projects/Sxorch/sxorch/lib/scala-compiler.jar
> /home/kent/.m2/repository/org/apache/ant/ant/1.7.0/ant-1.7.0.jar
>
> /home/kent/.m2/repository/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.jar
> /home/kent/.m2/repository/xerces/xercesImpl/2.6.2/xercesImpl-2.6.2.jar
> /usr/lib/ruby/gems/1.8/gems/buildr-1.3.1.1/lib/buildr/java/
> /home/kent/.m2/repository/org/apache/ant/ant-trax/1.7.0/ant-trax-1.7.0.jar
>
> /home/kent/.m2/repository/org/apache/ant/ant-junit/1.7.0/ant-junit-1.7.0.jar
> /home/kent/.m2/repository/org/mortbay/jetty/jetty/6.1.3/jetty-6.1.3.jar
>
> /home/kent/.m2/repository/org/mortbay/jetty/jetty-util/6.1.3/jetty-util-6.1.3.jar
>
> /home/kent/.m2/repository/org/mortbay/jetty/servlet-api-2.5/6.1.3/servlet-api-2.5-6.1.3.jar
> /home/kent/.m2/repository/org/slf4j/slf4j-api/1.4.3/slf4j-api-1.4.3.jar
>
> /home/kent/.m2/repository/org/slf4j/slf4j-simple/1.4.3/slf4j-simple-1.4.3.jar
>
> /home/kent/.m2/repository/org/slf4j/jcl104-over-slf4j/1.4.3/jcl104-over-slf4j-1.4.3.jar
> /usr/lib/ruby/gems/1.8/gems/buildr-1.3.1.1/addon/buildr/
> /usr/lib/jvm/java-6-sun-1.6.0.06/lib/tools.jar
>
> Which shows everything but the 3 paths I appended to Java.classpath.
> I am probably doing this wrong, buildr has been awesome so far though!
>
> Thanks!
> Kent
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message