Which directory is used for resource filtering when filtering is enabled?

Prepare for the MuleSoft Developer 2 Certification Exam. Access practice quizzes featuring flashcards and multiple choice questions with explanations. Get confident and ready for your certification success!

Multiple Choice

Which directory is used for resource filtering when filtering is enabled?

Explanation:
Resource filtering replaces placeholders in files with actual values during the build. When you enable filtering for resources, the build processes the resource directory you specify. The standard and most common place to enable this is the primary resources directory, src/main/resources, because these files are packaged into the final artifact (like a jar or war) and often contain environment-specific configuration such as application.properties. That’s why src/main/resources is the directory used for resource filtering when filtering is turned on. The other locations have different roles: src/test/resources is for test data (and would require explicit configuration to filter if you want it), src/main/java holds source code, and target is the build output directory, not a source of resources to filter.

Resource filtering replaces placeholders in files with actual values during the build. When you enable filtering for resources, the build processes the resource directory you specify. The standard and most common place to enable this is the primary resources directory, src/main/resources, because these files are packaged into the final artifact (like a jar or war) and often contain environment-specific configuration such as application.properties. That’s why src/main/resources is the directory used for resource filtering when filtering is turned on. The other locations have different roles: src/test/resources is for test data (and would require explicit configuration to filter if you want it), src/main/java holds source code, and target is the build output directory, not a source of resources to filter.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy