# Display basic plugin information $ mvn resources:help # Display detailed information about all goals and parameters $ mvn resources:help -Ddetail=trueIf you need to use the plugin's full coordinates instead of its prefix, you can do that as follows:
# Display basic plugin information $ mvn org.apache.maven.plugins:maven-resources-plugin:3.3.1:help # Display detailed information about all goals and parameters $ mvn org.apache.maven.plugins:maven-resources-plugin:3.3.1:help -Ddetail=trueYou can also use the Maven help plugin to describe the resources plugin:
# Basic plugin description using help plugin $ mvn help:describe -Dplugin="org.apache.maven.plugins:maven-resources-plugin:3.3.1" # Detailed plugin description with all parameters $ mvn help:describe -Dplugin="org.apache.maven.plugins:maven-resources-plugin:3.3.1" -Ddetail=trueTo get specific information about a goal, use the goal parameter:
# Help for the 'resources' goal $ mvn org.apache.maven.plugins:maven-resources-plugin:3.3.1:help -Dgoal=resources -Ddetail=true # Help for the 'resources' goal using the help plugin $ mvn help:describe -Dplugin="org.apache.maven.plugins:maven-resources-plugin:3.3.1" -Dgoal=resources -Ddetail=trueNote: When using the plugin's help goal directly, you don't need to specify the version if the plugin is already configured in your POM or if you want to use the latest version.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
<configuration>
<!-- Set the character encoding for resources -->
<encoding>UTF-8</encoding>
<!-- Include empty directories when copying resources -->
<includeEmptyDirs>false</includeEmptyDirs>
</configuration>
<executions>
<!-- Copy test resources: src/test/resources/* → target/test-classes/ -->
<execution>
<id>default-testResources</id>
<phase>process-test-resources</phase>
<goals>
<goal>testResources</goal>
</goals>
</execution>
<!-- Copy main resources: src/main/resources/* → target/classes/ -->
<execution>
<id>default-resources</id>
<phase>process-resources</phase>
<goals>
<goal>resources</goal>
</goals>
</execution>
<!-- Custom resource copying example -->
<execution>
<id>copy-resources</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/bin-nix</outputDirectory>
<resources>
<resource>
<directory>${project.build.directory}/bin</directory>
<!-- Copy all files except Windows-specific ones -->
<excludes>
<exclude>win/**</exclude>
</excludes>
<!-- Enable resource filtering for variable substitution -->
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>