I am running warbler 0.9.12 with Rails 2.2.2 and I have added jar files
to
lib/java. Uncommenting the following line in config/warble.rb causes
these
jar files to appear twice in the war file, under WEB-INF/lib and under
WEB-INF/lib/java:
config.java_libs += FileList[“lib/java/*.jar”]
I have not modified warble.rb in any other way. Is this a bug or am I
doing
something wrong?
I am running warbler 0.9.12 with Rails 2.2.2 and I have added jar files to
lib/java. Uncommenting the following line in config/warble.rb causes these
jar files to appear twice in the war file, under WEB-INF/lib and under
WEB-INF/lib/java:
config.java_libs += FileList[“lib/java/*.jar”]
I have not modified warble.rb in any other way. Is this a bug or am I doing
something wrong?
It’s sort-of-not-really-a-bug. Warbler copies everything in lib/ to
WEB-INF/lib by default. You’re also telling it to copy lib/java to
WEB-INF/lib but you’re not telling it to exclude lib/java from the
default copying task. You can:
Add an exclusion pattern:
config.excludes = FileList[“lib/java/*.jar”]
Just store your jar files in lib/*.jar and they will show up in the
right place by default.
Just store your jar files in lib/*.jar and they will show up in the
right place by default.
Out of curiosity, why do jars need to be in WEB-INF/lib, and not
WEB-INF/lib/blah/blah/blah? This is probably a J2EE 101 question, but on
a
project we did a couple years ago, we had lib/jars for jars we used in
dev
and prod, and lib/jars/waronly for jars that we wanted to have available
in production, too (goldspike and jruby-complete were both in
lib/jars/waronly). We had no special include or exclude for these, so
they
just ended up in the same place in the war (i.e. WEB-INF/lib/jars/…).
Did we just get lucky? Or are servlet containers supposed to look
through
WEB-INF/lib recursively for jars to put on the classpath?
WEB-INF/lib/blah/blah/blah? This is probably a J2EE 101 question, but on a
project we did a couple years ago, we had lib/jars for jars we used in dev
and prod, and lib/jars/waronly for jars that we wanted to have available
in production, too (goldspike and jruby-complete were both in
lib/jars/waronly). We had no special include or exclude for these, so they
just ended up in the same place in the war (i.e. WEB-INF/lib/jars/…).
Did we just get lucky? Or are servlet containers supposed to look through
WEB-INF/lib recursively for jars to put on the classpath?
Maybe some servers/containers look recursively, but it has been my
experience that jars alwasy go only in WEB-INF/lib. YMMV…
/Nick
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.