beehive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rich Feit <>
Subject Re: beehive 933 issue and <build-pageflows>
Date Fri, 16 Sep 2005 17:14:03 GMT
I think this is happening because our apt task demands that 'srcdir' be
the root of all files that should be scanned.  The 'srcpath' just
identifies individual source roots under the main directory.  I think it
would actually be nice to be able to use filesets instead of the
'srcdir' -- what do you think?


Eddie O'Neil wrote:

>  I've got a fix for BEEHIVE-933, but I'm not sure why it makes things
>work.  Ultimately, this was caused by reorganizing the netui-blank
>project template and resulting configuration problems with how the
><build-pageflows> Ant macro is invoked.
>  The problem right now that is causing the behavior in the bug is
>that the shared flow from the tutorial in
><proj-root>/src/shared/ isn't being picked up by the
>Page Flow annotation processor.  In the repro, the Ant that builds the
>JPFs looks like:
><build-pageflows srcdir="${web.dir}"
>                 webcontentdir="${web.dir}"
>                 destdir="${build.dir}/WEB-INF/classes"
>                 tempdir="${build.dir}/WEB-INF/${tmp.sourcegen.dir}"
>                 classpathref="webapp.classpath"/>
>Obviously, the src/ directory isn't in any of the source paths, so it
>shouldn't be picked up.
>  The fix is to add a sourcepathref like:
><path id="webapp.sourcepath"> 
>    <pathelement location="${src.dir}"/>
>    <pathelement location="${web.dir}"/>
><build-pageflows srcdir="${basedir}"
>                 webcontentdir="${web.dir}"
>                 destdir="${build.dir}/WEB-INF/classes"
>                 tempdir="${build.dir}/WEB-INF/${tmp.sourcegen.dir}"
>                 sourcepathref="webapp.sourcepath"
>                 classpathref="webapp.classpath"/>
>and this works.  But, in order to make this work, I had to explicitly
>set the srcdir equal to the ${basedir}.  This is the part that I'm not
>sure about -- it needed to be there in order to keep the AptTask from
>throwing an ArrayIndexOutOfBoundsException on line 198 (should be an
>assert here...).  I've not dug deeper than this right now, and as such
>am probably missing something simple.  Any insight into why this works
>this way?
>  In the long run, it would be cool to be able to do:
><build-pageflows webcontentdir="${web.dir}"
>                         destdir="${build.dir}/WEB-INF/classes"
>                         tempdir="${build.dir}/WEB-INF/${tmp.sourcegen.dir}"
>                         classpathref="webapp.classpath">
>    <src path="src"/>
>    <src path="web"/>
>though it's best to avoid putting source files in the web/ directory
>entirely.  :)
>  Another way this could be fixed in the tutorial would be to move the
>src/shared/ file into the web/shared/ and just doc / release note it.
>  Thoughts?

View raw message