Generating git.properties file with git information

git, maven

Solution

I found the answer to my question. The above pom.xml has Plugins for git.properties in . In the same pom.xml I missed to add the included

    <includes>
    <include>**/*.properties</include>
    </includes>

Also in add the following(besides to PluginManagement)

        <plugin>
            <groupId>pl.project13.maven</groupId>
            <artifactId>git-commit-id-plugin</artifactId>
        </plugin>

Hope this solves your problem to generate git.properties file

Problem

I am trying to generate `git.properties` file in my project. I have added the `git-commit-plugin` dependency in `pom.xml`. Please find my code below ``` <plugin> <groupId>pl.project13.maven</groupId> <artifactId>git-commit-id-plugin</artifactId> <version>2.1.4</version> <executions> <execution> <goals> <goal>revision</goal> </goals> </execution> </executions> <configuration> <verbose>true</verbose> <dotGitDirectory>${project.basedir}/.git</dotGitDirectory> <dateFormat>MM-dd-yyyy '@' HH:mm:ss Z</dateFormat> <generateGitPropertiesFile>true</generateGitPropertiesFile> <generateGitPropertiesFilename>src/main/resources/git.properties</generateGitPropertiesFilename> <failOnNoGitDirectory>true</failOnNoGitDirectory> </configuration> </plugin> ``` Also added git.properties in gitignore file. But i cant generate the properties in my project.

Original source