我完全新的行家。如何避免行家組裝的jar文件覆蓋文件
而且我有以下的maven組件文件進行調試。
<assembly>
<id>bin</id>
<formats>
<format>zip</format>
</formats>
<!-- Adds dependencies to zip package under lib directory -->
<dependencySets>
<dependencySet>
<useProjectArtifact>false</useProjectArtifact>
<outputDirectory>lib</outputDirectory>
<unpack>false</unpack>
</dependencySet>
</dependencySets>
<fileSets>
<fileSet>
<directory>${project.build.scriptSourceDirectory}</directory>
<outputDirectory></outputDirectory>
<includes>
<include>startup.*</include>
</includes>
</fileSet>
<!-- adds jar package to the root directory of zip package -->
<fileSet>
<directory>${project.build.directory}</directory>
<outputDirectory></outputDirectory>
<includes>
<include>*.jar</include>
</includes>
</fileSet>
</fileSets>
</assembly>
上述文件的問題是基礎應用程序需要從兩個相關項目中獲取jar。
這兩個項目都具有一定的罐子有相同的名字。
當我執行mvn clean assembly:assembly時,它將來自兩個項目的所有jar整合到一個文件夾中。
顯然,這將覆蓋一些jar文件,這是問題的開始位置。
由於這個原因,我開始變得ClassNotFound的錯誤。
請幫我分揀了這一點。
此外,我不確定是否定義了變量$ {project.build.scriptSourceDirectory}和$ {project.build.directory}。
...我已經尋找這一點,但沒有很好的完整的源代碼。
現在我懷疑這些是一些特定於maven的變量,但我很難理解這一點。
如果你有一些很棒的maven教程,對於maven絕對更新鮮,請提供。