You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by "Brian M Dube (JIRA)" <ji...@apache.org> on 2011/01/12 06:33:47 UTC

[jira] Issue Comment Edited: (FOR-752) Forrestbot "build" workstage creates spurious "build/webapp/WEB-INF/logs" directory

    [ https://issues.apache.org/jira/browse/FOR-752?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980566#action_12980566 ] 

Brian M Dube edited comment on FOR-752 at 1/12/11 12:33 AM:
------------------------------------------------------------

I included this stacktrace because I thought it showed the directory being created in a different part of the code, but I didn't read the issue description closely enough. Leaving it in since the original description is truncated.

  [1] java.io.File.mkdirs (File.java:1,145)
  [2] org.apache.log.output.io.FileTarget.openFile (FileTarget.java:103)
  [3] org.apache.log.output.io.FileTarget.<init> (FileTarget.java:55)
  [4] org.apache.avalon.excalibur.logger.factory.FileTargetFactory.createTarget (FileTargetFactory.java:164)
  [5] org.apache.avalon.excalibur.logger.factory.FileTargetFactory.createTarget (FileTargetFactory.java:145)
  [6] org.apache.avalon.excalibur.logger.DefaultLogTargetManager.configure (DefaultLogTargetManager.java:92)
  [7] org.apache.avalon.framework.container.ContainerUtil.configure (ContainerUtil.java:201)
  [8] org.apache.avalon.excalibur.logger.LogKitLoggerManager.setupTargetManager (LogKitLoggerManager.java:457)
  [9] org.apache.avalon.excalibur.logger.LogKitLoggerManager.configure (LogKitLoggerManager.java:403)
  [10] org.apache.cocoon.bean.CocoonWrapper.initialize (CocoonWrapper.java:144)
  [11] org.apache.cocoon.bean.CocoonBean.initialize (CocoonBean.java:102)
  [12] org.apache.cocoon.Main.main (Main.java:320)


      was (Author: brian):
    Breakpoint hit: "thread=main", java.io.File.mkdirs(), line=1,145 bci=0

main[1] dump this.path
 this.path = "/tmp/seed/build/webapp/WEB-INF/logs"
main[1] where
  [1] java.io.File.mkdirs (File.java:1,145)
  [2] org.apache.log.output.io.FileTarget.openFile (FileTarget.java:103)
  [3] org.apache.log.output.io.FileTarget.<init> (FileTarget.java:55)
  [4] org.apache.avalon.excalibur.logger.factory.FileTargetFactory.createTarget (FileTargetFactory.java:164)
  [5] org.apache.avalon.excalibur.logger.factory.FileTargetFactory.createTarget (FileTargetFactory.java:145)
  [6] org.apache.avalon.excalibur.logger.DefaultLogTargetManager.configure (DefaultLogTargetManager.java:92)
  [7] org.apache.avalon.framework.container.ContainerUtil.configure (ContainerUtil.java:201)
  [8] org.apache.avalon.excalibur.logger.LogKitLoggerManager.setupTargetManager (LogKitLoggerManager.java:457)
  [9] org.apache.avalon.excalibur.logger.LogKitLoggerManager.configure (LogKitLoggerManager.java:403)
  [10] org.apache.cocoon.bean.CocoonWrapper.initialize (CocoonWrapper.java:144)
  [11] org.apache.cocoon.bean.CocoonBean.initialize (CocoonBean.java:102)
  [12] org.apache.cocoon.Main.main (Main.java:320)

  
> Forrestbot "build" workstage creates spurious "build/webapp/WEB-INF/logs" directory
> -----------------------------------------------------------------------------------
>
>                 Key: FOR-752
>                 URL: https://issues.apache.org/jira/browse/FOR-752
>             Project: Forrest
>          Issue Type: Bug
>          Components: Tool: Forrestbot
>    Affects Versions: 0.7, 0.8, 0.9-dev
>            Reporter: Richard Calmbach
>            Priority: Minor
>             Fix For: 0.10
>
>
> When running Forrestbot with the default value for property "build.work-dir" (namely "work/${ant.project.name}"), "project.build-dir" is set to the same value and consequently, "project.webapp" is set to "work/${ant.project.name}/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(FileTargetFactory.java:160)
> 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.
-
You can reply to this email to add a comment to the issue online.