0

我正在使用这个插件 org.jfrog.buildinfo 将文件上传到工件。

当我使用.jar 时它正在工作,因此 jar 文件不会上传到工件。但是当我使用正则表达式 %regex[ .jar] 它不起作用。

我想排除所有 .jar 文件,除了使用这个正则表达式:%regex[(?!TrainBatch).*.jar]

我的配置是:

<plugin>
 <groupId>org.jfrog.buildinfo</groupId>
 <artifactId>artifactory-maven-plugin</artifactId>
 <version>{{VERSION}}</version>
 <inherited>false</inherited>
 <executions>
    <execution>
     <id>build-info</id>
        <goals>
          <goal>publish</goal>
        </goals>
     <configuration>
       <publisher>
         <contextUrl>{{ARTIFACTORY_URL}}</contextUrl>
         <username>{{ARTIFACTORY_USER}}</username>
         <password>{{ARTIFACTORY_PASS}}</password>
         <excludePatterns>%regex[(?!TrainBatch).*.jar]</excludePatterns>
         <repoKey>{{ARTIFACTORY_KEY}}</repoKey>
         <snapshotRepoKey>{{ARTIFACTORY_KEY_S}}</snapshotRepoKey>
       </publisher>
    </configuration>
  </execution>
 </executions>
</plugin>

任何想法如何使用这个插件的正则表达式?

提前致谢。此致

4

1 回答 1

0

该插件不支持正则表达式。
它支持 Ant 风格的路径模式:

  • ? 匹配一个字符
  • * 匹配零个或多个字符
  • ** 匹配路径中的零个或多个“目录”
于 2019-11-14T12:08:03.840 回答