}
if ( !moduleFile.isFile() )
{
ModelProblem problem =
new DefaultModelProblem( "Child module " + moduleFile + " of " + pomFile
+ " does not exist", ModelProblem.Severity.ERROR, ModelProblem.Version.BASE, model, -1, -1, null );
result.getProblems().add( problem );
noErrors = false;
continue;
}
if ( Os.isFamily( Os.FAMILY_WINDOWS ) )
{
// we don't canonicalize on unix to avoid interfering with symlinks
try
{
moduleFile = moduleFile.getCanonicalFile();
}
catch ( IOException e )
{
moduleFile = moduleFile.getAbsoluteFile();
}
}
else
{
moduleFile = new File( moduleFile.toURI().normalize() );
}
if ( aggregatorFiles.contains( moduleFile ) )
{
StringBuilder buffer = new StringBuilder( 256 );
for ( File aggregatorFile : aggregatorFiles )
{
buffer.append( aggregatorFile ).append( " -> " );
}
buffer.append( moduleFile );
ModelProblem problem =
new DefaultModelProblem( "Child module " + moduleFile + " of " + pomFile
+ " forms aggregation cycle " + buffer, ModelProblem.Severity.ERROR, ModelProblem.Version.BASE, model, -1, -1,
null );
result.getProblems().add( problem );
noErrors = false;