On Tue, Sep 16, 2008 at 11:57 PM, Victor Hugo Borja <[EMAIL PROTECTED]> wrote: > Assaf, > > On Tue, Sep 16, 2008 at 7:26 PM, Assaf Arkin <[EMAIL PROTECTED]> wrote: > >> >> There's no official API, but by convention you can get the version >> number from Ant.version (was: Ant::VERSION) and the list of >> dependencies from Ant.dependencies (was: Ant::REQUIRES). These >> methods are there in case the truly motivated need to mess with them, >> maybe pick a random version of JUnit on each build, or replace JMock >> with JSerious. > > > We will need to document on modules having a dependencies method, the key > users can use in the yaml file. I like having > ant: 1.7 > but I'd also like something more qualified (and more rubyish..) like > Buildr::Ant::version: 1 > some modules may need different versions for the same artifact. > > How could we handle cases like setting a fixed JUnit/TestNG version for > JtestR to use.
JBehave handles it by taking the JUnit dependencies and adding its own, so you have one setting to control JUnit (for everything) another to control jbehave. > Currently JtestR simply includes TestNG.dependencies, would this case > require the user > to override JtestR::dependencies ? > > > http://github.com/vic/buildr/commit/663cf568d34f8ca1ded2bc93332864cf0805e60c#L0R187 > > > Another interesting case[1] is how to set the dependencies or versions > per project. Say a project needs a particular JMock or XMLBeans version. You use XMLBeans via the compile_xml_beans method, so it's just a matter of adding an optional argument which tells it which version of XMLBeans to use and calculating the dependencies from that. I don't think it will be a big change to make if someone asks for it. Likewise, for test frameworks we can have an instance-level method you can use, which by default picks its value from the class-level method, which takes it from build.yml/constant. > > > I'm putting this first on Github for everyone to review, check, comment: >> http://github.com/assaf/buildr/commits/master > > > Great, I really like these reorg changes. > > I've rebased my JtestR branch to use your changes, and > changed it not to use REQUIRES constant. > > >> The official issue is 148 (configure JUnit from YAML file), also >> related to 140 (get rid of const_defined?), 115/138 (broken >> repositories.local = ) >> >> https://issues.apache.org/jira/browse/BUILDR-148 >> https://issues.apache.org/jira/browse/BUILDR-140 >> https://issues.apache.org/jira/browse/BUILDR-115 >> https://issues.apache.org/jira/browse/BUILDR-138 >> >> [1] https://issues.apache.org/jira/browse/BUILDR-4 > > -- > vic > > Quaerendo invenietis. >
