You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Geoff Howard <co...@leverageweb.com> on 2003/03/26 04:14:54 UTC

RE: Cocoon-2.1-dev build fails

Ok, you're not crazy - the build is in fact broken.  Sort of.  What is
broken is
an old validation target that was recently put back in (validate-jars in
src/targets/validate-build.xml).  It appears that everything is actually
built correctly,
but this old target has not been correctly updated to deal with blocks (at
least on
windows).  By the way, sorry for accusing you of using the old build
method - I was looking at your second attempt using -D instead of
build.properties and leapt to conclusions.

For now, your quickest bet is to go to src/targets/webapp-build.xml and find
the line:

<target name="webapp" ...
and remove the string validate-jars (and the comma) from the depends
attribute (try line 127, column 191 or so)

Unfortunately, when validate-jars was put back in, an override mechanism
wasn't added so you're stuck manually editing the build file for now.

I'll be submitting a patch to first of all add the override mechanism so
that this won't trip people up until the target is fixed.

(speaking to developers now)
Unfortunately, fixing the target looks non-trivial to me.  The problem seems
to be that moving the jar libs into src/blocks broke the basic mechanism.
The filter on @JARS@ into build/temp/current-jars.xml for the blocks jars
produces entries like:
<jar>D:/eclipse/workspace/cocoon-2.1/src/blocks/batik/lib/batik-all-1.5b2.ja
r</jar>

On quick inspection, check-jars.xsl seems to be looking for literal string
matches from lib/jars.xml which will be impossible if fileset is returning
absolute paths.  I tried various combinations of relative paths with no
success.  Either some trick is needed to make
<xsl:if test="count($directory/jars/jar[normalize-space(text()) = $this]) =
0">
      <xsl:message terminate="yes">
allow relative paths to match the absolute path (don't this this is
feasible?)

or

fileset needs to be made/configured to return relative paths (don't know ant
well enough myself)

or

some other means of checking jars needs to be devised (custom task?).

Is this broken only on windows, or does this affect *nix and mac?

Geoff

> -----Original Message-----
> From: Geoff Howard [mailto:cocoon@leverageweb.com]
> Sent: Tuesday, March 25, 2003 8:12 PM
> To: cocoon-users@xml.apache.org; nbacon@aisoftware.com.au
> Subject: RE: Cocoon-2.1-dev build fails
>
>
> The build process for 2.1dev has very recently changed and is still
> stabilizing.  While
> these problems may in fact be real, it's difficult to tell because you
> appear to be following the old method for customizing the build
> (no surprise
> since the docs probably
> still instruct you to).
>
> If you haven't, read through INSTALL.txt for the new instructions.  First
> try what it
> says (which is to copy build.properties to local.build.properties
> and modify
> the
> values you're interested in).  But if that doesn't work, erase or
> hide that
> file
> and modify build.properties directly.  For individual blocks, the
> process is
> the same
> but you'll use blocks.properties instead.
>
> If all this still fails, make sure you do build clean and try again, as
> there are
> often at this stage files moving around the repository which
> necessitates a
> clean build.
>
> As this is under active development, please do report back with your
> findings and
> if no developers seem to answer, post on the dev list or file a report in
> bugzilla.  I'll try to keep track of what's happening.
>
> Geoff
>
>
> > -----Original Message-----
> > From: neil [mailto:nbacon@aisoftware.com.au]
> > Sent: Tuesday, March 25, 2003 5:22 PM
> > To: Cocoon-Users (E-mail)
> > Subject: Re: Cocoon-2.1-dev build fails
> >
> >
> > Re:
> http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=104862608911688&w=2
> >
> > I like the way the build tries to let you include just what you
> > want, but there
> > are a few little problems with it. Yesterday I checked out the
> > CVS HEAD and now
> > using jdk-1.4.1, windows2000/cygwin ...
> >
> > 1.
> > I tried excluding blocks I don't need by using
> > local.blocks.properties, but when I ran
> > cocoon (in tomcat-4.1.18) I got:
> >
> > java.lang.NoClassDefFoundError:
> EDU/oswego/cs/dl/util/concurrent/Executor
> > 	at org.apache.cocoon.Cocoon.contextualize(Cocoon.java:204)
> > 	at
> > org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet
> > .java:1304)
> > 	at
> > org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:505)
> > 	at
> > org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapp
> > er.java:934)
> >
> > It seems that src/blocks/xmldb/lib/xmldb-api-20011111.jar
> > includes the package
> > EDU/oswego/cs/dl/util/concurrent which is referenced elsewhere.
> > So the xmldb block
> > cannot be excluded.
> >
> > 2.
> > I tried to exclude samples and docs:
> >
> > ./build.sh  -Dinclude.webapp.libs=yes \
> >                     -Dexclude.webapp.samples=yes \
> >                     -Dexclude.webapp.documenation=yes \
> >                     -Dexclude.webapp.javadocs=yes war
> >
> > and got:
> >
> > Writing: C:\cocoon-2.1\build\webapp\WEB-INF\cocoon.xconf
> >
> > scratchpad-samples:
> > Copying 57 files to C:\cocoon-2.1\build\webapp\samples
> > Copied 1 empty directory to C:\cocoon-2.1\build\webapp\samples
> > Copying 87 files to C:\cocoon-2.1\build\webapp\samples
> >
> > BUILD FAILED
> > file:///C:/cocoon-2.1/build.xml:637: IOException:
> > java.io.FileNotFoundException:
> >  C:\cocoon-2.1\build\webapp\samples\samples.xml (The system
> > cannot find the file
> >  specified)
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> > For additional commands, e-mail: cocoon-users-help@xml.apache.org
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>
>


