Skip to content
Browse files

we will need to compile against postgres driver's classes due PG types

  • Loading branch information...
1 parent 9c0d7c4 commit 984aa32bae762a5ff9b866e0064cf28d19bf1840 @kares kares committed Mar 21, 2013
Showing with 14 additions and 3 deletions.
  1. +8 −0 pom.xml
  2. +6 −3 rakelib/compile.rake
View
8 pom.xml
@@ -37,6 +37,14 @@
<artifactId>jruby-complete</artifactId>
<version>1.6.8</version>
</dependency>
+ <!-- e.g.
+ mvn install:install-file -DgroupId=org.postgresql -DartifactId=pgjdbc -Dversion=9.2-1002 -Dpackaging=jar -Dfile=./jdbc-postgres/lib/postgresql-9.2-1002.jdbc4.jar
+ -->
+ <dependency>
+ <groupId>org.postgresql</groupId>
+ <artifactId>pgjdbc</artifactId>
+ <version>9.2-1002</version>
+ </dependency>
</dependencies>
<build>
View
9 rakelib/compile.rake
@@ -4,12 +4,15 @@ begin
directory classes = "pkg/classes"
CLEAN << classes
+ driver_jars = []
+ # PostgreSQL driver :
+ driver_jars << Dir.glob("jdbc-postgres/lib/*.jar").sort.last
+
file jar_file => FileList['src/java/**/*.java', 'pkg/classes'] do
rm_rf FileList["#{classes}/**/*"]
ant.javac :srcdir => "src/java", :destdir => "pkg/classes",
- :source => "1.5", :target => "1.5",
- :debug => true, :deprecation => true,
- :classpath => "${java.class.path}:${sun.boot.class.path}",
+ :source => "1.5", :target => "1.5", :debug => true, :deprecation => true,
+ :classpath => "${java.class.path}:${sun.boot.class.path}:#{driver_jars.join(':')}",
:includeantRuntime => false
ant.jar :basedir => "pkg/classes", :destfile => jar_file, :includes => "**/*.class"

0 comments on commit 984aa32

Please sign in to comment.
Something went wrong with that request. Please try again.