我如何告诉 maven 插件我的 JSP 位于“/src/main/webapp/WEB-INF/jsp”而不是“src/main/scripts”?

How can I tell maven plugin that my JSPs live in `/src/main/webapp/WEB-INF/jsp` and not `src/main/scripts`?

我有一个 Java / Spring MVC 项目,它是用 Maven 构建的(使用 Eclipse/STS)。

一切正常,我的 JSP 文件位于此文件夹中...

.../myproject/src/main/webapp/WEB-INF/jsp

我正在尝试使用 The Apache Sling JSPC Maven Plugin 将 JSP 编译成 类,并在 WAR 的 /类 中传递它们文件夹。

当我 运行 使用适当的插件构建 Maven 时,出现此错误...

java.lang.IllegalStateException: basedir .../myproject/src/main/scripts does not exist

我看来插件希望我的 JSP 生活在 /src/main/scripts

如何告诉 Maven 和插件我的 JSP 位于 /src/main/webapp/WEB-INF/jsp 而不是 src/main/scripts

您可以根据文档<sourceDirectory>尝试<sourceDirectory>https://sling.apache.org/components/jspc-maven-plugin/jspc-mojo.html