You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Raymond Feng <en...@gmail.com> on 2009/03/02 18:27:00 UTC
Re: [2.x] Failing unit tests due to classPath issues in Eclipse PDE platform
Hi,
There is an inconsistency between the maven and OSGi dependencies. Maven
supports transitive dependencies while OSGi doesn't. In this case, we have
contribution-xml pulled in by maven as a (transitive) compile-time
dependency. But there is no explicit Import-Package in the MANIFEST.MF that
references any packages from contribution-xml OSGi bundle.
To avoid duplicate classpath entries, we generate the .classpath in such a
way that the compile/provided dependencies are NOT list as entries in the
.classpath and they will be automatically added by the PDE classpath
container. You can find more details in the "PDE integration of tuscany
modules" section on page [1].
One way to fix the problem is to add a "runtime" dependency for
contribution-xml to "override" the transitive "compile" dependency.
[1]
http://cwiki.apache.org/confluence/display/TUSCANYxDOCx2x/OSGi+Aware+Programming+in+Tuscany
Thanks,
Raymond
--------------------------------------------------
From: "ant elder" <an...@gmail.com>
Sent: Sunday, March 01, 2009 11:47 PM
To: <de...@tuscany.apache.org>
Subject: Re: [2.x] Failing unit tests due to classPath issues in Eclipse PDE
platform
> On Mon, Mar 2, 2009 at 6:45 AM, Luciano Resende <lu...@gmail.com>
> wrote:
>>
>> I'm having issues with the assembly-xml unit tests, and I have
>> realized that the problem is that some necessary dependencies are
>> missing (e.g contribution-xml)...
>> Even though this dependency is in the pom.xml, it is not listed as
>> dependency in either the regular classpath or in the
>> plugin-dependencies.
>>
>> Can someone please let me know if they are experiencing something
>> similar in the Eclipse PDE environment ?
>>
>
> This is the .classpath I get from running "mvn -Peclipse" in assembly-xml:
>
> <classpath>
> <classpathentry kind="src" path="."
> including="LICENSE|NOTICE|MANIFEST.MF" excluding="**/*.java"/>
> <classpathentry kind="src" path="src/main/java"/>
> <classpathentry kind="src" path="src/main/resources"
> excluding="**/*.java"/>
> <classpathentry kind="src" path="src/test/java"
> output="target/test-classes"/>
> <classpathentry kind="src" path="src/test/resources"
> output="target/test-classes" excluding="**/*.java"/>
> <classpathentry kind="output" path="target/classes"/>
> <classpathentry kind="con"
> path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
> <classpathentry kind="var"
> path="M2_REPO/junit/junit/4.5/junit-4.5.jar"/>
> <classpathentry kind="var"
> path="M2_REPO/org/apache/tuscany/sca/tuscany-assembly-xsd/2.0-SNAPSHOT/tuscany-assembly-xsd-2.0-SNAPSHOT.jar"/>
> <classpathentry kind="var"
> path="M2_REPO/org/apache/tuscany/sca/tuscany-definitions-xml/2.0-SNAPSHOT/tuscany-definitions-xml-2.0-SNAPSHOT.jar"/>
> <classpathentry kind="var"
> path="M2_REPO/org/apache/tuscany/sca/tuscany-policy-xml/2.0-SNAPSHOT/tuscany-policy-xml-2.0-SNAPSHOT.jar"/>
> <classpathentry kind="var"
> path="M2_REPO/org/codehaus/woodstox/wstx-asl/3.2.4/wstx-asl-3.2.4.jar"/>
> </classpath>
>
> so that does not include things like tuscany-contribution-xml which is
> in the assembly-xml pom.xml which doesn't seem right
>
> ...ant