Overlap dependencies of the maven libraries

Represent the situation where your project is using some library from the maven repository, having a stable build number and inclusion of standard way in pom.xml through dependencies. And at some point comes the need to validate of the build and execution of your project with a newer version the same library (e.g. SNAPSHOT-version), but which, for some reason, there isn't still available in the maven repository.

In this case the described plugin provides possibility to put a new version of the library into the project (e.g. in the lib/ directory) and with the overlapDependencyMatch parameter configuration check the build with this version of the library, without changing the global structure of dependencies of your project. The plugin simply redefine the dependency for further compilation found the coincidence of libraries.

Example all the above is as follows (assuming that we will use the new test version foo-1.1-SNAPSHOT.jar instead of the stable maven repository library foo-1.0.jar during the build):

<project>
    ...
    <dependencies>
        ...
        <dependency>
            <artifactId>foo</artifactId>
            <version>1.0</version>
        </dependency>
        ...
    </dependencies>
    ...
    <build>
        ...
        <plugins>
            <plugin>
                <groupId>org.hedgecode.maven.plugins</groupId>
                <artifactId>classpath-maven-plugin</artifactId>
                <version>1.0</version>
                <configuration>
                    <path>lib/foo-1.1-SNAPSHOT.jar</path>
                    <isMask>false</isMask>
                    <overlapDependencyMatch>true</overlapDependencyMatch>
                </configuration>
            </plugin>
        </plugins>
        ...
    </build>
    ...
</project>