How to exclude transitive dependency in ant build using maven task for ant? -
how exclude transitive dependency in maven task ant. scope: runtime , provided doesn't seem of in case. build.xml
<artifact:remoterepository url="https://mynexus/" id="remote.repository"/> <artifact:dependencies filesetid="dependency.fileset" usescope="runtime"> <dependency version="1.7.0" artifactid="commons-beanutils" groupid="commons-beanutils"/> </artifact:dependencies>
commons-beanutils has dependency commons-logging need exclude.
i don't think maven task supports feature. have considered using apache ivy instead? following 2 examples demonstrates exclusion capability.
the cachepath task useful managing classpaths:
<ivy:cachepath pathid="compile.path"> <dependency org="commons-beanutils" name="commons-beanutils" rev="1.7.0" conf="default"> <exclude module="commons-logging"/> </dependency> </ivy:cachepath>
the retrieve task can used download , save files locally:
<ivy:retrieve pattern="lib/[artifact]-[revision](-[classifier]).[ext]"> <dependency org="commons-beanutils" name="commons-beanutils" rev="1.7.0" conf="default"> <exclude module="commons-logging"/> </dependency> </ivy:retrieve>
Comments
Post a Comment