0

I've been trying to change from eclipse to IntelliJ, in order to give it a try with a real project we're in.

My problem is that when I try to compile and debug the project, it fails since tomcat can't figure out where are some resource files that are common to the project.

The project consists in 14 WARs...

Project Structure

...which are tied together in eclipse through some enviroment variables and, and this is the point, some classpath's links to a common resource folder.

In eclipse, I just set this scenario like this: Common resources folder conf. in eclipse

Eclipse Enviroment Variables

However, when I try to do the same in IntelliJ, I can't figure out how to do the same.

I have tried to just import the projects (modules), and configure the artifacts to be deployed, like this:

enter image description here

Artifact in IntelliJ

TomcatConfigurationInIntelliJ

However, I don't know how to do the same stuff regarding to classpath configuration in IntelliJ.

I try to depluy and run, but tomcat, thoughtout IntelliJ, complaints like this:

enter image description here

I have figured out how to solve this issue by including, manually, this common resource folder like this:

Include Folder

This way, tomcat starts without complaining. But I have to include this folder like this way in every single EAR!

I think there should be a way to configure it in IntelliJ like in eclipse, without having to include this folder in every artifact.

I have tried to run maven deployment instead of a normal IntelliJ Build. I also tried to include this common resources folder as a JDK dependency.

I have read articles regarding this classpath stuff in eclipse and in IntelliJ like this, and this, without any success.

Thanks in advance!

Community
  • 1
  • 1

1 Answers1

0

Now I could figure out how to perform same functionality that with eclipse.

Eclipse makes a copy of the entire server, and let you configure classpath stuff "from within". While IntelliJ is less coupled with any particular server configuration, and just deploys whatever maven is being build to whatever server you had setup.

So all I needed to do was configuring that server in order to define its own classpath dependencies and enviroment settings, like this:

Setting Tomcat Classpath dependencies

enter image description here

Here, we have to avoid back slashes.

Enviroment variables can be set up within IntelliJ.

And then, everything worked.

Thanks to CrazyCoder to point on the right direction...