How to add Jboss server in IntelliJ

Viewed 54804

Does anyone know how to setup JBoss server in IntelliJ and debug J2EE application from within the IDE?

When I click on + sign in Settings > Plugins there is no option for JBoss.

6 Answers

Go to Run > Edit Configurations. Select + > JBoss Server > Local. Name the configuration (for example "WF15") Press Configure and browse to the installation path of WildFly. Go to the Deployment tab and add the exploded WAR Go back to the Server tab and select "Redeploy" from On 'Update' action; uncheck the "Show Dialog" Run the configuration WildFly will start and deploy the exploded WAR. A server tab "WF15" will appear at the base of the IDE.

In case you want to use Intellij in ubuntu for project1 development, debug and git operations then use following steps :-

Import project1 in intellij as normal project.

To start jboss without eclipse use following

Go to terminal JBOSS_HOME/bin

To start project1 , with debug port /home/applicationName/.sdkman/candidates/java/current/bin/java -Xrunjdwp:transport=dt_socket,address=,server=y,suspend=n -Dprogram.name=JBossTools: -server -Xms64m -Xmx512m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Djava.net.preferIPv4Stack=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Dorg.jboss.boot.log.file=/home/applicationName//wildfly-9.0.1.Final/standalone_project1/log/boot.log -Dlogging.configuration=file:/home/applicationName//wildfly-9.0.1.Final/standalone_project1/configuration/logging.properties -Djboss.home.dir=/home/applicationName//wildfly-9.0.1.Final -Dorg.jboss.logmanager.nocolor=true -Djboss.bind.address.management=localhost -Dfile.encoding=UTF-8 -classpath /home/applicationName//wildfly-9.0.1.Final/jboss-modules.jar:/home/applicationName/.sdkman/candidates/java/current/jre/lib/resources.jar:/home/applicationName/.sdkman/candidates/java/current/jre/lib/rt.jar:/home/applicationName/.sdkman/candidates/java/current/jre/lib/jsse.jar:/home/applicationName/.sdkman/candidates/java/current/jre/lib/jce.jar:/home/applicationName/.sdkman/candidates/java/current/jre/lib/charsets.jar:/home/applicationName/.sdkman/candidates/java/current/jre/lib/jfr.jar org.jboss.modules.Main -mp /home/applicationName//wildfly-9.0.1.Final/modules -jaxpmodule javax.xml.jaxp-provider -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -b 0.0.0.0 --server-config=standalone.xml -Djboss.server.base.dir=/home/applicationName//wildfly-9.0.1.Final/standalone_project1 -Dcom.sun.jersey.server.impl.cdi.lookupExtensionInBeanManager=true -Djboss.node.name=project1

Replace java path /home/applicationName/.sdkman/candidates/java/current with your java path in above commands.
Replace wildfly path /home/applicationName//wildfly-9.0.1.Final with your wildfly path in above commands.

Now configure intellij to debug to remote application.

Note, we have still possibility to improve this command by replacing JBOSS_HOME, JAVA_HOME and others, which I haven't done yet.

Related