buildr 0.21.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: buildr
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.21.0
7
- date: 2007-04-20 00:00:00 -07:00
6
+ version: 0.22.0
7
+ date: 2007-04-26 00:00:00 -07:00
8
8
  summary: A build system that doesn't suck
9
9
  require_paths:
10
10
  - lib
@@ -32,6 +32,7 @@ files:
32
32
  - lib/tasks
33
33
  - lib/core
34
34
  - lib/buildr.rb
35
+ - lib/buildr
35
36
  - lib/java
36
37
  - lib/tasks/concat.rb
37
38
  - lib/tasks/zip.rb
@@ -40,22 +41,22 @@ files:
40
41
  - lib/core/project.rb
41
42
  - lib/core/rake_ext.rb
42
43
  - lib/core/common.rb
44
+ - lib/buildr/jetty.rb
45
+ - lib/buildr/xmlbeans.rb
46
+ - lib/buildr/javacc.rb
47
+ - lib/buildr/openjpa.rb
48
+ - lib/buildr/jetty
49
+ - lib/buildr/jetty/JettyWrapper.java
50
+ - lib/buildr/jetty/JettyWrapper$1.class
51
+ - lib/buildr/jetty/JettyWrapper$BuildrHandler.class
52
+ - lib/buildr/jetty/JettyWrapper.class
43
53
  - lib/java/test.rb
44
54
  - lib/java/eclipse.rb
45
- - lib/java/jetty.rb
46
- - lib/java/xmlbeans.rb
47
55
  - lib/java/java.rb
48
56
  - lib/java/ant.rb
49
- - lib/java/javacc.rb
50
57
  - lib/java/artifact.rb
51
58
  - lib/java/packaging.rb
52
- - lib/java/openjpa.rb
53
59
  - lib/java/compile.rb
54
- - lib/java/jetty
55
- - lib/java/jetty/JettyWrapper.java
56
- - lib/java/jetty/JettyWrapper$1.class
57
- - lib/java/jetty/JettyWrapper$BuildrHandler.class
58
- - lib/java/jetty/JettyWrapper.class
59
60
  - CHANGELOG
60
61
  - README
61
62
  - LICENSE
@@ -84,9 +85,9 @@ dependencies:
84
85
  version_requirement:
85
86
  version_requirements: !ruby/object:Gem::Version::Requirement
86
87
  requirements:
87
- - - "="
88
+ - - ">="
88
89
  - !ruby/object:Gem::Version
89
- version: 0.7.2
90
+ version: 0.7.3
90
91
  version:
91
92
  - !ruby/object:Gem::Dependency
92
93
  name: facets
