{"id":21155009,"url":"https://github.com/forge/angularjs-scaffoldx-plugin","last_synced_at":"2025-07-09T11:31:10.709Z","repository":{"id":8483796,"uuid":"10087625","full_name":"forge/angularjs-scaffoldx-plugin","owner":"forge","description":"The AngularJS scaffold-x plugin for Forge 1.x","archived":false,"fork":false,"pushed_at":"2014-03-23T14:54:28.000Z","size":1594,"stargazers_count":9,"open_issues_count":0,"forks_count":5,"subscribers_count":7,"default_branch":"master","last_synced_at":"2023-04-14T20:38:13.663Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":false,"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/forge.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-05-15T20:45:28.000Z","updated_at":"2016-04-23T17:04:49.000Z","dependencies_parsed_at":"2022-09-09T20:30:49.340Z","dependency_job_id":null,"html_url":"https://github.com/forge/angularjs-scaffoldx-plugin","commit_stats":null,"previous_names":[],"tags_count":5,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forge%2Fangularjs-scaffoldx-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forge%2Fangularjs-scaffoldx-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forge%2Fangularjs-scaffoldx-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forge%2Fangularjs-scaffoldx-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/forge","download_url":"https://codeload.github.com/forge/angularjs-scaffoldx-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225537292,"owners_count":17484986,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-20T11:13:56.594Z","updated_at":"2024-11-20T11:13:57.303Z","avatar_url":"https://github.com/forge.png","language":"Java","readme":"angularjs-scaffoldx-plugin\n==========================\n\nThe AngularJS scaffold provider for the scaffold-x plugin in Forge 1.x. It creates AngularJS web-apps from JPA entities.\n\n\u003e If you're looking at using this in **Forge 2**, head over to [the Forge 2 AngularJS addon project](https://github.com/forge/angularjs-addon).\n\n# Prerequisites\n\n* [Forge 1.4.3](https://repository.jboss.org/nexus/service/local/repositories/releases/content/org/jboss/forge/forge-distribution/1.4.3.Final/forge-distribution-1.4.3.Final.zip)\n\n# Install Forge\n\nCopy the ZIP distribution to a directory and unzip it. This is your ```FORGE_HOME```:\n```\n// Linux or Mac OS X\n$ export FORGE_HOME=\u003cthe location of the extracted distribution\u003e\n\n// or Windows\n\u003e set FORGE_HOME=\u003cthe location of the extracted distributio\u003e\n```\n\nModify the PATH to use this ```FORGE_HOME```:\n\n```\n// Linux or Mac OS X\n$ export PATH=$FORGE_HOME/bin:$PATH\n\n// or Windows\n\u003e set PATH=%FORGE_HOME%/bin:%PATH%\n```\n\nand start Forge:\n\n```\n$ forge\n```\n\nOr alternatively update your existing Forge installation to 1.4.3 - this may break due to [FORGE-849](https://issues.jboss.org/browse/FORGE-849), so it is would be better to download 1.4.3.\n\n# Install the AngularJS scaffold-x provider plugin\n\nStart Forge, and install the AngularJS scaffold-x provider plugin listed in the Forge central plugin repository.\n\n```\n$ forge install-plugin angularjs\n```\n\nThe 'angularjs' scaffold provider should now be available in the list of scaffold-x providers:\n\n```\n$ list-scaffoldx-providers \n* angularjs : AngularJS scaffolding\n```\n\nNote that this is not a provider for the older scaffold plugin.\n\n# Usage\n\nA sample Forge script to try out the scaffold provider is listed below. It :\n* creates a new project,\n* sets up JPA and Bean Validation\n* creates JPA entities\n* creates fields in the JPA entities\n* add Bean Validation constraints to the fields\n* creates REST resources that expose the JPA entities via a REST API\n* scaffolds an AngularJS app creating AngularJS views for every JPA entity\n\n```\necho \"Script to generate an AngularJS scaffold with uni-directional M:1 and 1:1 relationships\";\n \nset ACCEPT_DEFAULTS true;\nnew-project --named scaffold-example --topLevelPackage com.example.scaffoldexample;\npersistence setup --provider HIBERNATE --container JBOSS_AS7;\nvalidation setup --provider JAVA_EE;\nentity --named Customer;\nfield string --named firstName;\nconstraint NotNull --onProperty firstName;\nconstraint Size --onProperty firstName --min 3 --max 100;\nfield temporal --type DATE --named dateOfBirth;\nfield boolean --named optForMail;\nentity --named DiscountVoucher;\nfield string --named voucherCode;\nentity --named StoreOrder;\nfield string --named product;\nfield int --named amount;\nconstraint Min --onProperty amount --min 1;\nconstraint Max --onProperty amount --max 50;\nfield string --named remarks;\nconstraint Size --onProperty remarks --max 100;\nfield manyToOne --named customer --fieldType com.example.scaffoldexample.model.Customer.java;\nfield oneToOne --named voucher --fieldType com.example.scaffoldexample.model.DiscountVoucher.java;\nrest setup --activatorType WEB_XML;\nrest endpoint-from-entity --contentType application/json com.example.scaffoldexample.model.*;\nscaffold-x setup --scaffoldType angularjs;\ncd ~~;\nscaffold-x from \"src/main/java/com/example/scaffoldexample/model/*\";\n```\n\n\u003e Note - the AngularJS scaffold plugin does not create REST resources out-of-the box.\n\u003e\n\u003e It works best with the root-and-nested-DTOs based REST resources generated by Forge.\n\u003e\n\u003e In the above script, the Forge `rest` command is used to create the REST resources.\n\u003e This will be changed in FORGE 2.x. You can track [FORGE-1402](https://issues.jboss.org/browse/FORGE-1402) for progress on this issue.\n\n\nYou can save this (say, scaffold.fsh in the same working directory), and run it inside forge:\n\n```\n$ run scaffold.fsh\n```\n\nThe default values are sufficient.\n\n# Deploy the generated scaffold to JBoss AS 7.x\n\nYou may need to install the AS7 plugin. If you haven't done so already:\n\n```\n$ forge install-plugin jboss-as-7\n```\n\nAnd then setup the AS7 plugin in the project:\n\n```\n$ as7 setup\n```\n\nNow, you can build the project\n\n```\n$ build\n```\n\nand start and deploy to as7\n\n```\n$ as7 start\n$ as7 deploy\n```\n\n# Responsive support\n\nThe generated scaffold relies on the responsive support provided by Bootstrap 3. It has been tested on Firefox 22 and Google Chrome 30 (both desktop and mobile versions). This may work on older browsers.\n\n# Modifying the scaffolding templates\n\nThe scaffold-x plugin allows developers to modify the templates used by the scaffold providers (as long as the providers utilize a template driven approach). This feature is meant for developers who wish to control aspects of the scaffold provider, without writing another provider.\n\nFreemarker templates used by the AngularJS scaffolding provider, can be installed during project setup as:\n\n```\n$ scaffold-x setup --scaffoldType angularjs --installTemplates\n```\n\nThe templates are now available in `src/main/templates` and can be modified to modify the generated scaffold in certain areas. The scaffolding plugin will use the templates from this location, over the factory-shipped ones.\n\n\n# Issue Tracker\n\nWe do not use GitHub issues for issue tracking.\nPlease raise issues in the [JBoss JIRA Issue tracker](https://issues.jboss.org//secure/CreateIssueDetails!init.jspa?pid=12312020\u0026components=12317568\u0026issuetype=1\u0026priority=3).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fforge%2Fangularjs-scaffoldx-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fforge%2Fangularjs-scaffoldx-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fforge%2Fangularjs-scaffoldx-plugin/lists"}