/** * Creates a new {@link MavenDependency} instance from the specified properties. If no {@link ScopeType} is * specified, default will be {@link ScopeType#COMPILE}. * * @param coordinate A coordinate of the new {@link MavenDependency} instance. * @param scope A scope of the new {@link MavenDependency} instance. Default will be {@link ScopeType#COMPILE}. * @param optional Whether or not this {@link MavenDependency} has been marked as optional; defaults to <code>false</code>. * @param exclusions Exclusions of the new {@link MavenDependency} instance. * @return The new {@link MavenDependency} instance. * @throws IllegalArgumentException * If the coordinate is not supplied * @throws CoordinateParseException * If the specified canonical form is not valid */ public static MavenDependency createDependency(final MavenCoordinate coordinate, final ScopeType scope, final boolean optional, final MavenDependencyExclusion... exclusions) throws IllegalArgumentException, CoordinateParseException { if (coordinate == null) { throw new IllegalArgumentException("coordinate form is required"); } final MavenDependency dep = newInstance(coordinate, scope, optional, exclusions); return dep; }