编辑1:
以下代码的目的是在没有资源文件的情况下打包源代码。但我不知道*的意思。
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.1.2</version>
<configuration>
<attach>true</attach>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<excludes>
<exclude>**.*</exclude>
</excludes>
</configuration>
</execution>
</executions>
</plugin>发布于 2018-02-07 07:08:18
我认为您需要在这里看到apache文档:https://maven.apache.org/plugins/maven-resources-plugin/examples/include-exclude.html
它解释了**.*和**/*之间的区别!实际上,**/*是关于子文件夹排除的.
您可以对这两种语法进行组合,例如:
<exclude>**/*test*.*</exclude>它将排除文件名中包含test的子文件夹中的所有文件。
https://stackoverflow.com/questions/48656288
复制相似问题