0

How to add two plugins of same name with different version in eclipse product file?

For example - lua editor plugins has a plugin named com.naef.jnlua which has two versions 0.9.1 and 1.0.3 both the versions are needed to be added.

I am developing an eclipse plugin product and I want to add both the plugins to my .product file but my file is considering only the latest version of the plugin com.naef.jnlua.

Note: Eclipse IDE is accepting both versions.

Help me to solve the issue.

Chinna
  • 156
  • 1
  • 1
  • 11
  • Please, provide more information, why do you need both versions to be added? How do you want to distinguish them? – Dmitrii Bocharov Aug 13 '17 at 11:00
  • @bdshadow com.naef.jnlua has two version 0.9.1 and 1.0.3 rescpectively. 0.9.1 version provides lua51 architecture and 1.0.3 provides lua52. i want both in my product. – Chinna Aug 14 '17 at 07:19
  • ok. But how do you want to distinguish them? What version do you want to use in which situation. Possibly you have the same problem, that once was in jbostools-hibernate project. You can read about how it was solved here http://tools.jboss.org/blog/hibernate-tools-changes.html - tools for multiple versions of hibernate in one product. The source itself you can find here: https://github.com/jbosstools/jbosstools-hibernate – Dmitrii Bocharov Aug 14 '17 at 08:52

1 Answers1

0

I use Eclipse Photon and could observe the following:

  1. In the product editor, the "validate..." button might indicate a problem for each plugin with at least 2 versions in the current target that is referenced by the product.
    1. e.g. Missing constraint: Require-Bundle: org.apache.batik.css; bundle-version="[1.6.0,1.7.0)"
  2. BUT this does not prevent from exporting the product! This is just misleading and it took me hours to understand this.
  3. I managed to include 2 versions of some plugins of the org.apache.batik framework in one product
    1. In the product I had only one line, it specified the version that was not found during a previous build (try without version first, it worked also for me sometimes)
      1. <plugin id="org.apache.batik.css" version="1.6.0.v201011041432"/>
    2. I found as expected the 2 jars in the generated p2 repository\plugins folder created by the product export wizard:
      1. org.apache.batik.css_1.6.0.v201011041432.jar
      2. org.apache.batik.css_1.9.1.v20180313-1559.jar
jhecn
  • 1
  • 3