nuget-common/src/jetbrains/buildServer/nuget/common/FeedConstants.java
public boolean accept(File pathname) {
      return pathname.isFile() && EXE_FILE_NAME_FILTER.accept(pathname.getName());
new FileFilter()
nuget-common/src/jetbrains/buildServer/nuget/common/FeedConstants.java
public boolean accept(File pathname) {
      return pathname.isFile() && PACKAGE_FILE_NAME_FILTER.accept(pathname.getName()) || EXE_FILE_NAME_FILTER.accept(pathname.getName());
new FileFilter()
@NotNull String data
nuget-common/src/jetbrains/buildServer/nuget/common/FeedConstants.java
return data.toLowerCase().endsWith(FeedConstants.EXE_EXTENSION.toLowerCase());
boolean accept(@NotNull String data)
String name
nuget-tests/src/jetbrains/buildServer/nuget/tests/server/tools/ToolsRegistryTest.java
file(myPackagesHome, name + ".nupkg");
    file(myAgentHome, name + ".nupkg.zip");
    file(myToolsHome, name + ".nupkg/tools/nuget.exe");
    return new InstalledTool() {
      @NotNull
      public File getAgentPluginFile() {
        return myAgentHome;
InstalledTool tool(String name)
nuget-tests/src/jetbrains/buildServer/nuget/tests/server/tools/ToolsRegistryTest.java
void install()
nuget-tests/src/jetbrains/buildServer/nuget/tests/server/tools/ToolsRegistryTest.java
void delete()
nuget-tests/src/jetbrains/buildServer/nuget/tests/server/tools/ToolsRegistryTest.java
return null;
File getNuGetExePath()
nuget-tests/src/jetbrains/buildServer/nuget/tests/server/tools/ToolsRegistryTest.java
return false;
boolean isDefaultTool()
nuget-tests/src/jetbrains/buildServer/nuget/tests/server/tools/ToolsRegistryTest.java
return null;
String getId()
nuget-tests/src/jetbrains/buildServer/nuget/tests/server/tools/ToolsRegistryTest.java
return null;
String getVersion()
nuget-server/src/jetbrains/buildServer/nuget/server/toolRegistry/impl/PluginNaming.java
return FeedConstants.NUGET_COMMANDLINE;
String getNuGetCommandLinePackageName()
@NotNull final File plugin
nuget-server/src/jetbrains/buildServer/nuget/server/toolRegistry/impl/PluginNaming.java
String name = plugin.getName();

    if (name.toLowerCase().endsWith(FeedConstants.NUGET_EXTENSION.toLowerCase())) {
      name = name.substring(0, name.length() - FeedConstants.NUGET_EXTENSION.length());

      if (name.toLowerCase().startsWith(getNuGetCommandLinePackageName().toLowerCase() + ".")) {
        name = name.substring(getNuGetCommandLinePackageName().length()+1);
String getVersion(@NotNull final File plugin)
@NotNull final InstalledTool nupkg
nuget-server/src/jetbrains/buildServer/nuget/server/toolRegistry/impl/impl/ToolsWatcherImpl.java
myExecutors.getNormalExecutorService().submit(ExceptionUtil.catchAll("update installed package", new Runnable() {
          installPackage(nupkg);
      new InstalledToolImpl(myNaming, file).delete();
      installPackage(new InstalledToolImpl(myNaming, file));
void updatePackage(@NotNull final InstalledTool nupkg)
@NotNull final InstalledTool file
nuget-server/src/jetbrains/buildServer/nuget/server/toolRegistry/impl/impl/ToolsWatcherImpl.java
try {
      file.removeUnpackedFiles();

      FileUtil.createParentDirs(file.getAgentPluginFile());
      FileUtil.createDir(file.getUnpackFolder());
      myUnpacker.extractPackage(file.getPackageFile(), file.getUnpackFolder());
      myPacker.packTool(file.getAgentPluginFile(), file.getUnpackFolder());
void installPackage(@NotNull final InstalledTool file)
String name
nuget-tests/src/jetbrains/buildServer/nuget/tests/server/tools/ToolsRegistryTest.java
File pkg = file(myPackagesHome, name + ".nupkg");
    file(myAgentHome, name + ".nupkg.zip");
    file(myToolsHome, name + ".nupkg/tools/nuget.exe");
    return new InstalledToolImpl(myNaming, pkg);
InstalledTool nupkg(String name)