}
private String getHighestStableVersion(String groupId, String artifactId) {
final Dependency dep = DependencyBuilder.create(groupId + ":" + artifactId);
final DependencyFacet depFacet = getFaceted().getFacet(DependencyFacet.class);
final List<Coordinate> availVersions = depFacet.resolveAvailableVersions(dep);
String maxVersion = null;
for (final Coordinate versionCoord : availVersions) {
// FIXME needs a more reliable way of comparing versions
if (!versionCoord.isSnapshot() && (maxVersion == null || versionCoord.getVersion().compareTo(maxVersion) > 0)) {