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

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

Related

Error when uploading plugin to JetBrains Plugin Repository

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.

Nutch 2.3 + Elasticsearch 2.1.1. Cannot load Elasticsearch dependencies

I'm trying to integrate Nutch 2.3 in order to push data to the latest Elasticsearch 2.1.1.
I started updating versions and dependencies in the following files:
indexer-elastic/plugin.xml
<plugin id="indexer-elastic" name="ElasticIndexWriter" version="1.0.0"
provider-name="nutch.apache.org">
<runtime>
<library name="indexer-elastic.jar">
<export name="*" />
</library>
<library name="elasticsearch-2.1.1.jar"/>
<library name="hppc-0.7.1.jar"/>
<library name="jackson-core-2.6.2.jar"/>
<library name="jackson-dataformat-cbor-2.6.2.jar"/>
<library name="jackson-dataformat-smile-2.6.2.jar"/>
<library name="jackson-dataformat-yaml-2.6.2.jar"/>
<library name="guava-18.0.jar"/>
<library name="compress-lzf-1.0.2.jar"/>
<library name="t-digest-3.0.jar"/>
<library name="jsr166e-1.1.0.jar"/>
<library name="commons-cli-1.3.1.jar"/>
<library name="netty-3.10.5.Final.jar"/>
<library name="joda-time-2.8.2.jar"/>
<library name="lucene-analyzers-common-5.3.1.jar"/>
<library name="lucene-backward-codecs-5.3.1.jar"/>
<library name="lucene-core-5.3.1.jar"/>
<library name="lucene-highlighter-5.3.1.jar"/>
<library name="lucene-join-5.3.1.jar"/>
<library name="lucene-memory-5.3.1.jar"/>
<library name="lucene-queries-5.3.1.jar"/>
<library name="lucene-queryparser-5.3.1.jar"/>
<library name="lucene-spatial-5.3.1.jar"/>
<library name="lucene-suggest-5.3.1.jar"/>
<library name="HdrHistogram-2.1.6.jar"/>
<library name="joda-convert-1.2.jar"/>
</runtime>
<requires>
<import plugin="nutch-extensionpoints" />
</requires>
<extension id="org.apache.nutch.indexer.elastic"
name="Elasticsearch Index Writer"
point="org.apache.nutch.indexer.IndexWriter">
<implementation id="ElasticIndexWriter"
class="org.apache.nutch.indexwriter.elastic.ElasticIndexWriter" />
</extension>
</plugin>
indexer-elastic/ivy.xml
<ivy-module version="1.0">
<info organisation="org.apache.nutch" module="${ant.project.name}">
<license name="Apache 2.0" />
<ivyauthor name="Apache Nutch Team" url="http://nutch.apache.org" />
<description>Apache Nutch</description>
</info>
<configurations>
<include file="../../..//ivy/ivy-configurations.xml" />
</configurations>
<publications>
<!--get the artifact from our module name -->
<artifact conf="master" />
</publications>
<dependencies>
<dependency org="org.elasticsearch" name="elasticsearch"
rev="2.1.1" conf="*->default" />
<dependency org="com.google.guava" name="guava" rev="18.0" />
</dependencies>
</ivy-module>
I also reworked org.apache.nutch.indexwriter.elastic.ElasticIndexWriter to work against the new interface of the elasticsearch 2.1.1 client.
So what is the problem?
It seems that the dependencies listed in indexer-elastic/plugin.xml are not loaded automatically at runtime. Therefore elasticsearch client cannot benefit from them and throws exceptions..
So i tried a different approach adding the dependencies one by one according to the exception it gives me in $NUTCH_ROOT/ivy/ivy.xml where the main dependencies of Apache Nutch are listed. That's not the right approach but it's kind of working.
How to deal with plugin dependencies?
What is the strategy for using newer version of a library in the plugin. For example Nutch uses Guava v11.0.2 but Elasticsearch 2.1.1 requires Guava v18.0. Although i'm specifying it explicitly in indexer-elastic/ivy.xml it seems to load the old version at runtime.
Plugin dependencies should be declared both in the plugin's ivy.xml and in the plugin.xml files. I haven't tested the files you included but cannot see anything immediately wrong with them. As you pointed out, declaring the deps in the main ivy file is not great.
See this note on how to upgrade the Tika plugin, the same logic applies to all the plugins.
As for resolving conflicts between the main dependencies and the ones from the plugins, unfortunately you'll have to deal with it yourself e.g. force the version you need in the main ivy.xml as Nutch does not handle the plugins as dependencies (in the Maven sense) of the main code.

Problems running Java 8 TestNG inside IntelliJ

