• Home
  • Docker
  • Kubernetes
  • LLMs
  • Java
  • Ubuntu
  • Maven
  • Big Data
  • Archived
Maven | maven-resources-plugin
  1. Maven Resources Plugin (3.3.0)
  2. The goal help
  3. Example: Using resources plugin

  1. Maven Resources Plugin (3.3.0)
    Handles the copying of project resources to the output directory.
    There are two different kinds of resources: main resources and test resources.
    The difference is that the main resources are the resources associated to the main source code while the test resources are associated to the test source code.
    Thus, this allows the separation of resources for the main source code and its unit tests.

    Plugin coordinates:
    • Group Id: org.apache.maven.plugins
    • Artifact Id: maven-resources-plugin

    Plugin Prefix: resources

    The resources plugin has the following goals:
    • help: Display help information on maven-resources-plugin.

    • resources: Copy resources for the main source code to the main output directory (src/main/resources/* ► target/classes/).
      Always uses the project.build.resources element to specify the resources to copy.

    • testResources: Copy resources for the test source code to the test output directory (src/test/resources/* ► target/test-classes/).
      Always uses the project.build.testResources element to specify the resources to copy.

    • copy-resources: Copy resources of the configured plugin attribute resources.
  2. The goal help
    The goal help gives general information about the resources plugin and lists its goals.
    The parameter detail gives detailed information about the parameters of the goals of the resources plugin.

    If you need to use the plugin's coordinates instead of its prefix, you can do that as following:

    You can also use the goal describe of the help plugin to get information about the resources plugin and lists its goals:

    The parameter goal gives information about a goal of the resources plugin:
  3. Example: Using resources plugin
    Adjust your pom file with the following:
© 2025  mtitek