Esempio n. 1
0
 @Override
 public void setModel(final Model pom) {
   MavenXpp3Writer writer = new MavenXpp3Writer();
   ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
   MavenModelResource modelResource = getModelResource();
   try (Writer fw = new OutputStreamWriter(outputStream)) {
     writer.write(fw, pom);
     modelResource.setContents(outputStream.toString());
   } catch (IOException e) {
     throw new RuntimeException(
         "Could not write POM file: " + modelResource.getFullyQualifiedName(), e);
   } finally {
     buildManager.evictFromCache(modelResource);
   }
 }
Esempio n. 2
0
 public ProjectBuildingRequest getBuildingRequest(final boolean offline) {
   return buildManager.getProjectBuildingRequest(offline);
 }
Esempio n. 3
0
 public ProjectBuildingRequest getOfflineRequest() {
   return buildManager.getProjectBuildingRequest(isInstalled());
 }
Esempio n. 4
0
 public ProjectBuildingRequest getRequest() {
   return buildManager.getProjectBuildingRequest();
 }
Esempio n. 5
0
 @Override
 public DirectoryResource getLocalRepositoryDirectory() {
   return factory
       .create(buildManager.getLocalRepositoryDirectory())
       .reify(DirectoryResource.class);
 }
Esempio n. 6
0
 /*
  * POM manipulation methods
  */
 public synchronized ProjectBuildingResult getProjectBuildingResult() throws Exception {
   return buildManager.getProjectBuildingResult(getModelResource());
 }