Test compile jsp not working with target/source 11
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 935
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 17
Description
### Apache NetBeans version
Apache NetBeans 19
### What happened
After migrating my project on java 11, I can't build the project with the option "Test compile all JSP files during build".
Whit this flag off the build ends without errors. But with flag on, I get the error:
```
Exception in thread "main" java.lang.IllegalArgumentException: PWC6309: Illegal compilerSourceVM: 11
at org.apache.jasper.JspC.setCompilerSourceVM(JspC.java:684)
at org.netbeans.modules.web.project.ant.JspC.main(JspC.java:55)
C:\Users\andre\Work\Projects\EramCore2\Eram\nbproject\build-impl.xml:927: Java returned: 1
BUILD FAILED (total time: 15 seconds)
```
My java distribution is Corretto-11.0.12.7.1
### How to reproduce
1. Create a new project: Java with Ant -> JavaWeb -> WebApplication
2. Select Tomcat as target server (in my case Tomcat 9.0.82)
3. Select Java EE 8 Web as Java EE Version
4. Complete the wizard
6. Right click on project and select properties: enable "Test compile all JSP files during build" in Build -> Compiling
5. Create a new jsp
6. Build the project
### Did this work correctly in an earlier version?
No / Don't know
### Operating System
Windows 11
### JDK
JDK 11
### Apache NetBeans packaging
Apache NetBeans provided installer
### Anything else
_No response_
### Are you willing to submit a pull request?
No
Contributor guide
Research direction
Start with nbproject/build-impl.xml around line 927 and the org.netbeans.modules.web.project.ant.JspC entry point mentioned in the stack trace. Reproduce the Java 11 web project build with JSP test compilation enabled and trace the PWC6309 compilerSourceVM error; done means the JSP compilation completes successfully for the described configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100