2
使用ant ivy指定依賴關係時,是否有排除特定包的方法?如何排除特定包形成依賴關係?
如:我把一個依賴於MyJar.jar
它包
com.test.one
com.test.one.first
com.test.one.second
com.test.two
etc.
我要排除的包com.text.one.first
。
如果有辦法,我該怎麼做?
使用ant ivy指定依賴關係時,是否有排除特定包的方法?如何排除特定包形成依賴關係?
如:我把一個依賴於MyJar.jar
它包
com.test.one
com.test.one.first
com.test.one.second
com.test.two
etc.
我要排除的包com.text.one.first
。
如果有辦法,我該怎麼做?
常春藤下載包含一個或多個jar文件(稱爲工件),並可能反過來聲明依賴於其他模塊的模塊。
的exclude指令可以用來防止某些文物
<dependency name="myjar" rev="1.0">
<exclude module="idontlikethismodule"/>
</dependency>
的下載什麼常春藤不能做的就是打開一個罐子,只下載特定軟件包。
如果這是您的要求,那麼我會建議下載該罐子,然後使用ANT unzip和jar命令重新包裝它。
喜歡的東西:
<ivy:retrieve pattern="lib/[artifact].[ext]"/>
<unzip src="lib/myjar.jar" dest="build/unzip"/>
<jar destfile="build/mynewjar.jar" basedir="build/unzip" excludes="com.text.one.first"/>