Is it possible to adopt IntelliJ IDEA Community Edition for web-development?

21,315

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.

Share:
21,315

Related videos on Youtube

hades
Author by

hades

Updated on December 26, 2020

Comments

  • hades
    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
      niutech almost 10 years
      I would recommend using Netbeans instead. It has a strong support for both Java and HTML5. And it is free!
  • hades
    hades about 13 years
    I 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
    gcooney about 13 years
    Just 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
    MalsR about 13 years
    +1 For useful information regarding Tomcat and IntelliJ CE had a peep at your link (its bookmarked!).
  • Bartosz Radaczyński
    Bartosz Radaczyński over 11 years
    the content is no longer available on knol :(
  • ZhaoGang
    ZhaoGang over 7 years
    I 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
    ZhaoGang over 7 years
    Another thin is that I can not find any link in this post :(
  • Leon
    Leon over 6 years
    gradle has war plugin. So you can add apply plugin: 'war' directly.