On Fri, Nov 21, 2008 at 4:59 PM, Raymond Feng <[EMAIL PROTECTED]> wrote:

> Hi,
>
> It seems that they are a lot of confusions about the class path entries for
> the tuscany modules as PDE projects. Let me try to claify:
>
> 1) We generate the .classpath from maven dependencies.
>
> 2) For maven compile/provided dependencies, the modules explicit references
> these dependencies via packages. We define corresponding Import-Package
> header in the MANIFEST.MF for OSGi, and these get resolved to other bundles
> that export the matching packages. This magic comes from the
> "org.eclipse.pde.core.requiredPlugins" classpath container which is
> contributed by the Eclipse PDE. The classpath container resolves the OSGi
> dependencies such as Import-Package or Required-Bundle and automatically add
> the required bundles to the classpath as we see in Eclipse project under the
> "Plugin Dependencies".
>
> 3) The exported packages come from three types of sources:
> * System packages (exported by the System Bundle, i.e., org.eclipse.osgi).
> Different JDK levels have different list of system packages, for example,
> javax.xml.stream is not in J2SE-1.5 but in JSEJava-1.6. You can find the
> complete list by looking the .profile files within osgi-<version>.jar.
> * Tuscany modules in the Eclipse workspace. The classpath entry will be
> listed as a project under "Plugin Dependencies"
> * 3rd-party jars (already as OSGi bundles contributed by the target
> platform). The classpath entry will be listed as a jar under "Plugin
> Dependencies"
>
> 4) For maven runtime dependencies, there is no corresponding Import-Package
> and the dependencies are used in runtime. Ideally in OSGi, they could be a
> Required-Bundle or a bundle available at runtime. To run the project in JSE
> inside Eclipse, we generate an explicit classpath entry.
>
> 5) For maven test dependencies, there are two types: one is for test
> compilation and the other for test runtime. For the first type, we use
> optional Import-Package to pull in the dependencies if the same project has
> the compile dependency for the same artifact. Otherwise, we generate an
> explicit classpath entry for JSE testing.
>
> 6) For test cases which require extra dependencies in addition to the
> compile/provided/runtime dependencies for the main code, they probably
> should not be unit tests. We need to consider how to move them into the
> itest bucket.
>
> Thanks,
> Raymond
>
>
See, it's obvious really;-) Thanks for the summary Raymond. 6) is an
interesting point that we need to start looking out for. We should add it to
the list (themes?) of things we need to address.

Simon

Reply via email to