public static MavenArtifact convertArtifactAndPath(Artifact artifact, Path artifactPath, File localRepository) {
    return new MavenArtifact(artifact.getGroupId(),
                             artifact.getArtifactId(),
                             artifact.getVersion().asString(),
                             artifact.getVersion().asString(),
                             "", //artifact.getType(),
                             artifact.getClassifier(),

                             "", //artifact.getScope(),
                             false, //artifact.isOptional(),

                             convertExtension(artifact),

                             null == artifactPath ? null : artifactPath.toFile(),
                             localRepository,

                             null != artifactPath,
                             false /*artifact instanceof CustomMaven3Artifact && ((CustomMaven3Artifact)artifact).isStub()*/);
  }
public static MavenArtifact convertArtifactAndPath(Artifact artifact, Path artifactPath, File localRepository)