Hi,

I am using jspc-maven-plugin to precompile jsps. Everything works fine. I
can see jsps are compiled, jspweb.xml is generated correctly, and I can also
see web-fragment.xml.  But when I open the generated .war file, I see the
web.xml is not changed - there is no mapping for generated classes.

My questions is: if I deploy the generated war to server, then the generated
jsp classes will never be called because in web.xml no mapping for them.
Should I add maven-antrun-plugin to 1). open the generated war. 2). rename
the jspweb.xml to web.xml 3). move it under WEB-INF to overwrite the
original web.xml? Is this step mandatory, or there is a simple way work
around. I searched the entire web, but didn't find the answer. Could soemone
help me? thanks,
The following is my pom.xml fragment:


<build>
    <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>jspc-maven-plugin</artifactId>
        <executions>
           <execution>
               <id>jspc</id>
                  <goals>
                     <goal>compile</goal>
                  </goals>
           </execution>
         </executions>
         <configuration>
            <webXml>${basedir}/target/jspweb.xml</webXml>
            <injectString>&lt;!-- [INSERT FRAGMENT HERE]
--&gt;</injectString>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-war-plugin</artifactId>
        <version>2.0</version>
        <configuration>
          <webResources>
            <resource>
              <directory>${basedir}/src/main/webapp</directory>
              <filtering>false</filtering>
            </resource>
          </webResources>
          <webXml>${basedir}/target/jspweb.xml</webXml>
        </configuration>
      </plugin>
 <plugin>

Reply via email to