鉴于:


运行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>标记内

09-10 14:45