给定:
- 运行
mvn clean install
JSP 编译器jspc
报告问题 - 已确认问题确实存在。按原样部署代码时(不修复任何内容)JSP 在运行时被破坏
- 解决问题并部署应用程序后,问题就会消失
问题:JSPC 无法识别修复
JSPC 是如何称呼的?
<plugin>
<groupId>org.codehaus.mojo.jspc</groupId>
<artifactId>jspc-maven-plugin</artifactId>
<configuration>
<includeInProject>false</includeInProject>
<sources>
<directory>${basedir}/myapp/src/main/webapp/</directory>
<includes>
<include>**/*.jsp</include>
</includes>
</sources>
<source>1.6</source>
<target>1.6</target>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.codehaus.mojo.jspc</groupId>
<artifactId>jspc-compiler-tomcat6</artifactId>
<version>2.0-alpha-3</version>
</dependency>
</dependencies>
</plugin>
报告了什么错误?
[ERROR] MyClass cannot be resolved to a type
有关问题的更多详细信息:
关于此的类似问题here
看起来是类路径的问题,请问在pom中哪里可以设置呢?
最佳答案
尝试添加
<workingDirectory>${basedir}/myapp/target/classes</workingDirectory>
里面<configuration>
标签
关于java - JSPC 是怎么称呼的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13707063/