code: ProjectBuildingResult getProjectBuildingResult(MavenModelResource pomResource) throws ProjectBuildingException
     {
        ProjectBuildingResult result = cacheProject.get(pomResource.getFullyQualifiedName());
        if (result == null)
        {
           try
           {
              ProjectBuildingRequest request = getProjectBuildingRequest();
              Assert.notNull(request, "Project building request was null");
              request.setResolveDependencies(true);
              boolean inTransaction = !pomResource.getUnderlyingResourceObject().exists();
              // FORGE-1287
              if (inTransaction)
              {
                 result = getProjectBuilder().build(new FileResourceModelSource(pomResource), request);
                 // If under a transaction, don't start monitoring
              }
              else
              {
                 result = getProjectBuilder().build(pomResource.getUnderlyingResourceObject(), request);
                 monitorResource(pomResource);
              }
           }
           catch (ProjectBuildingException pbe)
           {
              List<ProjectBuildingResult> results = pbe.getResults();
              if (results != null && results.size() > 0)
                 result = results.get(0);
              throw pbe;
           }
           finally
           {
              if (result != null && !Projects.isCacheDisabled())
                 cacheProject.put(pomResource.getFullyQualifiedName(), result);
           }
        }
        return result;
     }
docs: *
  @param pomResource
  @return
  @throws ProjectBuildingException