forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mathieu Champlon (JIRA)" <>
Subject [jira] Commented: (FOR-752) Forrestbot "build" workstage creates spurious "build/webapp/WEB-INF/logs" directory
Date Sat, 15 Apr 2006 08:38:00 GMT
    [ ] 

Mathieu Champlon commented on FOR-752:

I just ran into the same issue, not a very important bug but rather annoying.

The problem is in ForrestLogTargetFactory#contextualize where the string "/build/webapp" is
hardcoded and appended to projectHome in order to set the context-root.
I wonder why the context-root is not simply set to project.webapp ?

Replacing the line :
                newContext.put("context-root",projectHome + "/build/webapp");
With :
                String webAppDir = ForrestConfUtils.getSystemProperty("project.webapp");
(and changing ForrestConfUtils#getSystemProperty visibility to public)
seems to fix the issue, however I'm not aware enough about forrest internals to clearly see
all the possible consequences.

Along the same idea, isn't the following line taken from ForrestConfUtils#getProjectHome involving
another hardcoded path ?
            projectHome = defaultHome + SystemUtils.FILE_SEPARATOR + "/project";

> Forrestbot "build" workstage creates spurious "build/webapp/WEB-INF/logs" directory
> -----------------------------------------------------------------------------------
>          Key: FOR-752
>          URL:
>      Project: Forrest
>         Type: Bug

>   Components: Tool: Forrestbot
>     Versions: 0.7, 0.8-dev
>     Reporter: Richard Calmbach
>     Priority: Minor

> When running Forrestbot with the default value for property "" (namely
"work/${}"), "" is set to the same value and consequently,
"project.webapp" is set to "work/${}/webapp". However, one of the two "logs"
directories continues to be created at "build/webapp/WEB-INF/logs", suggesting that somewhere
a hardcoded value is used instead of ${project.webapp}. The mkdir command for this "logs"
directory is not in any of the Ant build files in the Forrest distribution; it must be in
one of the Java classes, probably in a class related to logging. I forced an I/O failure by
turning off all permissions on build/webapp and running "forrest -f build.xml build". This
yielded a stacktrace that originated 7 calls before:
> org.apache.avalon.excalibur.logger.factory.FileTargetFactory.createTarget(
> The remaining 7 invokations were not displayed (just "... 7 more").
> The upshot of this bug is that running "forrest -f build.xml clean" misses the "logs"
directory in the unexpected location. My workaround right now is to use a custom "clean-all"
target that depends on "clean" and that deletes the spurious "build/webapp" directory.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message