regex - How do I convert my ivy code to maven if I use a regular expression? -
my ivy declaration is:
<dependency org="pmd" name="pmd" rec="4.2.5" conf="static-analysis->default"> <exclude module="xom|xml-apis|jdom|dom4j|xercesimpl|ant|junit" matcher="regexp" /> </dependency>
right have in maven as:
<dependency> <groupid>pmd</groupid> <artifactid>pmd</artifactid> <version>4.2.5</version> <exclusions> <exclusion></exclusion> </exclusions> </dependency>
i not sure how exclusion right. not sure how convert conf attribute ivy either.
if 1 concentrates on dependency management, maven , ivy tools similar mission, quite different implementations.
i don't believe regular expression exclusions supported maven, although appears form of wildcard support added in version 3, see mng-3832
my advice adopt simplest solution possible, explicitly list dependencies don't want:
<dependency> <groupid>pmd</groupid> <artifactid>pmd</artifactid> <version>4.2.5</version> <exclusions> <exclusion> <groupid>*</groupid> <artifactid>xom</artifactid> </exclusion> <exclusion> <groupid>*</groupid> <artifactid>xml-apis</artifactid> </exclusion> <exclusion> <groupid>*</groupid> <artifactid>jdom</artifactid> </exclusion> .. .. </exclusions> </dependency>
configuration mapping tricky translate, because concept not exist in maven. maven has fixed number of "scopes" whereas configurations used simulate scopes, not limited. more background infomration recommend
Comments
Post a Comment