Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xml files are not copied to target intellij idea

I have some xml files within the source folder along with the java files. Intellij Idea is not copying them to the target folder. I want those xml files to be along with the classes in the target. Eclipse does this fine.

Can anyone please tell how to achieve this in Intellij Idea?

like image 609
Vikash Balasubramanian Avatar asked Jun 26 '15 15:06

Vikash Balasubramanian


People also ask

What is target file in IntelliJ?

Last modified: 08 March 2021. IntelliJ IDEA lets you create a meta target for your Ant build file. A meta target can contain several different targets of your choosing. Those targets will be executed in the specified order. In this case, you don't need to change the Ant build script itself.

How do I copy a file in IntelliJ?

You can use ⇧⌘N (macOS), or Ctrl+Alt+Shift+Insert (Windows/Linux) to create a new scratch file. If you have content selected then the new scratch file will contain that content.


1 Answers

If, like me, the other answer didn't solve your problem -

If IDEA thinks your project is a Maven module (or once was), and it isn't, it'll behave like this. You can fix this by closing the project, editing the .iml file to remove the isMavenModule property, reopening, and rebuilding:

<moduleorg.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true"type="JAVA_MODULE" version="4">

like image 73
ilikesleeping Avatar answered Sep 21 '22 20:09

ilikesleeping