mapping multiple paths to custom Layout resources

View: New views
2 Messages — Rating Filter:   Alert me  

mapping multiple paths to custom Layout resources

by digitalsanctum :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm trying to map a few different directories to a custom Layout's resources
by doing something like the following:

spg_layout = Layout.new
spg_layout[:source, :main, :resources] = 'src/main/config/common'
spg_layout[:source, :main, :resources] = 'src/main/config/' +
Buildr.environment
spg_layout[:source, :main, :resources] = 'src/main/resources'
 It seems you can only map one path since it only picks up the last
'src/main/resources' path. Is what I'm trying to do possible?

--

Thanks,
Shane

Re: mapping multiple paths to custom Layout resources

by Assaf Arkin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Jan 14, 2009 at 8:03 AM, Shane Witbeck <shane@...> wrote:

> I'm trying to map a few different directories to a custom Layout's resources
> by doing something like the following:
>
> spg_layout = Layout.new
> spg_layout[:source, :main, :resources] = 'src/main/config/common'
> spg_layout[:source, :main, :resources] = 'src/main/config/' +
> Buildr.environment
> spg_layout[:source, :main, :resources] = 'src/main/resources'
>  It seems you can only map one path since it only picks up the last
> 'src/main/resources' path. Is what I'm trying to do possible?

Layouts are for people who don't like the default layout.  What you're
trying to do is get the resource task to copy from multiple
directories, instead of the single directory it picks by default.
That's what resources.from does.  If you want all your projects to
have resources.from( multiple ), perhaps an extension?

http://incubator.apache.org/buildr/rdoc/classes/Buildr/Extension.html

Assaf




>
> --
>
> Thanks,
> Shane
>