MavenArtifact (Artifact artifact, File localRepository) { return new MavenArtifact(artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(), artifact.getBaseVersion(), artifact.getType(), artifact.getClassifier(), artifact.getScope(), artifact.isOptional(), convertExtension(artifact), artifact.getFile(), localRepository, artifact.isResolved(), artifact instanceof CustomMaven3Artifact && ((CustomMaven3Artifact)artifact).isStub()); }