RE: Cocoon-2.1-dev build fails

Posted by Geoff Howard <co...@leverageweb.com>.

> -----Original Message-----
> From: Stephan Michels [mailto:stephan@apache.org]
> Sent: Wednesday, March 26, 2003 5:26 AM
> To: cocoon-users
> Subject: RE: Cocoon-2.1-dev build fails
>
> On Tue, 25 Mar 2003, Geoff Howard wrote:
>
> > Ok, you're not crazy - the build is in fact broken.  Sort of.  What is
> > broken is
> > an old validation target that was recently put back in (validate-jars in
<snip/>
> >
> > I'll be submitting a patch to first of all add the override mechanism so
> > that this won't trip people up until the target is fixed.
>
> Hmm, I don't get any problems with the validate-jars target, perhaps an
> windows-only problem.
<snip/>
> > Is this broken only on windows, or does this affect *nix and mac?
>
> Can you send me your build/cocoon-2.1-dev/temp/current-jars.xml, then I'll
> check this.
>
> Stephan.

I'll have to do that after work - looks like it was cleaned up out of
build/temp after a
successful build (interestingly blocks-build.xml wasn't).

Geoff


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


RE: Cocoon-2.1-dev build fails

Posted by Stephan Michels <st...@apache.org>.

On Tue, 25 Mar 2003, Geoff Howard wrote:

> Ok, you're not crazy - the build is in fact broken.  Sort of.  What is
> broken is
> an old validation target that was recently put back in (validate-jars in
> src/targets/validate-build.xml).  It appears that everything is actually
> built correctly,
> but this old target has not been correctly updated to deal with blocks (at
> least on
> windows).  By the way, sorry for accusing you of using the old build
> method - I was looking at your second attempt using -D instead of
> build.properties and leapt to conclusions.
>
> For now, your quickest bet is to go to src/targets/webapp-build.xml and find
> the line:
>
> <target name="webapp" ...
> and remove the string validate-jars (and the comma) from the depends
> attribute (try line 127, column 191 or so)
>
> Unfortunately, when validate-jars was put back in, an override mechanism
> wasn't added so you're stuck manually editing the build file for now.
>
> I'll be submitting a patch to first of all add the override mechanism so
> that this won't trip people up until the target is fixed.

Hmm, I don't get any problems with the validate-jars target, perhaps an
windows-only problem.

> (speaking to developers now)
> Unfortunately, fixing the target looks non-trivial to me.  The problem seems
> to be that moving the jar libs into src/blocks broke the basic mechanism.
> The filter on @JARS@ into build/temp/current-jars.xml for the blocks jars
> produces entries like:
> <jar>D:/eclipse/workspace/cocoon-2.1/src/blocks/batik/lib/batik-all-1.5b2.ja
> r</jar>
>
> On quick inspection, check-jars.xsl seems to be looking for literal string
> matches from lib/jars.xml which will be impossible if fileset is returning
> absolute paths.  I tried various combinations of relative paths with no
> success.  Either some trick is needed to make
> <xsl:if test="count($directory/jars/jar[normalize-space(text()) = $this]) =
> 0">
>       <xsl:message terminate="yes">
> allow relative paths to match the absolute path (don't this this is
> feasible?)
>
> or
>
> fileset needs to be made/configured to return relative paths (don't know ant
> well enough myself)
>
> or
>
> some other means of checking jars needs to be devised (custom task?).
>
> Is this broken only on windows, or does this affect *nix and mac?

Can you send me your build/cocoon-2.1-dev/temp/current-jars.xml, then I'll
check this.

Stephan.


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: Cocoon-2.1-dev build fails

Posted by Geoff Howard <co...@leverageweb.com>.
At 11:12 PM 3/26/2003, David wrote:
>Geoff Howard wrote:
> > Vadim wrote:
> > >Geoff Howard wrote:
> > >>Vadim wrote:
> > >>>Geoff Howard wrote:
> > >>>> ### wrote:

<snip/>

> > >>
> > >>
> > >>Shouldn't the jars validation be configurable though like the other
> > >>validations?  If it's now working, just default the validate.jars to 
> true
> > >>by default.
> > >
> > >Ok, so you will add it by yourself then ;-P
>
>I think that the validate-jars/check-jars task should *not*
>be optional. The only reason that it might fail and bust
>the build is if the committer who added the new jar did not
>describe it properly (or did not do a build before committing).
>The reason for this task is to ensure a solid build.

I think that's a great argument for why it should be enabled by
default, just as the validate-config.  If the config files don't
validate, cocoon may not even start, but if the jars.xml is broken,
cocoon may still build and run fine.  We need it there to nag us
to keep the descriptor current but I don't see the need to single
this step out as the one that will hang up all users of cvs while
jars.xml gets fixed.

The other night, there were new users trying
to build and evaluate 2.1 dev that were apt to think the entire
project was broken when in reality cocoon built fine, but the build
process aborted because of failure during this validation.  In this
case, it wasn't even that jars.xml was out of date, but the evolving
build process temporarily broke the use of it, causing even more
confusion for users (and me!).  In fact, correct me if I'm wrong, but
if I want to totally ignore a given block, but its jar in jars.xml is
missing/misconfigured my build will be aborted.

I had to suggest they modify the webapp target to remove the dependency
on validate-jars to keep them from being blocked while it that process
got fixed.  If it can be turned off temporarily, it will allow
other unrelated work to continue if fixes to the validation process are
necessary.

> > almost forgot! :) (If I don't tick anybody off soon - the vote is still
> > going on)
>
>Well now you can "tick people off" to your heart's content.

What is the emoticon for a devious look?

>Be kind please.

In all seriousness, _that_ I promise.

>--David

Geoff 


Re: Cocoon-2.1-dev build fails

Posted by David Crossley <cr...@indexgeo.com.au>.
Geoff Howard wrote:
> Vadim wrote:
> >Geoff Howard wrote:
> >>Vadim wrote:
> >>>Geoff Howard wrote:
> >>>> ### wrote: 
> >>>>>Unfortunately, when validate-jars was put back in, an override mechanism
> >>>>>wasn't added so you're stuck manually editing the build file for now.
> >>>>>
> >>>>>I'll be submitting a patch to first of all add the override mechanism so
> >>>>>that this won't trip people up until the target is fixed.
> >>>
> >>>Umm... I fear I fixed the reason of the issue... I haven't change build 
> >>>to make validation optional - this will keep document more up-to-date.
> >>>
> >>>Vadim
> >>
> >>
> >>Shouldn't the jars validation be configurable though like the other 
> >>validations?  If it's now working, just default the validate.jars to true 
> >>by default.
> >
> >Ok, so you will add it by yourself then ;-P

I think that the validate-jars/check-jars task should *not*
be optional. The only reason that it might fail and bust
the build is if the committer who added the new jar did not
describe it properly (or did not do a build before committing).
The reason for this task is to ensure a solid build.

> almost forgot! :) (If I don't tick anybody off soon - the vote is still 
> going on)

