}
}
@SuppressWarnings("deprecation")
private ArtifactRepository getArtifactRepositoryMaven21(MavenProject pom) {
ProjectBuilderConfiguration projectBuilderConfiguration;
try {
// Since maven-plugin is compiled against maven-core-3x, we need to retrieve
// this maven 2 object via reflection
Method method = MavenProject.class.getMethod("getProjectBuilderConfiguration");
projectBuilderConfiguration = (ProjectBuilderConfiguration) method.invoke(pom);
return projectBuilderConfiguration.getLocalRepository();
} catch (Exception e) {
LOGGER.log(Level.WARNING, "Could not retrieve BuilderConfigration", e);
return null;
}
}