You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@buildr.apache.org by David Rault <bu...@free.fr> on 2008/03/17 17:58:33 UTC
Tuning Junit Report directory
Hi everyone
i'm a newbie in both ruby and buildr
i'm a former ANT and currently looking for a way out of Maven!
i've read about Buildr and it seems it might be what i'm looking for
i've been trying to build commons-lang from source with it to familiarize
with both the syntax and the customization process
i'm having trouble customizing the JunitReport output
i set the test task to use "target/report"
but i can't find a way to tell junit:report to use the same (or any
other folder than its default report/junit)
here's my buildfile :
> require "buildr"
>
> VERSION_NUMBER = "2.3"
> SOURCE_VERSION = "1.3"
> TARGET_VERSION = "1.1"
>
> COPYRIGHT_END = "2008"
> COMPONENT_TITLE = "Core Language Utilities"
>
> desc "Commons.Lang, a package of Java utility classes for the classes
> that are in java.lang's hierarchy, or are considered to be so standard
> as to justify existence in java.lang."
>
> define "commons-lang" do
>
> project.version = VERSION_NUMBER
> project.group = "commons-lang"
> project.reports = "target/reports"
>
> compile.options.source = SOURCE_VERSION
> compile.options.target = TARGET_VERSION
> compile.options.warnings = false
> compile.options.deprecation = false
> # compile.options.other = [ "-encoding", "ISO8859-1" ]
> compile.from "src/java"
>
> javadoc.using :use => true, :author => true, :version => true
> javadoc.using :source => SOURCE_VERSION
> javadoc.using :link => "http://java.sun.com/j2se/1.3/docs/api/"
> javadoc.using :bottom => "Copyright © 2001-"+COPYRIGHT_END+" -
> Apache Software Foundation"
> javadoc.using :windowtitle => COMPONENT_TITLE+" (Version
> "+VERSION_NUMBER+")"
> javadoc.using :doctitle => "<h1>"+COMPONENT_TITLE+"</h1>"
> javadoc.using :overview =>
> compile.sources.first()+"/org/apache/commons/lang/overview.html"
> javadoc projects
>
> test.compile.from "src/test"
> ####
> ## exclude invalid tests
> ####
> test.exclude "org.apache.commons.lang.ClassNotFoundSerializationTest"
> test.exclude "org.apache.commons.lang.CharUtilsPerfTest"
> test.exclude "org.apache.commons.lang.builder.ToStringBuilderTest"
> test.exclude "org.apache.commons.lang.math.AbstractRangeTest"
>
> test do
> junitreport = task("junit:report")
> junitreport.invoke
> end
>
> package :javadoc
> package :jar
>
> end
am i missing something (or doing wrong) ?
BTW, is there a documentation with more advanced feature than the
site/pdf online ?
thanks
David
Re: Tuning Junit Report directory
Posted by Assaf Arkin <ar...@intalio.com>.
On Tue, Mar 18, 2008 at 6:59 AM, David Rault <bu...@free.fr> wrote:
> Assaf Arkin a écrit :
> >> i'm having trouble customizing the JunitReport output
> > Try JUnit.report.target = <path>
> >
> thanks, i missed checking the class variables !
> so this works and i've moved on to running cobertura and jdepend
> but then again there doesn't seem to be an "obvious" way to set the
> working directories (cobertura reports and cobertura.ser, xml output for
> jdepend)
>
> so here are my questions :
>
> 1/ how can i force cobertura and jdepend to use specific output folders ?
You can't at the moment.
>
>
> 2/ why don't they (= junit-report, cobertura, jdepend, etc.) root their
> outputs in the "project.reports" property **by default** ?
> since project.reports already exists (and is used by the test task), i'm
> a little confused other tasks write somewhere else
The test task generates output for the project, for each project it runs on,
in the project's reports directory. And in 1.3 we have a nice way of
controlling the project layout, so it all works nicely.
junit:report, cobertura and jdepend generate a consolidated output for all
the projects in the buildfile, so they need to use one directory that's not
tied to any single project and can't use the same setting.
We don't at the moment have a global option for an output directory these
tasks can use, simply because no one asked for it.
Assaf
>
> thanks for your feedback
>
Re: Tuning Junit Report directory
Posted by David Rault <bu...@free.fr>.
Assaf Arkin a écrit :
>> i'm having trouble customizing the JunitReport output
> Try JUnit.report.target = <path>
>
thanks, i missed checking the class variables !
so this works and i've moved on to running cobertura and jdepend
but then again there doesn't seem to be an "obvious" way to set the
working directories (cobertura reports and cobertura.ser, xml output for
jdepend)
so here are my questions :
1/ how can i force cobertura and jdepend to use specific output folders ?
2/ why don't they (= junit-report, cobertura, jdepend, etc.) root their
outputs in the "project.reports" property **by default** ?
since project.reports already exists (and is used by the test task), i'm
a little confused other tasks write somewhere else
thanks for your feedback
Re: Tuning Junit Report directory
Posted by Assaf Arkin <ar...@intalio.com>.
On Mon, Mar 17, 2008 at 9:58 AM, David Rault <bu...@free.fr> wrote:
> Hi everyone
> i'm a newbie in both ruby and buildr
Welcome :-)
>
>
> i'm a former ANT and currently looking for a way out of Maven!
> i've read about Buildr and it seems it might be what i'm looking for
>
> i've been trying to build commons-lang from source with it to familiarize
> with both the syntax and the customization process
>
> i'm having trouble customizing the JunitReport output
> i set the test task to use "target/report"
> but i can't find a way to tell junit:report to use the same (or any
> other folder than its default report/junit)
Try JUnit.report.target = <path>
The API has more details, not as nicely organized or detailed as the main
documentation, but a good reference if you can't find what you're looking
for elsewhere:
http://incubator.apache.org/buildr/rdoc/index.html
Assaf
>
>
> here's my buildfile :
> > require "buildr"
> >
> > VERSION_NUMBER = "2.3"
> > SOURCE_VERSION = "1.3"
> > TARGET_VERSION = "1.1"
> >
> > COPYRIGHT_END = "2008"
> > COMPONENT_TITLE = "Core Language Utilities"
> >
> > desc "Commons.Lang, a package of Java utility classes for the classes
> > that are in java.lang's hierarchy, or are considered to be so standard
> > as to justify existence in java.lang."
> >
> > define "commons-lang" do
> >
> > project.version = VERSION_NUMBER
> > project.group = "commons-lang"
> > project.reports = "target/reports"
> >
> > compile.options.source = SOURCE_VERSION
> > compile.options.target = TARGET_VERSION
> > compile.options.warnings = false
> > compile.options.deprecation = false
> > # compile.options.other = [ "-encoding", "ISO8859-1" ]
> > compile.from "src/java"
> >
> > javadoc.using :use => true, :author => true, :version => true
> > javadoc.using :source => SOURCE_VERSION
> > javadoc.using :link => "http://java.sun.com/j2se/1.3/docs/api/"
> > javadoc.using :bottom => "Copyright © 2001-"+COPYRIGHT_END+" -
> > Apache Software Foundation"
> > javadoc.using :windowtitle => COMPONENT_TITLE+" (Version
> > "+VERSION_NUMBER+")"
> > javadoc.using :doctitle => "<h1>"+COMPONENT_TITLE+"</h1>"
> > javadoc.using :overview =>
> > compile.sources.first()+"/org/apache/commons/lang/overview.html"
> > javadoc projects
> >
> > test.compile.from "src/test"
> > ####
> > ## exclude invalid tests
> > ####
> > test.exclude "org.apache.commons.lang.ClassNotFoundSerializationTest"
> > test.exclude "org.apache.commons.lang.CharUtilsPerfTest"
> > test.exclude "org.apache.commons.lang.builder.ToStringBuilderTest"
> > test.exclude "org.apache.commons.lang.math.AbstractRangeTest"
> >
> > test do
> > junitreport = task("junit:report")
> > junitreport.invoke
> > end
> >
> > package :javadoc
> > package :jar
> >
> > end
> am i missing something (or doing wrong) ?
>
> BTW, is there a documentation with more advanced feature than the
> site/pdf online ?
>
> thanks
> David
>