I'm fine with test => package, I guess the packaged jar might contain more than /target/classes. But this was a simple question raised because buildr 1.2.10 has a different behavior.
~/p/hello-dolly$b12 clean test (in /home/alexis/p/hello-dolly) Cleaning hello-dolly Testing hello-dolly Compiling 1 source files in hello-dolly:mod1:compile Compiling 1 source files in hello-dolly:mod2:compile Testing hello-dolly:mod1 Testing hello-dolly:mod2 Compiling 2 source files in hello-dolly:mod2:test:compile Running tests in hello-dolly:mod2 Alexis On Fri, Mar 27, 2009 at 4:45 PM, Alex Boisvert <[email protected]> wrote: > In other words, in this case the test + packaging tasks would be avoided if > the dependency was: > > project("mod1").compile.target > > I would be nice to have a shortcut for this. Let's try it for a while > first. > > alex > > > > > On Fri, Mar 27, 2009 at 3:39 PM, Assaf Arkin <[email protected]> wrote: > > > On Fri, Mar 27, 2009 at 3:36 PM, Alexis Midon <[email protected]> > > wrote: > > > > > I use the project() method to declare the dependency. > > > > > > Then yes. project("mod1") is the same as project("mod1").packages. > > > > Assaf > > > > > > > > > > > > > > > > define "hello-dolly" do > > > > > > define "mod1" do > > > package(:jar) > > > end > > > > > > define "mod2" do > > > compile.with project("mod1") > > > package(:jar) > > > end > > > > > > end > > > > > > Alexis > > > > > > > > > On Fri, Mar 27, 2009 at 3:31 PM, Assaf Arkin <[email protected]> > wrote: > > > > > > > On Fri, Mar 27, 2009 at 2:42 PM, Alexis Midon <[email protected] > > > > > > wrote: > > > > > > > > > > > > > > Hi guys, > > > > > > > > > > I have attached a simple HelloWorld project, with 2 modules, mod2 > > > depends > > > > > on mod1. > > > > > When I test mod2, mod1 gets packaged. is that the expected > behavior? > > > I'd > > > > > say no. > > > > > > > > > > > > Does mod2 have mod1.jar as a classpath dependency? > > > > > > > > Assaf > > > > > > > > > > > > > > > > > > > > > > > ~/p/hello-dolly$buildr clean test > > > > > (in /home/alexis/p/hello-dolly, development) > > > > > Cleaning hello-dolly > > > > > Testing hello-dolly > > > > > Compiling hello-dolly:mod1 into > > > > > /home/alexis/p/hello-dolly/mod1/target/classes > > > > > Packaging hello-dolly-mod1-1.0.0.jar > > > > > Compiling hello-dolly:mod2 into > > > > > /home/alexis/p/hello-dolly/mod2/target/classes > > > > > Testing hello-dolly:mod1 > > > > > Testing hello-dolly:mod2 > > > > > Compiling hello-dolly:mod2:test into > > > > > /home/alexis/p/hello-dolly/mod2/target/test/classes > > > > > Running tests in hello-dolly:mod2 > > > > > Trying to override old definition of datatype junit > > > > > > > > > > > > > > > Alexis > > > > > > > > > > > > > > >
