Intellij with JBoss as 7 modules

Hi, everyone

I am new to IntelliJ and used to Eclipse behaviour. I am fine with Java and just getting into Java EE. When using JBoss AS 7 as the app server, under the Project > External Libraries > JBoss 7.1.1.Final node, there are only three libraries. jboss-ejb-api, jboss-jsp-api, and jboss-servlet-api. When I add a facet, such as CDI, Intellij wants to download and put it in the lib folder of the project. I thought the point of using a Java EE compliant server was that it provided implementations to all the specs. But Intellij doesn't use any of the jars in jboss-home/modules folder. I've done a lot of googling and reading. I know AS 7 has a new class/module loading mechanism and can include the dependencies at deploy time, but nothing works in intellij during development.

I'm good at figuring out details normally but I just don't have as much time as I used to and I'm very curious about this.

what is the correct way to use JBoss with Intellij and have it use the EE 6 implementations that JBoss provides without having to have Intellij download them into the projects lib directory? I feel like I'm missing something obvious or simple here.

Thanks for your time,


Comment actions Permalink


Indeed, on addition of an application server, IDEA registers just a minimal set of JavaEE jars as the application server library.
Yet, you may configure a library with required JavaEE jars in a number of ways:
1) add the jars to the application server library at the Application Servers dialog (Settings -> IDE settings -> Application Servers or via an application server run configuration)
2) create a new library with the jars: Project Structure -> Modules -> <a module> -> Dependencies tab -> [+] -> Library -> New library,
    (note, in the 'Configure Library' dialog you'll be able to choose library scope - either Module, Project or Global)
3) with a framework or facet, for instance with the CDI: you may choose 'Use library', then press 'Create' and speicify the jars you want to be in the library.


Comment actions Permalink

Thanks for the reply.

Yes, JBoss AS 7 was throwing me off especially because it's all divided into module subfolders and I was thinking, this can't be the way everyone else is adding their libraries. The way to go is with the JBoss provided maven archetypes for sure. But, I was just trying to understand things. Thanks for helping with that.



Please sign in to leave a comment.