Invoke glean build.xml from external build.xml

1 view
Skip to first unread message

Evgeny

unread,
Oct 15, 2007, 8:54:34 AM10/15/07
to glean-code-users
Greetings,

I have created a small ant script that invokes glean on each folder
under projects that has feedback.properties, so I have something like
this:
R
|- build.xml
|- projects/
| |- FooProject/
| | |- feedback.properties
| |- BarProject/
| |- feedback.properties
|- glean/
|- build.xml
|- ...


And I had a problem with glean's build.xml - because the glean-subant
macro does not handle the "basedir" property correctly. I fixed it by
adding this line to the glean-subant macro:
<property name="basedir" location="tool/@{pattern}"/>

Without this line - each tool (like findbugs for example) had basedir
set to glean root directory.


Generally, because tools like findbugs and pmd, etc .. take a long
time. I would like to just run glean on ALL my projects in the company
every-night as part of my CruiseControl builds. Regurarly the projects
and unit tests just run on every commit.

Evgeny

unread,
Oct 15, 2007, 9:00:00 AM10/15/07
to glean-code-users
Oops ... damn.
It works when just one tool is being used, but when the pattern has
multiple tools like "pmd,findbugs" it breaks.
So basically I did not fix the problem.

HELP!

John Brugge

unread,
Oct 15, 2007, 9:14:50 AM10/15/07
to glean-co...@googlegroups.com
Evgeny,

Another user has just been having this same problem, and I think we
have a fix for it. I'll try to get a patch release out as soon as
possible. The approach is similar to what you did, providing a
defined property for the tool script's directory rather than relying
on "basedir".

If you need this right away, I can try to get it to you. Otherwise I
would hope to get it out in the next couple of days.

Thanks,
John

Evgeny

unread,
Oct 15, 2007, 9:27:06 AM10/15/07
to glean-co...@googlegroups.com
Just found this issue in ant's bugtracking,
http://issues.apache.org/bugzilla/show_bug.cgi?id=30569

Looks like a bug. And a nasty one ....
I don't really want to re-compile my ant with this fix, so perhaps there is another way to do it?

John Brugge

unread,
Oct 15, 2007, 11:36:26 PM10/15/07
to glean-co...@googlegroups.com
Evgeny,

There is a new release with changes that should fix your problem. The download is at http://jbrugge.com/glean/download.html. You shouldn't have to change anything in your script. Let me know if this doesn't solve the problem.

I'm getting around the bug that's mentioned by simply defining a property to hold what should be basedir, and using that where basedir would be used. I've been nagged by this bug before too, so it feels good to have found a way to deal with it.

Enjoy,
John

Evgeny

unread,
Oct 16, 2007, 4:56:06 AM10/16/07
to glean-co...@googlegroups.com
Thanks John!
And thank you for this great piece of "Ant Zen" you wrote.

I did end up patching my ant 1.7.0 yesterday, and it did fix the problem and started working -- but i'll test the new release with both the fixed and the broken ants.
Reply all
Reply to author
Forward
0 new messages