Well now you can "tick people off" to your heart's content.
Be kind please.

--David



Re: Cocoon-2.1-dev build fails

Posted by Geoff Howard <co...@leverageweb.com>.
At 10:40 AM 3/26/2003, you wrote:
>Geoff Howard wrote:
>
>>At 09:50 AM 3/26/2003, you wrote:
>>
>>>Geoff Howard wrote:
>>>
>>>>>Unfortunately, when validate-jars was put back in, an override mechanism
>>>>>wasn't added so you're stuck manually editing the build file for now.
>>>>>
>>>>>I'll be submitting a patch to first of all add the override mechanism so
>>>>>that this won't trip people up until the target is fixed.
>>>
>>>Umm... I fear I fixed the reason of the issue... I haven't change build 
>>>to make validation optional - this will keep document more up-to-date.
>>>
>>>Vadim
>>
>>
>>Shouldn't the jars validation be configurable though like the other 
>>validations?  If it's now working, just default the validate.jars to true 
>>by default.
>
>
>Ok, so you will add it by yourself then ;-P

almost forgot! :) (If I don't tick anybody off soon - the vote is still 
going on)


>>BTW, why did file.separator fix this but the others that don't use it 
>>aren't broken?
>
>
>Who are the others? :)
>
>validate-build.xml:
>    <replace file="${build.temp}/current-jars.xml"
>             token="${basedir}${file.separator}${blocks}${file.separator}"
>             value=""/>
>
>Note ${blocks} in there.
>
>Vadim

