You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by bo...@apache.org on 2010/09/19 00:02:29 UTC

svn commit: r998556 - in /buildr/trunk: ./ addon/buildr/ doc/ lib/buildr/core/ lib/buildr/groovy/ lib/buildr/java/ lib/buildr/scala/

Author: boisvert
Date: Sat Sep 18 22:02:28 2010
New Revision: 998556

URL: http://svn.apache.org/viewvc?rev=998556&view=rev
Log:
BUILDR-510 Add support for trace categories: --trace=foo,bar

Modified:
    buildr/trunk/.gitignore
    buildr/trunk/CHANGELOG
    buildr/trunk/addon/buildr/jetty.rb
    buildr/trunk/addon/buildr/xmlbeans.rb
    buildr/trunk/doc/more_stuff.textile
    buildr/trunk/lib/buildr/core/application.rb
    buildr/trunk/lib/buildr/core/test.rb
    buildr/trunk/lib/buildr/groovy/compiler.rb
    buildr/trunk/lib/buildr/java/ant.rb
    buildr/trunk/lib/buildr/java/commands.rb
    buildr/trunk/lib/buildr/java/compiler.rb
    buildr/trunk/lib/buildr/java/doc.rb
    buildr/trunk/lib/buildr/java/ecj.rb
    buildr/trunk/lib/buildr/java/emma.rb
    buildr/trunk/lib/buildr/java/external.rb
    buildr/trunk/lib/buildr/scala/compiler.rb
    buildr/trunk/lib/buildr/scala/doc.rb

Modified: buildr/trunk/.gitignore
URL: http://svn.apache.org/viewvc/buildr/trunk/.gitignore?rev=998556&r1=998555&r2=998556&view=diff
==============================================================================
--- buildr/trunk/.gitignore (original)
+++ buildr/trunk/.gitignore Sat Sep 18 22:02:28 2010
@@ -8,6 +8,7 @@ _snapshot
 _staged
 _release
 tmp
+*.swp
 *.log
 _all-in-one
 nbproject

Modified: buildr/trunk/CHANGELOG
URL: http://svn.apache.org/viewvc/buildr/trunk/CHANGELOG?rev=998556&r1=998555&r2=998556&view=diff
==============================================================================
--- buildr/trunk/CHANGELOG (original)
+++ buildr/trunk/CHANGELOG Sat Sep 18 22:02:28 2010
@@ -5,6 +5,7 @@
 * Added:  BUILDR-465 Eclipse project names should be customizable
 * Added:  BUILDR-493 Eclipse task should generate javadocpath
 * Added:  BUILDR-509 Option to generate non-prefixed Eclipse project names
+* Added:  BUILDR-510 Add support for trace categories: --trace=foo,bar
 * Added:  Integration test to show how to change the war packaging spec.
 * Added:  Integration test to show how to use junit 3.
 * Added:  Integration test to show how to get ahold of parent project

Modified: buildr/trunk/addon/buildr/jetty.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/addon/buildr/jetty.rb?rev=998556&r1=998555&r2=998556&view=diff
==============================================================================
--- buildr/trunk/addon/buildr/jetty.rb (original)
+++ buildr/trunk/addon/buildr/jetty.rb Sat Sep 18 22:02:28 2010
@@ -151,7 +151,7 @@ module Buildr
         response = http.request_post("/buildr/deploy", "webapp=#{webapp}&path=#{uri.path}")
         if Net::HTTPOK === response && response.body =~ /Deployed/
           path = response.body.split[1]
-          puts "Deployed #{webapp}, context path #{uri.path}" if Rake.application.options.trace
+          puts "Deployed #{webapp}, context path #{uri.path}" if trace?
           path
         else
           fail "Deployment failed: #{response}"

Modified: buildr/trunk/addon/buildr/xmlbeans.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/addon/buildr/xmlbeans.rb?rev=998556&r1=998555&r2=998556&view=diff
==============================================================================
--- buildr/trunk/addon/buildr/xmlbeans.rb (original)
+++ buildr/trunk/addon/buildr/xmlbeans.rb Sat Sep 18 22:02:28 2010
@@ -42,7 +42,7 @@ module Buildr
 
       def compile(*args)
         options = Hash === args.last ? args.pop : {}
