Error when uploading plugin to JetBrains Plugin Repository - intellij-idea

I am trying to deploy my plugin to the JetBrains Plugin Repository, But getting the following error-
ID of edited plugin is null, but uploaded plugin has
ID="package_name". You can not change id of plugin!
However I have ensured the <id>package id </id> has not changed.
And also I am uploading this for first time.
Thanks in advance for the help.
Here is the plugin.xml-
<idea-plugin version="3">
<id>my package name</id>
<name>My Plugin Name</name>
<version>2.0</version>
<vendor email="support#skedsoft.com" url="http://www.skedsoft.com">SkedSoft</vendor>
<description><![CDATA[
plugin description
]]></description>
<change-notes><![CDATA[
plgin change details
]]>
</change-notes>
<!-- please see http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/build_number_ranges.html for description -->
<idea-version since-build="141.0"/>
<!-- please see http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/plugin_compatibility.html
on how to target different products -->
<!-- uncomment to enable plugin in all products
-->
<depends>com.intellij.modules.androidstudio</depends>
<extensions defaultExtensionNs="com.intellij">
<!-- Add your extensions here -->
</extensions>
<actions>
my action classes and details
</actions>
</idea-plugin>

There was a problem with plugin repository. You can upload your plugin now.

Related

RCP e4 EclipseLink Error: No Persistence provider for EntityManager named

I am trying to apply a persistence framework to an eclipse rcp e4 application. For this purpose, I created an example of a feature project, almost following the tutorial https://www.vogella.com/tutorials/JavaPersistenceAPI/article.html, but adapting for rcp. However I got the error "Persistence provider for EntityManager named xxx not found". I have searched for a week but found no solution. Could someone please tell me, what the error really is and how to resolve it?
The persistence.xml is located in project tasks.model folder META-INF. The eclipse.jar and javax.persistence.jar are in another plugin project (Earlier I defined maven dependencies in pom.xml. Although eclipse reports no compilation errors, but running rcp product would result in an error that ClassDefNotFoundException for persistence, so putting javax.persistence.jar in a separate plugin removed this error). Some answers suggested that the persistence.xml should be in the folder src/resources/META-INF. But in a plugin project the folder META-INF is already in its default place. I even created an extra folder resources/META-INF and put the persistence.xml in that, but it did not help. If I created a normal maven project, then things work properly, also when I change the database to mysql in localhost. The errors appear when I convert the project into a plugin project for building rcp applications.
The error "No Persistence provider for EntityManager" occurs when I invoke the command:
factory = Persistence.createEntityManagerFactory("todos");
My persistence.xml file looks like:
<?xml version="1.0" encoding="UTF-8" ?>
<persistence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0" xmlns="http://java.sun.com/xml/ns/persistence">
<persistence-unit name="todos" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<class>tasks.model.Todo</class>
<properties>
<property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver" />
<property name="javax.persistence.jdbc.url" value="jdbc:derby:/tempGeo/simpleDB" />
<property name="javax.persistence.jdbc.user" value="test" />
<property name="javax.persistence.jdbc.password" value="test" />
<!-- EclipseLink should create the database schema automatically -->
<property name="eclipselink.ddl-generation" value="create-tables" />
<property name="eclipselink.ddl-generation.output-mode" value="database" />
</properties>
</persistence-unit>
</persistence>

IntelliJ plugin localization

I'm creating a plugin for Intellij IDEA. Following found tutorial now I have pretty simple working plugin. But my problem is the fact I don't know how to maintain localization for my actions.
Now I've got plugin.xml file with following actions tag:
<actions>
<group id="MyPlugin.TopMenu"
text="_MyPlugin"
description="My plugin toolbar menu">
<add-to-group group-id="MainMenu" anchor="last"/>
<action id="MyAction"
class="actions.MyAction"
text="_MyAction"
description="MyAction"/>
</group>
</actions>
This code means that my group and action will be shown as "_MyPlugin" and "_MyAction" regardless localization.
I found how to create resouces bundle and did it. Now I have strings.xml (as I used to for Android) with following content:
<properties>
<entry key="ActionName">_MyAction</entry>
</properties>
Another resource file called strings_ru.xml is combined with it into Resource Bundle, so I don't think I did something wrong with it.
I want to use resource reference to set text tag for my group and its actions. Is it even possible? If not should I create and register actions in runtime?

DevOps Build with localization resources

