You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Thorsten Scherler <th...@apache.org> on 2005/08/12 01:17:38 UTC
[usecase.xconf] @unless makes 'build clean' necessary.
Hello devs,
I am developing some usecases for a lenya pub based on 1.4.x. The
problem that I run into is that I added a new usecase to the one I
already had. After a couple of rebuilds and checking the code I finally
made a "build clean" and the second usecase showed up.
After looking again in the docu and in my code I found the reason why I
had to "build clean" (taken from default pub):
<xconf xpath="/cocoon/usecases"
unless="/cocoon/usecases/component-instance[@name =
'default/workflow.submit']"/>
The @unless prevent that we can add and activate new usecases unless we
do a "build clean". That is because we have a dependency on *one*
usecase "/cocoon/usecases/component-instance[@name =
'default/workflow.submit']".
Do I understand that right?
How can we overcome that problem because a build clean is IMO not
necessary.
TIA for any feedback.
salu2
--
thorsten
"Together we stand, divided we fall!"
Hey you (Pink Floyd)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: [usecase.xconf] @unless makes 'build clean' necessary.
Posted by Thorsten Scherler <th...@apache.org>.
On Fri, 2005-08-12 at 10:50 +0200, Thorsten Scherler wrote:
> On Fri, 2005-08-12 at 10:01 +0200, Andreas Hartmann wrote:
> > Thorsten Scherler wrote:
> > > Hello devs,
> > >
> > > I am developing some usecases for a lenya pub based on 1.4.x. The
> > > problem that I run into is that I added a new usecase to the one I
> > > already had. After a couple of rebuilds and checking the code I finally
> > > made a "build clean" and the second usecase showed up.
> > >
> > > After looking again in the docu and in my code I found the reason why I
> > > had to "build clean" (taken from default pub):
> > > <xconf xpath="/cocoon/usecases"
> > > unless="/cocoon/usecases/component-instance[@name =
> > > 'default/workflow.submit']"/>
> > >
> > > The @unless prevent that we can add and activate new usecases unless we
> > > do a "build clean". That is because we have a dependency on *one*
> > > usecase "/cocoon/usecases/component-instance[@name =
> > > 'default/workflow.submit']".
> > >
> > > Do I understand that right?
> >
> > Looks like a copy&paste error. The "unless" attribute should point
> > to the usecase you want to insert. It just avoids duplicate entries.
> >
>
> Hmm, the default pub has more then *one* usecase in the usecase.xconf.
> Would it make sense to have something like this:
> usecase-workflow-submit.xconf
> usecase-my-usecase.xconf
> ...
>
> That would bring back the behavior you describe "It just avoids
> duplicate entries".
>
> wdyt?
>
I just tried that in my project and it is working like a charm. :)
Should I refactor the usecase.xconf of the default pub and update the
docu?
salu2
--
thorsten
"Together we stand, divided we fall!"
Hey you (Pink Floyd)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: [usecase.xconf] @unless makes 'build clean' necessary.
Posted by Thorsten Scherler <th...@apache.org>.
On Fri, 2005-08-12 at 14:05 +0200, Andreas Hartmann wrote:
...
> I don't think that needs a vote, as no functionality is changed
> (it's just a refactoring of the default pub and not a requirement
> how people have to do things).
>
> Anyway, here's my +1 to have separate files for usecases
> (your argumentation was convincing :) ).
>
> -- Andreas
Ok, I will refactor that.
Thx for the feedback.
salu2
--
thorsten
"Together we stand, divided we fall!"
Hey you (Pink Floyd)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: [usecase.xconf] @unless makes 'build clean' necessary.
Posted by Andreas Hartmann <an...@apache.org>.
Thorsten Scherler wrote:
> On Fri, 2005-08-12 at 12:21 +0200, Andreas Hartmann wrote:
>
>>Thorsten Scherler wrote:
>>
>>[...]
>>
>>
>>>Hmm, the default pub has more then *one* usecase in the usecase.xconf.
>>>Would it make sense to have something like this:
>>>usecase-workflow-submit.xconf
>>>usecase-my-usecase.xconf
>>>...
>>>
>>>That would bring back the behavior you describe "It just avoids
>>>duplicate entries".
>>>
>>>wdyt?
>>
>>That would be possible, but is it really worth it?
>>We end up with a lot of files when the number of usecases rises.
>
>
> Yes, but IMO that is better then have a dependency on *one* usecase and
> have to do a 'build clean' to add new usecases.
>
> I should make a proposal, I guess.
I don't think that needs a vote, as no functionality is changed
(it's just a refactoring of the default pub and not a requirement
how people have to do things).
Anyway, here's my +1 to have separate files for usecases
(your argumentation was convincing :) ).
-- Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: [usecase.xconf] @unless makes 'build clean' necessary.
Posted by Thorsten Scherler <th...@apache.org>.
On Fri, 2005-08-12 at 12:21 +0200, Andreas Hartmann wrote:
> Thorsten Scherler wrote:
>
> [...]
>
> > Hmm, the default pub has more then *one* usecase in the usecase.xconf.
> > Would it make sense to have something like this:
> > usecase-workflow-submit.xconf
> > usecase-my-usecase.xconf
> > ...
> >
> > That would bring back the behavior you describe "It just avoids
> > duplicate entries".
> >
> > wdyt?
>
> That would be possible, but is it really worth it?
> We end up with a lot of files when the number of usecases rises.
Yes, but IMO that is better then have a dependency on *one* usecase and
have to do a 'build clean' to add new usecases.
I should make a proposal, I guess.
salu2
--
thorsten
"Together we stand, divided we fall!"
Hey you (Pink Floyd)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: [usecase.xconf] @unless makes 'build clean' necessary.
Posted by Andreas Hartmann <an...@apache.org>.
Thorsten Scherler wrote:
[...]
> Hmm, the default pub has more then *one* usecase in the usecase.xconf.
> Would it make sense to have something like this:
> usecase-workflow-submit.xconf
> usecase-my-usecase.xconf
> ...
>
> That would bring back the behavior you describe "It just avoids
> duplicate entries".
>
> wdyt?
That would be possible, but is it really worth it?
We end up with a lot of files when the number of usecases rises.
>>>How can we overcome that problem because a build clean is IMO not
>>>necessary.
>>
>>During development, you could add a "remove" attribute instead of the
>>"unless" attribute. Then the snippet is just replaced during patching.
>
> Yes and no. The @remove will remove *only* the usecase of the xpath
> expression but not all usecases that are stored in the usecase.xconf (if
> it contains more then one usecase - like the default pub).
>
> That *will* lead to duplication after the second build.
OK, when you add more than 1 usecase that's true.
>>But in production, you can't do that because cocoon.xconf will be
>>changed during every build process, which requires to restart the
>>servlet engine.
>
>
> That is perfectly alright with me but I do not want to be forced to do a
> build clean.
OK
-- Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: [usecase.xconf] @unless makes 'build clean' necessary.
Posted by Thorsten Scherler <th...@apache.org>.
On Fri, 2005-08-12 at 10:01 +0200, Andreas Hartmann wrote:
> Thorsten Scherler wrote:
> > Hello devs,
> >
> > I am developing some usecases for a lenya pub based on 1.4.x. The
> > problem that I run into is that I added a new usecase to the one I
> > already had. After a couple of rebuilds and checking the code I finally
> > made a "build clean" and the second usecase showed up.
> >
> > After looking again in the docu and in my code I found the reason why I
> > had to "build clean" (taken from default pub):
> > <xconf xpath="/cocoon/usecases"
> > unless="/cocoon/usecases/component-instance[@name =
> > 'default/workflow.submit']"/>
> >
> > The @unless prevent that we can add and activate new usecases unless we
> > do a "build clean". That is because we have a dependency on *one*
> > usecase "/cocoon/usecases/component-instance[@name =
> > 'default/workflow.submit']".
> >
> > Do I understand that right?
>
> Looks like a copy&paste error. The "unless" attribute should point
> to the usecase you want to insert. It just avoids duplicate entries.
>
Hmm, the default pub has more then *one* usecase in the usecase.xconf.
Would it make sense to have something like this:
usecase-workflow-submit.xconf
usecase-my-usecase.xconf
...
That would bring back the behavior you describe "It just avoids
duplicate entries".
wdyt?
>
> > How can we overcome that problem because a build clean is IMO not
> > necessary.
>
> During development, you could add a "remove" attribute instead of the
> "unless" attribute. Then the snippet is just replaced during patching.
>
Yes and no. The @remove will remove *only* the usecase of the xpath
expression but not all usecases that are stored in the usecase.xconf (if
it contains more then one usecase - like the default pub).
That *will* lead to duplication after the second build.
> But in production, you can't do that because cocoon.xconf will be
> changed during every build process, which requires to restart the
> servlet engine.
That is perfectly alright with me but I do not want to be forced to do a
build clean.
salu2
--
thorsten
"Together we stand, divided we fall!"
Hey you (Pink Floyd)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org
Re: [usecase.xconf] @unless makes 'build clean' necessary.
Posted by Andreas Hartmann <an...@apache.org>.
Thorsten Scherler wrote:
> Hello devs,
>
> I am developing some usecases for a lenya pub based on 1.4.x. The
> problem that I run into is that I added a new usecase to the one I
> already had. After a couple of rebuilds and checking the code I finally
> made a "build clean" and the second usecase showed up.
>
> After looking again in the docu and in my code I found the reason why I
> had to "build clean" (taken from default pub):
> <xconf xpath="/cocoon/usecases"
> unless="/cocoon/usecases/component-instance[@name =
> 'default/workflow.submit']"/>
>
> The @unless prevent that we can add and activate new usecases unless we
> do a "build clean". That is because we have a dependency on *one*
> usecase "/cocoon/usecases/component-instance[@name =
> 'default/workflow.submit']".
>
> Do I understand that right?
Looks like a copy&paste error. The "unless" attribute should point
to the usecase you want to insert. It just avoids duplicate entries.
> How can we overcome that problem because a build clean is IMO not
> necessary.
During development, you could add a "remove" attribute instead of the
"unless" attribute. Then the snippet is just replaced during patching.
But in production, you can't do that because cocoon.xconf will be
changed during every build process, which requires to restart the
servlet engine.
-- Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org