code: public static File getArtifactFileFromProjectDependencies(AbstractWisdomMojo mojo, String artifactId,
                                                                String type) {
          Preconditions.checkNotNull(mojo);
          Preconditions.checkNotNull(artifactId);
          Preconditions.checkNotNull(type);
  
          // Get artifacts also resolve transitive dependencies.
          for (Artifact artifact : mojo.project.getArtifacts()) {
              if (artifact.getArtifactId().equals(artifactId) && artifact.getType().equals(type)) {
                  return artifact.getFile();
              }
          }
          return null;
      }
docs: Gets the file of the dependency with the given artifact id from the project dependencies.
  
  @param mojo       the mojo
  @param artifactId the name of the artifact to find
  @param type  the extension of the artifact to find
  @return the artifact file, {@code null} if not found