integration test checks for reported dependencies
[teamcity/dotNetPackagesSupport.git] / nuget-agent / src / jetbrains / buildServer / nuget / agent / install / impl / NuGetActionFactoryImpl.java
index 236d4d549cd0e1c7446eeff6bdccb0ac34633610..640a7f7189ce666b27eb1c14adcdfbac168199be 100644 (file)
@@ -16,7 +16,9 @@
 \r
 package jetbrains.buildServer.nuget.agent.install.impl;\r
 \r
+import com.intellij.openapi.diagnostic.Logger;\r
 import jetbrains.buildServer.RunBuildException;\r
+import jetbrains.buildServer.agent.BuildFinishedStatus;\r
 import jetbrains.buildServer.agent.BuildProcess;\r
 import jetbrains.buildServer.agent.BuildRunnerContext;\r
 import jetbrains.buildServer.nuget.agent.install.NuGetActionFactory;\r
@@ -24,6 +26,7 @@ import jetbrains.buildServer.nuget.agent.install.PackageUsages;
 import jetbrains.buildServer.nuget.agent.parameters.NuGetParameters;\r
 import jetbrains.buildServer.nuget.agent.parameters.PackagesInstallParameters;\r
 import jetbrains.buildServer.nuget.agent.parameters.PackagesUpdateParameters;\r
+import jetbrains.buildServer.nuget.agent.util.BuildProcessBase;\r
 import jetbrains.buildServer.nuget.agent.util.CommandlineBuildProcessFactory;\r
 import jetbrains.buildServer.util.FileUtil;\r
 import org.jetbrains.annotations.NotNull;\r
@@ -38,6 +41,8 @@ import java.util.List;
  * Date: 07.07.11 17:49\r
  */\r
 public class NuGetActionFactoryImpl implements NuGetActionFactory {\r
+  private static final Logger LOG = Logger.getInstance(NuGetActionFactoryImpl.class.getName());\r
+\r
   private final CommandlineBuildProcessFactory myFactory;\r
   private final PackageUsages myPackageUsages;\r
 \r
@@ -89,11 +94,18 @@ public class NuGetActionFactoryImpl implements NuGetActionFactory {
   }\r
 \r
   @NotNull\r
-  public BuildProcess createUsageReport(@NotNull BuildRunnerContext context,\r
-                                        @NotNull NuGetParameters params,\r
-                                        @NotNull File packagesConfig,\r
-                                        @NotNull File targetFolder) throws RunBuildException {\r
-    return myPackageUsages.createReport(packagesConfig);\r
+  public BuildProcess createUsageReport(@NotNull final BuildRunnerContext context,\r
+                                        @NotNull final NuGetParameters params,\r
+                                        @NotNull final File packagesConfig,\r
+                                        @NotNull final File targetFolder) throws RunBuildException {\r
+    return new BuildProcessBase() {\r
+      @NotNull\r
+      @Override\r
+      protected BuildFinishedStatus waitForImpl() throws RunBuildException {\r
+        myPackageUsages.createReport(packagesConfig);\r
+        return BuildFinishedStatus.FINISHED_SUCCESS;\r
+      }\r
+    };\r
   }\r
 \r
   @NotNull\r