I didn't see any commit to validate-build.xml (must have missed it)  I just 
saw this change to build.properties:

   -blocks=${src}/blocks
   +blocks=${src}${file.separator}blocks
    samples=${src}/samples
    webapp=${src}/webapp

But I guess there aren't lib jars in samples or webapp, so that clears up 
the mystery.

Geoff 


Re: Cocoon-2.1-dev build fails

Posted by Vadim Gritsenko <va...@verizon.net>.
Geoff Howard wrote:

> At 09:50 AM 3/26/2003, you wrote:
>
>> Geoff Howard wrote:
>>
>>>> Unfortunately, when validate-jars was put back in, an override 
>>>> mechanism
>>>> wasn't added so you're stuck manually editing the build file for now.
>>>>
>>>> I'll be submitting a patch to first of all add the override 
>>>> mechanism so
>>>> that this won't trip people up until the target is fixed.
>>>
>>
>> Umm... I fear I fixed the reason of the issue... I haven't change 
>> build to make validation optional - this will keep document more 
>> up-to-date.
>>
>> Vadim
>
>
> Shouldn't the jars validation be configurable though like the other 
> validations?  If it's now working, just default the validate.jars to 
> true by default.


Ok, so you will add it by yourself then ;-P


> BTW, why did file.separator fix this but the others that don't use it 
> aren't broken?


