Adding/prompt to add .idea/*.xml into version control

I have maven project with multiple module.  I have also enabled the integration with version control with p4.  When I open the project using the pom.xml, it generates the .idea folder and creates punch of Maven_*.xm files.  IntelliJ prompt to add these files into scm or automatically add them into scm for checkin.  I never want to add these files since it is very specific to IDE and it can be regenerated again from pom.xml.  Adding or prompting Maven_*.xml into SCM is very annoying and I did not find any option to ignore these files, anyone knows how to ignore these files for scm.  It is similar to excluding all target/* from scm.  BTW, I don't want to create file, .idea/.p4ignore and checkin into perforce.  This is just purely intellij problem not p4.

Thanks,
-Kuppa

3 comments
Comment actions Permalink

File | Settings (Preferences on Mac), then Version Control | Ignored Files.

0
Comment actions Permalink

Hi, I have a problem like "Sridharan Kuppa". But in contrast to "Kuppa" I use .p4ignore to exclude the files like Maven_*.xml from adding to perforce. The problem is, that the IDEA ignores the settings in .p4ignore file and add this files to perforce.

Does any one know how I can change this behavior?

P4 provide a command to check if the file are ignored or not. If I execute it in a console for a file like Maven_xy.xml the P4 show me, that the file is ignored by respective .p4ignore file:

e.g.

>p4 ignores -v -i Maven__xy.xml
>Maven_xy.xml ignored by C:\p4ignore\.p4ignore:5:*.xml

However the IDE add this file to P4.

 

My System:

Windows 10

IntelliJ IDEA 2019.2.3

P4: 2019 Januar 29

0
Comment actions Permalink

> The problem is, that the IDEA ignores the settings in .p4ignore

Ignore settings in Perforce are determined by the P4IGNORE environment variable.

Probably, this variable is not set in the IDE context. E.g. if you configured it while IDE was running, P4IGNORE is not known for the IDE.

To reload the environment, restart the IDE. If you use Toolbox App to start the IDE, restart it as well, as variables are inherited from the parent process.

0

Please sign in to leave a comment.