/** * Creates an immutable {@link Dependency}. * * @param groupId the group ID (required) * @param artifactId the artifact ID (required) * @param version the version ID (required) * @param type the dependency type (required) * @param scope the dependency scope (required) * @param classifier the dependency classifier (required) */ public Dependency(final String groupId, final String artifactId, final String version, final DependencyType type, final DependencyScope scope, final String classifier) { XmlUtils.assertElementLegal(groupId); XmlUtils.assertElementLegal(artifactId); Validate.notNull(scope, "Dependency scope required"); Validate.notNull(type, "Dependency type required"); this.artifactId = artifactId; this.classifier = classifier; this.groupId = groupId; this.scope = scope; systemPath = null; this.type = type; this.version = version; this.optional = null; }