1

如果没有更改,有没有办法不将 test.html 提交给 scm?

因为,当您使用git commit提交未更改的文件时,它不会提交任何内容

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-scm-plugin</artifactId>
    <version>1.9.2</version>
    <configuration>
        <connectionType>connection</connectionType>
    </configuration>
    <inherited>false</inherited>
    <executions>
        <execution>
            <id>add-version-to-git</id>
            <phase>package</phase>
            <goals>
                <goal>checkin</goal>
            </goals>
            <configuration>
                <basedir>${project.basedir}</basedir>
                <includes>test.html</includes>
                <message>Test HTML Update</message>
            </configuration>
        </execution>
    </executions>
</plugin>
4

1 回答 1

0

可以使用 Maven 配置文件激活,例如:

<activation>
    <property>
        <name>testChanged</name>
    </property>
</activation>  

可以在进行更改的位置设置testChanged属性。

于 2016-10-27T11:29:41.477 回答