Iterator it = depsParent.elementIterator( "dependency" );
while ( it.hasNext() )
{
Element elemDependency = (Element) it.next();
Dependency dependency = new Dependency();
dependency.setGroupId( elemDependency.elementTextTrim( "groupId" ) );
dependency.setArtifactId( elemDependency.elementTextTrim( "artifactId" ) );
dependency.setVersion( elemDependency.elementTextTrim( "version" ) );
dependency.setClassifier( StringUtils.defaultString( elemDependency.elementTextTrim( "classifier" ) ) );
dependency.setType( StringUtils.defaultIfEmpty( elemDependency.elementTextTrim( "type" ), "jar" ) );
dependency.setScope( StringUtils.defaultIfEmpty( elemDependency.elementTextTrim( "scope" ), "compile" ) );
// Not for v4.0.0 -> dependency.setUrl( elemDependency.elementTextTrim("url") );
dependency.setOptional( toBoolean( elemDependency.elementTextTrim( "optional" ), false ) );
if ( DependencyScope.isSystemScoped( dependency ) )
{
dependency.setSystemPath( elemDependency.elementTextTrim( "systemPath" ) );
}
dependency.setExclusions( getExclusions( elemDependency ) );
if ( dependencyList.contains( dependency ) )
{
// TODO: throw into monitor as issue.
}