private File find( MavenProject project, Artifact artifact ) { if ( "pom".equals( artifact.getExtension() ) ) { return project.getFile(); } org.apache.maven.artifact.Artifact matchingArtifact = findMatchingArtifact( project, artifact ); if ( matchingArtifact != null ) { return matchingArtifact.getFile(); } return null; }