<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: xxx</li>
<li>Operating System version: xxx</li>
<li>Java version: xxx</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li>xxx</li>
<li>xxx</li>
<li>xxx</li>
</ol>
<p dir="auto">Pls. provide [GitHub address] to reproduce this issue.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">What do you expected from the above steps？</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">What actually happens?</p>
<p dir="auto">If there is an exception, please attach the exception trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Just put your stack trace here!"><pre class="notranslate"><code class="notranslate">Just put your stack trace here!
</code></pre></div>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: v2.7.3</li>
<li>Java version: 1.8</li>
<li>Maven version: 3.6.1</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<p dir="auto">here is an project that reproduces this issue.<br>
<a href="https://github.com/spawpaw/dubbo-duplicate-dep-demo">https://github.com/spawpaw/dubbo-duplicate-dep-demo</a></p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">What actually happens?</p>
<p dir="auto">this is my error log:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2019-12-16 14:43:06.210 ERROR 3220 --- [  restartedMain] o.a.d.c.Version                          :  [DUBBO] Duplicate class org/apache/dubbo/common/Version.class in 2 jar [file:/C:/var/repository/org/apache/dubbo/dubbo-common/2.7.3/dubbo-common-2.7.3.jar!/org/apache/dubbo/common/Version.class, file:/C:/var/repository/org/apache/dubbo/dubbo/2.7.3/dubbo-2.7.3.jar!/org/apache/dubbo/common/Version.class], dubbo version: 2.7.3, current host: 169.254.227.5
14:43:21.307 ERROR 3220 --- [  restartedMain] o.a.d.c.Version                         :236 :  [DUBBO] Duplicate class org/apache/dubbo/remoting/exchange/Exchangers.class in 2 jar [file:/C:/var/repository/org/apache/dubbo/dubbo-remoting-api/2.7.3/dubbo-remoting-api-2.7.3.jar!/org/apache/dubbo/remoting/exchange/Exchangers.class, file:/C:/var/repository/org/apache/dubbo/dubbo/2.7.3/dubbo-2.7.3.jar!/org/apache/dubbo/remoting/exchange/Exchangers.class], dubbo version: 2.7.3, current host: 169.254.227.5
14:43:21.319 ERROR 3220 --- [  restartedMain] o.a.d.c.Version                         :236 :  [DUBBO] Duplicate class org/apache/dubbo/remoting/Transporters.class in 2 jar [file:/C:/var/repository/org/apache/dubbo/dubbo-remoting-api/2.7.3/dubbo-remoting-api-2.7.3.jar!/org/apache/dubbo/remoting/Transporters.class, file:/C:/var/repository/org/apache/dubbo/dubbo/2.7.3/dubbo-2.7.3.jar!/org/apache/dubbo/remoting/Transporters.class], dubbo version: 2.7.3, current host: 169.254.227.5
14:43:21.320 ERROR 3220 --- [  restartedMain] o.a.d.c.Version                         :236 :  [DUBBO] Duplicate class org/apache/dubbo/remoting/RemotingException.class in 2 jar [file:/C:/var/repository/org/apache/dubbo/dubbo/2.7.3/dubbo-2.7.3.jar!/org/apache/dubbo/remoting/RemotingException.class, file:/C:/var/repository/org/apache/dubbo/dubbo-remoting-api/2.7.3/dubbo-remoting-api-2.7.3.jar!/org/apache/dubbo/remoting/RemotingException.class], dubbo version: 2.7.3, current host: 169.254.227.5
"><pre class="notranslate"><code class="notranslate">2019-12-16 14:43:06.210 ERROR 3220 --- [  restartedMain] o.a.d.c.Version                          :  [DUBBO] Duplicate class org/apache/dubbo/common/Version.class in 2 jar [file:/C:/var/repository/org/apache/dubbo/dubbo-common/2.7.3/dubbo-common-2.7.3.jar!/org/apache/dubbo/common/Version.class, file:/C:/var/repository/org/apache/dubbo/dubbo/2.7.3/dubbo-2.7.3.jar!/org/apache/dubbo/common/Version.class], dubbo version: 2.7.3, current host: 169.254.227.5
14:43:21.307 ERROR 3220 --- [  restartedMain] o.a.d.c.Version                         :236 :  [DUBBO] Duplicate class org/apache/dubbo/remoting/exchange/Exchangers.class in 2 jar [file:/C:/var/repository/org/apache/dubbo/dubbo-remoting-api/2.7.3/dubbo-remoting-api-2.7.3.jar!/org/apache/dubbo/remoting/exchange/Exchangers.class, file:/C:/var/repository/org/apache/dubbo/dubbo/2.7.3/dubbo-2.7.3.jar!/org/apache/dubbo/remoting/exchange/Exchangers.class], dubbo version: 2.7.3, current host: 169.254.227.5
14:43:21.319 ERROR 3220 --- [  restartedMain] o.a.d.c.Version                         :236 :  [DUBBO] Duplicate class org/apache/dubbo/remoting/Transporters.class in 2 jar [file:/C:/var/repository/org/apache/dubbo/dubbo-remoting-api/2.7.3/dubbo-remoting-api-2.7.3.jar!/org/apache/dubbo/remoting/Transporters.class, file:/C:/var/repository/org/apache/dubbo/dubbo/2.7.3/dubbo-2.7.3.jar!/org/apache/dubbo/remoting/Transporters.class], dubbo version: 2.7.3, current host: 169.254.227.5
14:43:21.320 ERROR 3220 --- [  restartedMain] o.a.d.c.Version                         :236 :  [DUBBO] Duplicate class org/apache/dubbo/remoting/RemotingException.class in 2 jar [file:/C:/var/repository/org/apache/dubbo/dubbo/2.7.3/dubbo-2.7.3.jar!/org/apache/dubbo/remoting/RemotingException.class, file:/C:/var/repository/org/apache/dubbo/dubbo-remoting-api/2.7.3/dubbo-remoting-api-2.7.3.jar!/org/apache/dubbo/remoting/RemotingException.class], dubbo version: 2.7.3, current host: 169.254.227.5

</code></pre></div>
<p dir="auto">lets inspect the artifact <code class="notranslate">org.apache.dubbo:dubbo-common </code> and <code class="notranslate">org.apache.dubbo:dubbo</code>:</p>
<p dir="auto">dubbo-common:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/18007922/70884353-c41caa80-2010-11ea-84ec-63d0cc268987.png"><img src="https://user-images.githubusercontent.com/18007922/70884353-c41caa80-2010-11ea-84ec-63d0cc268987.png" alt="图片" style="max-width: 100%;"></a><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/18007922/70884364-ce3ea900-2010-11ea-8cba-283486f12775.png"><img src="https://user-images.githubusercontent.com/18007922/70884364-ce3ea900-2010-11ea-8cba-283486f12775.png" alt="图片" style="max-width: 100%;"></a></p>
<p dir="auto">dubbo-remoting:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/18007922/70884919-478acb80-2012-11ea-855f-de523dc3ecdb.png"><img src="https://user-images.githubusercontent.com/18007922/70884919-478acb80-2012-11ea-855f-de523dc3ecdb.png" alt="图片" style="max-width: 100%;"></a><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/18007922/70884974-6f7a2f00-2012-11ea-8327-6043ebf221e7.png"><img src="https://user-images.githubusercontent.com/18007922/70884974-6f7a2f00-2012-11ea-8327-6043ebf221e7.png" alt="图片" style="max-width: 100%;"></a></p>
<p dir="auto">It seems that <code class="notranslate">org.apache.dubbo:dubbo </code> packages all classes in all modules into one artifact, so when other framework wants to depend a single dubbo module, the duplicate class error occurs.</p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">decompose <code class="notranslate">org.apache.dubbo:dubbo</code></p>
<h3 dir="auto">See also</h3>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="462304704" data-permission-text="Title is private" data-url="https://github.com/apache/dubbo/issues/4427" data-hovercard-type="issue" data-hovercard-url="/apache/dubbo/issues/4427/hovercard" href="https://github.com/apache/dubbo/issues/4427">#4427</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="351479637" data-permission-text="Title is private" data-url="https://github.com/apache/dubbo/issues/2314" data-hovercard-type="issue" data-hovercard-url="/apache/dubbo/issues/2314/hovercard" href="https://github.com/apache/dubbo/issues/2314">#2314</a></p>