shuber      2004/09/16 14:48:39 CEST

  Modified files:
    .                    plugin.jelly 
  Log:
  Bugfix in processing order. Jasper needs the webapp already built in order to 
correctly process <jsp:useBean> class references.
  
  Revision  Changes    Path
  1.2       +11 -11    maven-jahiawar-plugin/plugin.jelly
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/maven-jahiawar-plugin/plugin.jelly.diff?r1=1.1&r2=1.2&f=h
  
  
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/repository/maven-jahiawar-plugin/plugin.jelly,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- plugin.jelly      10 Sep 2004 13:07:40 -0000      1.1
  +++ plugin.jelly      16 Sep 2004 12:48:38 -0000      1.2
  @@ -14,21 +14,19 @@
         />
     </define:taglib>
   
  -  <preGoal name="war:webapp">
  -    <j:set var="precompileJsp" value="${maven.jahiawar.precompile.jsp}"/>
  -    <j:if test="${precompileJsp == 'true'}">
  -      <attainGoal name="jahia:precompile-jsp"/>
  -    </j:if>
  -  </preGoal>
  -
     <postGoal name="war:webapp">
       <j:set var="precompileJsp" value="${maven.jahiawar.precompile.jsp}"/>
       <j:if test="${precompileJsp == 'true'}">
  +      <attainGoal name="jahia:precompile-jsp"/>
         <j:set var="target" 
value="${pom.getPluginContext('maven-war-plugin').getVariable('maven.war.webapp.dir')}"/>
         <util:available file="${maven.build.dir}/web-fragment.xml">
           <util:loadText var="fragment" file="${maven.build.dir}/web-fragment.xml"/>
           <ant:replace file="${target}/WEB-INF/web.xml" token="&lt;!-- [INSERT 
FRAGMENT HERE] --&gt;" value="${fragment}"/>
         </util:available>
  +      <!-- We now need to copy the compiled classes to the WEB-INF/classes 
directory. -->
  +      <copy todir="${maven.war.webapp.dir}/WEB-INF/classes">
  +        <fileset dir="${maven.build.dest}"/>
  +      </copy>
       </j:if>
   
       <j:set var="useSharedLibs" value="${maven.jahiawar.usesharedlibs}"/>
  @@ -39,11 +37,11 @@
        </j:if>
     </postGoal>
   
  -  <goal name="jahia:precompile-jsp" description="Precompile all JSPs into java 
classes, and then into classes" prereqs="war:load,java:compile">
  -    <j:set var="warSource" 
value="${pom.getPluginContext('maven-war-plugin').getVariable('maven.war.src')}"/>
  +  <goal name="jahia:precompile-jsp" description="Precompile all JSPs into java 
classes, and then into classes">
  +    <j:set var="warSource" 
value="${pom.getPluginContext('maven-war-plugin').getVariable('maven.war.webapp.dir')}"/>
       <ant:mkdir dir="${maven.build.dir}/jspc"/>
  -    <ant:mkdir dir="${maven.build.dir}/jspc-processed"/>
  -    <ant:mkdir dir="${maven.build.dir}/jspc-classes"/>
  +    <!--ant:mkdir dir="${maven.build.dir}/jspc-processed"/-->
  +    <!--ant:mkdir dir="${maven.build.dir}/jspc-classes"/-->
   
       <j:set var="jspOutDir" value="${maven.build.dir}/jspc"/>
       <j:set var="jspClassesOutDir" value="${maven.build.dest}"/>
  @@ -62,6 +60,7 @@
         <ant:path refid="maven.dependency.classpath"/>
         <ant:pathelement path="${maven.build.dest}"/>
       </ant:path>
  +    <echo>Generating Java source from JSPs, using warSource=${warSource}...</echo>
       <jasper:JspC
         webXmlFragment="${maven.build.dir}/web-fragment.xml"
         package="${pom.package}.jsp.${maven.war.final.name}"
  @@ -70,6 +69,7 @@
         uriroot="${warSource}"
         uribase="/${pom.artifactId}"
         verbose="2"/>
  +    <echo>Compiling generated source...</echo>
       <ant:javac
         srcdir="${jspOutDir}"
         destdir="${jspClassesOutDir}"
  

Reply via email to