@ Override public void afterProjectsRead ( final MavenSession session ) throws MavenExecutionException { boolean anyProject = false ; for ( MavenProject project : session . getProjects ( ) ) { if ( project . getPlugin ( "ceylon" ) != null || project . getPlugin ( "ceylon-maven-plugin" ) != null || "ceylon" . equals ( project . getArtifact ( ) . getArtifactHandler ( ) . getPackaging ( ) ) || "car" . equals ( project . getArtifact ( ) . getArtifactHandler ( ) . getPackaging ( ) ) || "ceylon-jar" . equals ( project . getArtifact ( ) . getArtifactHandler ( ) . getPackaging ( ) ) || usesCeylonRepo ( project ) ) { anyProject = true ; } } if ( anyProject ) { logger . info ( "At least one project is using the Ceylon plugin. Preparing." ) ; findCeylonRepo ( session ) ; } logger . info ( "Adding Ceylon repositories to build" ) ; session . getRequest ( ) . setWorkspaceReader ( new CeylonWorkspaceReader ( session . getRequest ( ) . getWorkspaceReader ( ) , logger ) ) ; }
Interception after projects are known .