private Artifact readPom(Path jarPath, String key)
{
JarPath jar = JarPath.create(jarPath);
try {
MavenProject project = new MavenProject();
new Config().configure(project, jar.lookup(key));
Artifact artifact = project.toArtifact(jarPath);
return artifact;
} catch (IOException e) {
log.log(Level.WARNING, e.toString(), e);