Reputation: 11377
I'm trying to migrate from Eclipse to Intellij, at the moment I have all the projects properly imported (projects are huge and correlated), and Maven builds are successfully executing. But IntelliJ shows lot of different compilation problems in Java files which are not possible as Maven is building.
I don't need to run anything with IntelliJ, I just build Maven artifact and deploy it on sandbox deployments and use remote debug to work with project. In short I don't need IntelliJ to compile Java files itself, I need it to use Maven output directories with class files and only show compilation issues if Maven can't build it.
In Eclipse I simply disable automatic project build and just edit my Java code and build with Maven. I don't know what's the alternative here.
How can I use Maven target directories instead of IntelliJ's out directory?
Upvotes: 1
Views: 5928
Reputation: 16110
Highlight your project root in the project panel and press F4. Select Modules
in the project settings window in the upper left. Select your project's parent folder in the long panel to the right of this. On the right of that, in the Path's tab, you'll find your project's output path. You can edit this to be anything you like.
Because I've imported a maven project, my output path end in target/classes and target/test-classes respectively. I have the option to exclude output paths selected.
Upvotes: 1
Reputation: 11280
Import your maven projects as maven modules in IntelliJ : http://wiki.jetbrains.net/intellij/Creating_and_importing_Maven_projects
IntelliJ is smart enough to figure out what the source folders and class folders are (even when modified in the pom.xml file)
Upvotes: 1
Reputation: 1784
Hum. I think you only need to import your project as a maven project.
Idea will never produce any classes, as long as you don't use "Compile project_name" or "Make project_name" explicitly (unlike eclipse which always build everything by default).
Upvotes: 2