You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by "Ross Gardler (JIRA)" <ji...@apache.org> on 2006/08/02 14:01:14 UTC

[jira] Closed: (FOR-913) failure when ${project.home}/forrest.properties does not exist

     [ http://issues.apache.org/jira/browse/FOR-913?page=all ]

Ross Gardler closed FOR-913.
----------------------------

    Resolution: Invalid

forrest.properties has nothing to do with ant. It provides configuration values for forrest.

A forrest.properties file is required.

> failure when ${project.home}/forrest.properties does not exist
> --------------------------------------------------------------
>
>                 Key: FOR-913
>                 URL: http://issues.apache.org/jira/browse/FOR-913
>             Project: Forrest
>          Issue Type: Bug
>          Components: Tools (general issues)
>    Affects Versions: 0.8-dev
>            Reporter: Mathieu Champlon
>            Priority: Minor
>
> Sometimes the ${project.home}/forrest.properties is not necessary, for example because the build is launched from an ant script like this :
>         <ant antfile="${env.FORREST_HOME}/main/forrest.build.xml">
>           <property name="project.name" value="my-project"/>
>           <property name="project.content-dir" value="../src/documentation"/>
>           <property name="project.build-dir" location="../out/documentation"/>
>         </ant>
> However, even if an empty ${project.home}/forrest.properties yields a successfull build, removing the file gives the following error :
> ------------------------------------------------------------------------
> cocoon 2.2.0-dev
> Copyright (c) 1999-2005 Apache Software Foundation. All rights reserved.
> Build: December 8 2005 (TargetVM=1.4, SourceVM=1.4, Debug=on, Optimize=on)
> ------------------------------------------------------------------------
> org.apache.avalon.framework.configuration.ConfigurationException: Invalid pattern '{project:skinconf}' at file:/C:/Program%20Files/Apache%20Software%20Foundation/forrest/main/webapp/./sitemap.xmap:302:73
>         at org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.getParameters(DefaultTreeBuilder.java:568)
>         ...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Re: [jira] Closed: (FOR-913) failure when ${project.home}/forrest.properties does not exist

Posted by Mathieu Champlon <m....@free.fr>.
Cyriaque Dupoirieux a écrit :
> I can see that there is no problem with ant, the problem comes from 
> cocoon, are you sure a couple of jave lines will be enough ?
The exception stacktrace was quite long and I didn't include it, but at 
some point it goes through :
...
     [java] Caused by: 
org.apache.excalibur.source.SourceNotFoundException: 
file:/C:/dev/projects/xeumeuleu/build/forrest.properties doesn't exist.
     [java]     at 
org.apache.excalibur.source.impl.FileSource.getInputStream(FileSource.java:150)
     [java]     at 
org.apache.forrest.conf.ForrestConfModule.loadAntPropertiesFromURI(ForrestConfModule.java:300)
...

So it's actually forrest trying to load the property file and throwing 
because it does not find it.
Simply catching the exception in ForrestConfModule and discarding the 
error does the trick, that's how the other optional property files are 
currently handled.

I can provide the patch.

MAT.

Re: [jira] Closed: (FOR-913) failure when ${project.home}/forrest.properties does not exist

Posted by Cyriaque Dupoirieux <Cy...@pcotech.fr>.
le 03/08/2006 05:57 Mathieu Champlon a écrit :
>>
>> Ross Gardler closed FOR-913.
>> ----------------------------
>>
>>     Resolution: Invalid
>>
>> forrest.properties has nothing to do with ant. It provides 
>> configuration values for forrest.
>>
>> A forrest.properties file is required.
>>   
> Hello !
>
> First of all sorry for having added an issue when I should probably 
> have taken this to the mailing-list first...
>
> What I was trying to explain is that a forrest.properties file seems 
> indeed required while its content isn't.
> If you seed a new project and remove everything from the 
> forrest.properties file, it builds fine (using default configuration).
> But if you remove the (now empty) file, the build breaks.
>
> In the context of several projects with an automated/centralized build 
> process, it isn't very convenient to maintain a forrest.properties 
> file for each project.
> For example if the proxy configuration must be changed, it's much 
> easier to change it in one place rather than going through every project.
> The feature is already there in forrest : for instance a (centralized) 
> script can simply pass custom configuration values to 'forrest' using 
> -D options.
> If the whole build process is already scripted, it makes sense to 
> integrate forrest in it, and to try and remove configuration 
> duplications, thus ending with obsolete forrest.properties files.
>
> I understand that it might not be considered a bug, especially with 
> such an easy workaround (an empty forrest.properties file).
> Maybe this could be a feature request ?
> If cannot think of any drawback but if you prefer that the 
> ${project.home}/forrest.properties file should really be required and 
> must not be made optional, then so be it...
>
> By the way the patch is really simple, involving only a couple of java 
> lines in forrest.
I can see that there is no problem with ant, the problem comes from 
cocoon, are you sure a couple of jave lines will be enough ?
If it is the case, I agree with you that this file should not be required.

WDOT ?

Cyriaque,
>
> Thanks.
>
> MAT.
>
>

Re: [jira] Closed: (FOR-913) failure when ${project.home}/forrest.properties does not exist

Posted by Ross Gardler <rg...@apache.org>.
Tim Williams wrote:
> On 8/4/06, Ross Gardler <rg...@apache.org> wrote:

...

> I'd just point out that he offered to provide a patch (e.g. "I can
> provide a patch.") but likely got the perception it wouldn't be
> well-received because the issue was closed on him.  He now knows to
> discuss onlist first though...


Sorry, I missed that. Thanks for pointing it out Tim.

Ross

Re: [jira] Closed: (FOR-913) failure when ${project.home}/forrest.properties does not exist

Posted by Tim Williams <wi...@gmail.com>.
On 8/4/06, Ross Gardler <rg...@apache.org> wrote:
> Mathieu Champlon wrote:
> >>
> >> Ross Gardler closed FOR-913.
> >> ----------------------------
> >>
> >>     Resolution: Invalid
> >>
> >> forrest.properties has nothing to do with ant. It provides
> >> configuration values for forrest.
> >>
> >> A forrest.properties file is required.
> >>
> >
>
> ...
>
> > What I was trying to explain is that a forrest.properties file seems
> > indeed required while its content isn't.
> > If you seed a new project and remove everything from the
> > forrest.properties file, it builds fine (using default configuration).
> > But if you remove the (now empty) file, the build breaks.
> >
> > In the context of several projects with an automated/centralized build
> > process, it isn't very convenient to maintain a forrest.properties file
> > for each project.
>
> ...
>
> > For example if the proxy configuration must be changed, it's much easier
> > to change it in one place rather than going through every project.
>
> ...
>
> OK, that all makes sense. But how is this changed by having a blank
> forrest.properties file? (rhetorical question... keep reading)
>
>
> > I understand that it might not be considered a bug, especially with such
> > an easy workaround (an empty forrest.properties file).
>
> ...
>
> > Maybe this could be a feature request ?
>
> ...
>
> > By the way the patch is really simple, involving only a couple of java
> > lines in forrest.
>
> Then why not provide us with a patch? (again a rhetorical question, keep
> reading, I just want to point out we need your help)
>
> I've applied a guard around the necessary code. It should now work
> without a forrest.properties file.

I'd just point out that he offered to provide a patch (e.g. "I can
provide a patch.") but likely got the perception it wouldn't be
well-received because the issue was closed on him.  He now knows to
discuss onlist first though...
--tim

Re: [jira] Closed: (FOR-913) failure when ${project.home}/forrest.properties does not exist

Posted by Ross Gardler <rg...@apache.org>.
Mathieu Champlon wrote:
>>
>> Ross Gardler closed FOR-913.
>> ----------------------------
>>
>>     Resolution: Invalid
>>
>> forrest.properties has nothing to do with ant. It provides 
>> configuration values for forrest.
>>
>> A forrest.properties file is required.
>>   
> 

...

> What I was trying to explain is that a forrest.properties file seems 
> indeed required while its content isn't.
> If you seed a new project and remove everything from the 
> forrest.properties file, it builds fine (using default configuration).
> But if you remove the (now empty) file, the build breaks.
> 
> In the context of several projects with an automated/centralized build 
> process, it isn't very convenient to maintain a forrest.properties file 
> for each project.

...

> For example if the proxy configuration must be changed, it's much easier 
> to change it in one place rather than going through every project.

...

OK, that all makes sense. But how is this changed by having a blank 
forrest.properties file? (rhetorical question... keep reading)


> I understand that it might not be considered a bug, especially with such 
> an easy workaround (an empty forrest.properties file).

...

> Maybe this could be a feature request ?

...

> By the way the patch is really simple, involving only a couple of java 
> lines in forrest.

Then why not provide us with a patch? (again a rhetorical question, keep 
reading, I just want to point out we need your help)

I've applied a guard around the necessary code. It should now work 
without a forrest.properties file.

But...

Perhaps your use case requries a new site-wide properties file. It would 
be easier to manage than setting properties in your ant build file and 
is easy to implement.

The loading of the properites is handled by 
org.apache.forrest.conf.ForrestConfModule

It is also worth noting that in a future version of Forrest (probably 
0.9) we will be moving to a new XML property configuration system. This 
provides much more flexibility than the existing system. If you add a 
site-wide file please be sure to add an equivalent XML conf file (loaded 
in the same code).

Ross

Re: [jira] Closed: (FOR-913) failure when ${project.home}/forrest.properties does not exist

Posted by Mathieu Champlon <m....@free.fr>.
>
> Ross Gardler closed FOR-913.
> ----------------------------
>
>     Resolution: Invalid
>
> forrest.properties has nothing to do with ant. It provides configuration values for forrest.
>
> A forrest.properties file is required.
>   
Hello !

First of all sorry for having added an issue when I should probably have 
taken this to the mailing-list first...

What I was trying to explain is that a forrest.properties file seems 
indeed required while its content isn't.
If you seed a new project and remove everything from the 
forrest.properties file, it builds fine (using default configuration).
But if you remove the (now empty) file, the build breaks.

In the context of several projects with an automated/centralized build 
process, it isn't very convenient to maintain a forrest.properties file 
for each project.
For example if the proxy configuration must be changed, it's much easier 
to change it in one place rather than going through every project.
The feature is already there in forrest : for instance a (centralized) 
script can simply pass custom configuration values to 'forrest' using -D 
options.
If the whole build process is already scripted, it makes sense to 
integrate forrest in it, and to try and remove configuration 
duplications, thus ending with obsolete forrest.properties files.

I understand that it might not be considered a bug, especially with such 
an easy workaround (an empty forrest.properties file).
Maybe this could be a feature request ?
If cannot think of any drawback but if you prefer that the 
${project.home}/forrest.properties file should really be required and 
must not be made optional, then so be it...

By the way the patch is really simple, involving only a couple of java 
lines in forrest.

Thanks.

MAT.