有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java如何使用maven查看文件名格式

我试图找到一种方法来检查通过运行mvn install生成的文件,我的任务基本上是,检查名称中的总字符是否正确,如果至少有一个文件名不符合要求,我应该确定任务

这在一个有mavenpom中可能吗


共 (1) 个答案

  1. # 1 楼答案

    您可以使用dependency:analyze进行分析

    [https://maven.apache.org/plugins/maven-dependency-plugin/analyze-mojo.html]

    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-dependency-plugin</artifactId>
    <executions>
        <execution>
            <id>analyze</id>  <!  notice the execution id "analyze"  >
            <goals>
                <goal>analyze</goal>
            </goals>
            <configuration>
                <ignoreNonCompile>true</ignoreNonCompile>
            </configuration>
        </execution>
    </executions>