@@ -1,72 +0,0 @@
1
- require "java/java"
2
-
3
- module Buildr
4
- module Java
5
- module JavaCC
6
-
7
- JAVACC = "net.java.dev.javacc:javacc:jar:4.0"
8
- JJTREE = "net.java.dev.javacc:javacc:jar:4.0"
9
-
10
- class << self
11
-
12
- def javacc(*args)
13
- options = Hash === args.last ? args.pop.clone : {}
14
- options[:verbose] ||= Rake.application.options.trace || false
15
- fu_check_options options, *Java::JAVA_OPTIONS + [:output]
16
-
17
- (options[:classpath] ||= []) << JAVACC
18
- java_args = ["javacc"]
19
- java_args << "-OUTPUT_DIRECTORY=#{options[:output]}" if options[:output]
20
- java_args += args.flatten.map(&:to_s).collect { |f| File.directory?(f) ? FileList[f + "/**/*.jj"] : f }.flatten
21
- java_args << options.reject { |k, v| !Java::JAVA_OPTIONS.include?(k) }
22
- Java.java(*java_args)
23
- end
24
-
25
- def jjtree(*args)
26
- options = Hash === args.last ? args.pop.clone : {}
27
- options[:verbose] ||= Rake.application.options.trace || false
28
- fu_check_options options, *Java::JAVA_OPTIONS + [:output, :build_node_files]
29
-
30
- (options[:classpath] ||= []) << JJTREE
31
- java_args = ["jjtree"]
32
- java_args << "-OUTPUT_DIRECTORY=#{options[:output]}" if options[:output]
33
- java_args << "-BUILD_NODE_FILES=#{options[:build_node_files] || false}"
34
- java_args += args.flatten.map(&:to_s).collect { |f| File.directory?(f) ? FileList[f + "/**/*.jjt"] : f }.flatten
35
- java_args << options.reject { |k, v| !Java::JAVA_OPTIONS.include?(k) }
36
- Java.java(*java_args)
37
- end
38
-
39
- end
40
-
41
- def javacc(*args)
42
- if Hash === args.last
43
- options = args.pop
44
- in_package = options[:in_package].split(".")
45
- else
46
- in_package = []
47
- end
48
- file(path_to("target/generated/javacc")=>args.flatten) do |task|
49
- Java::JavaCC.javacc task.prerequisites, :output=>File.join(task.name, in_package)
50
- end
51
- end
52
-
53
- def jjtree(*args)
54
- if Hash === args.last
55
- options = args.pop
56
- in_package = options[:in_package].split(".")
57
- build_node_files = options[:build_node_files]
58
- else
59
- in_package = []
60
- end
61
- file(path_to("target/generated/jjtree")=>args.flatten) do |task|
62
- Java::JavaCC.jjtree task.prerequisites, :output=>File.join(task.name, in_package), :build_node_files=>build_node_files
63
- end
64
- end
65
-
66
- end
67
- end
68
-
69
- class Project
70
- include JavaCC
71
- end
72
- end
@@ -1,63 +0,0 @@
1
- require "java/java"
2
-
3
- module Buildr
4
- module Java
5
- module OpenJPA
6
-
7
- VERSION = "0.9.7-incubating-SNAPSHOT"
8
-
9
- REQUIRES = [ "org.apache.openjpa:openjpa-all:jar:#{VERSION}",
10
- "commons-collections:commons-collections:jar:3.1",
11
- "commons-dbcp:commons-dbcp:jar:1.2.1",
12
- "commons-lang:commons-lang:jar:2.1",
13
- "commons-pool:commons-pool:jar:1.2",
14
- "javax.persistence:persistence-api:jar:1.0",
15
- "org.apache.geronimo.specs:geronimo-j2ee-connector_1.5_spec:jar:1.0",
16
- "org.apache.geronimo.specs:geronimo-jta_1.0.1B_spec:jar:1.0",
17
- "net.sourceforge.serp:serp:jar:1.11.0" ]
18
-
19
- OPTIONS = [ :verbose, :noop, :classpath, :properties ]
20
-
21
- class << self
22
-
23
- def enhance(options)
24
- fu_check_options options, *OPTIONS + [:output]
25
- runtool options.merge(:class=>"org.apache.openjpa.enhance.PCEnhancer", :name=>"Enhancer",
26
- :args=>{ "-p"=>options[:properties], "-d"=>options[:output].to_s },
27
- :classpath=>options[:classpath])
28
- end
29
-
30
- def mapping_tool(options)
31
- fu_check_options options, *OPTIONS + [:action, :sql]
32
- runtool options.merge(:class=>"org.apache.openjpa.jdbc.meta.MappingTool", :name=>"Mapping Tool",
33
- :args=>{ "-p"=>options[:properties], "-sql"=>options[:sql], "-sa"=>options[:action] })
34
- end
35
-
36
- private
37
-
38
- def runtool(options)
39
- args = [options[:class]] + options[:args].select { |n, v| v }.map { |n, v| [ n, v ] }.flatten
40
- args << { :classpath=>requires + (options[:classpath] || []),
41
- :name=>"OpenJPA #{options[:name]}", :verbose=>options[:verbose] }
42
- Java.java *args
43
- end
44
-
45
- def requires()
46
- @required ||= artifacts(REQUIRES).each { |artifact| artifact.invoke }.map(&:to_s)
47
- end
48
-
49
- end
50
-
51
- def open_jpa_enhance(options = nil)
52
- jpa_options = { :output=>compile.target, :classpath=>[compile.classpath, compile.target.to_s],
53
- :properties=>path_to("src/main/resources/META-INF/persistence.xml") }
54
- Java::OpenJPA.enhance jpa_options.merge(options || {})
55
- end
56
-
57
- end
58
- end
59
-
60
- class Project
61
- include Java::OpenJPA
62
- end
63
- end
@@ -1,72 +0,0 @@
1
- require "java/java"
2
-
3
- module Buildr
4
- module Java
5
- module XMLBeans
6
-
7
- REQUIRES = [ "xmlbeans:xbean:jar:2.2.0", "stax:stax-api:jar:1.0" ]
8
-
9
- class << self
10
-
11
- def compile(*args)
12
- options = Hash === args.last ? args.pop : {}
13
- options[:verbose] ||= Rake.application.options.trace || false
14
- fu_check_options options, :verbose, :noop, :javasource, :jar, :compile, :output, :xsb
15
-
16
- # Options for SchemaCompiler.
17
- output = options[:output].to_s
18
- cmd_args = [ options[:verbose] ? "-verbose" : "-quiet" ]
19
- cmd_args << "-javasource" << options[:javasource].collect.join(File::PATH_SEPARATOR) if options[:javasource]
20
- cmd_args << "-out" << options[:jar] if options[:jar]
21
- cmd_args << "-d" << output
22
- cmd_args << "-srconly" unless options[:compile]
23
- cmd_args << "-src" << output
24
- cmd_args += args.flatten
25
- cmd_args << { :verbose=>options[:verbose] }
26
-
27
- unless options[:noop]
28
- puts "Running XMLBeans schema compiler" if verbose
29
- mkpath output, :verbose=>false rescue nil
30
- sh(Java.path_to_bin("java"), "-Xmx256m", "-cp", requires.join(File::PATH_SEPARATOR),
31
- "org.apache.xmlbeans.impl.tool.SchemaCompiler", *cmd_args) { |ok, res|
32
- fail "Failed to compile schemas, see errors above" unless ok }
33
- # Touch paths to let other tasks know there's an update.
34
- touch output, :verbose=>false
35
- end
36
- end
37
-
38
- private
39
-
40
- def requires()
41
- @requires ||= artifacts(REQUIRES).each { |artifact| artifact.invoke }.map(&:to_s)
42
- end
43
-
44
- end
45
-
46
- def compile_xml_beans(*args)
47
- # Generate sources and add them to the compile task.
48
- generated = file(path_to("target/generated/xmlbeans")=>FileList[args.flatten]) do |task|
49
- Java::XMLBeans.compile task.prerequisites, :output=>task.name,
50
- :javasource=>compile.options.source, :xsb=>compile.target
51
- end
52
- compile.from(generated).with(JAVAX.stream, XMLBEANS)
53
- # Once compiled, we need to copy the generated XSB/XSD and one (magical?) class file
54
- # into the target directory, or the rest is useless.
55
- compile do |task|
56
- verbose(false) do
57
- base = Pathname.new(generated.to_s)
58
- FileList["#{base}/**/*.{class,xsb,xsd}"].each do |file|
59
- target = File.join(compile.target.to_s, Pathname.new(file).relative_path_from(base))
60
- mkpath File.dirname(target) ; cp file, target
61
- end
62
- end
63
- end
64
- end
65
-
66
- end
67
- end
68
-
69
- class Project
70
- include Java::XMLBeans
71
- end
72
- end