more implementation of agent-side packages installer
authorEugene.Petrenko <eugene.petrenko@gmail.com>
Thu, 7 Jul 2011 14:27:24 +0000 (18:27 +0400)
committerEugene.Petrenko <eugene.petrenko@gmail.com>
Thu, 7 Jul 2011 14:27:24 +0000 (18:27 +0400)
nuget-agent/src/META-INF/build-agent-plugin-nuget.xml
nuget-agent/src/jetbrains/buildServer/nuget/agent/install/LocateNuGetConfigBuildProcess.java [new file with mode: 0644]
nuget-agent/src/jetbrains/buildServer/nuget/agent/install/NuGetInstallPackageActionFactory.java [new file with mode: 0644]
nuget-agent/src/jetbrains/buildServer/nuget/agent/install/PackageInstallParametersFactory.java [new file with mode: 0644]
nuget-agent/src/jetbrains/buildServer/nuget/agent/install/PackagesInstallParameters.java [new file with mode: 0644]
nuget-agent/src/jetbrains/buildServer/nuget/agent/install/PackagesInstallerRunner.java
nuget-agent/src/jetbrains/buildServer/nuget/agent/install/impl/NuGetInstallPackageActionFactoryImpl.java [new file with mode: 0644]
nuget-agent/src/jetbrains/buildServer/nuget/agent/install/impl/PackageInstallParametersFactoryImpl.java [new file with mode: 0644]
nuget-common/src/jetbrains/buildServer/nuget/common/PackagesInstallerConstants.java

index 96cd105dd09714a4a08d5e985b3a2dfe2cf659f9..b8ccaaf319bcca81c3e69275d94e4f45220772ab 100644 (file)
@@ -1,11 +1,16 @@
 <?xml version="1.0" encoding="UTF-8"?>\r
+<!--suppress AutowiredDependenciesInspection -->\r
 <beans xmlns="http://www.springframework.org/schema/beans"\r
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
-       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"\r
+       xsi:schemaLocation="http://www.springframework.org/schema/beans\r
+                           http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"\r
        default-autowire="constructor">\r
 \r
   <bean class="jetbrains.buildServer.nuget.agent.util.impl.CommandlineBuildProcessFactoryImpl"/>\r
 \r
   <bean class="jetbrains.buildServer.nuget.agent.install.PackagesInstallerRunner"/>\r
   <bean class="jetbrains.buildServer.nuget.agent.install.PackagesInstallerRunnerRegistrar"/>\r
+\r
+  <bean class="jetbrains.buildServer.nuget.agent.install.impl.NuGetInstallPackageActionFactoryImpl"/>\r
+  <bean class="jetbrains.buildServer.nuget.agent.install.impl.PackageInstallParametersFactoryImpl"/>\r
 </beans>
