title: Tycho: 'Unable to satisfy dependency ...' when building via multi-module parent
body: <p>I have to build an Eclipse-plugin with a Maven/Tycho which has dependencies to other 3rd parties. As embedding dependencies is not yet supported by Tycho, I split up projects into two as following:</p>
  
  <ul>
  <li><code>A-thirdparty</code>: project with a packaging 'bundle', built by <strong>maven-bundle-plugin</strong>, having <strong>'Embed-Dependency'</strong> instruction, and exporting all packages which are required by a plug-in <strong>'A'</strong></li>
  <li><code>A</code>: project with a packaging 'eclipse-plugin', using tycho-maven-plugin, and Tycho's target-platform-configuration plug-in with <code>pomDependencies</code> set to <code>consider</code>.</li>
  </ul>
  
  <p>When I build them separately (at first, thirdparty aggregator, then project A itself), everything works fine. However, if I aggregate both those projects (using multi-module POM), I get the following Maven ERROR:</p>
  
  <pre><code>Caused by: java.lang.RuntimeException: "No solution found because the problem is unsatisfiable.": ["Unable to satisfy dependency from A 1.0.0.qualifier to package org.apache.axis2.transaction 0.0.0.", "Unable to satisfy dependency from A 1.0.0.qualifier to package org.apache.axis2.addressing.i18n 0.0.0.", ...
  </code></pre>
  
  <p>Why does building projects in aggregated fashion causes this error, and what kind of workaround could be possible if that's a Tycho bug?</p>
  
  <p>Though, there's no error if I leave only one module in aggregation POM (independently which one).</p>
  
  <p><strong>EDIT</strong> </p>
  
  <p>Cannot reproduce with a small, similar multi-module sample. Which means there's something about my POM hierarchy.</p>
  
  <p><strong>EDIT2</strong></p>
  
  <p><strong>Was able to reproduce</strong> with a small, similar multi-module sample, after including same set of dependencies (couple of axis2 &amp; axiom libs).</p>
  
  <p><strong>EDIT3: Minimalistic Example</strong></p>
  
  <p>Now I'm wondering if the problem is about missing all thirdparties <strong>required by</strong> thirdparty libraries I included. If so, then why am I able to build successfully when executing both modules separately, and build fails only when done via parent, multi-module pom.xml? The example below includes only one single axis2-kernel JAR, bundled in a pom-first artifact named <strong>first-thirdparty</strong>.</p>
  
  <p>Instead of <code>A</code>, example has keywoard <code>first</code>. The folder structure is as following:</p>
  
  <pre><code>./pom.xml
  ./first-thirdparty
      pom.xml
  ./first
      src/main/java/org/mydemo/Test.java // has just one method that simply returns AxisFault.class.getSimpleName(); to test import resolution
      META-INF/MANIFEST.MF
      build.properties
      pom.xml
  </code></pre>
  
  <p>Root pom:</p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
          http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;org.mydemo&lt;/groupId&gt;
      &lt;artifactId&gt;first-aggregator&lt;/artifactId&gt;
  
      &lt;packaging&gt;pom&lt;/packaging&gt;
      &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
  
  
      &lt;modules&gt;
          &lt;module&gt;first-thirdparty&lt;/module&gt;
          &lt;module&gt;first&lt;/module&gt;
      &lt;/modules&gt;
  
  &lt;/project&gt;
  </code></pre>
  
  <p>POM of <code>first-thirdparty</code>. It simply embeds axis2-kernel JAR (no other libraries..):</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi=           "http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
  
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;parent&gt;
          &lt;groupId&gt;org.mydemo&lt;/groupId&gt;
          &lt;artifactId&gt;first-aggregator&lt;/artifactId&gt;
          &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
          &lt;relativePath&gt;../pom.xml&lt;/relativePath&gt;
      &lt;/parent&gt;
  
      &lt;properties&gt;
          &lt;manifest-location&gt;META-INF&lt;/manifest-location&gt;
      &lt;/properties&gt;
  
      &lt;packaging&gt;bundle&lt;/packaging&gt;
  
      &lt;groupId&gt;org.mydemo&lt;/groupId&gt;
      &lt;artifactId&gt;first-thirdparty&lt;/artifactId&gt;
      &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.axis2&lt;/groupId&gt;
              &lt;artifactId&gt;axis2-kernel&lt;/artifactId&gt;
              &lt;version&gt;1.5.1&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.felix&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-bundle-plugin&lt;/artifactId&gt;
                  &lt;extensions&gt;true&lt;/extensions&gt;
                  &lt;configuration&gt;
                      &lt;instructions&gt;
                          &lt;Embed-Dependency&gt;
                              axis2-kernel
                          &lt;/Embed-Dependency&gt;
                          &lt;_exportcontents&gt;
                              org.apache.axis2.*;version="1.5.1"
                          &lt;/_exportcontents&gt;
                          &lt;Bundle-ClassPath&gt;{maven-dependencies}&lt;/Bundle-ClassPath&gt;
                          &lt;Embed-Transitive&gt;true&lt;/Embed-Transitive&gt;
                          &lt;Embed-Directory&gt;jars&lt;/Embed-Directory&gt;
                          &lt;_failok&gt;true&lt;/_failok&gt;
                          &lt;_nouses&gt;true&lt;/_nouses&gt;
                      &lt;/instructions&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
  &lt;/project&gt;
  </code></pre>
  
  <p>POM of <code>first</code>, which is an eclipse-plugin, and depends on <code>first-thirdparty</code>:</p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
          http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;parent&gt;
          &lt;groupId&gt;org.mydemo&lt;/groupId&gt;
          &lt;artifactId&gt;first-aggregator&lt;/artifactId&gt;
          &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
          &lt;relativePath&gt;../pom.xml&lt;/relativePath&gt;
      &lt;/parent&gt;
  
      &lt;groupId&gt;org.mydemo&lt;/groupId&gt;
      &lt;artifactId&gt;org.mydemo.first-bundle&lt;/artifactId&gt;
  
      &lt;packaging&gt;eclipse-plugin&lt;/packaging&gt;
      &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
  
      &lt;properties&gt;
          &lt;tycho.ver&gt;0.14.1&lt;/tycho.ver&gt;
      &lt;/properties&gt;
  
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;helios&lt;/id&gt;
              &lt;layout&gt;p2&lt;/layout&gt;
              &lt;url&gt;http://download.eclipse.org/releases/indigo&lt;/url&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.mydemo&lt;/groupId&gt;
              &lt;artifactId&gt;first-thirdparty&lt;/artifactId&gt;
              &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
      &lt;build&gt; 
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.eclipse.tycho&lt;/groupId&gt;
                  &lt;artifactId&gt;tycho-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${tycho.ver}&lt;/version&gt;
                  &lt;extensions&gt;true&lt;/extensions&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.eclipse.tycho&lt;/groupId&gt;
                  &lt;artifactId&gt;target-platform-configuration&lt;/artifactId&gt;
                  &lt;version&gt;${tycho.ver}&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;pomDependencies&gt;consider&lt;/pomDependencies&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>MANIFEST.MF of module <code>first</code>; it explicitly imports all packages of axis2-kernel:</p>
  
  <pre><code>Manifest-Version: 1.0
  Bundle-Version: 1.0.0.qualifier
  Tool: Bnd-0.0.357
  Bundle-Name: first-bundle
  Bnd-LastModified: 1334819004300
  Created-By: 1.6.0_25 (Sun Microsystems Inc.)
  Bundle-ManifestVersion: 2
  Bundle-SymbolicName: org.mydemo.first-bundle
  Export-Package: org.mydemo
  Import-Package: org.apache.axis2.clustering.context,
   org.apache.axis2.modules,
   org.apache.axis2.deployment.util,
   org.apache.axis2.dataretrieval.client,
   org.apache.axis2.clustering,
   org.apache.axis2.wsdl.util,
   org.apache.axis2.clustering.configuration,
   org.apache.axis2.java.security,
   org.apache.axis2.deployment.resolver,
   org.apache.axis2.util,
   org.apache.axis2.wsdl,
   org.apache.axis2.addressing.metadata,
   org.apache.axis2.i18n,
   org.apache.axis2.deployment.scheduler,
   org.apache.axis2.dataretrieval,
   org.apache.axis2.dispatchers,
   org.apache.axis2.transport,org.apache.axis2.service,
   org.apache.axis2.deployment.repository.util,
   org.apache.axis2.client,
   org.apache.axis2.context,
   org.apache.axis2.classloader,
   org.apache.axis2.receivers,
   org.apache.axis2.engine,
   org.apache.axis2.addressing,
   org.apache.axis2.deployment,
   org.apache.axis2.transport.http,
   org.apache.axis2.phaseresolver,
   org.apache.axis2.context.externalize,
   org.apache.axis2.transaction,
   org.apache.axis2.description,
   org.apache.axis2.addressing.wsdl,
   org.apache.axis2.transport.http.util,
   org.apache.axis2.util.threadpool,
   org.apache.axis2,
   org.apache.axis2.handlers,
   org.apache.axis2.addressing.i18n,
   org.apache.axis2.builder,
   org.apache.axis2.description.java2wsdl,
   org.apache.axis2.builder.unknowncontent,
   org.apache.axis2.namespace,
   org.apache.axis2.description.java2wsdl.bytecode,
   org.apache.axis2.client.async,
   org.osgi.framework;version="1.3.0"
  Bundle-Localization: plugin
  </code></pre>