lib/java/compile.rb in buildr-0.21.0 vs lib/java/compile.rb in buildr-0.22.0
- old
+ new
@@ -157,11 +157,11 @@
# tasks, projects, etc. Use this rather than setting the classpath directly.
#
# For example:
# compile.with("module1.jar", "log4j:log4j:jar:1.0", project("foo"))
def with(*specs)
- @classpath |= artifacts(specs.flatten).uniq
+ @classpath |= Buildr.artifacts(specs.flatten).uniq
self
end
# The target directory for the generated class files.
attr_reader :target
@@ -366,11 +366,11 @@
# :call-seq:
# with(*artifacts) => self
#
# Adds files and artifacts as classpath dependencies, and returns self.
def with(*specs)
- @classpath |= artifacts(specs.flatten).uniq
+ @classpath |= Buildr.artifacts(specs.flatten).uniq
self
end
# Additional sourcepaths that are not part of the documented files.
attr_accessor :sourcepath
@@ -536,10 +536,10 @@
prepare = task("prepare")
# Resources task is a filter.
resources = Java::ResourcesTask.define_task("resources")
resources.filter.from project.path_to("src/main/resources")
# Compile task requires prepare and performs resources, if anything compiled.
- compile = Java::CompileTask.define_task("compile"=>[prepare, resources]) { |task| project.resources.invoke }
+ compile = Java::CompileTask.define_task("compile"=>[prepare, resources])
project.path_to("src/main/java").tap { |dir| compile.from dir if File.exist?(dir) }
compile.into project.path_to("target/classes")
resources.filter.into project.compile.target
Java::JavadocTask.define_task("javadoc"=>prepare).tap do |javadoc|
javadoc.into project.path_to("target/javadoc")