How to config custom plugin repository with 'idea.plugins.host'?
已回答
Hi,
I wrote my own updatePlugins.xml file, and configured it though Plugins -> Manage plugin Repositories -> + -> "http://xx-server:8000/updatePlugins.xml". Then I can see the custom plugins in Marketplace, it succeed.
But on page https://www.jetbrains.com/help/idea/managing-plugins.html#required-plugins, it says that I can alternatively use idea.plugins.host to replace the JetBrains Plugin Repository, so I add one line through Help -> Edit custom properties. But failed with the following four configurations:
- idea.plugins.host="http://xx-server:8000/updatePlugins.xml"
- idea.plugins.host="http://xx-server:8000/"
- idea.plugins.host=http://xx-server:8000/updatePlugins.xml
- idea.plugins.host=http://xx-server:8000/
All of them have the same error:
Is there any wrong with my config? I am using IDEA 2020.3 community.
请先登录再写评论。
Hello,
Could you please share your idea.log ("Help | Show Log in...") after restarting IDE?
Sorry, there is a restriction to submit the whole idea.log file in our company, if you can give some keyword, I could paste the relate results.
Leon,
I need just startup lines describing common IDE configuratiuon to check that property was enabled.
That property is enabled, I find this log:
It tried to access xxx/api/search/plugins?xxxxxx, and I don't have it.
Leon,
Did you get this message after opening "Plugins" settings page? Could you please enter address manually in "Manage plugin Repositories" and check logs again - what URL will be used?
There is no other message in IDEA UI, but ther is an Error in terminal :
Though "Manage plugin Repositories", the result is :
It works ok and the url address changed to plugins.jetbrains.com in the idea.log:
I think it's a bug of the example on the help doc. It should be:
Leon,
Does it work with "idea.plugin.hosts"?
"idea.plugin.hosts" works ok.
Leon,
Thanks! I'll ask to add more information about those options. "
idea.plugins.host" also might be used
. In this case you specify a URL to an application that should be ready to requests that IDEA sends to plugins.jetbrains.com: for example, "/plugins/list?build=<buildnumber>"
After adding "idea.plugin.hosts", Is it replaced default marketplace?
In Guide doc. (https://www.jetbrains.com/help/idea/managing-plugins.html#repos)
```
If you replace the default plugin repository with a custom one, the search field on the Marketplace tab of the Plugins dialog will browse only the plugins in your custom repository.
```
I added "idea.plugin.hosts" with my custom plugin repository but i cannot search the plugin without type.
I can search custom plugin repository plugin with type "repository:http://plugins.example.com:8080/updatePlugins.xml myPlugin" only!!
In short, "idea.plugin.hosts" properties cannot replace default marketplace??
Yes, to exclude the JetBrains plugin repository completely you need to define
idea.plugin.hosts
property as described in documentation.>I added "idea.plugin.hosts" with my custom plugin repository but i cannot search the plugin without type.
Could you please clarify what do you mean by type?
As noted, this property completely replaces the Marketplace default repository, so all plugins from Marketplace will not be available in this case.
If you want to add additional repositories, please follow Custom plugin repositories steps in documentation section.
type is repository url like this. "repository:http://plugins.example.com:8080/updatePlugins.xml myPlugin"
search custom plugin without above type, it cannot be searched.
Could you please add screenshot or better a small screencast if possible?
For uploading you can use https://uploads.jetbrains.com or any file sharing service.
I think he means, that he has to type `repository:http://plugins.example.com:8080/updatePlugins.xml` in the searchfield, before he is able to type the plugin-name of the plugin he is looking for.
For comparison: I've an RCP/standalone MPS instance with a custom plugin-repository and am using `-Didea.plugin.hosts`. In the marketplace I see jetbrains and custom plugins and also can simply search for just my plugin-name, without the need to specify the repo first. (On MPS 2020.3.3)
If one uses it's own repository, the repository plugin descriptor must match requirements, described here https://plugins.jetbrains.com/docs/intellij/update-plugins-format.html
Repository located at the specified url should support following requests from IDE:
plugins/list/?build=<productCode>-<buildNumber>
.pluginManager?action=download&id=<pluginXmlId>&build=<productCode>-<buildNumber>
.More documentation can be found at
https://plugins.jetbrains.com/docs/marketplace/plugins-list.html
https://plugins.jetbrains.com/docs/marketplace/plugin-update-download.html