Project Layout

1 view
Skip to first unread message

JVelilla

unread,
Sep 13, 2007, 10:35:48 AM9/13/07
to glean-code-users, Project
Hello,

I'm trying to figure out how to use glean with a complex project
layout.

# Uncomment and change these to match your project layout
src.dir = ${project.root}/src
#bin.dir = ${project.root}/bin
lib.dir = ${project.root}/lib


I have a project with the following src structure

src/model
org.myproject.model.User.java
src/services
org.myproject.services.UserServices.java
src/web
org.myproject.web.UserController.java
src/util
org.myproject.util.EqualsUtils.java


Is there a way to configure this structure in glean?

Thanks
JV

John Brugge

unread,
Sep 13, 2007, 1:23:23 PM9/13/07
to glean-co...@googlegroups.com
JV,

The short answer is no, Glean does not currently support a project structure that has multiple source root folders. The main reason is that most of the tools that it drives take a FileSet, and FileSet only gives you the chance to choose a single directory. Without adding in something like the AntUtil lib to get iteration, there's not a clean way I can see to do it (and even with that it wouldn't necessarily be pretty)

There are a couple of workarounds that occur to me:
1. Have an auxiliary Ant task that can copy all of the source to a temporary area under a single source root, and point Glean at that. You can delete it after Glean is done.

2. Have one Glean configuration for each of the source modules, and run Glean multiple times. Unfortunately, that doesn't give you aggregate results, which is what I assume you're after.

Solving the general issue of being able to give Glean a description of multiple source folders (and multiple libs, and bins) is one that I'm sure many people would like to see, including myself, but I don't have a good solution yet. I've been there before, though, so I know that it's needed; the project that I was on where the idea of Glean started had dozens of source projects, and while we had a feedback system that kind of aggregated things, it wasn't great, and it wasn't general. Glean is an attempt to generalize some of that, and has started simple with the hope of growing with time.

I hope that helps,
John
Reply all
Reply to author
Forward
0 new messages