Elements versions = doc.getElementsByTag("version");
List<ArtifactVersionBean> artifactList = Lists.newArrayList();
for (Element version : versions) {
ArtifactVersionBean artifactVersionBean = new ArtifactVersionBean();
artifactVersionBean.setGroupId(groupId);
artifactVersionBean.setArtifactId(artifactId);
artifactVersionBean.setVersion(version.text());
artifactVersionBean.setId(groupId + ":" + artifactId + ":" + version.text());
// Gets and convert the last update date
Long lastUpdateDate = retrieveLastUpdateDate(artifactVersionBean);
if (lastUpdateDate == null) {
continue;
}
artifactVersionBean.setTimestamp(lastUpdateDate);
artifactList.add(artifactVersionBean);
}
return artifactList;