public static boolean hasDependency(MavenProject project, String groupId, String artifactId) {
        return getDependencyVersion(project, groupId, artifactId) != null;
    }
public static boolean hasDependency(MavenProject project, String groupId, String artifactId) {
        return getDependencyVersion(project, groupId, artifactId) != null;
    }
public static boolean hasDependency ( MavenProject project , String groupId , String artifactId ) { return getDependencyVersion ( project , groupId , artifactId ) != null ; }
Returns true if the maven project has a dependency with the given groupId and artifactId (if not null)
Returns true if the maven project has a dependency with the given groupId and artifactId ( if not null )