[英]How can I tell maven plugin that my JSPs live in `/src/main/webapp/WEB-INF/jsp` and not `src/main/scripts`?
I have a Java / Spring MVC project that's built with Maven (using Eclipse/STS).我有一个使用 Maven(使用 Eclipse/STS)构建的 Java / Spring MVC 项目。
Everything works great and my JSP files live in this folder...一切正常,我的 JSP 文件位于此文件夹中...
.../myproject/src/main/webapp/WEB-INF/jsp
I'm trying to use The Apache Sling JSPC Maven Plugin to compile the JSPs into classes, and deliver them in the WAR's /classes folder.我正在尝试使用Apache Sling JSPC Maven 插件将 JSP 编译成类,并将它们传递到 WAR 的 /classes 文件夹中。
When I run the maven build with the plugin in place, I get this error...当我使用插件运行 maven 构建时,我收到此错误...
java.lang.IllegalStateException: basedir.../myproject/src/main/scripts does not exist
I appears the plugin expects my JSPs to live in /src/main/scripts
.我似乎插件希望我的 JSP 存在于/src/main/scripts
中。
How can I tell maven and the plugin that my JSPs live in /src/main/webapp/WEB-INF/jsp
and not src/main/scripts
?如何告诉 maven 和我的 JSP 位于/src/main/webapp/WEB-INF/jsp
而不是src/main/scripts
的插件?
You can try <sourceDirectory>
as per the documentation https://sling.apache.org/components/jspc-maven-plugin/jspc-mojo.html您可以按照文档https://sling.apache.org/components/jspc-maven-plugin/jspc-mojo.ZFC35FDC70D5FC69D269883A82EZA7尝试<sourceDirectory>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.