Who are the others? :)

validate-build.xml:
    <replace file="${build.temp}/current-jars.xml"
             token="${basedir}${file.separator}${blocks}${file.separator}"
             value=""/>

Note ${blocks} in there.

Vadim



Re: Cocoon-2.1-dev build fails

Posted by Geoff Howard <co...@leverageweb.com>.
At 09:50 AM 3/26/2003, you wrote:
>Geoff Howard wrote:
>
>>>Unfortunately, when validate-jars was put back in, an override mechanism
>>>wasn't added so you're stuck manually editing the build file for now.
>>>
>>>I'll be submitting a patch to first of all add the override mechanism so
>>>that this won't trip people up until the target is fixed.
>
>Umm... I fear I fixed the reason of the issue... I haven't change build to 
>make validation optional - this will keep document more up-to-date.
>
>Vadim

Shouldn't the jars validation be configurable though like the other 
validations?  If it's now working, just default the validate.jars to true 
by default.

BTW, why did file.separator fix this but the others that don't use it 
aren't broken?

Geoff


Re: Cocoon-2.1-dev build fails

Posted by Vadim Gritsenko <va...@verizon.net>.
Geoff Howard wrote:

>>Unfortunately, when validate-jars was put back in, an override mechanism
>>wasn't added so you're stuck manually editing the build file for now.
>>
>>I'll be submitting a patch to first of all add the override mechanism so
>>that this won't trip people up until the target is fixed.
>>

Umm... I fear I fixed the reason of the issue... I haven't change build 
to make validation optional - this will keep document more up-to-date.

Vadim



RE: Cocoon-2.1-dev build fails

Posted by Geoff Howard <co...@leverageweb.com>.
Here are two patches to do this.  One simply adds a new validate.jars
property to build.properties and sets it to false by default for now.  The
other uses this property to set up an unless property, and an unless
attribute on the validate-jars target.

I can submit these to bugzilla, but thought it'd be faster for now to send
them here since they're simple and the build is broken.

If anyone followed my temporary advice to modify the webapp target to remove
validate-jars, that is no longer necessary.

neil, I or someone else will have to look into the xmldb block later.

Geoff

> -----Original Message-----
> From: Geoff Howard [mailto:cocoon@leverageweb.com]
> Sent: Tuesday, March 25, 2003 10:15 PM
> To: cocoon-users@xml.apache.org
> Cc: cocoon-dev@xml.apache.org
> Subject: RE: Cocoon-2.1-dev build fails
>
>
>
> Unfortunately, when validate-jars was put back in, an override mechanism
> wasn't added so you're stuck manually editing the build file for now.
>
> I'll be submitting a patch to first of all add the override mechanism so
> that this won't trip people up until the target is fixed.
>

RE: Cocoon-2.1-dev build fails

Posted by Geoff Howard <co...@leverageweb.com>.
Here are two patches to do this.  One simply adds a new validate.jars
property to build.properties and sets it to false by default for now.  The
other uses this property to set up an unless property, and an unless
attribute on the validate-jars target.

I can submit these to bugzilla, but thought it'd be faster for now to send
them here since they're simple and the build is broken.

If anyone followed my temporary advice to modify the webapp target to remove
validate-jars, that is no longer necessary.

neil, I or someone else will have to look into the xmldb block later.

Geoff

> -----Original Message-----
> From: Geoff Howard [mailto:cocoon@leverageweb.com]
> Sent: Tuesday, March 25, 2003 10:15 PM
> To: cocoon-users@xml.apache.org
> Cc: cocoon-dev@xml.apache.org
> Subject: RE: Cocoon-2.1-dev build fails
>
>
>
> Unfortunately, when validate-jars was put back in, an override mechanism
> wasn't added so you're stuck manually editing the build file for now.
>
> I'll be submitting a patch to first of all add the override mechanism so
> that this won't trip people up until the target is fixed.
>