{"id":15893121,"url":"https://github.com/zebrajaeger/opencms-resource-plugin","last_synced_at":"2025-03-17T23:31:48.773Z","repository":{"id":97329042,"uuid":"81675695","full_name":"zebrajaeger/opencms-resource-plugin","owner":"zebrajaeger","description":null,"archived":false,"fork":false,"pushed_at":"2018-05-05T06:36:10.000Z","size":92,"stargazers_count":4,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T05:53:21.508Z","etag":null,"topics":["java","manifest","maven","maven-plugin","opencms","plugin","resource","resource-type","resourcetype","scaffolding"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zebrajaeger.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-02-11T19:13:36.000Z","updated_at":"2019-06-26T00:26:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"86af9069-9e84-4da9-a42c-8f9cc83fa066","html_url":"https://github.com/zebrajaeger/opencms-resource-plugin","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zebrajaeger%2Fopencms-resource-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zebrajaeger%2Fopencms-resource-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zebrajaeger%2Fopencms-resource-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zebrajaeger%2Fopencms-resource-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zebrajaeger","download_url":"https://codeload.github.com/zebrajaeger/opencms-resource-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243891968,"owners_count":20364613,"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":["java","manifest","maven","maven-plugin","opencms","plugin","resource","resource-type","resourcetype","scaffolding"],"created_at":"2024-10-06T08:07:40.779Z","updated_at":"2025-03-17T23:31:48.767Z","avatar_url":"https://github.com/zebrajaeger.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Maven OpenCms Resource Plugin\n\nScaffolding plugin for an easy way to add a new resourceType to your OpenCms project that uses \n[the mediaworx berlin AG openCms Plugin for Maven](http://opencms.mediaworx.com/de/opencms-tools/).   \n\n## Use from commandline\nSimplest way\n```\nmvn de.zebrajaeger:opencms-resource-plugin:createResource \\\n-DnewResourceName=abc\n```\n\nWith custom icon\n```\nmvn de.zebrajaeger:opencms-resource-plugin:createResource \\\n-DnewResourceName=abc \\\n-DiconSource=https://assets-cdn.github.com/images/modules/logos_page/Octocat.png\n```\nCreate multible resourceTypes at once:   \n```\nmvn de.zebrajaeger:opencms-resource-plugin:createResource \\\n-DnewResourceName=abc,def\n```\n\n## Add as profile to project\nadd to pom.xml\n```xml\n\u003cproject\u003e\n\u003c!-- ... --\u003e\n\u003cprofiles\u003e\n    \u003cprofile\u003e\n        \u003cid\u003ecreateResource\u003c/id\u003e\n        \u003cbuild\u003e\n            \u003cplugins\u003e\n                \u003cplugin\u003e\n                    \u003cgroupId\u003ede.zebrajaeger\u003c/groupId\u003e\n                    \u003cartifactId\u003eopencms-resource-plugin\u003c/artifactId\u003e\n                    \u003cversion\u003e1.0-SNAPSHOT\u003c/version\u003e\n                    \u003cexecutions\u003e\n                        \u003cexecution\u003e\n                            \u003cgoals\u003e\n                                \u003cgoal\u003ecreateResource\u003c/goal\u003e\n                            \u003c/goals\u003e\n                        \u003c/execution\u003e\n                    \u003c/executions\u003e\n                \u003c/plugin\u003e\n\n            \u003c/plugins\u003e\n        \u003c/build\u003e\n    \u003c/profile\u003e\n\n\u003c/profiles\u003e\n\u003c!-- ... --\u003e\n\u003c/project\u003e\n```\n## Configuration options\n\n### Parameter \"manifestDir\"   \n* Default value: \"${project.basedir}/src/main/opencms/manifest\"   \n* Required: true   \n* Type: java.io.File   \n* Description: Path to manifest root directory.\n\n### Parameter \"manifestStubFile\"   \n* Default value : \"manifest_stub.xml\"   \n* Required: true    \n* Type: java.lang.String   \n* Description: File name of manifest stub file.\n\n### Parameter \"vfsDir\"  \n* Default value: \"${project.basedir}/src/main/opencms/vfs\"   \n* Required: true   \n* Type: java.io.File   \n* Description: Path to vfs root directory.\n\n### Parameter \"newResourceName\"  \n* Default value: no default value   \n* Required: true   \n* Type: java.lang.String   \n* Description: The name of the new resourceType. Multible values are supported as a comma-separated list of resource-type-names. \nIn this case the 'resourceId'-variable should be 'auto'.\n\n### Parameter \"resourceId\"  \n* Default value: \"auto\"   \n* Required: true   \n* Type: java.lang.String   \n* Possible values: \"auto\" or a java.lang.Integer value \u0026gt; 0    \n* Description: The id of the new resourceType. \"Auto\" looks for other resources in the manifest_Stub file \nand takes the highest resourceId +1 for the new resourceId.  \n\n### Parameter \"iconSource\"  \n* Default value: null   \n* Required: false   \n* Type: java.lang.String \n* Possible values: java.lang.URL od path to file\n  * Supported URL protocols: http, https, ftp(java 7), file, jar   \n* Description: Path to the resource image \n  * if icon or iconBig has its default value, these values ar generated from iconSource filename \n\n### Parameter \"icon\"  \n* Default value: \"plain.png\"   \n* Required: true   \n* Type: java.lang.String   \n* Description: The small icon for the new resourceType. \nThese icons resides in vfs path \"/system/workplace/resources/filetypes/\".\n\n### Parameter \"bigicon\"  \n* Default value: \"plain_big.png\"   \n* Required: true   \n* Type: java.lang.String   \n* Description: The big icon for the new resourceType. \nThese icons resides in vfs path \"/system/workplace/resources/filetypes/\".\n\n### Parameter \"moduleName\"  \n* Default value: \"${project.artifactId}\"   \n* Required: true   \n* Description: The name of the OpenCms Module. With this value generates the plugin the path \nfrom manifest/vfs directory to the module root. \n* Example: the module path is \"/system/modules/de.ikk.classic.cms.template/\" \nthen the moduleName must be \"de.ikk.classic.cms.template\"  .\n\n### Parameter \"layout\"  \n* Default value: \"resource\"   \n* Required: true   \n* Type: de.zebrajaeger.opencms.resourceplugin.ResourceCreatorConfig    \n* Possible values: \"DISTRIBUTED\", \"RESOURCE\" (case insensitive)    \n* Description: The value \"RESOURCE\" means that we create all new files (schema, bundle, formatter, formatter config) \nin the same directory which name is the resource name. The value \"DISTRIBUTED\" let us create all the new \nfiles in different directories (schema in \"schemas\", bundle in \"i18n\", formatter and formatter config in \"formatters\"\")  \n\n### Parameter \"resourceTypeSubDirectory\"  \n* Default value: \"ce\"   \n* Required: true   \n* Description: If variable \"layout\" is set to \"RESOURCE\" and this value is set, the new resourcetype \nfolder will not be created in module root. Instead, in module root will be a new folder created (if not exists) \nwith the name of this variable. The folder of the new resourceType is created within the new subfolder. \n* Example: We create a new resourceType \"foo\" and \"resourceTypeSubDirectory\" is \"ce\". \nThe \"moduleName\" is \"my.opencms.module\". All the new files a created in vfs/manifest are in the folder \n\"/system/modules/my.opencms.module/ce/foo/\". To prevent create a additional subfolder, set this value to \"\" (empty string).\n\n### Parameter \"schemaTypeNamingStrategyClass\"  \n* Default value: \"de.zebrajaeger.opencms.resourceplugin.namingstrategy.CamelCaseNamingStrategy\"   \n* Required: true\n* Possible values are\n** 'de.zebrajaeger.opencms.resourceplugin.namingstrategy.CamelCaseNamingStrategy'\n** 'de.zebrajaeger.opencms.resourceplugin.namingstrategy.LowerCaseWithHyphenNamingStrategy'\n** 'de.zebrajaeger.opencms.resourceplugin.namingstrategy.PassThroughNamingStrategy'\n** or any other self implemented naming-strategy that derives from 'de\n                                                                    .zebrajaeger.opencms.resourceplugin\n                                                                    .namingstrategy.NamingStrategy'   \n* Description: The strategy how to transform the 'newRecourceName'-Parameter to the type-name that is \nused in recourceType-schema.  \n\n### Parameter \"resourceTypeNamingStrategyClass\"  \n* Default value: \"de.zebrajaeger.opencms.resourceplugin.namingstrategy.LowerCaseWithHyphenNamingStrategy\"   \n* Required: true\n* Possible values are\n** 'de.zebrajaeger.opencms.resourceplugin.namingstrategy.CamelCaseNamingStrategy'\n** 'de.zebrajaeger.opencms.resourceplugin.namingstrategy.LowerCaseWithHyphenNamingStrategy'\n** 'de.zebrajaeger.opencms.resourceplugin.namingstrategy.PassThroughNamingStrategy'\n** or any other self implemented naming-strategy that derives from 'de\n                                                                    .zebrajaeger.opencms.resourceplugin\n                                                                    .namingstrategy.NamingStrategy'   \n* Description: The strategy how to transform the 'newRecourceName'-Parameter to the type-name that is \nused for filenames and for OpenCms recourceType-name.  \n\n### Parameter \"workplaceBundlePath\"  \n* Default value: \"${project.artifactId}.workplace\"   \n* Required: true\n* Description: Path to workplace VFSResourceBundle.  \n\n### Parameter \"workplacePropertiesPath\"  \n* Default value: \"src/main/resources/workplace.properties\"   \n* Required: true\n* Description: Path to workplace properties file. Alternative to the VFSResourceBundle.\n\n### Parameter \"addResourceTypeToModuleConfig\"  \n* Default value: \"true\"\n* Possible values are:\n** 'true'\n** 'false'\n* Required: true\n* Description: Add the new resourceType to the module .config file. \n\n### Parameter \"match\"  \n* Default value: \"width:-1\"\n* Possible values are:\n** width:\u003cInteger value\u003e\n** types:\u0026lt;container type 1\u0026gt;,\u0026lt;container type 2\u0026gt;, ...\n* Required: true\n* Description: The container type(s) or width where the new Element can be put in. \n\n## TODO\n* make module .config path modifiable \n* The module config may have more then one language\n** see de.zebrajaeger.opencms.resourceplugin.ModuleConfigManipulator.add\n* The resourcebundle may have more than one language\n** see de.zebrajaeger.opencms.resourceplugin.VfsBundleManipulator.add\n\n## Development\nFor fast building without building javadoc, sources, signing and all the \ndeployment stuff execute\n```\nmvn clean install -Pdevelop\n```\n\nIf you don't like unit-test you may prefer the fastest way:\n```\nmvn clean install -Pdevelop -DskipTests\n```\n\nIf you fork this and deploy it on maven central via sonatype OSS\nyou need pgp in your path (on windows i use cygwin) and a key pair.   \nThe public key must be published on a public key server.   \nIf you fulfill these requirements, a deployment is easy but the version \ncannnot be a x.x.x-SNAPSHOT version. It has to be a release version number \n(without the -SNAPSHOT postfix).    \nThan execute this command line call:\n```\nmvn clean deploy\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzebrajaeger%2Fopencms-resource-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzebrajaeger%2Fopencms-resource-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzebrajaeger%2Fopencms-resource-plugin/lists"}