Iterator<Element> it = depsParent.elementIterator( "dependency" );
while ( it.hasNext() )
{
Element elemDependency = it.next();
Dependency dependency = new Dependency();
dependency.setGroupId( elemDependency.elementTextTrim( "groupId" ) );
dependency.setArtifactId( elemDependency.elementTextTrim( "artifactId" ) );
dependency.setVersion( elemDependency.elementTextTrim( "version" ) );
dependency.setType( StringUtils.defaultIfEmpty( elemDependency.elementTextTrim( "type" ), "jar" ) );
dependency.setUrl( elemDependency.elementTextTrim( "url" ) );
/* Following are not valid for <pomVersion>3</pomVersion> / Maven 1 pom files.
*
* dependency.setClassifier( StringUtils.defaultString( elemDependency.elementTextTrim( "classifier" ) ) );
* dependency.setScope( StringUtils.defaultIfEmpty( elemDependency.elementTextTrim( "scope" ), "compile" ) );
* dependency.setOptional( toBoolean( elemDependency.elementTextTrim( "optional" ), false ) );
*/
dependency.setSystemPath( elemDependency.elementTextTrim( "jar" ) );
if ( dependencyList.contains( dependency ) )
{
// TODO: throw into monitor as "duplicate dependency" issue.
}