{
getLog()
.info( "Processed " + modelsProcessed + " models (" + seenModels.size() + " unique) ..." );
}
Relocation relocation = null;
if ( seenModels.contains( projectKey ) )
{
return;
}
seenModels.add( projectKey );
out.println( " model = toModel( \"" + projectKey + "\" );" );
if ( model.getParent() != null )
{
String parentKey = toKey( model.getParent() );
out.println( " model.setParentProject( toParent( \"" + parentKey + "\" ) );" );
}
if ( isNotEmpty( model.getDependencies() ) )
{
Iterator it = model.getDependencies().iterator();
while ( it.hasNext() )
{
Dependency dep = applyDepMan( (Dependency) it.next(), model );
writeAddDependency( "addDependency", dep );
}
}
if ( ( model.getDependencyManagement() != null )
&& isNotEmpty( model.getDependencyManagement().getDependencies() ) )
{
Iterator it = model.getDependencyManagement().getDependencies().iterator();
while ( it.hasNext() )
{
Dependency dep = (Dependency) it.next();
writeAddDependency( "addDependencyManagement", dep );
}
}
if ( isNotEmpty( model.getProperties() ) )
{
Iterator it = new EnumerationIterator( model.getProperties().keys() );
while ( it.hasNext() )
{
String key = (String) it.next();
String value = model.getProperties().getProperty( key );
out.println( " model.addProperty( \"" + key + "\", \"" + value + "\" );" );
}
}
if ( model.getDistributionManagement() != null )
{
DistributionManagement distMgmt = model.getDistributionManagement();
if ( distMgmt.getRelocation() != null )
{
relocation = distMgmt.getRelocation();
out.println( " model.setRelocation( new VersionedReference() );" );
if ( StringUtils.isNotEmpty( relocation.getGroupId() ) )
{
out.println( " model.getRelocation().setGroupId( \"" + relocation.getGroupId() + "\" );" );
}
if ( StringUtils.isNotEmpty( relocation.getArtifactId() ) )
{
out
.println( " model.getRelocation().setArtifactId( \"" + relocation.getArtifactId()
+ "\" );" );
}
if ( StringUtils.isNotEmpty( relocation.getVersion() ) )
{
out.println( " model.getRelocation().setVersion( \"" + relocation.getVersion() + "\" );" );
}
}
}
out.println( " addModel( model );" );