Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 17168 invoked from network); 12 Oct 2006 10:12:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 12 Oct 2006 10:12:39 -0000 Received: (qmail 67466 invoked by uid 500); 12 Oct 2006 10:12:37 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 67404 invoked by uid 500); 12 Oct 2006 10:12:37 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 67393 invoked by uid 99); 12 Oct 2006 10:12:36 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Oct 2006 03:12:36 -0700 X-ASF-Spam-Status: No, hits=1.3 required=10.0 tests=RCVD_NUMERIC_HELO,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of ap-cocoon-dev@m.gmane.org designates 80.91.229.2 as permitted sender) Received: from [80.91.229.2] (HELO ciao.gmane.org) (80.91.229.2) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Oct 2006 03:12:35 -0700 Received: from root by ciao.gmane.org with local (Exim 4.43) id 1GXxVr-0001R9-52 for dev@cocoon.apache.org; Thu, 12 Oct 2006 12:10:03 +0200 Received: from 217.244.9.5 ([217.244.9.5]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 12 Oct 2006 12:10:03 +0200 Received: from alexander.klimetschek by 217.244.9.5 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 12 Oct 2006 12:10:03 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: dev@cocoon.apache.org From: Alexander Klimetschek Subject: Re: [RT] Simplify flow usage Date: Thu, 12 Oct 2006 11:21:17 +0200 Lines: 61 Message-ID: References: <451BECA3.6060707@apache.org> <451C096A.3060902@apache.org> <451CC905.7060804@apache.org> <451FD6F9.1020606@gmx.de> <45222784.8050305@apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 217.244.9.5 User-Agent: Thunderbird 1.5.0.7 (Macintosh/20060909) In-Reply-To: <45222784.8050305@apache.org> Sender: news X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I just run into a problem with the automatic loading of all files inside flow/: if there is a subversion directory (.svn) inside, it will try to call getInputStream() on it, which will fail on a directory. So the problem is very general: you probably want to traverse sub-directories in order to let users structure their flow-directory. But how do you know that you have one of those "hidden" directories of a version control system (.svn, CVS,....). The "." for hidden dirs is not an exclusion criteria, because CVS doesn't use it. IMHO the conclusion is that there are two cases: a) skip traversing of sub-directories (simple) b) write some magic code that is able to skip any special/hidden directory I could quickly provide a patch for a). So what do you think? Alexander Klimetschek (Mindquarry) The stacktrace: Caused by: org.apache.excalibur.source.SourceNotFoundException: file:/Users/alex/Mindquarry/hack/mindquarry-teamspace-web/mindquarry-teamspace-block/src/main/resources/COB-INF/flow/.svn/ doesn't exist. at org.apache.excalibur.source.impl.FileSource.getInputStream(FileSource.java:150) at org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.compileScript(FOM_JavaScriptInterpreter.java:502) at org.apache.cocoon.components.flow.CompilingInterpreter$ScriptSourceEntry.getScript(CompilingInterpreter.java:112) at org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.setupContext(FOM_JavaScriptInterpreter.java:453) at org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.callFunction(FOM_JavaScriptInterpreter.java:572) at org.apache.cocoon.components.treeprocessor.sitemap.CallFunctionNode.invoke(CallFunctionNode.java:109) ... 43 more Caused by: java.io.FileNotFoundException: /Users/alex/Mindquarry/hack/mindquarry-teamspace-web/mindquarry-teamspace-block/src/main/resources/COB-INF/flow/.svn (No such file or directory) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.(FileInputStream.java:106) at org.apache.excalibur.source.impl.FileSource.getInputStream(FileSource.java:146) ... 48 more Carsten Ziegeler wrote: > I now implemented this "convention" stuff - all files located in the > "flow" directory relative to the current sitemap are added to the flow > interpreter - regardless of the file name suffix and the used > interpreter (javascript, javaflow etc). The directory is of course optional. > By this we show a best practice of how to use flow - if for any reason > the user wants to use a different location, it's possible by specifying > the "location" attribute on the flow node. > > I think we should leave the other "convention" directories for spring > and avalon configurations and the properties inside the "config" > directory for now. > > Carsten >