code: protected boolean hasValidFile( Artifact artifact )
      {
          // Make sure the file exists.
          boolean hasValidFile = artifact != null && artifact.getFile() != null && artifact.getFile().exists();
  
          // Exclude project POM file.
          hasValidFile = hasValidFile && !artifact.getFile().getPath().equals( project.getFile().getPath() );
  
          // Exclude files outside of build directory.
          hasValidFile = hasValidFile && artifact.getFile().getPath().startsWith( project.getBuild().getDirectory() );
  
          return hasValidFile;
      }
docs: Decide whether the artifact file should be processed.
  
  <p>Excludes the project POM file and any file outside the build directory, because this could lead to writing
  files on the user local repository for example.</p>
  
  @param artifact the artifact to check.
  @return true if the artifact should be included in the files to process.