{"id":19892189,"url":"https://github.com/broadleafcommerce/broadleaf-xml-migrator","last_synced_at":"2026-05-15T14:03:25.985Z","repository":{"id":66761884,"uuid":"92441854","full_name":"BroadleafCommerce/broadleaf-xml-migrator","owner":"BroadleafCommerce","description":"Migrates the XML from a Broadleaf 5.1 project to use the required 5.2 configuration","archived":false,"fork":false,"pushed_at":"2024-10-03T18:43:08.000Z","size":66,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-03-01T05:26:52.277Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BroadleafCommerce.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-25T20:29:54.000Z","updated_at":"2021-05-11T15:19:30.000Z","dependencies_parsed_at":"2025-01-11T19:42:27.903Z","dependency_job_id":null,"html_url":"https://github.com/BroadleafCommerce/broadleaf-xml-migrator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BroadleafCommerce/broadleaf-xml-migrator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BroadleafCommerce%2Fbroadleaf-xml-migrator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BroadleafCommerce%2Fbroadleaf-xml-migrator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BroadleafCommerce%2Fbroadleaf-xml-migrator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BroadleafCommerce%2Fbroadleaf-xml-migrator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BroadleafCommerce","download_url":"https://codeload.github.com/BroadleafCommerce/broadleaf-xml-migrator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BroadleafCommerce%2Fbroadleaf-xml-migrator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33068894,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T18:22:19.141Z","updated_at":"2026-05-15T14:03:25.945Z","avatar_url":"https://github.com/BroadleafCommerce.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# broadleaf-xml-migrator\nMigrates the application context XML files from a Broadleaf 5.1 project to use the required 5.2 configuration\n\n## Project Setup\nThis project can either be cloned locally or the executable jar can be downloaded [here](https://github.com/BroadleafCommerce/broadleaf-xml-migrator/releases/new)\n\n## Usage\n### Using Downloaded JAR\nLocate the JAR in your local system and run\n```\njava -jar broadleaf-xml-migrator-{version}.jar --filepath={filepath} --qualifier={qualifier} --dryrun={true|false} --outputpath={dirpath}\n```\n### Using JAR created from cloned repo\nCreate the JAR by navigating to the root directory of where the repo was cloned and run\n```\nmvn package\n```\nThe JAR will be built inside the `target` directory so navigate there and run the command mentioned for the \"Using Downloaded JAR\" section\n### Running without creating a JAR\nNaviagte to the root directory of where the repo was cloned and run\n```\nmvn spring-boot:run -Drun.arguments=\"--filepath={filepath},--qualifier={qualifier},--dryrun={true|false},--outputpath={dirpath}\"\n```\n### Arguments\n- `--filepath={filepath}`\n    - **Required**\n    - The file or directory where the application contexts reside that need migrating. If it's a path to a file then that file will be used. If it's a folder then the application will recursively go through all of the sub directories and run the migration on every file that starts with `applicationContext` and ends with `xml`.\n    - **If you are upgrading an entire project set this to the path to the root of your project**\n        - This is important because the application deals with collisions and will prevent your application from declaring multiple beans with the same id\n        - Alternatively you can run the application multiple times for one project but make sure you change the qualifier argument for every run.\n- `--qualifier={qualifier}`\n    - Optional\n    - Defaults to `client`\n    - This is the custom text that should be added to bean ids in order to keep them unique from a broadleaf bean id. For example if in your project you added a custom activity to the CheckoutWorkflow like below\n\n        ```\n        \u003cbean id=\"blCheckoutWorkflow\" class=\"org.broadleafcommerce.core.workflow.SequenceProcessor\"\u003e\n            \u003cproperty name=\"activities\"\u003e\n                \u003clist\u003e\n                    \u003c!-- This activity should occur at the very end of the checkout workflow, after everything has been executed --\u003e\n                    \u003cbean p:order=\"9999999\" class=\"com.mycompany.workflow.checkout.SendOrderConfirmationEmailActivity\" /\u003e\n                \u003c/list\u003e\n            \u003c/property\u003e\n        \u003c/bean\u003e\n        ```\n        Then the result would be\n        ```\n        \u003cbean id=\"blCheckoutWorkflowActivities-client\" class=\"org.springframework.beans.factory.config.ListFactoryBean\"\u003e\n            \u003cproperty name=\"sourceList\"\u003e\n                \u003clist\u003e\n                    \u003cbean class=\"com.mycompany.workflow.checkout.SendOrderConfirmationEmailActivity\" p:order=\"9999999\"/\u003e\n                \u003c/list\u003e\n            \u003c/property\u003e\n        \u003c/bean\u003e\n        \u003cbean class=\"org.broadleafcommerce.common.extensibility.context.merge.LateStageMergeBeanPostProcessor\"\u003e\n            \u003cproperty name=\"sourceRef\" value=\"blCheckoutWorkflowActivities-client\"/\u003e\n            \u003cproperty name=\"targetRef\" value=\"blCheckoutWorkflowActivities\"/\u003e\n        \u003c/bean\u003e\n        ```\n        where `client` in the id `blCheckoutWorkflowActivities-client` is the qualifier\n    - In the event that multiple declarations exist (for example it's common to add to `blMergedPersistenceXmlLocations` multiple times in one project) a `- {number}` will be added to the end of the bean id in order to prevent that application from having declarations of beans with the same name.\n        - For example if multiple applicationContexts were adding activities to the `blCheckoutWorkflow` then the second time it was found the resulting id of the collection bean would be `blCheckoutWorkflowActivities-client-1`.\n- `--dryrun={true|false}`\n    - Optional\n    - Defaults to false\n    - If set to true then the resulting migrated xml file prints to the console. If not set or not true then the file that was being migrated will be altered in place\n- `--outputpath={path}`\n    - Optional\n    - Defaults to nothing and is not used if it's not set\n    = If this parameter is set with a value then the resulting migrated xml file(s) will be saved to that location. The original xml files will be unchanged and will not be printed to the console. If this value is set and `--dryrun` is also set, the `--dryrun` argument will be ignored\n        \n## Example Usage\n```\nmvn package;java -jar target/broadleaf-xml-migrator-0.0.1-SNAPSHOT.jar --filepath=/Users/user/blc/DemoSite --dryrun=true --qualifier=ds\n```\nor\n```\nmvn package;java -jar target/broadleaf-xml-migrator-0.0.1-SNAPSHOT.jar --filepath=/Users/user/blc/DemoSite --outputpath=/users/user/blc/MigratedXml\n```\n\n## Running without packaging into a jar\n```\nmvn spring-boot:run -Drun.arguments=\"--filepath=/Users/user/blc/DemoSite,--qualifier=ds,--dryrun=true\"\n```\nof\n```\nmvn spring-boot:run -Drun.arguments=\"--filepath=/Users/user/blc/DemoSite,--qualifier=ds,--outputpath=/users/user/blc/MigratedXml\"\n```\n\n\n## Example Results\nThe result of running\n`mvn spring-boot:run -Drun.arguments=\"--filepath=src/main/resources/applicationContext-before.xml\"` can be found [here](https://github.com/BroadleafCommerce/broadleaf-xml-migrator/blob/master/src/main/resources/applicationContext-after.xml).\n**Note** The file was originally changed in place but an original copy was retained for comparison and was named applicationContext-before\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbroadleafcommerce%2Fbroadleaf-xml-migrator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbroadleafcommerce%2Fbroadleaf-xml-migrator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbroadleafcommerce%2Fbroadleaf-xml-migrator/lists"}