This Question is Possibly Answered

1 "correct" answer available (4 pts) 1 "helpful" answer available (2 pts)
4 Replies Last post: Jul 1, 2013 5:27 PM by Alexander Chernikov  
Eugene Mustaphin Newbie 4 posts since
Mar 11, 2012
Currently Being Moderated

Jun 28, 2013 7:50 AM

Moving from NetBeans to IDEA, have a couple of questions

Hello,

 

I'm trying to move from NetBeans to Intellij IDEA and have some difficulties. Could you help me finding out the right way to achieve the following please?

 

We in our company have about 70 different maven-based web-projects (most of them are unrelated JAX-WS webservices, some webapps and several common libs) and usually I have to work on 2-3 of them each day. In NetBeans I just open the projects I'm going to work on and close the projects I don't need.

 

As far as I understood, to work on several projects at the same time in IDEA I have to create a project and add them as modules.

The first question is which is the right way in IDEA to handle many modules when I only need few of them? Have all 70 modules loaded in the project or Import the modules I'm going to work on and then remove them when I stop working on them?

 

Another thing is debugging under Tomcat. In Netbeans I have a single built-in Tomcat. When I hit Debug in any project, it's built and deployed to this Tomcat under context path according to pom.xml's <finalName>. Is there a way to have something like this in IDEA? Or do I have to manually create run/debug config for each of 70 modules?

 

Thank you in advance!

Mark Vedder Apprentice 912 posts since
Dec 10, 2003
Currently Being Moderated
Jun 28, 2013 9:10 PM in response to: Eugene Mustaphin
Re: Moving from NetBeans to IDEA, have a couple of questions

My personal recommendation would be to define a separate IDEA project for each of your projects. The only rationale for defining a multi-module project is to have everything in one window. It's mostly former Eclipse and NetBeans users that desire doing such since they are use to those IDE's having the "workspace" concept. While it may take you a little bit to get use to, in the end having a separate IDEA project for each of your projects will be easier to manage. And you may end up liking it. I had one co-worker that when first trying IDEA kicked and screamed constantly about IDEA not having a workspace like Eclipse for the first couple of weeks. Ultimately, he ended up preferring the one project = one window concept after using it for a bit.You can easily switch between project windows using the Ctrl+Alt+[ and Ctrl + Alt+] shortcuts (or via the menu Window > Next/Previous Project Window). Given that they are unrelated projects, I see no benefit to defining them as modules in a single project. Keep in mind a module can be used in multiple projects. So if you do create 70 different projects, you can still create a project that loads a few (or all) of the modules from those projects.

 

Regarding Tomcat, I am not familiar with any way to auto create a run/debug config for a webapp. You can for many other things (main classes / application, maven tasks, etc). It'd definitely be a nice feature enhancement. I'd suggest you make a request for it: http://youtrack.jetbrains.com

Denis Zhdanov Expert 1,620 posts since
Oct 20, 2007
Currently Being Moderated
Jun 30, 2013 11:17 AM in response to: Eugene Mustaphin
Re: Moving from NetBeans to IDEA, have a couple of questions

Hi Eugene,

 

AFAIK we don't have a facility to automatically create tomcat run configuration on pom.xml basis. Asked our maven guy to confirm.

 

Denis

Alexander Chernikov JetBrains 1,013 posts since
Jan 11, 2007
Currently Being Moderated
Jul 1, 2013 5:27 PM in response to: Eugene Mustaphin
Re: Moving from NetBeans to IDEA, have a couple of questions

Hi.

 

In IDEA you can run/debug from context. Select a file inside web application, like index.jsp, check context menu: there are Run and Debug actions. They create temporary run confuguration and start it. (In short, "temporary" means that it may disappear after a while, you have to "Save" it if necessary.) The definition of the web artifact used for that configuration is imported from Maven.

 

For further information please search IDEA documentation for "run/debug configuration" and "artifact" terms.

 

Regards,

Alexander.

More Like This

  • Retrieving data ...