-        options[:verbose] ||= Rake.application.options.trace || false
+        options[:verbose] ||= trace?(:xmlbeans)
         rake_check_options options, :verbose, :noop, :javasource, :jar, :compile, :output, :xsb
         puts "Running XMLBeans schema compiler" if verbose
         Buildr.ant "xmlbeans" do |ant|

Modified: buildr/trunk/doc/more_stuff.textile
URL: http://svn.apache.org/viewvc/buildr/trunk/doc/more_stuff.textile?rev=998556&r1=998555&r2=998556&view=diff
==============================================================================
--- buildr/trunk/doc/more_stuff.textile (original)
+++ buildr/trunk/doc/more_stuff.textile Sat Sep 18 22:02:28 2010
@@ -78,6 +78,36 @@ Buildr supports several different shell 
 
 Note that some of these shells impose certain requirements to enable use.  The Groovy shell requires the @GROOVY_HOME@ environment variable to point to the Groovy install path.  The Clojure REPL makes a similar requirement of @CLOJURE_HOME@.  The JRuby and Scala shells will use @JRUBY_HOME@ and @SCALA_HOME@ respectively if they are defined.  However, if these environment variables are not defined, the relevant JAR files will be automatically downloaded from the appropriate Maven2 repository.
 
+h3. Verbosity and Tracing
+
+By default, Buildr is moderately verbose, meaning that it attempts to give you enough context into what's happening during the build.
+
+It's possible to silence Buildr if you're inconvenienced by its default verbosity by issuing,
+
+{% highlight sh %}
+$ buildr --silent
+{% endhighlight %}
+
+On the other hand, if you want Buildr to give you more context in order to trace what's happening, you can use the @-t@ options:
+
+{% highlight sh %}
+$ buildr -t
+{% endhighlight %}
+
+Using @-t@ will also display backtraces if and when they occur.
+
+Many components can be individually configured to display more output if you're debugging a specific area of your build.  For instance, you could use @--trace=javac,groovyc@ to enable tracing of the Java and Groovy compilers:
+
+{% highlight sh %}
+$ buildr --trace=javac,groovyc
+{% endhighlight %}
+
+If you don't know which tracing category you need to enable or if you want a full firehose worth of traces, you can enable all traces:
+
+{% highlight sh %}
+$ buildr --trace=all
+{% endhighlight %}
+
 h3. JavaRebel Integration
 
 "JavaRebel":http://www.zeroturnaround.com/javarebel is a live bytecode reloading solution by Zero Turnaround.  It's a lot like the hot code reload feature found in many Java IDE debuggers (like Eclipse and IntelliJ), but capable of handling things like member addition or removal and new class definition.  The tool itself is commercial and works with any JVM language, but they do offer a free license for use with Scala classes only.
@@ -104,7 +134,7 @@ Running java scala.tools.nsc.MainGeneric
  (c) Copyright Webmedia, Ltd, 2007-2009. All rights reserved.
 
  This product is licensed to Daniel Spiewak
- for personal use only. 
+ for personal use only.
 
 #############################################################
 
@@ -114,7 +144,7 @@ Type :help for more information.
 
 scala> </pre>
 
