rename to NuGetActionFactory, add Update packages getters
[teamcity/dotNetPackagesSupport.git] / nuget-agent / src / jetbrains / buildServer / nuget / agent / install / PackagesInstallerRunner.java
index 7d11d07973389c73f0193a4fc9f4a55e224609a8..678f5d6acfca23320b4a11cdf8e40e14023942d1 100644 (file)
@@ -23,6 +23,7 @@ import jetbrains.buildServer.nuget.agent.util.DelegatingBuildProcess;
 import jetbrains.buildServer.nuget.agent.util.impl.CompositeBuildProcessImpl;\r
 import jetbrains.buildServer.nuget.common.DotNetConstants;\r
 import jetbrains.buildServer.nuget.common.PackagesInstallerConstants;\r
+import jetbrains.buildServer.util.FileUtil;\r
 import org.jetbrains.annotations.NotNull;\r
 \r
 import java.io.File;\r
@@ -36,10 +37,10 @@ import static jetbrains.buildServer.nuget.agent.install.LocateNuGetConfigBuildPr
 public class PackagesInstallerRunner implements AgentBuildRunner, AgentBuildRunnerInfo {\r
   private static final Logger LOG = Logger.getInstance(PackagesInstallerRunner.class.getName());\r
 \r
-  private final NuGetInstallPackageActionFactory myInstallActionFactory;\r
+  private final NuGetActionFactory myInstallActionFactory;\r
   private final PackageInstallParametersFactory myParametersFactory;\r
 \r
-  public PackagesInstallerRunner(@NotNull final NuGetInstallPackageActionFactory installActionFactory,\r
+  public PackagesInstallerRunner(@NotNull final NuGetActionFactory installActionFactory,\r
                                  @NotNull final PackageInstallParametersFactory parametersFactory) {\r
     myInstallActionFactory = installActionFactory;\r
     myParametersFactory = parametersFactory;\r
@@ -74,9 +75,11 @@ public class PackagesInstallerRunner implements AgentBuildRunner, AgentBuildRunn
 \r
                           @NotNull\r
                           public BuildProcess startImpl() throws RunBuildException {\r
-                            logger.activityStarted("install", "Installing NuGet packages for " + config, "nuget");\r
+                            String pathToLog = FileUtil.getRelativePath(context.getBuild().getCheckoutDirectory(), config);\r
+                            if (pathToLog == null) pathToLog = config.getPath();\r
+                            logger.activityStarted("install", "Installing NuGet packages for " + pathToLog, "nuget");\r
 \r
-                            return myInstallActionFactory.createBuildProcess(context,\r
+                            return myInstallActionFactory.createInstall(context,\r
                                     parameters,\r
                                     config,\r
                                     targetFolder)\r