{"id":27054852,"url":"https://github.com/random-maven/profile-activator-extension","last_synced_at":"2025-10-09T02:51:27.960Z","repository":{"id":57718113,"uuid":"117730041","full_name":"random-maven/profile-activator-extension","owner":"random-maven","description":"Provide flexible Maven profile activation via script","archived":false,"fork":false,"pushed_at":"2019-05-13T19:17:57.000Z","size":134,"stargazers_count":12,"open_issues_count":1,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-05T09:17:17.539Z","etag":null,"topics":["activator","extension","maven","maven-extension","profile"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/random-maven.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}},"created_at":"2018-01-16T19:20:24.000Z","updated_at":"2023-12-20T09:47:51.000Z","dependencies_parsed_at":"2022-09-11T21:33:50.301Z","dependency_job_id":null,"html_url":"https://github.com/random-maven/profile-activator-extension","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/random-maven/profile-activator-extension","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/random-maven%2Fprofile-activator-extension","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/random-maven%2Fprofile-activator-extension/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/random-maven%2Fprofile-activator-extension/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/random-maven%2Fprofile-activator-extension/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/random-maven","download_url":"https://codeload.github.com/random-maven/profile-activator-extension/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/random-maven%2Fprofile-activator-extension/sbom","scorecard":{"id":761365,"data":{"date":"2025-08-11","repo":{"name":"github.com/random-maven/profile-activator-extension","commit":"76c4483bea2d16c3b30dceb22d1b7e5ba7983c53"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/9 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: .mvn/wrapper/maven-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: licence.md:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":1,"reason":"9 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-5mg8-w23w-74h3","Warn: Project is vulnerable to: GHSA-7g45-4rm6-3mm3","Warn: Project is vulnerable to: GHSA-mvr2-9pj6-7w5j","Warn: Project is vulnerable to: GHSA-78wr-2p64-hpwj","Warn: Project is vulnerable to: GHSA-gwrp-pvrq-jmwv","Warn: Project is vulnerable to: GHSA-j288-q9x7-2f5v","Warn: Project is vulnerable to: GHSA-rhgr-952r-6p8q","Warn: Project is vulnerable to: GHSA-2f88-5hg8-9x2x","Warn: Project is vulnerable to: GHSA-rcjj-h6gh-jf3r"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T23:34:58.160Z","repository_id":57718113,"created_at":"2025-08-22T23:34:58.161Z","updated_at":"2025-08-22T23:34:58.161Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000762,"owners_count":26082906,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["activator","extension","maven","maven-extension","profile"],"created_at":"2025-04-05T09:17:21.441Z","updated_at":"2025-10-09T02:51:27.938Z","avatar_url":"https://github.com/random-maven.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n### Profile Activator Extension\n\nProvide flexible Maven profile activation via script.\n\nReference feature implementation, [vote for MNG-6345](https://issues.apache.org/jira/browse/MNG-6345).\n\n[![Apache License, Version 2.0, January 2004](https://img.shields.io/github/license/mojohaus/versions-maven-plugin.svg?label=License)](http://www.apache.org/licenses/)\n[![Travis Status](https://travis-ci.org/random-maven/profile-activator-extension.svg?branch=master)](https://travis-ci.org/random-maven/profile-activator-extension/builds)\n\n| Install  | Production Release | Development Release |\n|----------|--------------------|---------------------|\n| Artifact | [![Central][central_icon]][central_link] | [![Bintray][bintray_icon]][bintray_link] | \n\nSimilar extensions\n* [kpiwko/el-profile-activator-extension](https://github.com/kpiwko/el-profile-activator-extension)\n* [rrialq/jsr223-profile-activator-extension](https://github.com/rrialq/jsr223-profile-activator-extension)\n\nExtension features\n* comprehensive [logging](https://github.com/random-maven/profile-activator-extension/blob/master/note/activator-logging.md)\n* exposes resolved [project pom.xml](https://maven.apache.org/pom.html)\n* works with Maven 3.5\n([activation via AND](https://issues.apache.org/jira/browse/MNG-4565))\n* scripting with \n[Groovy](https://en.wikipedia.org/wiki/Groovy_(programming_language)), \n[JavaScript](https://en.wikipedia.org/wiki/JavaScript), \n[MVEL Script](https://en.wikipedia.org/wiki/MVEL)\n\n\n### Usage Examples:\n\nProfile activator is configured in two steps: \n\n1. Register [project extension](https://github.com/random-maven/profile-activator-extension/blob/master/.mvn/extensions.xml)\n```\n${project.basedir}/.mvn/extensions.xml\n```\n```xml\n\u003cextension\u003e\n   \u003cgroupId\u003ecom.carrotgarden.maven\u003c/groupId\u003e\n   \u003cartifactId\u003eprofile-activator-extension\u003c/artifactId\u003e\n\u003c/extension\u003e\n```\n\n2. Provide activation script inside the [magic property](https://github.com/random-maven/profile-activator-extension/blob/master/src/main/java/com/carrotgarden/maven/activator/Activator.java)\n```xml\n\u003cprofile\u003e\n   \u003cactivation\u003e\n      \u003cproperty\u003e\n         \u003cname\u003e[ACTIVATOR:MVELSCRIPT]\u003c/name\u003e\n         \u003cvalue\u003e\n\u003c![CDATA[\n   isdef property1 \u0026\u0026 isdef property2 \u0026\u0026 property1 == \"hello-maven\" \u0026\u0026 project.packaging == \"bundle\" \n]]\u003e\n         \u003c/value\u003e\n       \u003c/property\u003e\n   \u003c/activation\u003e\n\u003c/profile\u003e\n```   \n* example activator in [Groovy](https://github.com/random-maven/profile-activator-extension/tree/master/src/it/test-groovyscript/pom.xml)\n* example activator in [JavaScript](https://github.com/random-maven/profile-activator-extension/tree/master/src/it/test-javascript/pom.xml)\n* example activator in [MVEL Script](https://github.com/random-maven/profile-activator-extension/tree/master/src/it/test-mvelscript/pom.xml)\n\n### Script variables\n\nTip: check [examples first](https://github.com/random-maven/profile-activator-extension/tree/master/src/it).\n\nActivator script has access to\n* merged properties, as a map of type \n  [`java.util.Map\u003cString, String\u003e`](https://docs.oracle.com/javase/8/docs/api/java/util/Map.html)\n  named `value`\n* resolved project model, as an object of type\n  [`org.apache.maven.model.Model`](http://maven.apache.org/ref/3.5.2/maven-model/apidocs/org/apache/maven/model/Model.html)\n  named `project`\n\n#### Merged Properties \n\nActivator script has ordered and merged view of\n* `project` properties: `pom.xml/\u003cproperties\u003e`\n* `system` properties form: `System.getProperties()`\n* `user` properties from user-provided command line `-D` options\n\nMerged properties scopes\n* properties are injected in the default script variable scope\n  (for scripting engines that have such)\n* there is also an extension-provided map `value`,\n  which contains a copy of the default scope\n* use `value` map to access variables\n  with dot in the name or when there is no default scope\n\nExample default scope access syntax:\nthe following expression extracts the value of\n```pom.xml/\u003cproperties\u003e/\u003cproperty1\u003e``` \n* Groovy syntax: not available, use `value[\"property1\"]` \n* JavaScript syntax: `property1` (same result as `value[\"property1\"]`)\n* MVEL Script syntax: `property1` (same result as `value[\"property1\"]`) \n\nExample `value` map access syntax:\nthe following expression extracts the value of ```user.name``` \nwhich originally comes from a system property,\nand which is considered \"invalid name\" in the default scope:\n* Groovy syntax: `value[\"user.name\"]` \n* JavaScript syntax: `value[\"user.name\"]` \n* MVEL Script syntax: `value[\"user.name\"]` \n\n#### Resolved Project Model \n\nResolved interpolated [project descriptor](https://maven.apache.org/pom.html)\nis exposed\nin the form of [project model bean](http://maven.apache.org/ref/3.5.2/maven-model/apidocs/org/apache/maven/model/Model.html)\n.\n\nActivator script has access to the project model as an object named `project`.\n\nExample `project` object access syntax:\nthe following expression extracts the value of ```pom.xml/\u003cpackaging\u003e``` \nwhich is available as [`public String getPackaging()`](http://maven.apache.org/ref/3.5.2/maven-model/apidocs/org/apache/maven/model/Model.html#getPackaging--)\n* Groovy syntax: `project.packaging` (same result as `project.getPackaging()`)\n* JavaScript syntax: `project.packaging` (same result as `project.getPackaging()`) \n* MVEL Script syntax: `project.packaging` (same result as `project.getPackaging()`)\n\n#### Variable existence check\n\nNormally, scripting engine will throw an error\nwhen trying to access a variable which is not defined. \n\nExample variable existence check syntax:\n* Groovy syntax: not available, use null-test: `if ( value[\"property1\"] ) { ... }`\n* JavaScript syntax: `if ( typeof property1 !== 'undefined' )  { ... }`\n* MVEL Script syntax: `if ( isdef property1 ) { ... }`\n\nIn practice, `null-test` is sufficient in most cases\n* `if ( value[\"property1\"] ) { ... }`\n\nProject [model members](http://maven.apache.org/ref/3.5.2/maven-model/apidocs/org/apache/maven/model/Model.html)\nare always defined, but can return `null`. \n\n### Build yourself\n\n```\ncd /tmp\ngit clone git@github.com:random-maven/profile-activator-extension.git\ncd profile-activator-extension\n./mvnw.sh clean install -B -P skip-test\n```\n\n[central_icon]: https://maven-badges.herokuapp.com/maven-central/com.carrotgarden.maven/profile-activator-extension/badge.svg?style=plastic\n[central_link]: https://maven-badges.herokuapp.com/maven-central/com.carrotgarden.maven/profile-activator-extension\n\n[bintray_icon]: https://api.bintray.com/packages/random-maven/maven/profile-activator-extension/images/download.svg\n[bintray_link]: https://bintray.com/random-maven/maven/profile-activator-extension/_latestVersion\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frandom-maven%2Fprofile-activator-extension","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frandom-maven%2Fprofile-activator-extension","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frandom-maven%2Fprofile-activator-extension/lists"}