Regex 如果我使用正则表达式,如何将我的常春藤代码转换为maven?

Regex 如果我使用正则表达式,如何将我的常春藤代码转换为maven?,regex,maven,build,ivy,Regex,Maven,Build,Ivy,我的常春藤宣言是: <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> 现在我在Maven中有这样一个例子: <depend

我的常春藤宣言是:

<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>

现在我在Maven中有这样一个例子:

<dependency>
   <groupId>pmd</groupId>
   <artifactId>pmd</artifactId>
   <version>4.2.5</version>
   <exclusions>
      <exclusion></exclusion>
   </exclusions>
</dependency>

偏振模色散
偏振模色散
4.2.5

我不知道怎样才能把排除在外。我也不知道如何从Ivy转换conf属性。

如果只关注依赖关系管理,Maven和Ivy是具有类似任务的工具,但实现方式完全不同

我不相信Maven支持正则表达式排除,尽管版本3中似乎添加了某种形式的通配符支持,请参阅

我的建议是采用尽可能最简单的解决方案,因此只需明确列出您不想要的依赖项:

<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>

偏振模色散


列出Maven在常春藤上的平等形式。了解如何解析常春藤声明。构造Maven线。