List<Dependency> dependencyList = new LinkedList<Dependency>();
for( MavenDependency dependency : dependencies ) {
Dependency dependencyModel = new Dependency();
dependencyModel.setArtifactId( dependency.getArtefactId() );
dependencyModel.setGroupId( dependency.getGroup().toString() );
MavenVersionRange versionRange = dependency.getVersionRange();
if( versionRange.isLatestVersion() ) {
dependencyModel.setVersion( "LATEST" );
} else {
dependencyModel.setVersion( versionRange.toString() );
}
dependencyList.add( dependencyModel );
}
pomModel.setDependencies( dependencyList );
}