我想我已經知道答案了,但是如果有人能爲我確認,我將不勝感激。maven-shade-plugin和singletons
A) We are including a library in a build using maven-shade-plugin;
B) This library implements singleton(s);
C) Our resulting jar (uber-jar) is, in turn, used in a build of a megaproject;
D) Other jars in a megaproject also using the same library (A);
請問庫(A)將不作爲整個大型項目單身? 我們最終會得到一個單獨的一組靜態變量,用於工件的每個陰影副本嗎? 會使用maven-assembly-plugin而不是maven-shade插件幫助嗎?
maven-shade-plugin如何與單例相關? –
我認爲在多項目項目中,我們包含了幾個(例如)mypackage.Mysingleton類的實現。我擔心這些實現不能看到彼此的靜態屬性。 – Alexander