\ No newline at end of file
diff --git a/nuget-agent/src/jetbrains/buildServer/nuget/agent/install/LocateNuGetConfigBuildProcess.java b/nuget-agent/src/jetbrains/buildServer/nuget/agent/install/LocateNuGetConfigBuildProcess.java
new file mode 100644 (file)
index 0000000..75370b2
--- /dev/null
@@ -0,0 +1,117 @@
+/*\r
+ * Copyright 2000-2011 JetBrains s.r.o.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+package jetbrains.buildServer.nuget.agent.install;\r
+\r
+import com.intellij.openapi.diagnostic.Logger;\r
+import jetbrains.buildServer.RunBuildException;\r
+import jetbrains.buildServer.agent.BuildFinishedStatus;\r
+import jetbrains.buildServer.agent.BuildProgressLogger;\r
+import jetbrains.buildServer.nuget.agent.util.BuildProcessBase;\r
+import jetbrains.buildServer.util.FileUtil;\r
+import jetbrains.buildServer.util.StringUtil;\r
+import jetbrains.buildServer.util.XmlXppAbstractParser;\r
+import org.jetbrains.annotations.NotNull;\r
+\r
+import java.io.File;\r
+import java.io.IOException;\r
+import java.util.ArrayList;\r
+import java.util.Arrays;\r
+import java.util.Collection;\r
+import java.util.List;\r
+\r
+/**\r
+ * Created by Eugene Petrenko (eugene.petrenko@gmail.com)\r
+ * Date: 07.07.11 16:03\r
+ */\r
+public class LocateNuGetConfigBuildProcess extends BuildProcessBase {\r
+  private static final Logger LOG = Logger.getInstance(LocateNuGetConfigBuildProcess.class.getName());\r
+\r
+  private final PackagesInstallParameters myContext;\r
+  private final BuildProgressLogger myLogger;\r
+  private final Callback myCallback;\r
+\r
+  public LocateNuGetConfigBuildProcess(@NotNull final PackagesInstallParameters context,\r
+                                       @NotNull final BuildProgressLogger logger,\r
+                                       @NotNull final Callback callback) {\r
+    myContext = context;\r
+    myLogger = logger;\r
+    myCallback = callback;\r
+  }\r
+\r
+  public static interface Callback {\r
+    /**\r
+     * Called when packages.config is found\r
+     * @param config full path to packages.config file\r
+     * @param targetFolder target folder to store packages\r
+     * @throws jetbrains.buildServer.RunBuildException if failed to process callback\r
+     */\r
+    void onPackagesConfigFound(@NotNull final File config, @NotNull final File targetFolder) throws RunBuildException;\r
+  }\r
+\r
+  @Override\r
+  protected BuildFinishedStatus waitForImpl() throws RunBuildException {\r
+    final File sln = myContext.getSolutionFile();\r
+    final File packages = new File(sln, "packages");\r
+    final File repositoriesConfig = new File(packages, "repositories.config");\r
+\r
+    LOG.debug("resources.config path is " + repositoriesConfig);\r
+\r
+    if (!repositoriesConfig.isFile()) {\r
+      throw new RunBuildException("Failed to find " + repositoriesConfig);\r
+    }\r
+\r
+    myLogger.message("Found packages folder: " + packages);\r
+    myLogger.message("Found list of packages.config files: " + repositoriesConfig);\r
+    Collection<File> files = listPackagesConfigs(repositoriesConfig);\r
+\r
+    if (files.isEmpty()) {\r
+      myLogger.warning("No packages.config files were found under solution. Nothing to install");\r
+      return BuildFinishedStatus.FINISHED_SUCCESS;\r
+    }\r
+\r
+    for (File file : files) {\r
+      myCallback.onPackagesConfigFound(file, packages);\r
+    }\r
+\r
+    return null;\r
+  }\r
+\r
+  @NotNull\r
+  private Collection<File> listPackagesConfigs(@NotNull final File repositoriesConfig) throws RunBuildException {\r
+    final Collection<File> files = new ArrayList<File>();\r
+    try {\r
+      new XmlXppAbstractParser(){\r
+        @Override\r
+        protected List<XmlHandler> getRootHandlers() {\r
+          return Arrays.asList(elementsPath(new Handler() {\r
+            public XmlReturn processElement(@NotNull XmlElementInfo xmlElementInfo) {\r
+              final String relPath = xmlElementInfo.getAttribute("path");\r
+              if (relPath != null && !StringUtil.isEmptyOrSpaces(relPath)) {\r
+                files.add(FileUtil.resolvePath(repositoriesConfig.getParentFile(), relPath));\r
+              }\r
+              return xmlElementInfo.noDeep();\r
+            }\r
+          }, "repositories", "repository"));\r
+        }\r
+      }.parse(repositoriesConfig);\r
+    } catch (IOException e) {\r
+      throw new RunBuildException("Failed to parse " + repositoriesConfig + ". " + e.getMessage(), e);\r
+    }\r
+\r
+    return files;\r
+  }\r
+}\r
diff --git a/nuget-agent/src/jetbrains/buildServer/nuget/agent/install/NuGetInstallPackageActionFactory.java b/nuget-agent/src/jetbrains/buildServer/nuget/agent/install/NuGetInstallPackageActionFactory.java
new file mode 100644 (file)
index 0000000..760386d
--- /dev/null
@@ -0,0 +1,35 @@
+/*\r
+ * Copyright 2000-2011 JetBrains s.r.o.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+package jetbrains.buildServer.nuget.agent.install;\r
+\r
+import jetbrains.buildServer.RunBuildException;\r
+import jetbrains.buildServer.agent.BuildProcess;\r
+import jetbrains.buildServer.agent.BuildRunnerContext;\r
+import org.jetbrains.annotations.NotNull;\r
+\r
+import java.io.File;\r
+\r
+/**\r
+ * Created by Eugene Petrenko (eugene.petrenko@gmail.com)\r
+ * Date: 07.07.11 18:07\r
+ */\r
+public interface NuGetInstallPackageActionFactory {\r
+  BuildProcess createBuildProcess(@NotNull BuildRunnerContext context,\r
+                                  @NotNull PackagesInstallParameters params,\r
+                                  @NotNull File packagesConfig,\r
+                                  @NotNull File targetFolder) throws RunBuildException;\r
+}\r
diff --git a/nuget-agent/src/jetbrains/buildServer/nuget/agent/install/PackageInstallParametersFactory.java b/nuget-agent/src/jetbrains/buildServer/nuget/agent/install/PackageInstallParametersFactory.java
new file mode 100644 (file)
index 0000000..269f351
--- /dev/null
@@ -0,0 +1,36 @@
+/*\r
+ * Copyright 2000-2011 JetBrains s.r.o.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+package jetbrains.buildServer.nuget.agent.install;\r
+\r
+import jetbrains.buildServer.RunBuildException;\r
+import jetbrains.buildServer.agent.BuildRunnerContext;\r
+import org.jetbrains.annotations.NotNull;\r
+\r
+/**\r
+ * Created by Eugene Petrenko (eugene.petrenko@gmail.com)\r
+ * Date: 07.07.11 18:08\r
+ */\r
+public interface PackageInstallParametersFactory {\r
+  /**\r
+   * Creates object-style implementation of parameters\r
+   * @param context current build step context\r
+   * @return parameters\r
+   * @throws RunBuildException if failed to create parameters\r
+   */\r
+  @NotNull\r
+  PackagesInstallParameters loadParameters(@NotNull final BuildRunnerContext context) throws RunBuildException;\r
+}\r
diff --git a/nuget-agent/src/jetbrains/buildServer/nuget/agent/install/PackagesInstallParameters.java b/nuget-agent/src/jetbrains/buildServer/nuget/agent/install/PackagesInstallParameters.java
new file mode 100644 (file)
index 0000000..4e424ba
--- /dev/null
@@ -0,0 +1,50 @@
+/*\r
+ * Copyright 2000-2011 JetBrains s.r.o.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+package jetbrains.buildServer.nuget.agent.install;\r
+\r
+import jetbrains.buildServer.RunBuildException;\r
+import org.jetbrains.annotations.NotNull;\r
+\r
+import java.io.File;\r
+import java.util.Collection;\r
+\r
+/**\r
+ * Created by Eugene Petrenko (eugene.petrenko@gmail.com)\r
+ * Date: 07.07.11 16:18\r
+ */\r
+public interface PackagesInstallParameters {\r
+  /**\r
+   * @return path to solution file.\r
+   * @throws jetbrains.buildServer.RunBuildException\r
+   *          if .sln file is not found\r
+   */\r
+  @NotNull\r
+  File getSolutionFile() throws RunBuildException;\r
+\r
+  /**\r
+   * @return path to nuget.exe file\r
+   * @throws RunBuildException if nuget was not found\r
+   */\r
+  @NotNull\r
+  File getNuGetExeFile() throws RunBuildException;\r
+\r
+  /**\r
+   * @return collection of nuget sources to fetch packages\r
+   */\r
+  @NotNull\r
+  Collection<String> getNuGetPackageSources();\r
+}\r
index c1906bfe4255635e5027f442304b631105bd8dc2..cd5c3ee630637930e5a2d371dce359b203a0c98e 100644 (file)
@@ -19,22 +19,61 @@ package jetbrains.buildServer.nuget.agent.install;
 import com.intellij.openapi.diagnostic.Logger;\r
 import jetbrains.buildServer.RunBuildException;\r
 import jetbrains.buildServer.agent.*;\r
+import jetbrains.buildServer.nuget.agent.util.impl.CompositeBuildProcessImpl;\r
 import jetbrains.buildServer.nuget.common.DotNetConstants;\r
 import jetbrains.buildServer.nuget.common.PackagesInstallerConstants;\r
 import org.jetbrains.annotations.NotNull;\r
 \r
+import java.io.File;\r
+\r
+import static jetbrains.buildServer.nuget.agent.install.LocateNuGetConfigBuildProcess.Callback;\r
+\r
 /**\r
  * Created by Eugene Petrenko (eugene.petrenko@gmail.com)\r
  * Date: 07.07.11 13:55\r
  */\r
-public class PackagesInstallerRunner implements AgentBuildRunner, AgentBuildRunnerInfo{\r
+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 PackageInstallParametersFactory myParametersFactory;\r
+\r
+  public PackagesInstallerRunner(@NotNull final NuGetInstallPackageActionFactory installActionFactory,\r
+                                 @NotNull final PackageInstallParametersFactory parametersFactory) {\r
+    myInstallActionFactory = installActionFactory;\r
+    myParametersFactory = parametersFactory;\r
+  }\r
+\r
   @NotNull\r
   public BuildProcess createBuildProcess(@NotNull AgentRunningBuild runningBuild,\r
-                                         @NotNull BuildRunnerContext context) throws RunBuildException {\r
+                                         @NotNull final BuildRunnerContext context) throws RunBuildException {\r
+    final CompositeBuildProcessImpl process = new CompositeBuildProcessImpl();\r
+    final PackagesInstallParameters parameters = myParametersFactory.loadParameters(context);\r
+    final LocateNuGetConfigBuildProcess locate = new LocateNuGetConfigBuildProcess(\r
+            parameters,\r
+            context.getBuild().getBuildLogger(),\r
+            createLocateCallback(context, process, parameters)\r
+    );\r
+    process.pushBuildProcess(locate);\r
 \r
-    throw new RunBuildException("Not Implemented");\r
+    return process;\r
+  }\r
+\r
+  @NotNull\r
+  private Callback createLocateCallback(@NotNull final BuildRunnerContext context,\r
+                                        @NotNull final CompositeBuildProcessImpl process,\r
+                                        @NotNull final PackagesInstallParameters parameters) {\r
+    return new Callback() {\r
+      public void onPackagesConfigFound(@NotNull File config,\r
+                                        @NotNull File targetFolder) throws RunBuildException {\r
+        process.pushBuildProcess(\r
+                myInstallActionFactory.createBuildProcess(context,\r
+                        parameters,\r
+                        config,\r
+                        targetFolder)\r
+        );\r
+      }\r
+    };\r
   }\r
 \r
   @NotNull\r
@@ -60,5 +99,4 @@ public class PackagesInstallerRunner implements AgentBuildRunner, AgentBuildRunn
 \r
     return true;\r
   }\r
-\r
 }\r
diff --git a/nuget-agent/src/jetbrains/buildServer/nuget/agent/install/impl/NuGetInstallPackageActionFactoryImpl.java b/nuget-agent/src/jetbrains/buildServer/nuget/agent/install/impl/NuGetInstallPackageActionFactoryImpl.java
new file mode 100644 (file)
index 0000000..2f7185c
--- /dev/null
@@ -0,0 +1,65 @@
+/*\r
+ * Copyright 2000-2011 JetBrains s.r.o.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+package jetbrains.buildServer.nuget.agent.install.impl;\r
+\r
+import jetbrains.buildServer.RunBuildException;\r
+import jetbrains.buildServer.agent.BuildProcess;\r
+import jetbrains.buildServer.agent.BuildRunnerContext;\r
+import jetbrains.buildServer.nuget.agent.install.NuGetInstallPackageActionFactory;\r
+import jetbrains.buildServer.nuget.agent.install.PackagesInstallParameters;\r
+import jetbrains.buildServer.nuget.agent.util.CommandlineBuildProcessFactory;\r
+import jetbrains.buildServer.util.FileUtil;\r
+import org.jetbrains.annotations.NotNull;\r
+\r
+import java.io.File;\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+\r
+/**\r
+ * Created by Eugene Petrenko (eugene.petrenko@gmail.com)\r
+ * Date: 07.07.11 17:49\r
+ */\r
+public class NuGetInstallPackageActionFactoryImpl implements NuGetInstallPackageActionFactory {\r
+  private final CommandlineBuildProcessFactory myFactory;\r
+\r
+  public NuGetInstallPackageActionFactoryImpl(CommandlineBuildProcessFactory factory) {\r
+    myFactory = factory;\r
+  }\r
+\r
+  public BuildProcess createBuildProcess(@NotNull final BuildRunnerContext context,\r
+                                         @NotNull final PackagesInstallParameters params,\r
+                                         @NotNull final File packagesConfig,\r
+                                         @NotNull final File targetFolder) throws RunBuildException {\r
+    final List<String> argz = new ArrayList<String>();\r
+    argz.add("install");\r
+    argz.add(FileUtil.getCanonicalFile(packagesConfig).getPath()); //path to package\r
+    argz.add("-OutputDirectory");\r
+    argz.add(FileUtil.getCanonicalFile(targetFolder).getPath());\r
+\r
+    for (String source : params.getNuGetPackageSources()) {\r
+      argz.add("-Source");\r
+      argz.add(source);\r
+    }\r
+\r
+    return myFactory.executeCommandLine(\r
+            context,\r
+            params.getNuGetExeFile(),\r
+            argz,\r
+            packagesConfig.getParentFile()\r
+    );\r
+  }\r
+}\r
diff --git a/nuget-agent/src/jetbrains/buildServer/nuget/agent/install/impl/PackageInstallParametersFactoryImpl.java b/nuget-agent/src/jetbrains/buildServer/nuget/agent/install/impl/PackageInstallParametersFactoryImpl.java
new file mode 100644 (file)
index 0000000..8e15f88
--- /dev/null
@@ -0,0 +1,85 @@
+/*\r
+ * Copyright 2000-2011 JetBrains s.r.o.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+package jetbrains.buildServer.nuget.agent.install.impl;\r
+\r
+import jetbrains.buildServer.RunBuildException;\r
+import jetbrains.buildServer.agent.BuildRunnerContext;\r
+import jetbrains.buildServer.nuget.agent.install.PackageInstallParametersFactory;\r
+import jetbrains.buildServer.nuget.agent.install.PackagesInstallParameters;\r
+import jetbrains.buildServer.nuget.common.PackagesInstallerConstants;\r
+import jetbrains.buildServer.util.FileUtil;\r
+import jetbrains.buildServer.util.StringUtil;\r
+import org.jetbrains.annotations.NotNull;\r
+import org.jetbrains.annotations.Nullable;\r
+\r
+import java.io.File;\r
+import java.util.ArrayList;\r
+import java.util.Collection;\r
+import java.util.Collections;\r
+import java.util.List;\r
+\r
+/**\r
+ * Created by Eugene Petrenko (eugene.petrenko@gmail.com)\r
+ * Date: 07.07.11 18:09\r
+ */\r
+public class PackageInstallParametersFactoryImpl implements PackageInstallParametersFactory {\r
+  @NotNull\r
+  public PackagesInstallParameters loadParameters(@NotNull final BuildRunnerContext context) throws RunBuildException {\r
+    return new PackagesInstallParameters() {\r
+\r
+      private File resolvePath(@Nullable final String runnerParameter) throws RunBuildException {\r
+        String path = context.getRunnerParameters().get(runnerParameter);\r
+        if (StringUtil.isEmptyOrSpaces(path))\r
+          throw new RunBuildException("Runner parameter '" + runnerParameter + "' was not found");\r
+\r
+        File file = FileUtil.resolvePath(context.getBuild().getCheckoutDirectory(), path);\r
+        if (!file.exists()) {\r
+          throw new RunBuildException("File does not exists: " + file);\r
+        }\r
+\r
+        return file;\r
+      }\r
+\r
+\r
+      @NotNull\r
+      public File getSolutionFile() throws RunBuildException {\r
+        return resolvePath(PackagesInstallerConstants.SLN_PATH);\r
+      }\r
+\r
+      @NotNull\r
+      public File getNuGetExeFile() throws RunBuildException {\r
+        return resolvePath(PackagesInstallerConstants.NUGET_PATH);\r
+      }\r
+\r
+      @NotNull\r
+      public Collection<String> getNuGetPackageSources() {\r
+        String sources = context.getRunnerParameters().get(PackagesInstallerConstants.NUGET_SOURCES);\r
+        if (sources == null) return Collections.emptyList();\r
+\r
+        List<String> list = new ArrayList<String>();\r
+        for (String _source : sources.split("[\\r\\n]+")) {\r
+          final String source = _source.trim();\r
+          if (!source.isEmpty()) {\r
+            list.add(source);\r
+          }\r
+        }\r
+\r
+        return Collections.unmodifiableList(list);\r
+      }\r
+    };\r
+  }\r
+}\r
index a9bada1476b5bf374e9b3b3b1f86c25fc222e10c..e686fca208cb19393229bbd1a8f5f7f20b7fb56c 100644 (file)
@@ -22,4 +22,9 @@ package jetbrains.buildServer.nuget.common;
  */\r
 public interface PackagesInstallerConstants {\r
   public static final String RUN_TYPE = "jetbrains.nuget.packagesInstaller";\r
+\r
+\r
+  public static final String NUGET_PATH = "nuget.path";\r
+  public static final String NUGET_SOURCES = "nuget.sources";\r
+  public static final String SLN_PATH = "sln.path";\r
 }\r