SeeMoreGain SeeMoreGain - 1 year ago 221
Git Question

Intellij -Project structure settings (spring facet config) - where are they stored?

Have a project that I am migrating over from netbeans to intellij.

Intellij recognises the spring config files and gives the warning "please configure/setup spring facet for modules". This requires manually adding these under project structure settings.

I don't want the other team members to all have to do this manually, so I wish to check these settings into git, but according to that, there are no changed files in the project directory (I have standard ignores added to .gitignore). I have also tried searches of file contents for the config file names etc and that turns up nothing too.

So my question is where are the settings stored? In a file that is typically on the ignored list or in a location external to the project directory?

Answer Source

Essentially all the IDEA related configuration for the project is under .idea folder, for example, all the project workspace iteams you can find in the .idea/worksapce.xml, include the spring features you mentioned.

But this is not a good idea to keep those things in your VCs, the .idea folder is ignore default as in the configuration items will store you local env related like the full path to your local gradle, e.g.

<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="GradleSettings">
    <option name="linkedExternalProjectsSettings">
        <option name="distributionType" value="LOCAL" />
        <option name="externalProjectPath" value="$PROJECT_DIR$" />
        <option name="gradleHome" value="C:/DevTools/gradle-2.14.1" />
        <option name="gradleJvm" value="#JAVA_HOME" />
        <option name="modules">
            <option value="$PROJECT_DIR$" />
        <option name="useAutoImport" value="true" />
        <option name="myModules">
            <option value="$PROJECT_DIR$" />

Here are some files under the .idea folder for my proejct

enter image description here


For the spring facets, it's under the module .iml file, like

<component name="FacetManager">
    <facet type="Spring" name="Spring">
        <fileset id="fileset" name="Spring Application Context" removed="false">
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download