How to use Java EE: Web classes in 2021.2 Follow
Answered
With upgrading to 2021.2 some dependencies from the Java EE: Web (com.intellij.javaee.web) were removed
import com.intellij.javaee.web.WebUtil;
import com.intellij.javaee.web.facet.WebFacet;
import com.intellij.psi.impl.source.jsp.WebDirectoryUtil;
import com.intellij.psi.impl.source.resolve.reference.impl.providers.WebPathReferenceProvider;
This was probably due to the announced unbundling: https://plugins.jetbrains.com/docs/intellij/api-notable-list-2021.html#notable-changes-in-intellij-idea-20212
What is the migration path for these removed classes? Do I need new module dependencies?
Current plattform plugins:
platformPlugins = com.intellij.java,com.intellij.jsp,com.intellij.spring,com.intellij.javaee.web,com.intellij.css
Please sign in to leave a comment.
After unbundling plugins from the IDE, you have to set a dependency to them manually – i.e., to include Java EE: Enterprise Java Beans (EJB) plugin in your build, add its ID (com.intellij.javaee.ejb) both to the Gradle properties (platformPlugins property) and plugin.xml.
Thanks for your answer, unfortunately this does not work for me. IntelliJ does not find this plugin.
ejb is also not part of the code completion and marked red in the plugin.xml.
The error message says that it cannot find a builtin plugin, after unbundling its probably not a builtin plugin any more. Do I have to reference not builtin plugins different or enable their usage?
You said that theses classes moved to ejb module. How can I find out such information by myself: Which classes reside in which module. This is easy for Community Edition, but how to do this for the non open source part?
When referring to plugins which are _not_ bundled (like com.intellij.javaee.ejb), you must specify compatible version number explicitly in Gradle dependencies.
https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html#locating-plugin-id-and-preparing-sandbox
Thanks Yann, that brought me one step further. After adding the EJB version and also the transitive JPA dependency of EJB IntelliJ can build the project and I can start runIde.
But unfortunately buildPlugin still fails at task buildSearchableOptions:
Any ideas? Is there a different classpath for building and running? How can I debug/log the classpath?
Relevant project information:
non bundled EJB plugin now there
build/idea-sandbox/plugins
Due to the fixed EJB dependency I had to pin the compatiblity range to 2021.2 only.
gradle.properties
plugin.xml
If you don't require searchable options, you can disable it completely https://github.com/JetBrains/gradle-intellij-plugin/blob/master/FAQ.md#how-to-disable-building-searchable-options
JPA plugin itself has these dependencies, please try adding missing ones as well
Disabling searchable options solved my problem. Didn't expect that it is an optional task. Thanks a lot for your help.
For others which read this, here's also the Kotlin DSL variant: