【发布时间】:2010-07-28 10:35:19
【问题描述】:
我有一个具有以下配置的网络应用程序(继承自父母的 pluginManagement)。 JSPC 可以很好地预编译我的 JSP,但是有一些非常奇怪的行为:
在我的网络应用程序中,如果我运行 mvn clean install,编译后的 JSP 类会按照我的意愿放置在目标/类中。 如果我在不清理的情况下运行 mvn install,则编译后的 JSP 将与 JSP 本身并排放置在 target/jsp-source/jsp 中
结果是在非干净运行时,它是旧版本的 JSP 类被包含在 WAR 中。
有人知道为什么会这样吗?
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jspc-maven-plugin</artifactId>
<version>1.4.6</version>
<executions>
<execution>
<id>jspc</id>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<injectString><!-- [INSERT JSPC FRAGMENT HERE] --></injectString>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.codehaus.mojo.jspc</groupId>
<!-- change tomcat6 to tomcat5 below for 5.5 compatibility -->
<artifactId>jspc-compiler-tomcat6</artifactId>
<version>2.0-alpha-3</version>
</dependency>
</dependencies></plugin>
谢谢
加里
【问题讨论】: