\r
<bean class="jetbrains.buildServer.nuget.server.toolRegistry.impl.AvailableToolsState"/>\r
<bean class="jetbrains.buildServer.nuget.server.toolRegistry.impl.NuGetToolManagerImpl"/>\r
+ <bean class="jetbrains.buildServer.nuget.server.toolRegistry.impl.NuGetToolsInstaller"/>\r
+ <bean class="jetbrains.buildServer.nuget.server.toolRegistry.impl.ToolsRegistry"/>\r
+ <bean class="jetbrains.buildServer.nuget.server.toolRegistry.impl.ToolPacker"/>\r
+ <bean class="jetbrains.buildServer.nuget.server.toolRegistry.impl.ToolPaths"/>\r
</beans>
\ No newline at end of file
* @throws FetchException on fetch error if it was called\r
*/\r
@NotNull\r
- Collection<NuGetTool> getAvailableTools(@NotNull final ToolsPolicy policy) throws FetchException;\r
+ Collection<? extends NuGetTool> getAvailableTools(@NotNull final ToolsPolicy policy) throws FetchException;\r
\r
/**\r
* Downloads and installs nuget tools for both server and agent\r
import jetbrains.buildServer.util.TimeService;\r
import jetbrains.buildServer.util.filters.Filter;\r
import org.jetbrains.annotations.NotNull;\r
+import org.jetbrains.annotations.Nullable;\r
\r
import java.io.IOException;\r
import java.util.Collection;\r
\r
private final NuGetFeedReader myReader;\r
private final TimeService myTime;\r
- private Collection<NuGetTool> myTools;\r
+ private Collection<InstallableTool> myTools;\r
private long lastRequest = 0;\r
\r
public AvailableToolsState(@NotNull final NuGetFeedReader reader,\r
myTime = time;\r
}\r
\r
+ @Nullable\r
+ public FeedPackage findTool(@NotNull final String id) {\r
+ final Collection<InstallableTool> tools = myTools;\r
+ if (tools != null) {\r
+ for (InstallableTool tool : tools) {\r
+ if(tool.getPackage().getAtomId().equals(id)) {\r
+ return tool.getPackage();\r
+ }\r
+ }\r
+ }\r
+ return null;\r
+ }\r
+\r
@NotNull\r
- public Collection<NuGetTool> getAvailable(ToolsPolicy policy) throws FetchException {\r
- Collection<NuGetTool> nuGetTools = myTools;\r
+ public Collection<? extends NuGetTool> getAvailable(ToolsPolicy policy) throws FetchException {\r
+ Collection<InstallableTool> nuGetTools = myTools;\r
if (policy == ToolsPolicy.FetchNew\r
|| nuGetTools == null\r
|| lastRequest + TIMEOUT < myTime.now()) {\r
return nuGetTools;\r
}\r
\r
- private Collection<NuGetTool> fetchAvailable() throws FetchException {\r
+ private Collection<InstallableTool> fetchAvailable() throws FetchException {\r
try {\r
final Collection<FeedPackage> packages = myReader.queryPackageVersions(FeedConstants.FEED_URL, FeedConstants.NUGET_COMMANDLINE);\r
return CollectionsUtil.filterAndConvertCollection(\r
packages,\r
- new Converter<NuGetTool, FeedPackage>() {\r
- public NuGetTool createFrom(@NotNull FeedPackage source) {\r
+ new Converter<InstallableTool, FeedPackage>() {\r
+ public InstallableTool createFrom(@NotNull FeedPackage source) {\r
return new InstallableTool(source);\r
}\r
},\r
--- /dev/null
+/*\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.server.toolRegistry.impl;\r
+\r
+import jetbrains.buildServer.nuget.server.feed.reader.FeedPackage;\r
+import org.jetbrains.annotations.NotNull;\r
+import org.jetbrains.annotations.Nullable;\r
+\r
+import java.io.File;\r
+\r
+/**\r
+* Created by Eugene Petrenko (eugene.petrenko@gmail.com)\r
+* Date: 16.08.11 0:09\r
+*/\r
+public interface InstallLogger {\r
+ void started(@NotNull String packageId);\r
+\r
+ void packageNotFound(@NotNull String packageId);\r
+\r
+ void packageDownloadStarted(@NotNull FeedPackage tool);\r
+\r
+ void packageDownloadFinished(@NotNull FeedPackage tool, @Nullable File pkg);\r
+\r
+ void packageDownloadFailed(@NotNull FeedPackage tool, @Nullable File pkg, @NotNull Exception e);\r
+\r
+ void packageUnpackStarted(@NotNull FeedPackage tool, @NotNull File pkg);\r
+\r
+ void packageUnpackFailed(@NotNull FeedPackage tool, @NotNull File pkg, @Nullable File dest);\r
+\r
+ void packageUnpackFinished(@NotNull FeedPackage tool, @NotNull File pkg, @Nullable File dest);\r
+\r
+ void agentToolPackStarted(@NotNull FeedPackage tool, @NotNull File dest);\r
+\r
+ void agentToolPackFailed(@NotNull FeedPackage tool, @NotNull File dest, @NotNull Exception e);\r
+\r
+ void agentToolPackFinished(@NotNull FeedPackage tool);\r
+\r
+ void agentToolPubslishStarted(@NotNull FeedPackage tool, @NotNull File agentTool);\r
+\r
+ void agentToolPublishFailed(@NotNull FeedPackage tool, @NotNull File agentTool, @NotNull Exception e);\r
+\r
+ void agentToolPuglishFinished(@NotNull FeedPackage tool, @NotNull File agentTool);\r
+\r
+ void finished(@NotNull String packageId, @Nullable FeedPackage tool);\r
+}\r
--- /dev/null
+/*\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.server.toolRegistry.impl;\r
+\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: 15.08.11 21:32\r
+*/\r
+public class InstallResult {\r
+ private final File myExtractedPackage;\r
+ private final File myAgentPlugin;\r
+\r
+ public InstallResult(@NotNull final File extractedPackage,\r
+ @NotNull final File agentPlugin) {\r
+ myExtractedPackage = extractedPackage;\r
+ myAgentPlugin = agentPlugin;\r
+ }\r
+\r
+ @NotNull\r
+ public File getExtractedPackage() {\r
+ return myExtractedPackage;\r
+ }\r
+\r
+ @NotNull\r
+ public File getAgentPlugin() {\r
+ return myAgentPlugin;\r
+ }\r
+}\r
\r
package jetbrains.buildServer.nuget.server.toolRegistry.impl;\r
\r
+import com.intellij.openapi.diagnostic.Logger;\r
import jetbrains.buildServer.nuget.server.toolRegistry.*;\r
import org.jetbrains.annotations.NotNull;\r
\r
-import java.io.File;\r
+import java.lang.reflect.InvocationHandler;\r
+import java.lang.reflect.Method;\r
+import java.lang.reflect.Proxy;\r
import java.util.Arrays;\r
import java.util.Collection;\r
import java.util.List;\r
* Date: 11.08.11 1:07\r
*/\r
public class NuGetToolManagerImpl implements NuGetToolManager {\r
+ private static final Logger LOG = Logger.getInstance(NuGetToolManagerImpl.class.getName());\r
+\r
private final AvailableToolsState myAvailables;\r
+ private final NuGetToolsInstaller myInstaller;\r
+ private final ToolsRegistry myInstalled;\r
\r
- public NuGetToolManagerImpl(AvailableToolsState availables) {\r
+ public NuGetToolManagerImpl(@NotNull final AvailableToolsState availables,\r
+ @NotNull final NuGetToolsInstaller installer,\r
+ @NotNull final ToolsRegistry installed) {\r
myAvailables = availables;\r
+ myInstaller = installer;\r
+ myInstalled = installed;\r
}\r
\r
@NotNull\r
public Collection<NuGetInstalledTool> getInstalledTools() {\r
- return mockInstalledTools();\r
+ return myInstalled.getTools();\r
}\r
\r
@NotNull\r
}\r
\r
@NotNull\r
- public Collection<NuGetTool> getAvailableTools(@NotNull ToolsPolicy policy) throws FetchException {\r
+ public Collection<? extends NuGetTool> getAvailableTools(@NotNull ToolsPolicy policy) throws FetchException {\r
//This must be cached to make if work faster!\r
return myAvailables.getAvailable(policy);\r
}\r
\r
public void installTool(@NotNull String toolId) {\r
-\r
+ myInstaller.installNuGet(\r
+ toolId,\r
+ (InstallLogger) Proxy.newProxyInstance(getClass().getClassLoader(),\r
+ new Class<?>[]{InstallLogger.class},\r
+ new InvocationHandler() {\r
+ public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {\r
+ StringBuilder sb = new StringBuilder();\r
+ sb.append(method.getName());\r
+ for (Object arg : args) {\r
+ sb.append(" ").append(arg);\r
+ }\r
+ LOG.debug(sb.toString());\r
+ return null;\r
+ }\r
+ }));\r
}\r
\r
private List<NuGetInstallingTool> mockInstallingTools() {\r
}\r
);\r
}\r
-\r
- private List<NuGetInstalledTool> mockInstalledTools() {\r
- return Arrays.<NuGetInstalledTool>asList(\r
- new NuGetInstalledTool() {\r
- @NotNull\r
- public File getPath() {\r
- return new File(".");\r
- }\r
-\r
- @NotNull\r
- public String getId() {\r
- return "i1";\r
- }\r
-\r
- @NotNull\r
- public String getVersion() {\r
- return "i1.2.3.5";\r
- }\r
- },\r
- new NuGetInstalledTool() {\r
- @NotNull\r
- public File getPath() {\r
- return new File(".");\r
- }\r
-\r
- @NotNull\r
- public String getId() {\r
- return "i2";\r
- }\r
-\r
- @NotNull\r
- public String getVersion() {\r
- return "i2.4.5.7";\r
- }\r
- }\r
- );\r
- }\r
}\r
--- /dev/null
+/*\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.server.toolRegistry.impl;\r
+\r
+import com.intellij.openapi.diagnostic.Logger;\r
+import jetbrains.buildServer.nuget.server.feed.reader.FeedPackage;\r
+import jetbrains.buildServer.nuget.server.feed.reader.NuGetFeedReader;\r
+import jetbrains.buildServer.util.ArchiveUtil;\r
+import jetbrains.buildServer.util.FileUtil;\r
+import org.jetbrains.annotations.NotNull;\r
+import org.jetbrains.annotations.Nullable;\r
+\r
+import java.io.*;\r
+import java.util.zip.ZipInputStream;\r
+\r
+/**\r
+ * Created by Eugene Petrenko (eugene.petrenko@gmail.com)\r
+ * Date: 15.08.11 20:47\r
+ */\r
+public class NuGetToolsInstaller {\r
+ private static final Logger LOG = Logger.getInstance(NuGetToolsInstaller.class.getName());\r
+\r
+ private final ToolPaths myToolPaths;\r
+ private final NuGetFeedReader myClient;\r
+ private final AvailableToolsState myState;\r
+ private final ToolPacker myPacker;\r
+\r
+ public NuGetToolsInstaller(@NotNull final ToolPaths toolPaths,\r
+ @NotNull final NuGetFeedReader client,\r
+ @NotNull final AvailableToolsState state,\r
+ @NotNull final ToolPacker packer) {\r
+ myToolPaths = toolPaths;\r
+ myClient = client;\r
+ myState = state;\r
+ myPacker = packer;\r
+ }\r
+\r
+ @Nullable\r
+ private FeedPackage findTool(@NotNull final String packageId) {\r
+ return myState.findTool(packageId);\r
+ }\r
+\r
+ public InstallResult installNuGet(@NotNull final String packageId, @NotNull final InstallLogger logger) {\r
+ logger.started(packageId);\r
+\r
+ FeedPackage tool = null;\r
+ try {\r
+ tool = findTool(packageId);\r
+ if (tool == null) {\r
+ logger.packageNotFound(packageId);\r
+ return null;\r
+ }\r
+\r
+ final File pkg = downloadPackage(logger, tool);\r
+ final File dest = extractPackage(logger, tool, pkg);\r
+ File agentTool = packAgentPlugin(logger, tool, dest);\r
+ agentTool = registerAgentPlugins(logger, tool, agentTool);\r
+\r
+ return new InstallResult(dest, agentTool);\r
+ } catch (ProcessedException e) {\r
+ return null;\r
+ } catch (Exception e) {\r
+ LOG.warn("Failed to install NuGet.Commandline package. " + e.getMessage(), e);\r
+ return null;\r
+ } finally {\r
+ logger.finished(packageId, tool);\r
+ }\r
+ }\r
+\r
+ @NotNull\r
+ private File registerAgentPlugins(InstallLogger logger, FeedPackage tool, File agentTool) {\r
+ logger.agentToolPubslishStarted(tool, agentTool);\r
+\r
+ try {\r
+ final File dest = new File(myToolPaths.getAgentPluginsPath(), agentTool.getName());\r
+ if (!agentTool.renameTo(dest)) {\r
+ FileUtil.copy(agentTool, dest);\r
+ FileUtil.delete(agentTool);\r
+ }\r
+ return dest;\r
+ } catch (Exception e) {\r
+ logger.agentToolPublishFailed(tool, agentTool, e);\r
+ throw new ProcessedException();\r
+ } finally {\r
+ logger.agentToolPuglishFinished(tool, agentTool);\r
+ }\r
+ }\r
+\r
+ private File packAgentPlugin(@NotNull final InstallLogger logger,\r
+ @NotNull final FeedPackage tool,\r
+ @NotNull final File dest) {\r
+ logger.agentToolPackStarted(tool, dest);\r
+ try {\r
+ return myPacker.packTool("nuget-commandline-" + tool.getInfo().getVersion(), dest);\r
+ } catch (Exception e) {\r
+ logger.agentToolPackFailed(tool, dest, e);\r
+ LOG.warn("Failed to pack agent tool " + tool);\r
+ throw new ProcessedException();\r
+ } finally {\r
+ logger.agentToolPackFinished(tool);\r
+ }\r
+ }\r
+\r
+ @NotNull\r
+ private File extractPackage(@NotNull final InstallLogger logger,\r
+ @NotNull final FeedPackage tool,\r
+ @NotNull final File pkg) {\r
+ logger.packageUnpackStarted(tool, pkg);\r
+ File dest = null;\r
+ try {\r
+ dest = new File(myToolPaths.getTools(), tool.getInfo().getVersion());\r
+ FileUtil.createDir(dest);\r
+ final ZipInputStream zip = new ZipInputStream(new BufferedInputStream(new FileInputStream(pkg)));\r
+ if (!ArchiveUtil.unpackZip(zip, dest)) {\r
+ throw new IOException("Failed to unpack package " + tool.getInfo() + " to " + dest);\r
+ }\r
+ return dest;\r
+ } catch (Exception e) {\r
+ logger.packageUnpackFailed(tool, pkg, dest);\r
+ LOG.warn("Failed to unpack nuget package " + tool + ". " + e.getMessage(), e);\r
+ throw new ProcessedException();\r
+ } finally {\r
+ logger.packageUnpackFinished(tool, pkg, dest);\r
+ }\r
+ }\r
+\r
+ @NotNull\r
+ private File downloadPackage(@NotNull final InstallLogger logger,\r
+ @NotNull final FeedPackage tool) {\r
+ logger.packageDownloadStarted(tool);\r
+ File pkg = null;\r
+ try {\r
+ pkg = FileUtil.createTempFile("nuget.commandline", ".nupkg");\r
+ myClient.downloadPackage(tool, pkg);\r
+ return pkg;\r
+ } catch (Exception e) {\r
+ LOG.warn("Failed to download package " + tool + (pkg != null ? " to file " + pkg : ""));\r
+ logger.packageDownloadFailed(tool, pkg, e);\r
+ throw new ProcessedException();\r
+ } finally {\r
+ logger.packageDownloadFinished(tool, pkg);\r
+ }\r
+ }\r
+\r
+ private static class ProcessedException extends RuntimeException {\r
+ }\r
+}\r
--- /dev/null
+/*\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.server.toolRegistry.impl;\r
+\r
+import jetbrains.buildServer.util.ArchiveUtil;\r
+import jetbrains.buildServer.util.FileUtil;\r
+import org.jetbrains.annotations.NotNull;\r
+\r
+import java.io.BufferedOutputStream;\r
+import java.io.File;\r
+import java.io.FileOutputStream;\r
+import java.io.IOException;\r
+import java.util.Collection;\r
+import java.util.zip.ZipEntry;\r
+import java.util.zip.ZipOutputStream;\r
+\r
+/**\r
+ * Created by Eugene Petrenko (eugene.petrenko@gmail.com)\r
+ * Date: 15.08.11 20:51\r
+ */\r
+public class ToolPacker {\r
+\r
+ public File packTool(@NotNull final String toolId,\r
+ @NotNull final File rootDir) throws IOException {\r
+ final File tool = new File(FileUtil.getTempDirectory(), toolId + ".zip");\r
+ final ZipOutputStream fos = new ZipOutputStream(new BufferedOutputStream(new FileOutputStream(tool)));\r
+ try {\r
+ fos.putNextEntry(new ZipEntry("teamcity-plugin.xml"));\r
+ fos.write(TOOL_DESCRIPTOR.getBytes("utf-8"));\r
+ fos.closeEntry();\r
+ if (!ArchiveUtil.packZip(rootDir, fos)) {\r
+ throw new IOException("Failed to create agent tool plugin");\r
+ }\r
+ } finally {\r
+ FileUtil.close(fos);\r
+ }\r
+\r
+ return tool;\r
+ }\r
+\r
+ private static final String TOOL_DESCRIPTOR = "" +\r
+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +\r
+ "<teamcity-agent-plugin xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n" +\r
+ " xsi:noNamespaceSchemaLocation=\"urn:shemas-jetbrains-com:teamcity-agent-plugin-v1-xml\">\n" +\r
+ " <tool-deployment />\n" +\r
+ "</teamcity-agent-plugin>";\r
+}\r
--- /dev/null
+/*\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.server.toolRegistry.impl;\r
+\r
+import jetbrains.buildServer.plugins.bean.PluginInfo;\r
+import jetbrains.buildServer.web.openapi.PluginDescriptor;\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: 15.08.11 20:47\r
+ */\r
+public class ToolPaths {\r
+ private final File myPluginRoot;\r
+\r
+ public ToolPaths(@NotNull final PluginDescriptor paths) {\r
+ myPluginRoot = ((PluginInfo)paths).getPluginRoot();\r
+ }\r
+\r
+ @NotNull\r
+ public File getTools() {\r
+ final File file = new File(myPluginRoot, "tools");\r
+ file.mkdirs();\r
+ return file;\r
+ }\r
+\r
+ public File getAgentPluginsPath() {\r
+ final File file = new File(myPluginRoot, "agent");\r
+ file.mkdirs();\r
+ return file;\r
+ }\r
+}\r
--- /dev/null
+/*\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.server.toolRegistry.impl;\r
+\r
+import jetbrains.buildServer.nuget.server.toolRegistry.NuGetInstalledTool;\r
+import org.jetbrains.annotations.NotNull;\r
+\r
+import java.io.File;\r
+import java.util.ArrayList;\r
+import java.util.Collection;\r
+import java.util.Collections;\r
+\r
+/**\r
+ * Created by Eugene Petrenko (eugene.petrenko@gmail.com)\r
+ * Date: 16.08.11 0:25\r
+ */\r
+public class ToolsRegistry {\r
+ private final ToolPaths myPaths;\r
+\r
+ public ToolsRegistry(@NotNull final ToolPaths paths) {\r
+ myPaths = paths;\r
+ }\r
+\r
+ @NotNull\r
+ public Collection<NuGetInstalledTool> getTools() {\r
+ final File[] tools = myPaths.getTools().listFiles();\r
+ if (tools == null) return Collections.emptyList();\r
+ final Collection<NuGetInstalledTool> result = new ArrayList<NuGetInstalledTool>();\r
+ for (final File path : tools) {\r
+ result.add(new NuGetInstalledTool() {\r
+ @NotNull\r
+ public File getPath() {\r
+ return new File(path, "tools/NuGet.exe");\r
+ }\r
+\r
+ @NotNull\r
+ public String getId() {\r
+ return path.getName();\r
+ }\r
+\r
+ @NotNull\r
+ public String getVersion() {\r
+ return path.getName();\r
+ }\r
+ });\r
+ }\r
+ return result;\r
+ }\r
+}\r