Patch a Single File

The Patch Plugin can be configured to apply a single patch to a file as specified:

<project>
  [...]
  <build>
    [...]
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-patch-plugin</artifactId>
        <version>1.1.1</version>
        <configuration>
          <patches>
            <patch>mylittle.patch</patch>
          </patches>
        </configuration>
        <executions>
          <execution>
            <id>patch</id>
            <phase>process-sources</phase>
            <goals>
              <goal>apply</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
    [...]
  </build>
  [...]
</project>