检出分支和Intellij中的排除文件

时间:2018-10-09 03:43:40

标签: java intellij-idea

当我结帐分支机构时,总是需要将某些文件夹手动重新标记为已排除,例如:enter image description here

1 个答案:

答案 0 :(得分:0)

我的pom.xml构建

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <version>${springboot.version}</version>
            <configuration>
                <addResources>true</addResources>
            </configuration>
            <executions>
                <execution>
                    <configuration>
                        <mainClass>cn.com.xxxApplication</mainClass>
                        <classifier>boot</classifier>
                    </configuration>
                    <goals>
                        <goal>repackage</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
        </plugin>
        <plugin>
            <groupId>org.codehaus.gmavenplus</groupId>
            <artifactId>gmavenplus-plugin</artifactId>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
        </plugin>

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-resources-plugin</artifactId>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-assembly-plugin</artifactId>
        </plugin>

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
        </plugin>
    </plugins>

    <resources>
        <resource>
            <directory>src/main/resources</directory>
            <includes>
                <include>**/spring.xml</include>
                <include>*.properties</include>
                <include>*.json</include>
            </includes>
            <excludes>
                <exclude>**/spring-*.xml</exclude>
            </excludes>
            <filtering>true</filtering>
        </resource>
        <resource>
            <directory>src/main/resources</directory>
            <includes>
                <include>**/*.xml</include>
                <include>**/*.properties</include>
                <include>*.json</include>
            </includes>
            <filtering>false</filtering>
        </resource>
    </resources>
</build>