问题
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.
回答1:
I use Eclipse Photon and could observe the following:
- 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.
- e.g.
Missing constraint: Require-Bundle: org.apache.batik.css; bundle-version="[1.6.0,1.7.0)"
- e.g.
- BUT this does not prevent from exporting the product! This is just misleading and it took me hours to understand this.
- I managed to include 2 versions of some plugins of the org.apache.batik framework in one product
- 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)
<plugin id="org.apache.batik.css" version="1.6.0.v201011041432"/>
- I found as expected the 2 jars in the generated p2 repository\plugins folder created by the product export wizard:
- org.apache.batik.css_1.6.0.v201011041432.jar
- org.apache.batik.css_1.9.1.v20180313-1559.jar
- 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)
来源:https://stackoverflow.com/questions/45593226/add-two-plugins-of-same-version