Is it possible to adopt IntelliJ IDEA Community Edition for web-development?
Solution 1
Sure it's possible. I mean, it's possible to do web development in a text editor. The real question is what do you lose/how much of a pain it is. Some things that you will need to set up:
- A task to build and deploy your WAR file locally(ant, maven, etc.)
- To debug your project in IntelliJ CE, you'll need to spend some time setting up a run profile to launch your application server.
Even with that stuff set-up, you'll still be missing any convenience features specific to web development(beans won't automatically show links to relevant xml configurations, getters/setters used for dependency injection will probably show unused method warnings, etc.)
I'd say whether IntelliJ CE is a reasonable choice for web-development depends on how strongly you prefer IntelliJ to other editors, how comfortable you are with web-development in general(since you won't get any editor suggestions or warnings), and how complex the web components of your project are.
Solution 2
EDIT: This answer is now outdated. There is a war plugin in gradle that can be used directly by IntelliJ. Original contents follow, but please don't do this anymore.
We were using this gradle file:
apply from: 'https://raw.githubusercontent.com/icoloma/gradle-plugins/master/webapp.gradle'
group = 'com.mycompany'
version = '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
providedCompile group: 'javax.servlet', name: 'javax.servlet-api', version:'3.0.1'
}
Then execute gradle idea
or gradle eclipse
to generate a project that can be deployed in IntelliJ Community Edition.
The long explanation is available here and the source code is available as a Github project.
Related videos on Youtube
hades
Updated on December 26, 2020Comments
-
hades over 3 years
Currently I'm using IntelliJ IDEA for non-web projects, but I'd love to use it for web development. Unfortunately IntelliJ IDEA Ultimate Edition's price (220 Euro) is to high for me currently and that's why I'm forced to use STS(Springsource Tool suite).
And I'm wondering is there a way to adopt IntelliJ IDEA CE version for web-development? Of course I could just use crack or write one but it's not my style.
-
niutech almost 10 yearsI would recommend using Netbeans instead. It has a strong support for both Java and HTML5. And it is free!
-
-
hades about 13 yearsI prefer to use IntelliJ IDEA because it makes my life easier in non-web development. OK, I understood your position. I'll better use STS some time until I decide to buy fully featured IntelliJ IDEA Ultimate Edition. Thanks for a comment.
-
gcooney about 13 yearsJust to be clear. I'm currently using IntelliJ CE for a project with a web component and it's working fine. I just wanted to make sure you were aware of the challenges involved in doing so.
-
MalsR about 13 years+1 For useful information regarding Tomcat and IntelliJ CE had a peep at your link (its bookmarked!).
-
Bartosz Radaczyński over 11 yearsthe content is no longer available on knol :(
-
ZhaoGang over 7 yearsI was also consider such a problem fro a recent project, after some investigation, in my understanding, there is not an easy way to use IntelJ CE for a Java web project.
-
ZhaoGang over 7 yearsAnother thin is that I can not find any link in this post :(
-
Leon over 6 yearsgradle has
war
plugin. So you can addapply plugin: 'war'
directly.