-Note that Buildr does *not* check to make sure that you have a valid JavaRebel license, so you may end up launching with JavaRebel configured but without the ability to use it (in which case, JavaRebel will print a notification). 
+Note that Buildr does *not* check to make sure that you have a valid JavaRebel license, so you may end up launching with JavaRebel configured but without the ability to use it (in which case, JavaRebel will print a notification).
 
 h2(#gems).  Using Gems
 
@@ -134,7 +164,7 @@ Use the @build.yaml@ file to specify the
 
 {% highlight yaml %}
 # This project requires the following gems
-gems: 
+gems:
   # Suppose we want to notify developers when testcases fail.
   - buildr-twitter-notifier-addon >=1
   # we test with ruby mock objects
@@ -240,7 +270,7 @@ For other platforms or if you want to no
 Here is an example using these extension points to send notifications using "Qube":http://launchpad.net/qube:
 
 {% highlight ruby %}
-# Send notifications using Qube 
+# Send notifications using Qube
 notify = lambda do |type, title, message|
   param = case type
     when 'completed'; '-i'
@@ -249,12 +279,12 @@ notify = lambda do |type, title, message
   end
   system "qube #{param} #{title.inspect} #{message.inspect}"
 end
-  
-Buildr.application.on_completion do |title, message| 
+
+Buildr.application.on_completion do |title, message|
   notify['completed', title, message]
 end
-Buildr.application.on_failure do |title, message, ex| 
-  notify['failed', title, message] 
+Buildr.application.on_failure do |title, message, ex|
+  notify['failed', title, message]
 end
 {% endhighlight %}
 
@@ -319,7 +349,7 @@ $ buildr test cobertura:html
 
 As you can guess, the other tasks are @cobertura:xml@, @emma:html@ and @emma:xml@.
 
-If you want to generate a test coverage report only for a specific project, you can do so by using the project name as prefix to the tasks. 
+If you want to generate a test coverage report only for a specific project, you can do so by using the project name as prefix to the tasks.
 
 {% highlight sh %}
 $ buildr subModule:cobertura:html
@@ -328,7 +358,7 @@ $ buildr subModule:cobertura:html
 Each project can specify which classes to include or exclude from cobertura instrumentation by giving a class-name regexp to the @cobertura.include@ or @cobertura.exclude@ methods:
 
 {% highlight ruby %}
-define 'someModule' do 
+define 'someModule' do
   cobertura.include 'some.package.==*=='
   cobertura.include /some.(foo|bar).==*==/
   cobertura.exclude 'some.foo.util.SimpleUtil'
@@ -345,7 +375,7 @@ define 'someModule' do
   cobertura.check.branch_rate = 75
   cobertura.check.line_rate = 100
   cobertura.check.total_line_rate = 98
-  
+
   task(:deploy).enhance 'cobertura:check'
 end
 {% endhighlight %}

Modified: buildr/trunk/lib/buildr/core/application.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/core/application.rb?rev=998556&r1=998555&r2=998556&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/core/application.rb (original)
+++ buildr/trunk/lib/buildr/core/application.rb Sat Sep 18 22:02:28 2010
@@ -343,9 +343,13 @@ module Buildr
             options.full_description = false
           }
         ],
