Module: Buildr::OpenJPA

Defined in:
lib/java/openjpa.rb

Constant Summary collapse

VERSION =
"0.9.7-incubating-SNAPSHOT"
REQUIRES =
[ "org.apache.openjpa:openjpa-all:jar:#{VERSION}",
"commons-collections:commons-collections:jar:3.1",
"commons-dbcp:commons-dbcp:jar:1.2.1", 
"commons-lang:commons-lang:jar:2.1",
"commons-pool:commons-pool:jar:1.2",
"javax.persistence:persistence-api:jar:1.0",
"org.apache.geronimo.specs:geronimo-j2ee-connector_1.5_spec:jar:1.0",
"org.apache.geronimo.specs:geronimo-jta_1.0.1B_spec:jar:1.0",
"net.sourceforge.serp:serp:jar:1.11.0" ]
OPTIONS =
[ :verbose, :noop, :cp, :classpath, :properties ]

Class Method Summary collapse

Class Method Details

.enhance(options) ⇒ Object



19
20
21
22
23
24
25
26
# File 'lib/java/openjpa.rb', line 19

def self.enhance(options)
  options[:verbose] ||= Rake.application.options.trace || false
  fu_check_options options, *OPTIONS + [:output]

  runtool options.merge(:class=>"org.apache.openjpa.enhance.PCEnhancer", :name=>"Enhancer",
    :args=>{ "-p"=>options[:properties], "-d"=>options[:output] },
    :classpath=>options[:classpath] + [options[:output]])
end

.mapping_tool(options) ⇒ Object



28
29
30
31
32
33
34
# File 'lib/java/openjpa.rb', line 28

def self.mapping_tool(options)
  options[:verbose] ||= Rake.application.options.trace || false
  fu_check_options options, *OPTIONS + [:action, :sql]

  runtool options.merge(:class=>"org.apache.openjpa.jdbc.meta.MappingTool", :name=>"Mapping Tool",
    :args=>{ "-p"=>options[:properties], "-sql"=>options[:sql], "-sa"=>options[:action] })
end