I'm trying to build a solution using Azure DevOps and publish the result as a nuGet package in a private repository.
A project in the solution contains a localized resource Language.resx containing the English texts.
The localized versions are:
Language.da.resx, Language.se.resx and Language.no.resx yet none of these are included in the resulting nuget package.
I tried adding /target:Resource,Compile to the MSBuild arguments property of the Build Solution task in DevOps, but it just resulted in an error saying no 'Resource' target was found.
I'm sure I'm just missing something obvious, but I just can't see it.
I must be close, the nuGet package gets published after all, and works, except for the localization resources.
I inspected the resulting nuGet Package and extracted the DLL from the project in question. Opening the DLL in .Net Reflector 10 shows me that it does indeed contain the text strings in English, but no other languages.
It appears the localized ressources were indeed built by default, though not visible in .Net Reflector 10.
The reason is that they weren't included in the nuGet package in the Packaging task.
A bit of research lead me to add a .nuspec file to the project.
In this file, I specified the relevant files etc. and they are now included in the nuGet package.
Not ideal though, since the list of files and dependencies now have to be maintained manually. But I was unable to find a way of making it dynamic.
Most of the details in the .nuspec file was possible to be made dynamic though, using variables referring to the AssemblyInfo.cs file.
I ended up with the following content in the .nuspec file (some details cleaned though, since this is displayed in public)
Note: The word Release in the src attribute of the files section is the name of my build profile. Your solution might use a different name.
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<!-- The identifier that must be unique within the hosting gallery -->
<id>$id$</id>
<!-- The package version number that is used when resolving dependencies -->
<version>$version$</version>
<!-- Authors contain text that appears directly on the gallery -->
<authors>$author$</authors>
<!--
Owners are typically nuget.org identities that allow gallery
users to easily find other packages by the same owners.
-->
<owners>$author$</owners>
<!-- License and project URLs provide links for the gallery -->
<!--<licenseUrl></licenseUrl>-->
<!--<projectUrl></projectUrl>-->
<!-- The icon is used in Visual Studio's package manager UI -->
<!--<iconUrl></iconUrl>-->
<!--
If true, this value prompts the user to accept the license when
installing the package.
-->
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<!-- Any details about this particular release -->
<!--<releaseNotes></releaseNotes>-->
<!--
The description can be used in package manager UI. Note that the
nuget.org gallery uses information you add in the portal.
Must be included, and must never be empty.
-->
<description>$description$</description>
<!-- Copyright information -->
<copyright>$copyright$</copyright>
<!-- Tags appear in the gallery and can be used for tag searches -->
<!--<tags></tags>-->
<!-- Dependencies are automatically installed when the package is installed -->
<dependencies>
<dependency id="MicrosoftOfficeCore" version="15.0.0" />
<dependency id="Microsoft.Office.Interop.Word" version="15.0.4797.1003" />
</dependencies>
</metadata>
<!-- Files to include in the package -->
<files>
<file src="bin\Release\$id$.dll" target="lib\net462\$id$.dll" />
<file src="bin\Release\da\$id$.resources.dll" target="lib\net462\da\$id$.resources.dll" />
<file src="bin\Release\no\$id$.resources.dll" target="lib\net462\no\$id$.resources.dll" />
<file src="bin\Release\sv\$id$.resources.dll" target="lib\net462\sv\$id$.resources.dll" />
</files>
</package>

IntelliJ Enterprise Plugin Repository - Plugins' Metadata won't display

I have several proprietary IntelliJ plugins that I am hosting on an Enterprise Repository. When I view them in IntelliJ's Repository Browser, the metadata does not display, besides the version.
(Note: None of the other plugins have metadata either)
I am hosting these plugins at my.enterprise.repository.com/updatePlugins.xml, with the file
<plugins>
<plugin
id="Plugin 1"
url="http://my.enterprise.repository.com/Plugin1.jar"
version="12.001" />
<plugin
id="Plugin 2"
url="http://my.enterprise.repository.com/Plugin2.jar"
version="12.001"/>
<plugin
id="Plugin 3"
url="http://my.enterprise.repository.com/Plugin3.jar"
version="12.001"/>
<plugin
id="Plugin 4"
url="http://my.enterprise.repository.com/Plugin4.jar"
version="12.001"/>
<plugin
id="Plugin 5"
url="http://my.enterprise.repository.com/Plugin5.jar"
version="12.001"/>
</plugins>
And the plugin.xml for Plugin 5 is
<idea-plugin version="2">
<name>Plugin 5</name>
<description>Is a cool plugin.</description>
<version>12.001</version>
<vendor>My Company</vendor>
<idea-version since-build="8000"/>
<application-components>
<!-- Add your application components here -->
</application-components>
<project-components>
<!-- Add your project components here -->
</project-components>
<extensions defaultExtensionNs="com.intellij">
...
</extensions>
</idea-plugin>
Is the metadata specified in a different file? Or is my plugin.xml file wrong?
Note: These plugins successfully download, install, and function.
It's a known issue, the work is in progress. You can track the state here:
IDEA-88075 Plugins in enterprise / custom plugin repository do not show plugin details

how can i know whether i am using a snapshot version or not

I have created my own repository under my hard disk
using Apache Server and provided username and password under settings.xml file
under the M2_HOME
And when i am running mvn deploy under command prompt its displaying BUILD ERROR
saying this
<distributionManagement>
<!-- use the following if you're not using a snapshot version. --
<repository>
<id>repo</id>
<name>Repository Name</name>
<url>scp://host/path/to/repo</url>
</repository>
<!-- use the following if you ARE using a snapshot version. -->
<snapshotRepository>
<id>repo</id>
<name>Repository Name</name>
<url>scp://host/path/to/repo</url>
</snapshotRepository>
</distributionManagement>
Please tell me how can i know whether i am using a snapshot version
(I have imported an existing Maven project into Eclipse , i dont know about maven )
You just have to check in the same pom.xml file of the project whether the <version \> tag includes the -SNAPSHOT suffix. If the ${project.version} is not defined, look for the same tag under the <parent \> tag.
Anyway, you are going to have some hard time setting up deployment with no previous knowledge of Maven. I suggest you take a look at this free PDF guide, which is a pretty good introduction to the tool.