buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Neil Curzon" <neil.cur...@gmail.com>
Subject Re: Layouts
Date Sat, 17 May 2008 16:17:32 GMT
It's true that the target directory doesn't exist, but buildr has no problem
creating it when using the default layout.  It seems the reason it's not
creating it is that for some reason it doesn't find anything to compile.

When I create the the directories it's looking for (strangely
target/main/classes and target/test/classes) it's true that the error goes
away, but nothing gets built or tested.

When I make a project with the default layout built from the standard maven
archetype, and no target folder existing, with similar debugging output, I
get:

Path to: C:/Documents and Settings/neil/test/second/src/main/java
Compile target: C:/Documents and Settings/neil/test/second/target/classes
Compile sources: C:/Documents and Settings/neil/test/second/src/main/java
Building app
Compiling app:second
Testing app
Testing app:myproject
Testing app:second
Compiling app:second:test
Running tests in app:second
    [junit] Testsuite: com.test.AppTest
    [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.062 sec
    [junit]
    [junit] Testcase: testApp took 0 sec
Completed in 1.469s

Note the compile.sources is actually defined when using the default layout.
So maybe the compile task is having trouble finding the source folder when
using a non default layout?

Neil

On Sat, May 17, 2008 at 11:28 AM, Daniel Spiewak <djspiewak@gmail.com>
wrote:

> Try adding this:
>
> legacy_layout[:target, :classes] = 'bin'       # replace with whatever your
> output dir is
>
> Either that or just create the target/classes/ directory.
>
> Daniel
>
> On Sat, May 17, 2008 at 9:35 AM, Neil Curzon <neil.curzon@gmail.com>
> wrote:
>
> > I'm trying to get a legacy layout working in buildr 1.3.0.  My sources
> are
> > in src, tests in test.  Here's the buildfile, inspired from a similar
> > question on the mailing list back in February.
> >
> > require 'buildr'
> >
> > VERSION_NUMBER = '1.0'
> >
> > repositories.remote << 'http://www.ibiblio.org/maven2/'
> >
> > define 'app' do
> >
> >  project.version = VERSION_NUMBER
> >  compile.options.target = '1.5'
> >
> >  legacy_layout = Layout.new
> >  legacy_layout[:source, :main, :java] = 'src'
> >  legacy_layout[:source, :test, :java] = 'test'
> >
> >  define 'myproject', :layout => legacy_layout do
> >    puts "Path to: #{path_to(:source, :main, :java)}"
> >    puts "Compile target: #{compile.target}"
> >    puts "Compile sources: #{compile.sources}"
> >    package :jar
> >  end
> >
> > end
> >
> > The build fails with output:
> >
> > C:\Documents and Settings\neil\test>buildr
> > (in C:/Documents and Settings/neil/test, development)
> > Path to: C:/Documents and Settings/neil/test/myproject/src
> > Compile target: C:/Documents and
> > Settings/neil/test/myproject/target/main/classes
> > Compile sources:
> > Building app
> > Testing app
> > Testing app:myproject
> > IOException: No file or directory with the name C:\Documents and
> > Settings\neil\test\myproject\target\main\classes
> > rake aborted!
> > No file or directory with the name C:\Documents and
> > Settings\neil\test\myproject\target\main\classes
> >
> > (See full trace by running task with --trace)
> >
> >
> > Any help would be appreciated!
> >
> > Thanks
> > Neil
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message