I am writing a Maven application using OpenJDK 1.8 and running tests using TestNG.
When I run Maven from the command line everything works fine, but when I try to run the test inside IntelliJ, then the make process is displaying the following error:
java: javacTask: source release 8 requires target release 1.8
I have the project settings pointing to the 1.8 JDK and Project Language Level 8.
Inside Maven I have the following block (which I am guessing is not getting called yet as it seems to be the make causing the problem)
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
I have even configured the Maven Runner JRE to point to the 1.8 JDK.
I just don't seem to be able to get IntelliJ 12.0.4 to run the tests properly
Am I missing something?
After the hint from CrazyCoder it turns out that .idea/compiler.xml had the following section in it
<bytecodeTargetLevel>
<module name="game" target="1.7" />
</bytecodeTargetLevel>
I changed this to:
<bytecodeTargetLevel>
<module name="game" target="1.8" />
</bytecodeTargetLevel>
and it worked
There is another way to make it. Go to Files->Other Settings->Type "javac" in the search bar -> change the JDK default to "1.8" or any version you target.
Xetius' answer didn't work for me in IntelliJ 14.1.2
In the end I found the section in .idea/misc.xml
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" assert-keyword="true" jdk-15="true" project-jdk-name="1.7" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
I ended up with:
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
For me, I needed to go File > Project Structure > Modules. Half of my modules had their "module SDK" field set to the wrong thing (not Project Default as they should have been).

Build Eclipse cross-platform with Maven Tycho

I try to compile an Eclipse Indigo RCP application with Maven and Tycho. It works fine if I just build it for one platform but if I try to build it for more the build stops working.
The Problem is that I have platform specific plugins in my product file I want to build. Dependencies like org.eclipse.swt.win32.win32.x86 which are fragment plugins for org.eclipse.swt.
When I add no platform specific fragments to my product the application wouldn't start because there are no platform libraries like org.eclipse.swt.win32.win32.x86.
As Tycho repository we use a clone of the eclipse indigo update site hosted on our own server. It includes the delta-pack.
And when I add all fragments for all platforms the build crashed and maven tell me that the platform filters did not match for the Linux build for example.
Does anyone know how to fix this?
Should I add these platform dependent stuff into my product? I prefer to keep the specific dependencies out of my product, am I right?
It sounds like you have a plug-in based product. In this case you will need to manually edit your .product file and add in platform filters for these plug-ins. Unfortunately the built-in product editor in eclipse does not expose these values. See http://wiki.eclipse.org/Tycho/FAQ#How_to_build_plugin-based_products_with_platform-specific_fragments.3F
For each plugin e.g. org.eclipse.swt.win32.win32.x86 you will need to add something like;
<plugin id="org.eclipse.swt.win32.win32.x86" fragment="true" ws="win32" os="win32" arch="x86"/>
Note, if you use the product editor it will remove these values.
It is better however to use a feature based product. The feature editor permits these fields to be edited.
There is an easier solution I found in the blog: http://blog.sdruskat.net/building-a-cross-platform-feature-based-eclipse-rcp-product-with-tycho-the-umpteenth/
In the parent/master pom.xml,
To use all the plugins from p2, specify the following:
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho-version}</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho-version}</version>
<configuration>
<resolver>p2</resolver>
<environments>
<environment>
<os>linux</os>
<ws>gtk</ws>
<arch>x86_64</arch>
</environment>
<environment>
<os>win32</os>
<ws>win32</ws>
<arch>x86_64</arch>
</environment>
</environments>
</configuration>
</plugin>
</plugins>
</build>
My tycho version is 0.21.0

Maven2: Cargo plugin hot deployment & Jonas support

I am trying to get the Cargo plugin works on my maven project in order to benefit from war hot-deployment targetting the Jonas server.
The official documentation is not that clear on what is supported and what is not (for example you can find this: http://cargo.codehaus.org/Hot+Deployment but also this http://cargo.codehaus.org/JOnAS+4.x).
Anyway I have the following coniguration in for my war's POM:
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.0</version>
<configuration>
<container>
<containerId>jonas4x</containerId>
<home>C:\JOnAS-4.8.4\nt\bin</home>
</container>
<configuration>
<type>existing</type>
<home>C:\JOnAS-4.8.4</home>
</configuration>
</configuration>
</plugin>
And when I run
mvn cargo:deploy
on my project, the war is copied to the Jonas webapps folder but there is no hot deployment. The file is only copied but the hot deploy Jonas command is not called so that my modifications are not available immediatly.
EDIT: I also tried to add a deployer configuration as suggested on the answers but the behaviour is the same (ie: war is copied but the Jonas hot deploy command is not called so that the war is not reloaded in Jonas).
Am I missing something or am I right saying the Cargo Maven plugin does not support Jonas Hot Deployement?
Thanks in advance!
The cargo page on deploying to a running container links to a table listing the version where hot deployment was introduced for that container. According to the table, JOnAS 4.x is supported from version 1.0 (which you are using), so it should work.
On that page it also has some guidelines for configuring the plugin for deployment, I've attempted to interpret them below.
From the home element in your configuration I assume you are attempting a local deployment. The configuration in the running container page implies that the hot-deployment should be automatic in this line at the end:
Just type mvn cargo:deploy. Notice that we haven't specified a element nor a one. This is because the plugin is smart enough to create default instances for you. Cool, isn't it?
However the earlier configuration block indicates you should configure the deployer section to make the cargo plugin aware of the war to be deployed. The configuration for the deployer would be something like this:
<deployer>
<type>local</type>
<deployables>
<deployable>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<type>war</type>
<properties>
<context>optional root context</context>
</properties>
<pingURL>optional url to ping to know if deployable is done or not</pingURL>
<pingTimeout>optional timeout to ping (default 20000 milliseconds)</pingTimeout>
</deployable>
</deployables>
</deployer>
If the automatic option isn't working for you, consider declaring the configuration for your war.