beehive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eddie O'Neil <ekon...@gmail.com>
Subject beehive 933 issue and <build-pageflows>
Date Fri, 16 Sep 2005 17:04:28 GMT
  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/SharedFlow.java 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}"/>
</path>

<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"/>
</build-pageflows>

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?

Eddie

Mime
View raw message