}
fileData.mark( fileData.available() ); // is available() safe?
String pomContent = GuvnorM2Repository.loadPOMFromJar(fileData);
PomModel pomModel = null;
if ( pomContent != null ) {
pomModel = PomModel.Parser.parse("pom.xml", new ByteArrayInputStream(pomContent.getBytes()));
}
if ( pomModel != null ) {
String groupId = pomModel.getReleaseId().getGroupId();
String artifactId = pomModel.getReleaseId().getArtifactId();
String version = pomModel.getReleaseId().getVersion();
if (isNullOrEmpty(groupId) || isNullOrEmpty(artifactId) || isNullOrEmpty(version)) {
return NO_VALID_POM;
} else {
gav = new GAV(groupId, artifactId, version);