Raymond Feng wrote:
I found one case where the mvn eclipse:eclipse command is run against the project itself. The jars for other Tuscany modules are added to the .classpath and the PDE also adds the Tuscany projects in the workspace via the plugin dependency classpath container. As a result, there are duplicate copies of the definitions.xml from the jar and project.

Can you try to run mvn -Peclipse instead? This will use the Tuscany version of the maven eclipse plugin to produce the .classpath file that is friendly to PDE as well as non OSGi dependencies (such as test/runtime or even transitive compile dependencies).

Thanks,
Raymond
--------------------------------------------------
From: "Jean-Sebastien Delfino" <[email protected]>
Sent: Thursday, October 08, 2009 7:56 AM
To: <[email protected]>
Subject: [2.x] Test cases fail with DuplicateIntent errors in Eclipse

Many test cases (binding-http-runtime, binding-jsonrpc-runtime, binding-ws-axis2 etc) which work in Maven fail for me with DuplicateIntent policy errors in Eclipse.

Run As / Junit Test gives me the following errors:

Oct 8, 2009 7:40:59 AM org.apache.tuscany.sca.node.impl.NodeImpl start
INFO: Starting node: http://tuscany.apache.org/sca/1.1/nodes/default0 domain: tuscany.apache.org Oct 8, 2009 7:41:01 AM org.apache.tuscany.sca.definitions.impl.DefinitionsImpl [Extension points definitions] (DuplicateIntent) SEVERE: Duplicate intent {http://docs.oasis-open.org/ns/opencsa/sca/200903}serverAuthentication found in domain Oct 8, 2009 7:41:01 AM org.apache.tuscany.sca.definitions.impl.DefinitionsImpl [Extension points definitions] (DuplicateIntent) SEVERE: Duplicate intent {http://docs.oasis-open.org/ns/opencsa/sca/200903}clientAuthentication found in domain Oct 8, 2009 7:41:01 AM org.apache.tuscany.sca.definitions.impl.DefinitionsImpl [Extension points definitions] (DuplicateIntent) SEVERE: Duplicate intent {http://docs.oasis-open.org/ns/opencsa/sca/200903}authentication found in domain Oct 8, 2009 7:41:01 AM org.apache.tuscany.sca.definitions.impl.DefinitionsImpl [Extension points definitions] (DuplicateIntent) SEVERE: Duplicate intent {http://docs.oasis-open.org/ns/opencsa/sca/200903}mutualAuthentication found in domain
...

Any idea on what's causing getting these errors in Eclipse?
--
Jean-Sebastien


Here's what mvn -Peclipse produces for project binding-http-runtime:

<classpath>
<classpathentry kind="src" path="src/test/java" output="target/test-classes" including="**/*.java"/> <classpathentry kind="src" path="src/test/resources" output="target/test-classes" excluding="**/*.java"/>
  <classpathentry kind="src" path="src/main/java" including="**/*.java"/>
<classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/> <classpathentry kind="src" path="." including="LICENSE|NOTICE|README|META-INF/**/*|OSGI-INF/**/*" excluding="**/*.java"/>
  <classpathentry kind="output" path="target/classes"/>
<classpathentry kind="var" path="M2_REPO/javax/activation/activation/1.1/activation-1.1.jar"/> <classpathentry kind="var" path="M2_REPO/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar"/> <classpathentry kind="var" path="M2_REPO/javax/xml/ws/jaxws-api/2.1/jaxws-api-2.1.jar"/> <classpathentry kind="var" path="M2_REPO/javax/jws/jsr181-api/1.0-MR1/jsr181-api-1.0-MR1.jar"/> <classpathentry kind="var" path="M2_REPO/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar"/>
  <classpathentry kind="var" path="M2_REPO/asm/asm/3.1/asm-3.1.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/bcel/bcel/5.2/bcel-5.2.jar"/>
  <classpathentry kind="var" path="M2_REPO/cglib/cglib/2.2/cglib-2.2.jar"/>
<classpathentry kind="var" path="M2_REPO/jakarta-regexp/jakarta-regexp/1.4/jakarta-regexp-1.4.jar"/> <classpathentry kind="var" path="M2_REPO/com/sun/xml/bind/jaxb-impl/2.1.12/jaxb-impl-2.1.12.jar"/> <classpathentry kind="var" path="M2_REPO/org/mortbay/jetty/jetty/6.1.19/jetty-6.1.19.jar"/> <classpathentry kind="var" path="M2_REPO/org/mortbay/jetty/jetty-util/6.1.19/jetty-util-6.1.19.jar"/>
  <classpathentry kind="var" path="M2_REPO/junit/junit/4.5/junit-4.5.jar"/>
  <classpathentry kind="src" path="/tuscany-binding-sca-runtime"/>
  <classpathentry kind="src" path="/tuscany-builder"/>
  <classpathentry kind="src" path="/tuscany-core"/>
  <classpathentry kind="src" path="/tuscany-core-databinding"/>
  <classpathentry kind="src" path="/tuscany-databinding"/>
  <classpathentry kind="src" path="/tuscany-databinding-jaxb"/>
  <classpathentry kind="src" path="/tuscany-host-jetty"/>
  <classpathentry kind="src" path="/tuscany-implementation-java"/>
  <classpathentry kind="src" path="/tuscany-implementation-java-runtime"/>
  <classpathentry kind="src" path="/tuscany-interface-java"/>
  <classpathentry kind="src" path="/tuscany-interface-java-jaxws"/>
  <classpathentry kind="src" path="/tuscany-node-api"/>
  <classpathentry kind="src" path="/tuscany-node-impl"/>
  <classpathentry kind="src" path="/tuscany-xsd"/>
<classpathentry kind="var" path="M2_REPO/org/codehaus/woodstox/wstx-asl/3.2.4/wstx-asl-3.2.4.jar"/> <classpathentry kind="var" path="M2_REPO/xalan/xalan/2.7.0/xalan-2.7.0.jar"/> <classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar"/> <classpathentry kind="var" path="M2_REPO/org/apache/ws/commons/schema/XmlSchema/1.4.2/XmlSchema-1.4.2.jar"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
  <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
</classpath>

What's weird is that the generated .classpath lists projects like tuscany-core for example, which are also available in my workspace as OSGi bundles (and therefore also brought into the classpath by the org.eclipse.pde.core.requiredPlugins classpath container?) so perhaps that's what causing the duplicate definitions.xml?

I added a print statement to DefaultDefinitionsExtensionPoint and see assembly-xml/.../definitions.xml loaded twice:

file:/home/delfinoj/SCAZone/Source/tuscany-sca/modules/assembly-xml/target/classes/META-INF/sca-policy-1.1-intents-definitions-cd02.xml
file:/home/delfinoj/SCAZone/Source/tuscany-sca/modules/implementation-java-runtime/target/classes/org/apache/tuscany/sca/implementation/java/definitions/definitions.xml
file:/home/delfinoj/SCAZone/Source/tuscany-sca/modules/binding-sca-runtime/target/classes/org/apache/tuscany/sca/binding/sca/definitions.xml
file:/home/delfinoj/SCAZone/Source/tuscany-sca/modules/assembly-xml/target/classes/META-INF/sca-policy-1.1-intents-definitions-cd02.xml

What are you guys doing to not get that problem? Is your generated .classpath different from what I've posted?

--
Jean-Sebastien

Reply via email to