-        ['--trace', '-t', "Turn on invoke/execute tracing, enable full backtrace.",
+        ['--trace', '-t [CATEGORIES]', "Turn on invoke/execute tracing, enable full backtrace.",
           lambda { |value|
             options.trace = true
+            if value
+              options.trace_categories = value.split(',').map { |v| v.downcase.to_sym }
+            end
+            options.trace_all = options.trace_categories.include? :all
             verbose(true)
           }
         ],
@@ -614,6 +618,13 @@ def trace(message)
   puts message if Buildr.application.options.trace
 end
 
+def trace?(*category)
+  options = Buildr.application.options
+  return options.trace if category.empty?
+  return true if options.trace_all
+  return false unless Buildr.application.options.trace_categories
+  options.trace_categories.include?(category.first)
+end
 
 module Rake #:nodoc
   # Rake's circular dependency checks (InvocationChain) only applies to task prerequisites,

Modified: buildr/trunk/lib/buildr/core/test.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/core/test.rb?rev=998556&r1=998555&r2=998556&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/core/test.rb (original)
+++ buildr/trunk/lib/buildr/core/test.rb Sat Sep 18 22:02:28 2010
@@ -521,7 +521,7 @@ module Buildr
           @passed_tests = @framework.run(@tests, dependencies)
         rescue Exception=>ex
           error "Test framework error: #{ex.message}"
-          error ex.backtrace.join("\n") if Buildr.application.options.trace
+          error ex.backtrace.join("\n") if trace?
           @passed_tests = []
         end
         @failed_tests = @tests - @passed_tests

Modified: buildr/trunk/lib/buildr/groovy/compiler.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/groovy/compiler.rb?rev=998556&r1=998555&r2=998556&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/groovy/compiler.rb (original)
+++ buildr/trunk/lib/buildr/groovy/compiler.rb Sat Sep 18 22:02:28 2010
@@ -95,7 +95,7 @@ module Buildr::Groovy
       options[:debug] = Buildr.options.debug if options[:debug].nil?
       options[:deprecation] ||= false
       options[:optimise] ||= false
-      options[:verbose] ||= Buildr.application.options.trace if options[:verbose].nil?
+      options[:verbose] ||= trace?(:groovyc) if options[:verbose].nil?
       options[:warnings] = verbose if options[:warnings].nil?
       options[:javac] = OpenObject.new if options[:javac].nil?
     end

Modified: buildr/trunk/lib/buildr/java/ant.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/java/ant.rb?rev=998556&r1=998555&r2=998556&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/java/ant.rb (original)
+++ buildr/trunk/lib/buildr/java/ant.rb Sat Sep 18 22:02:28 2010
@@ -69,12 +69,12 @@ module Buildr
     #   end
     def ant(name, &block)
       options = { :name=>name, :basedir=>Dir.pwd, :declarative=>true }
-      options.merge!(:logger=> Logger.new(STDOUT), :loglevel=> Logger::DEBUG) if Buildr.application.options.trace
+      options.merge!(:logger=> Logger.new(STDOUT), :loglevel=> Logger::DEBUG) if trace?(:ant)
       Java.load
       Antwrap::AntProject.new(options).tap do |project|
         # Set Ant logging level to debug (--trace), info (default) or error only (--quiet).
         project.project.getBuildListeners().get(0).
-          setMessageOutputLevel((Buildr.application.options.trace && 4) || (verbose && 2) || 0)
+          setMessageOutputLevel((trace?(:ant) && 4) || (verbose && 2) || 0)
         yield project if block_given?
       end
     end

Modified: buildr/trunk/lib/buildr/java/commands.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/java/commands.rb?rev=998556&r1=998555&r2=998556&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/java/commands.rb (original)
+++ buildr/trunk/lib/buildr/java/commands.rb Sat Sep 18 22:02:28 2010
@@ -42,7 +42,7 @@ module Java
       # * :verbose -- If true, prints the command and all its argument.
       def java(*args, &block)
         options = Hash === args.last ? args.pop : {}
-        options[:verbose] ||= Buildr.application.options.trace || false
+        options[:verbose] ||= trace?(:java)
         rake_check_options options, :classpath, :java_args, :properties, :name, :verbose
 
         name = options[:name]
@@ -84,7 +84,7 @@ module Java
 
         files = args.flatten.map(&:to_s).
           collect { |arg| File.directory?(arg) ? FileList["#{arg}/**/*.java"] : arg }.flatten
-        cmd_args = [ Buildr.application.options.trace ? '-verbose' : '-nowarn' ]
+        cmd_args = [ trace?(:apt) ? '-verbose' : '-nowarn' ]
         if options[:compile]
           cmd_args << '-d' << options[:output].to_s
         else
@@ -160,7 +160,7 @@ module Java
         options = Hash === args.last ? args.pop : {}
         fail "No output defined for javadoc" if options[:output].nil?
         options[:output] = File.expand_path(options[:output].to_s)
-        cmd_args = [ '-d', options[:output], Buildr.application.options.trace ? '-verbose' : '-quiet' ]
+        cmd_args = [ '-d', options[:output], trace?(:javadoc) ? '-verbose' : '-quiet' ]
         options.reject { |key, value| [:output, :name, :sourcepath, :classpath].include?(key) }.
           each { |key, value| value.invoke if value.respond_to?(:invoke) }.
           each do |key, value|

Modified: buildr/trunk/lib/buildr/java/compiler.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/java/compiler.rb?rev=998556&r1=998555&r2=998556&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/java/compiler.rb (original)
+++ buildr/trunk/lib/buildr/java/compiler.rb Sat Sep 18 22:02:28 2010
@@ -76,7 +76,7 @@ module Buildr
       def javac_args #:nodoc:
         args = []
         args << '-nowarn' unless options[:warnings]
-        args << '-verbose' if Buildr.application.options.trace
+        args << '-verbose' if trace? :javac
         args << '-g' if options[:debug]
         args << '-deprecation' if options[:deprecation]
         args << '-source' << options[:source].to_s if options[:source]
@@ -109,7 +109,7 @@ module Buildr
     def apt(*sources)
       sources = compile.sources if sources.empty?
       file(path_to(:target, 'generated/apt')=>sources) do |task|
-        cmd_args = [ Buildr.application.options.trace ? '-verbose' : '-nowarn' ]
+        cmd_args = [ trace?(:apt) ? '-verbose' : '-nowarn' ]
         cmd_args << '-nocompile' << '-s' << task.name
         cmd_args << '-source' << compile.options.source if compile.options.source
         classpath = Buildr.artifacts(compile.dependencies).map(&:to_s).each { |t| task(t).invoke }

Modified: buildr/trunk/lib/buildr/java/doc.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/java/doc.rb?rev=998556&r1=998555&r2=998556&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/java/doc.rb (original)
+++ buildr/trunk/lib/buildr/java/doc.rb Sat Sep 18 22:02:28 2010
@@ -34,7 +34,7 @@ module Buildr
       specify :language => :java, :source_ext => 'java'
 
       def generate(sources, target, options = {})
-        cmd_args = [ '-d', target, Buildr.application.options.trace ? '-verbose' : '-quiet' ]
+        cmd_args = [ '-d', target, trace?(:javadoc) ? '-verbose' : '-quiet' ]
         options.reject { |key, value| [:sourcepath, :classpath].include?(key) }.
           each { |key, value| value.invoke if value.respond_to?(:invoke) }.
           each do |key, value|

Modified: buildr/trunk/lib/buildr/java/ecj.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/java/ecj.rb?rev=998556&r1=998555&r2=998556&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/java/ecj.rb (original)
+++ buildr/trunk/lib/buildr/java/ecj.rb Sat Sep 18 22:02:28 2010
@@ -15,16 +15,16 @@
 
 module Buildr
   module Compiler
-    
+
     class Ecj < Javac
-      
+
       OPTIONS = Buildr::Compiler::Javac::OPTIONS
-      
+
       specify :language=>:java, :sources => 'java', :source_ext => 'java',
       :target=>'classes', :target_ext=>'class', :packaging=>:jar
 
-      
-      
+
+
       def compile(sources, target, dependencies) #:nodoc:
         check_options options, OPTIONS
         cmd_args = []
@@ -48,9 +48,9 @@ module Buildr
 
       # See arg list here: http://publib.boulder.ibm.com/infocenter/rsahelp/v7r0m0/index.jsp?topic=/org.eclipse.jdt.doc.isv/guide/jdt_api_compile.htm
       def ecj_args #:nodoc:
-        args = []  
+        args = []
         args << '-warn:none' unless options[:warnings]
-        args << '-verbose' if Buildr.application.options.trace
+        args << '-verbose' if trace?(:ecj)
         args << '-g' if options[:debug]
         args << '-deprecation' if options[:deprecation]
         args << '-source' << options[:source].to_s if options[:source]

Modified: buildr/trunk/lib/buildr/java/emma.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/java/emma.rb?rev=998556&r1=998555&r2=998556&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/java/emma.rb (original)
+++ buildr/trunk/lib/buildr/java/emma.rb Sat Sep 18 22:02:28 2010
@@ -62,7 +62,7 @@ module Buildr
         Buildr.ant 'emma' do |ant|
           ant.taskdef :resource=>'emma_ant.properties',
             :classpath=>Buildr.artifacts(dependencies).each(&:invoke).map(&:to_s).join(File::PATH_SEPARATOR)
-          ant.emma :verbosity=>(Buildr.application.options.trace ? 'verbose' : 'warning') do
+          ant.emma :verbosity=>(trace?(:emma) ? 'verbose' : 'warning') do
             yield ant
           end
         end

Modified: buildr/trunk/lib/buildr/java/external.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/java/external.rb?rev=998556&r1=998555&r2=998556&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/java/external.rb (original)
+++ buildr/trunk/lib/buildr/java/external.rb Sat Sep 18 22:02:28 2010
@@ -16,13 +16,13 @@
 module Buildr
   module Compiler
     class ExternalJavac< Buildr::Compiler::Javac
-      
+
       OPTIONS = [:jvm, :warnings, :debug, :deprecation, :source, :target, :lint, :other]
-    
+
       specify :language=>:java, :sources => 'java', :source_ext => 'java',
               :target=>'classes', :target_ext=>'class', :packaging=>:jar
-              
-              
+
+
       def compile(sources, target, dependencies) #:nodoc:
         check_options options, OPTIONS
         cmd_args = []
@@ -47,12 +47,12 @@ module Buildr
       end
 
       private
-      
+
       # See arg list here: http://publib.boulder.ibm.com/infocenter/rsahelp/v7r0m0/index.jsp?topic=/org.eclipse.jdt.doc.isv/guide/jdt_api_compile.htm
       def externaljavac_args #:nodoc:
-        args = []  
+        args = []
         args << '-nowarn' unless options[:warnings]
-        args << '-verbose' if Buildr.application.options.trace
+        args << '-verbose' if trace?(:javac)
         args << '-g' if options[:debug]
         args << '-deprecation' if options[:deprecation]
         args << '-source' << options[:source].to_s if options[:source]
@@ -64,9 +64,9 @@ module Buildr
         end
         args + Array(options[:other])
       end
-      
+
     end
-    
+
   end
 end
 

Modified: buildr/trunk/lib/buildr/scala/compiler.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/scala/compiler.rb?rev=998556&r1=998555&r2=998556&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/scala/compiler.rb (original)
+++ buildr/trunk/lib/buildr/scala/compiler.rb Sat Sep 18 22:02:28 2010
@@ -225,7 +225,7 @@ module Buildr::Scala
     def scalac_args #:nodoc:
       args = []
       args << "-nowarn" unless options[:warnings]
-      args << "-verbose" if Buildr.application.options.trace
+      args << "-verbose" if trace?(:scalac)
       args << "-g" if options[:debug]
       args << "-deprecation" if options[:deprecation]
       args << "-optimise" if options[:optimise]

Modified: buildr/trunk/lib/buildr/scala/doc.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/scala/doc.rb?rev=998556&r1=998555&r2=998556&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/scala/doc.rb (original)
+++ buildr/trunk/lib/buildr/scala/doc.rb Sat Sep 18 22:02:28 2010
@@ -22,7 +22,7 @@ module Buildr
       specify :language => :scala, :source_ext => 'scala'
 
       def generate(sources, target, options = {})
-        cmd_args = [ '-d', target, Buildr.application.options.trace ? '-verbose' : '' ]
+        cmd_args = [ '-d', target, trace?(:scaladoc) ? '-verbose' : '' ]
         options.reject { |key, value| [:sourcepath, :classpath].include?(key) }.
           each { |key, value| value.invoke if value.respond_to?(:invoke) }.
           each do |key, value|
@@ -68,7 +68,7 @@ module Buildr
       specify :language => :scala, :source_ext => 'scala'
 
       def generate(sources, target, options = {})
-        cmd_args = [ '-d', target, (Buildr.application.options.trace ? '-verbose' : ''),
+        cmd_args = [ '-d', target, (trace?(:vscaladoc) ? '-verbose' : ''),
           '-sourcepath', project.compile.sources.join(File::PATH_SEPARATOR) ]
         options.reject { |key, value| [:sourcepath, :classpath].include?(key) }.
           each { |key, value| value.invoke if value.respond_to?(:invoke) }.