Hi,
The current UIMA Eclipse plugins (runtime, CDE, etc.) use "Imported
Packages" for declaring dependencies instead of "Required Plug-ins". This
declaration is automatically generated by Maven (I think ?) and gives more
fine grained controls on what to depend on.
But, there are some side-effects from this approach which may cause the
problems. The imported packages may wired to the correct packages from the
"wrong" plugins.

Today, while I am testing the new UIMA build candidate 03 with my plugins, I
had this "wrong" wiring situation. The following is what happen:
  -  One of my plugins has two exported packages named "org.apache.uima.util"
and "org.apache.uima.jcas.tcas" which are the same as the packages exported
by "org.apache.uima.runtime".
  -  UIMA runtime plugin (org.apache.uima.runtime) exports "
org.apache.uima.util" and "org.apache.uima.jcas.tcas" packages and it also
imports these two packages.
  -  UIMA CDE plugin uses some classes (e.g., XMLizable) from "
org.apache.uima.util" which is imported by using "Imported Packages"
approach.
  -  At runtime, Eclipse OSGi has the following wiring:
id    State       Bundle
0    ACTIVE      org.eclipse.osgi_3.3.1.R33x_v20070828
1    ACTIVE      org.eclipse.equinox.common_3.3.0.v20070426
2    ACTIVE      org.eclipse.update.configurator_3.2.101.R33x_v20070810
3    ACTIVE      org.eclipse.core.runtime_3.3.100.v20070530
4    ACTIVE      org.apache.uima.desceditor_2.2.2.incubating
5    <<LAZY>>    org.apache.uima.editors.dde_2.2.2.incubating
232    <<LAZY>>    org.apache.uima.jcas.jcasgenp_2.2.2.incubating
233    <<LAZY>>    org.apache.uima.pear_2.2.2.incubating
234    RESOLVED    org.apache.uima.runtime_2.2.2.incubating
                Fragments=235
235    RESOLVED
org.apache.uima.runtime.fragments.deployeditor_2.2.2.incubating
                Master=234

For CDE (bundle#4), "org.apache.uima.util" package is imported from
Bundle#194
    org.apache.uima.util;
version="0.0.0"<[EMAIL 
PROTECTED]/ws-test/org.apache.uima.runtimetoolkit.container/
[194]>

For UIMA runtime plugin "org.apache.uima.runtime" (Bundle#234), it has the
following resolution:
    org.apache.uima.jcas.tcas;
version="0.0.0"<[EMAIL 
PROTECTED]/ws-test/org.apache.uima.runtimetoolkit.container/
[194]>
    org.apache.uima.util;
version="0.0.0"<[EMAIL 
PROTECTED]/ws-test/org.apache.uima.runtimetoolkit.container/
[194]>

>From the above imported resolution, "org.apache.uima.util"  and "
org.apache.uima.jcas.tcas" come from the wrong plugin (Bundle#194) which
cause the problem for CDE to properly run.

It is a good idea to document this so that the tools that use UIMA plugin
will not create the wrong wiring as the above example.

Comment ?

- Tong

Reply via email to