You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue Description
We are using jetty-jspc-maven-plugin to compile JSP in our build.
We have some maven-projects that contain only taglibs (tld files) but no jsp files.
Sadly, these taglibs are not compiled when the project is compiled.
It seems jetty-jspc-maven-plugin does a top to bottom approach, starting with jsp files and including everything in the compilation that is reachable from these.
Because our taglib project does not contain a jsp file, nothing is compiled.
When including tag files explicitly ( <includes>**/*.tag, **/*.jsp, **/*.jspx</includes> ) then these are still considered as jsp files and it results in an error: [<%@ tag] directive can only be used in a tag file
Desired Solution
Include an option compileUnusedTaglibs (name is only a suggestion).
It should search for tld files and compile everything that is reachable from these.
Motivation
At the moment, our taglib is only compiled as part of a later project.
Sadly, project dependencies are not enforced because of this.
Example:
TaglibProject is Referenced by WebAppProject.
TaglibProject uses Java classes from WebAppProject prematurely in tag files
TaglibProject tag files are not compiled yet. Thus no error.
WebAppProject is compiled. The prematurely used Java files are not present. Thus no error.
It works. But it would be better for our project structure, if it would not be possible to use classes from later projects prematurely in tag files or earlier projects. taglib compilation would enforce this.
Workaround: Create a dummy jsp file that includes the tag files of the taglib project. They will be compiled then because they are reachable from a jsp file.
The text was updated successfully, but these errors were encountered:
Workaround: Create a dummy jsp file that includes the tag files of the taglib project. They will be compiled then because they are reachable from a jsp file.
Does not seem to work because JSP files cannot be placed in taglib projects (see #8317 for details)
@achimmihca I think this is in the same category as #8317, in that this is the way that jspc is working, so would need an issue raised over at Apache Jasper?
Jetty version
jetty-jspc-maven-plugin 9.4.43.v20210629
Java version
17
Issue Description
We are using jetty-jspc-maven-plugin to compile JSP in our build.
We have some maven-projects that contain only taglibs (tld files) but no jsp files.
Sadly, these taglibs are not compiled when the project is compiled.
It seems jetty-jspc-maven-plugin does a top to bottom approach, starting with jsp files and including everything in the compilation that is reachable from these.
Because our taglib project does not contain a jsp file, nothing is compiled.
When including tag files explicitly (
<includes>**/*.tag, **/*.jsp, **/*.jspx</includes>
) then these are still considered as jsp files and it results in an error:[<%@ tag] directive can only be used in a tag file
Desired Solution
Include an option
compileUnusedTaglibs
(name is only a suggestion).It should search for tld files and compile everything that is reachable from these.
Motivation
At the moment, our taglib is only compiled as part of a later project.
Sadly, project dependencies are not enforced because of this.
Example:
TaglibProject
is Referenced byWebAppProject
.TaglibProject
uses Java classes fromWebAppProject
prematurely in tag filesTaglibProject
tag files are not compiled yet. Thus no error.WebAppProject
is compiled. The prematurely used Java files are not present. Thus no error.It works. But it would be better for our project structure, if it would not be possible to use classes from later projects prematurely in tag files or earlier projects. taglib compilation would enforce this.
Workaround: Create a dummy jsp file that includes the tag files of the taglib project. They will be compiled then because they are reachable from a jsp file.
The text was updated successfully, but these errors were encountered: