Where do you set package dependencies in a Salesforce DX project?

Study for the Architect Journey - Development Lifecycle and Deployment Exam. Enhance your knowledge with quizzes and detailed questions. Prepare effectively for a successful test experience!

Multiple Choice

Where do you set package dependencies in a Salesforce DX project?

Explanation:
In Salesforce DX, you declare package dependencies inside the sfdx-project.json file, specifically within each packageDirectories entry. Each package directory can list dependencies on other packages, guiding the CLI to resolve and install those required packages when you create, push, or deploy. This is how DX knows which unlocked packages must be present for a given package. Other options aren’t used for this purpose in DX: the manifest (package.xml) handles metadata API operations, while dependencies.yaml or a separate packageDependencies field aren’t part of the standard DX dependency mechanism.

In Salesforce DX, you declare package dependencies inside the sfdx-project.json file, specifically within each packageDirectories entry. Each package directory can list dependencies on other packages, guiding the CLI to resolve and install those required packages when you create, push, or deploy. This is how DX knows which unlocked packages must be present for a given package. Other options aren’t used for this purpose in DX: the manifest (package.xml) handles metadata API operations, while dependencies.yaml or a separate packageDependencies field aren’t part of the standard DX dependency mechanism.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy