{"id":109,"date":"2019-04-23T14:07:43","date_gmt":"2019-04-23T12:07:43","guid":{"rendered":"https:\/\/transferttexei.wordpress.com\/2021\/08\/10\/automatically-install-second-generation-packages-dependencies-with-a-custom-sfdx-plugin\/"},"modified":"2023-08-16T15:36:20","modified_gmt":"2023-08-16T13:36:20","slug":"automatically-install-second-generation-packages-dependencies-with-a-custom-sfdx-plugin","status":"publish","type":"post","link":"https:\/\/texei.com\/en\/advices\/automatically-install-second-generation-packages-dependencies-with-a-custom-sfdx-plugin\/","title":{"rendered":"Automatically install Second-Generation Packages dependencies with a custom sfdx plugin"},"content":{"rendered":"\r\n<p>If you\u2019ve started using Salesforce DX, it\u2019s likely you\u2019ve already seen this picture of happy Trailhead characters moving metadata from the so-called \u201cHappy soup\u201d to separate projects:<\/p>\r\n\r\n\r\n\r\n<p>In an <a href=\"https:\/\/texei.com\/conseils\/our-move-to-salesforce-dx-and-developer-controlled-packages\/\" target=\"_blank\" rel=\"noopener\">older blog post<\/a>, I wrote about our first steps with DX and Unlocked Packages. We started small with a new project that had no dependency with the existing org\u2019s metadata.<\/p>\r\n\r\n\r\n\r\n<p>At some point however, having more complex projects required to split metadata in separate projects and packages.<\/p>\r\n\r\n\r\n\r\n<p>I\u2019m not going to talk about the best strategy to split your org in separate projects, but if you\u2019re interested (and I\u2019m sure you are), you can have a look to the great blog post serie <a href=\"https:\/\/developer.salesforce.com\/blogs\/2018\/06\/working-with-modular-development-and-unlocked-packages-part-1.html\" target=\"_blank\" rel=\"noopener\">Working with Modular Development and Unlocked Packages<\/a> on Salesforce Developer blog, or John Daniel &amp; Dileep Burki\u2019s talk at TDX18, <a href=\"https:\/\/youtu.be\/MY2_AfjtBp8\" target=\"_blank\" rel=\"noopener\">Architecting Unlocked Packages in your Salesforce Org<\/a>.<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">Sfdx plugin, what is a Package?<\/h2>\r\n\r\n\r\n\r\n<p>Before talking about dependencies, it\u2019s important to understand what exactly is a package and what makes it unique.<\/p>\r\n\r\n\r\n\r\n<p>A package has 2 parts:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>a Package Id (starting by 0Ho)<\/li>\r\n<li>a Package Version Id (starting by 04t)<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>You first create your Package, and then create versions of it that you will install and upgrade over time. It\u2019s almost the same thing as what you get with an App Exchange package.<\/p>\r\n\r\n\r\n\r\n<p>For instance you could create a package for your Service Cloud project, and then deploy several versions of it. So you\u2019ll have:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>Your package \u201cServiceCloudProject\u201d, Id 0Hoxxxxxxxxxxxx (would never change)<\/li>\r\n<li>Your package version ServiceCloudProject v1.0, Id 04tyyyyyyyyyyyy<\/li>\r\n<li>Your package version ServiceCloudProject v1.1, Id 04tzzzzzzzzzzzz<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>Additionally, depending on your branching model, you could have one version per branch, so for instance:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>a ServiceCloudProject v1.1 for the dev branch<\/li>\r\n<li>a ServiceCloudProject v1.1 for the release branch<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>Both would have a different Package Version (04t) id (but you can definitely build one version and deploy it everywhere without using the branch tag).<\/p>\r\n\r\n\r\n\r\n<p>So to sum up, you can target a specific and unique package version with:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>Its Package Version Id (04t)<\/li>\r\n<li>Its Package Id (0ho) + its Version Number + its Branch<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\">Packages Dependency<\/h3>\r\n\r\n\r\n\r\n<p>Let\u2019s take a fictional project that would be separated into 4 Packages like this:<\/p>\r\n\r\n\r\n\r\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter wp-image-5229 size-full\" src=\"https:\/\/texei.com\/dev\/wp-content\/uploads\/2019\/04\/PROJECT-A-New-custom-fields-on-Account-New-custom-fields-on-Contact-Custom-Objects.png\" alt=\"\" width=\"1920\" height=\"1080\" srcset=\"https:\/\/texei.com\/dev\/wp-content\/uploads\/2019\/04\/PROJECT-A-New-custom-fields-on-Account-New-custom-fields-on-Contact-Custom-Objects-200x113.png 200w, https:\/\/texei.com\/dev\/wp-content\/uploads\/2019\/04\/PROJECT-A-New-custom-fields-on-Account-New-custom-fields-on-Contact-Custom-Objects-300x169.png 300w, https:\/\/texei.com\/dev\/wp-content\/uploads\/2019\/04\/PROJECT-A-New-custom-fields-on-Account-New-custom-fields-on-Contact-Custom-Objects-400x225.png 400w, https:\/\/texei.com\/dev\/wp-content\/uploads\/2019\/04\/PROJECT-A-New-custom-fields-on-Account-New-custom-fields-on-Contact-Custom-Objects-600x338.png 600w, https:\/\/texei.com\/dev\/wp-content\/uploads\/2019\/04\/PROJECT-A-New-custom-fields-on-Account-New-custom-fields-on-Contact-Custom-Objects-768x432.png 768w, https:\/\/texei.com\/dev\/wp-content\/uploads\/2019\/04\/PROJECT-A-New-custom-fields-on-Account-New-custom-fields-on-Contact-Custom-Objects-800x450.png 800w, https:\/\/texei.com\/dev\/wp-content\/uploads\/2019\/04\/PROJECT-A-New-custom-fields-on-Account-New-custom-fields-on-Contact-Custom-Objects-1024x576.png 1024w, https:\/\/texei.com\/dev\/wp-content\/uploads\/2019\/04\/PROJECT-A-New-custom-fields-on-Account-New-custom-fields-on-Contact-Custom-Objects-1200x675.png 1200w, https:\/\/texei.com\/dev\/wp-content\/uploads\/2019\/04\/PROJECT-A-New-custom-fields-on-Account-New-custom-fields-on-Contact-Custom-Objects-1536x864.png 1536w, https:\/\/texei.com\/dev\/wp-content\/uploads\/2019\/04\/PROJECT-A-New-custom-fields-on-Account-New-custom-fields-on-Contact-Custom-Objects.png 1920w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><\/figure>\r\n\r\n\r\n\r\n<p>Let\u2019s say you need to work on Project B, you\u2019ll have to install the Base package first. To work on Project C, you\u2019ll need to install both the Base package and Project B package. So how does it work\u00a0?<\/p>\r\n\r\n\r\n\r\n<h3 class=\"wp-block-heading\">Specifying dependencies<\/h3>\r\n\r\n\r\n\r\n<p>Dependencies are listed in your project definition file (sfdx-project.json). For Project C, you\u2019ll have something like this:<\/p>\r\n\r\n\r\n<script src=\"https:\/\/gist.github.com\/ac37c8812fd899bab93575f8a7388dbc.js\"><\/script>\n\r\n\r\n\r\n<p>As you can see, dependencies are listed under\u2026dependencies (unbelievable, right\u00a0?).<\/p>\r\n\r\n\r\n\r\n<p>There are a few things to note here:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>You need to specify the whole dependency chain (Project C must add dependencies for both Project B and the Base package)<\/li>\r\n<li>Most importantly, and this is something that to me remains quite painful today, you need specify a dependency on one very specific Package Version.<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>A Package Version number looks like this: major.minor.patch.build.<\/p>\r\n\r\n\r\n\r\n<p>You can use the LATEST keyword on the BUILD number of the package version when you specify a dependency, but that\u2019s it! Every time you release a package version you\u2019ll have to increment at least the minor number of the version, and thus update all your sfdx-project.json!<\/p>\r\n\r\n\r\n\r\n<h4 class=\"wp-block-heading\">Where is dependency used?<\/h4>\r\n\r\n\r\n\r\n<p>So this seems pretty simple, but this dependency is actually only used for one thing: package creation.<\/p>\r\n\r\n\r\n\r\n<p>When you\u2019ll be ready to package your Project B and run <code>sfdx force:package:version:create<\/code>, Salesforce will pick all the dependencies that you\u2019ve listed in your sfdx-project.json, and validate your whole package.<\/p>\r\n\r\n\r\n\r\n<p>So this makes sense, but what happens when you want to install your package in a whole new org\u00a0? Well, you\u2019ll have to manually install all the dependencies of that package.<\/p>\r\n\r\n\r\n\r\n<p>This means that in our example, you wouldn\u2019t be able to install Package C before having installed Base Package and Package B first. Salesforce won\u2019t install them for you. This can makes sense, if you don\u2019t want to quickly find yourself into an npm-like dependency craziness.<\/p>\r\n\r\n\r\n\r\n<h4 class=\"wp-block-heading\">So what\u2019s the \u201cissue\u201d\u00a0?<\/h4>\r\n\r\n\r\n\r\n<p>Well the thing is that, you\u2019ll likely have to use your dependencies in several places:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>in your sfdx-project.json<\/li>\r\n<li>in your CI, so that your package can be tested<\/li>\r\n<li>maybe in a script used to build a Scratch Org for your developers<\/li>\r\n<li>\u2026<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>Looking back at our Package C, it has 2 dependencies:<\/p>\r\n\r\n\r\n\r\n<ul class=\"wp-block-list\">\r\n<li>\u201cProject B\u201d: \u201c0Ho58123456789BCAQ\u201d<\/li>\r\n<li>\u201cBase@1.3.0.0\u201d: \u201c04t58123456Kmn0AAC\u201d<\/li>\r\n<\/ul>\r\n\r\n\r\n\r\n<p>If you use these Ids in several scripts as said before, each time you build a new version of Project B or Base Package, you\u2019ll have to update all these scripts. Does this makes sense\u00a0? Not really, as everything is already written down in our sfdx-project.json. Could we do a better job here\u00a0? Sure.<\/p>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading\">Introducing Texe\u00ef&#8217;s custom sfdx\u00a0plugin<\/h2>\r\n\r\n\r\n\r\n<p>Last year, we wrote a <a href=\"https:\/\/developer.salesforce.com\/blogs\/2018\/05\/create-your-first-salesforce-cli-plugin.html\" target=\"_blank\" rel=\"noopener\">custom sfdx plugin<\/a> to automatically install dependencies. Just run the following command from your project\u2019s folder, and that\u2019s it:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-code\"><code>sfdx texei:package:dependencies:install -u MyOrg<\/code><\/pre>\r\n\r\n\r\n\r\n<p>For instance, for Project C, both Base package and Package B would be installed. Next time you\u2019ll have to update the package ids, you\u2019ll just have to do it in the sfdx-project.json file and that\u2019s it, as no id is hardcoded in the plugin command.<\/p>\r\n\r\n\r\n\r\n<p>To know more about the available flags (to add installation key for instance), just run the help command:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-code\"><code>sfdx texei:package:dependencies:install -h<\/code><\/pre>\r\n\r\n\r\n\r\n<p>You can install the plugin easily by running:<\/p>\r\n\r\n\r\n\r\n<pre class=\"wp-block-code\"><code>sfdx plugins:install texei-sfdx-plugin<\/code><\/pre>\r\n\r\n\r\n\r\n<p>Also, we\u2019ve made the plugin fully open source, so you can have a look to the code on GitHub:<\/p>\r\n\r\n\r\n<p><a href=\"https:\/\/github.com\/texei\/texei-sfdx-plugin\">https:\/\/github.com\/texei\/texei-sfdx-plugin<\/a><\/p>\n\r\n\r\n\r\n<p>I would like to thank <a href=\"https:\/\/twitter.com\/ImJohnMDaniel\" target=\"_blank\" rel=\"noopener\">John Daniel<\/a> and <a href=\"https:\/\/twitter.com\/dieffrei\" target=\"_blank\" rel=\"noopener\">Di\u00e9ffrei Quadros<\/a>, active members of the Salesforce community, that helped to make a better plugin with their Pull Requests. Thank you guys\u00a0!<\/p>\r\n\r\n\r\n\r\n<p>Would you have any question or comment, please feel free to reach out to me on <a href=\"https:\/\/twitter.com\/fabientaillon\" target=\"_blank\" rel=\"noopener\">Twitter<\/a>.<\/p>\r\n<p><a href=\"https:\/\/texei.com\/livres-blancs\/lessentiel-pour-demarrer-avec-sfdx\/\"><img decoding=\"async\" class=\"aligncenter wp-image-14457 size-full\" src=\"https:\/\/texei.com\/dev\/wp-content\/uploads\/2019\/04\/Bannire-signature.jpg\" alt=\"\" width=\"600\" height=\"200\" srcset=\"https:\/\/texei.com\/dev\/wp-content\/uploads\/2019\/04\/Bannire-signature-200x67.jpg 200w, https:\/\/texei.com\/dev\/wp-content\/uploads\/2019\/04\/Bannire-signature-300x100.jpg 300w, https:\/\/texei.com\/dev\/wp-content\/uploads\/2019\/04\/Bannire-signature-400x133.jpg 400w, https:\/\/texei.com\/dev\/wp-content\/uploads\/2019\/04\/Bannire-signature.jpg 600w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>If you\u2019ve started using Salesforce DX, it\u2019s likely you\u2019ve already seen this picture of happy Trailhead characters moving metadata from the so-called \u201cHappy soup\u201d to separate projects: In an older blog post, I wrote about our first steps with DX and Unlocked Packages. We started small with a new project that had no dependency with [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":5261,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[300],"tags":[],"class_list":["post-109","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-advices"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Automatically install Second-Generation Packages dependencies with a custom sfdx plugin - Texe\u00ef<\/title>\n<meta name=\"description\" content=\"Learn how to automatically install Second-Generation Packages using a sfdx plugin and see how to use it in your day to day !\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/texei.com\/en\/advices\/automatically-install-second-generation-packages-dependencies-with-a-custom-sfdx-plugin\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Automatically install Second-Generation Packages dependencies with a custom sfdx plugin\" \/>\n<meta property=\"og:description\" content=\"Learn how to automatically install Second-Generation Packages using a sfdx plugin and see how to use it in your day to day !\" \/>\n<meta property=\"og:url\" content=\"https:\/\/texei.com\/en\/advices\/automatically-install-second-generation-packages-dependencies-with-a-custom-sfdx-plugin\/\" \/>\n<meta property=\"og:site_name\" content=\"Texe\u00ef\" \/>\n<meta property=\"article:published_time\" content=\"2019-04-23T12:07:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-08-16T13:36:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/texei.com\/dev\/wp-content\/uploads\/2019\/04\/User_Scenario_1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1440\" \/>\n\t<meta property=\"og:image:height\" content=\"1080\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Fabien Taillon\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/texei.com\\\/en\\\/advices\\\/automatically-install-second-generation-packages-dependencies-with-a-custom-sfdx-plugin\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/texei.com\\\/en\\\/advices\\\/automatically-install-second-generation-packages-dependencies-with-a-custom-sfdx-plugin\\\/\"},\"author\":{\"name\":\"Fabien Taillon\",\"@id\":\"https:\\\/\\\/texei.com\\\/#\\\/schema\\\/person\\\/082ce6d13635571cae4161f1d4f5a9a7\"},\"headline\":\"Automatically install Second-Generation Packages dependencies with a custom sfdx plugin\",\"datePublished\":\"2019-04-23T12:07:43+00:00\",\"dateModified\":\"2023-08-16T13:36:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/texei.com\\\/en\\\/advices\\\/automatically-install-second-generation-packages-dependencies-with-a-custom-sfdx-plugin\\\/\"},\"wordCount\":1011,\"publisher\":{\"@id\":\"https:\\\/\\\/texei.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/texei.com\\\/en\\\/advices\\\/automatically-install-second-generation-packages-dependencies-with-a-custom-sfdx-plugin\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/texei.com\\\/dev\\\/wp-content\\\/uploads\\\/2019\\\/04\\\/User_Scenario_1.png\",\"articleSection\":[\"Advices\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/texei.com\\\/en\\\/advices\\\/automatically-install-second-generation-packages-dependencies-with-a-custom-sfdx-plugin\\\/\",\"url\":\"https:\\\/\\\/texei.com\\\/en\\\/advices\\\/automatically-install-second-generation-packages-dependencies-with-a-custom-sfdx-plugin\\\/\",\"name\":\"Automatically install Second-Generation Packages dependencies with a custom sfdx plugin - Texe\u00ef\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/texei.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/texei.com\\\/en\\\/advices\\\/automatically-install-second-generation-packages-dependencies-with-a-custom-sfdx-plugin\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/texei.com\\\/en\\\/advices\\\/automatically-install-second-generation-packages-dependencies-with-a-custom-sfdx-plugin\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/texei.com\\\/dev\\\/wp-content\\\/uploads\\\/2019\\\/04\\\/User_Scenario_1.png\",\"datePublished\":\"2019-04-23T12:07:43+00:00\",\"dateModified\":\"2023-08-16T13:36:20+00:00\",\"description\":\"Learn how to automatically install Second-Generation Packages using a sfdx plugin and see how to use it in your day to day !\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/texei.com\\\/en\\\/advices\\\/automatically-install-second-generation-packages-dependencies-with-a-custom-sfdx-plugin\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/texei.com\\\/en\\\/advices\\\/automatically-install-second-generation-packages-dependencies-with-a-custom-sfdx-plugin\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/texei.com\\\/en\\\/advices\\\/automatically-install-second-generation-packages-dependencies-with-a-custom-sfdx-plugin\\\/#primaryimage\",\"url\":\"https:\\\/\\\/texei.com\\\/dev\\\/wp-content\\\/uploads\\\/2019\\\/04\\\/User_Scenario_1.png\",\"contentUrl\":\"https:\\\/\\\/texei.com\\\/dev\\\/wp-content\\\/uploads\\\/2019\\\/04\\\/User_Scenario_1.png\",\"width\":1440,\"height\":1080},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/texei.com\\\/en\\\/advices\\\/automatically-install-second-generation-packages-dependencies-with-a-custom-sfdx-plugin\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/texei.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Advices\",\"item\":\"https:\\\/\\\/texei.com\\\/en\\\/category\\\/advices\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Automatically install Second-Generation Packages dependencies with a custom sfdx plugin\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/texei.com\\\/#website\",\"url\":\"https:\\\/\\\/texei.com\\\/\",\"name\":\"Texe\u00ef\",\"description\":\"Turn your IT into Business\",\"publisher\":{\"@id\":\"https:\\\/\\\/texei.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/texei.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/texei.com\\\/#organization\",\"name\":\"Texe\u00ef\",\"url\":\"https:\\\/\\\/texei.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/texei.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/texei.com\\\/dev\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/logo-essai-1.jpg\",\"contentUrl\":\"https:\\\/\\\/texei.com\\\/dev\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/logo-essai-1.jpg\",\"width\":2560,\"height\":1102,\"caption\":\"Texe\u00ef\"},\"image\":{\"@id\":\"https:\\\/\\\/texei.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/texei.com\\\/#\\\/schema\\\/person\\\/082ce6d13635571cae4161f1d4f5a9a7\",\"name\":\"Fabien Taillon\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/texei.com\\\/dev\\\/wp-content\\\/uploads\\\/2025\\\/12\\\/avatar_user_5_1766076207-96x96.png\",\"url\":\"https:\\\/\\\/texei.com\\\/dev\\\/wp-content\\\/uploads\\\/2025\\\/12\\\/avatar_user_5_1766076207-96x96.png\",\"contentUrl\":\"https:\\\/\\\/texei.com\\\/dev\\\/wp-content\\\/uploads\\\/2025\\\/12\\\/avatar_user_5_1766076207-96x96.png\",\"caption\":\"Fabien Taillon\"},\"url\":\"https:\\\/\\\/texei.com\\\/en\\\/author\\\/fabient\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Automatically install Second-Generation Packages dependencies with a custom sfdx plugin - Texe\u00ef","description":"Learn how to automatically install Second-Generation Packages using a sfdx plugin and see how to use it in your day to day !","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/texei.com\/en\/advices\/automatically-install-second-generation-packages-dependencies-with-a-custom-sfdx-plugin\/","og_locale":"en_US","og_type":"article","og_title":"Automatically install Second-Generation Packages dependencies with a custom sfdx plugin","og_description":"Learn how to automatically install Second-Generation Packages using a sfdx plugin and see how to use it in your day to day !","og_url":"https:\/\/texei.com\/en\/advices\/automatically-install-second-generation-packages-dependencies-with-a-custom-sfdx-plugin\/","og_site_name":"Texe\u00ef","article_published_time":"2019-04-23T12:07:43+00:00","article_modified_time":"2023-08-16T13:36:20+00:00","og_image":[{"width":1440,"height":1080,"url":"https:\/\/texei.com\/dev\/wp-content\/uploads\/2019\/04\/User_Scenario_1.png","type":"image\/png"}],"author":"Fabien Taillon","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/texei.com\/en\/advices\/automatically-install-second-generation-packages-dependencies-with-a-custom-sfdx-plugin\/#article","isPartOf":{"@id":"https:\/\/texei.com\/en\/advices\/automatically-install-second-generation-packages-dependencies-with-a-custom-sfdx-plugin\/"},"author":{"name":"Fabien Taillon","@id":"https:\/\/texei.com\/#\/schema\/person\/082ce6d13635571cae4161f1d4f5a9a7"},"headline":"Automatically install Second-Generation Packages dependencies with a custom sfdx plugin","datePublished":"2019-04-23T12:07:43+00:00","dateModified":"2023-08-16T13:36:20+00:00","mainEntityOfPage":{"@id":"https:\/\/texei.com\/en\/advices\/automatically-install-second-generation-packages-dependencies-with-a-custom-sfdx-plugin\/"},"wordCount":1011,"publisher":{"@id":"https:\/\/texei.com\/#organization"},"image":{"@id":"https:\/\/texei.com\/en\/advices\/automatically-install-second-generation-packages-dependencies-with-a-custom-sfdx-plugin\/#primaryimage"},"thumbnailUrl":"https:\/\/texei.com\/dev\/wp-content\/uploads\/2019\/04\/User_Scenario_1.png","articleSection":["Advices"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/texei.com\/en\/advices\/automatically-install-second-generation-packages-dependencies-with-a-custom-sfdx-plugin\/","url":"https:\/\/texei.com\/en\/advices\/automatically-install-second-generation-packages-dependencies-with-a-custom-sfdx-plugin\/","name":"Automatically install Second-Generation Packages dependencies with a custom sfdx plugin - Texe\u00ef","isPartOf":{"@id":"https:\/\/texei.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/texei.com\/en\/advices\/automatically-install-second-generation-packages-dependencies-with-a-custom-sfdx-plugin\/#primaryimage"},"image":{"@id":"https:\/\/texei.com\/en\/advices\/automatically-install-second-generation-packages-dependencies-with-a-custom-sfdx-plugin\/#primaryimage"},"thumbnailUrl":"https:\/\/texei.com\/dev\/wp-content\/uploads\/2019\/04\/User_Scenario_1.png","datePublished":"2019-04-23T12:07:43+00:00","dateModified":"2023-08-16T13:36:20+00:00","description":"Learn how to automatically install Second-Generation Packages using a sfdx plugin and see how to use it in your day to day !","breadcrumb":{"@id":"https:\/\/texei.com\/en\/advices\/automatically-install-second-generation-packages-dependencies-with-a-custom-sfdx-plugin\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/texei.com\/en\/advices\/automatically-install-second-generation-packages-dependencies-with-a-custom-sfdx-plugin\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/texei.com\/en\/advices\/automatically-install-second-generation-packages-dependencies-with-a-custom-sfdx-plugin\/#primaryimage","url":"https:\/\/texei.com\/dev\/wp-content\/uploads\/2019\/04\/User_Scenario_1.png","contentUrl":"https:\/\/texei.com\/dev\/wp-content\/uploads\/2019\/04\/User_Scenario_1.png","width":1440,"height":1080},{"@type":"BreadcrumbList","@id":"https:\/\/texei.com\/en\/advices\/automatically-install-second-generation-packages-dependencies-with-a-custom-sfdx-plugin\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/texei.com\/"},{"@type":"ListItem","position":2,"name":"Advices","item":"https:\/\/texei.com\/en\/category\/advices\/"},{"@type":"ListItem","position":3,"name":"Automatically install Second-Generation Packages dependencies with a custom sfdx plugin"}]},{"@type":"WebSite","@id":"https:\/\/texei.com\/#website","url":"https:\/\/texei.com\/","name":"Texe\u00ef","description":"Turn your IT into Business","publisher":{"@id":"https:\/\/texei.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/texei.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/texei.com\/#organization","name":"Texe\u00ef","url":"https:\/\/texei.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/texei.com\/#\/schema\/logo\/image\/","url":"https:\/\/texei.com\/dev\/wp-content\/uploads\/2021\/03\/logo-essai-1.jpg","contentUrl":"https:\/\/texei.com\/dev\/wp-content\/uploads\/2021\/03\/logo-essai-1.jpg","width":2560,"height":1102,"caption":"Texe\u00ef"},"image":{"@id":"https:\/\/texei.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/texei.com\/#\/schema\/person\/082ce6d13635571cae4161f1d4f5a9a7","name":"Fabien Taillon","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/texei.com\/dev\/wp-content\/uploads\/2025\/12\/avatar_user_5_1766076207-96x96.png","url":"https:\/\/texei.com\/dev\/wp-content\/uploads\/2025\/12\/avatar_user_5_1766076207-96x96.png","contentUrl":"https:\/\/texei.com\/dev\/wp-content\/uploads\/2025\/12\/avatar_user_5_1766076207-96x96.png","caption":"Fabien Taillon"},"url":"https:\/\/texei.com\/en\/author\/fabient\/"}]}},"_links":{"self":[{"href":"https:\/\/texei.com\/en\/wp-json\/wp\/v2\/posts\/109","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/texei.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/texei.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/texei.com\/en\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/texei.com\/en\/wp-json\/wp\/v2\/comments?post=109"}],"version-history":[{"count":0,"href":"https:\/\/texei.com\/en\/wp-json\/wp\/v2\/posts\/109\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/texei.com\/en\/wp-json\/wp\/v2\/media\/5261"}],"wp:attachment":[{"href":"https:\/\/texei.com\/en\/wp-json\/wp\/v2\/media?parent=109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/texei.com\/en\/wp-json\/wp\/v2\/categories?post=109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/texei.com\/en\/wp-json\/wp\/v2\/tags?post=109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}