{"id":27054853,"url":"https://github.com/random-maven/scalor-maven-plugin","last_synced_at":"2025-04-05T09:17:22.045Z","repository":{"id":57718123,"uuid":"112517828","full_name":"random-maven/scalor-maven-plugin","owner":"random-maven","description":"Build integrator for Java, Scala, Scala.macro, Scala.js, Scala.native, Eclipse and Maven.","archived":false,"fork":false,"pushed_at":"2019-05-02T23:12:01.000Z","size":2991,"stargazers_count":50,"open_issues_count":9,"forks_count":6,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-11-17T13:11:28.697Z","etag":null,"topics":["eclipse","eclipse-plugin","java","m2e","macros","maven","maven-plugin","scala","scala-ide","scala-native","scalajs"],"latest_commit_sha":null,"homepage":"https://random-maven.github.io/scalor-maven-plugin/2.12/plugin-info.html","language":"Scala","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":"2017-11-29T19:22:06.000Z","updated_at":"2024-05-27T09:20:02.000Z","dependencies_parsed_at":"2022-09-11T21:52:33.515Z","dependency_job_id":null,"html_url":"https://github.com/random-maven/scalor-maven-plugin","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/random-maven%2Fscalor-maven-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/random-maven%2Fscalor-maven-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/random-maven%2Fscalor-maven-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/random-maven%2Fscalor-maven-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/random-maven","download_url":"https://codeload.github.com/random-maven/scalor-maven-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247312043,"owners_count":20918344,"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":["eclipse","eclipse-plugin","java","m2e","macros","maven","maven-plugin","scala","scala-ide","scala-native","scalajs"],"created_at":"2025-04-05T09:17:21.514Z","updated_at":"2025-04-05T09:17:22.035Z","avatar_url":"https://github.com/random-maven.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n### Scalor Maven Plugin\n\nBuild integrator for Java, Scala, Scala.macro, Scala.js, Scala.native, Eclipse and Maven.\n\n[![Project License][licence_icon]][licence_link]\n[![Travis Status][travis_icon]][travis_link]\n[![Appvey Status][appvey_icon]][appvey_link]\n[![Lines of Code][tokei_basic_icon]][tokei_basic_link]\n\n| Install | Production Release | Development Release |\n|---------|--------------------|---------------------|\n| \u003ch5\u003eScalor Plugin 1.X for Scala IDE 4.7\u003c/h5\u003e | [![Central][central_212_icon]][central_212_link] | [![Bintray][bintray_212_icon]][bintray_212_link] | \n\nSimilar plugins\n* [scala-maven-plugin](https://github.com/davidB/scala-maven-plugin)\n* [sbt-compiler-maven-plugin](https://github.com/sbt-compiler-maven-plugin/sbt-compiler-maven-plugin)\n\nGetting started\n* setup [Eclipse / Scala IDE][setup_link]\n* build and study [demo project](https://github.com/random-maven/scalor-maven-plugin/blob/master/demo)\n\n### Plugin features\n\nScala\n* new incremental [Zinc](https://github.com/sbt/zinc)\n* uses static [compiler-bridge](https://github.com/sbt/zinc/tree/develop/internal/compiler-bridge)\n* auto-discovery of [Scala compiler plugins](https://random-maven.github.io/scalor-maven-plugin/2.12/eclipse-config-mojo.html#definePluginList)\n* cross-scala-version [build with simple setup](https://github.com/random-maven/scalor-maven-plugin/tree/master/src/it/test-cross)\n* limited Scala [Java 11 support](https://github.com/scala/scala-dev/issues/139) \n\nScala.macro\n* [same-project](https://stackoverflow.com/questions/21994764/scala-macros-and-separate-compilation-units) Scala macro build\n* compiles in 3 scopes: [macro, main, test](http://scala-ide.org/docs/current-user-doc/features/scalacompiler/index.html)\n\nScala.js\n* compiles and [links scala-js](https://github.com/scala-js/scala-js) JavaScrpt\n* supports [JavaScrpt module initializers](https://random-maven.github.io/scalor-maven-plugin/2.12/scala-js-link-main-mojo.html#linkerMainInitializerList)\n* same-project JS-VM + JVM [JUnit testing](https://github.com/random-scalor/scala-js-junit-tools)\n* incremental cached JS linking in [Eclipse/M2E](https://random-maven.github.io/scalor-maven-plugin/2.12/scala-js-link-main-mojo.html)\n* [auto-provisions](https://random-maven.github.io/scalor-maven-plugin/2.12/scala-js-env-prov-webjars-mojo.html) \n  Webjars [resources for testing](https://www.webjars.org/) \n* [auto-provisions](https://random-maven.github.io/scalor-maven-plugin/2.12/scala-js-env-prov-nodejs-mojo.html)\n  JavaScript [JS-VM environments for testing](https://www.scala-js.org/doc/project/js-environments.html)\n\nScala.native\n* compiles and links [scala-native](https://github.com/scala-native/scala-native) binary runtime\n* supports embedding of [objcopy resources](http://www.linuxjournal.com/content/embedding-file-executable-aka-hello-world-version-5967)\n* supports compiling of C/CPP user sources\n* incremental cached Native linking in [Eclipse/M2E](https://random-maven.github.io/scalor-maven-plugin/2.12/scala-native-link-main-mojo.html)\n\nEclipse and Maven\n* brings and installs companion [Eclipse plugin](https://github.com/random-maven/scalor-maven-plugin/blob/master/src/main/scala/com/carrotgarden/maven/scalor/EclipsePlugin.scala)\n* creates custom [Scala installations for Scala IDE](http://scala-ide.org/docs/4.0.x/advancedsetup/scala-installations.html)\n* exposes comprehensive [configuration and logging](https://random-maven.github.io/scalor-maven-plugin/2.12/eclipse-config-mojo.html)\n* provides [identical compiler settings](https://random-maven.github.io/scalor-maven-plugin/2.12/eclipse-config-mojo.html#zincOptionsScala)\nfor Maven and Eclipse\n* provides [identical formatter settings](https://random-maven.github.io/scalor-maven-plugin/2.12/format-mojo.html)\nfor Maven and Eclipse\n* works around spurious crashes of [Scala IDE presentation compiler](https://random-maven.github.io/scalor-maven-plugin/2.12/eclipse-prescomp-mojo.html)\n* auto-restarts test application [after full or incremental build in Eclipse](https://random-maven.github.io/scalor-maven-plugin/2.12/eclipse-restart-mojo.html)\n\nPrimary Maven goals\n\n* [eclipse-config](https://random-maven.github.io/scalor-maven-plugin/2.12/eclipse-config-mojo.html)\n* [register-main](https://random-maven.github.io/scalor-maven-plugin/2.12/register-main-mojo.html)\n* [compile-main](https://random-maven.github.io/scalor-maven-plugin/2.12/compile-main-mojo.html)\n* [scala-js-link-main](https://random-maven.github.io/scalor-maven-plugin/2.12/scala-js-link-main-mojo.html)\n* [scala-native-link-main](https://random-maven.github.io/scalor-maven-plugin/2.12/scala-native-link-main-mojo.html)\n\nComplete goals reference\n\n* [Maven Goals 2.12](https://random-maven.github.io/scalor-maven-plugin/2.12/plugin-info.html)\n\n### Eclipse setup\n\nPrerequisites:\n* [JDK-8/11 LTS](http://www.oracle.com/technetwork/java/javase/downloads/index.html)\n* [Eclipse 2019-03](http://www.eclipse.org/downloads/),\n  [Maven M2E 1.10](http://www.eclipse.org/m2e/),\n  [Scala IDE 4.7](http://scala-ide.org/).\n* better, use\n  [Maven M2E 1.12](http://download.eclipse.org/technology/m2e/milestones/1.12/)\n  and\n  [Scala IDE 4.7 RC](http://scala-ide.org/download/milestone.html)\n  .\n\nInvolves two steps:\n\n1. declare `scalor-maven-plugin` in `pom.xml` editor  \n   this makes plugin available for Maven and Eclipse M2E  \n   make sure to provide Maven plugin goal `eclipse-config`  \n  \n2. invoke from menu `Eclipse -\u003e Project -\u003e { Auto, Clean, Build }`  \n   this allows Maven plugin to install own Eclipse companion plugin  \n   which in turn invokes M2E project configurator for Scala projects  \n\nProject update tips:\n\n* After an edit of `pom.xml`, propagate changes to Scala IDE  \n  via context menu `Project -\u003e Maven -\u003e Update Project...`\n\n* Activate M2E [Maven Console](https://www.ibm.com/support/knowledgecenter/SS8PJ7_9.1.0/com.ibm.etools.maven.doc/topics/troubleshooting.html)\nto review  \nMaven plugin and Eclipse [plugin messages](https://github.com/random-maven/scalor-maven-plugin/blob/master/note/install-log.md).\n\n* If in doubt, review generated Eclipse descriptors:  \n[.project](https://github.com/random-maven/scalor-maven-plugin/blob/master/note/eclipse.project.md),\n[.classpath](https://github.com/random-maven/scalor-maven-plugin/blob/master/note/eclipse.classpath.md),\n[.settings/scala-ide](https://github.com/random-maven/scalor-maven-plugin/blob/master/note/eclipse.scala-ide.md).\n\n### Version mapping\n\nNormally, Scala IDE itself runs \non the latest stable Scala Library at the time frame.\n\nFor example:\n* Scala IDE `4.7.0` -\u003e Scala Library `2.12.3`\n\nEclipse companion plugin provided by this Maven plugin\nneeds to interact with Scala IDE and hence must run\non the Scala Library from the same epoch:\n* Scala IDE `4.7.0` -\u003e `scalor-maven-plugin_2.12`\n\nHowever, `compiler-bridge` module provides an isolation gateway \nwhich allows `scalor-maven-plugin_2.12` to build projects \nwith different Scala epoch, such as `2.11`, `2.12`, `2.13`\n\nRequired version mapping is provided via `scalor-maven-plugin` configuration entries:\n```xml\n\u003cdefineAuto\u003e\n\u003cdefineBridge\u003e\n\u003cdefineCompiler\u003e\n\u003cdefinePluginList\u003e\n```\n\n### Usage example\n\nProject Examples:\n* basic [demo project](https://github.com/random-maven/scalor-maven-plugin/blob/master/demo)\n* test project for [Scala Native](https://github.com/random-maven/scalor-maven-plugin/tree/master/src/it/test-native)\n* test project for cross Scala [2.11, 2.12, 2.13](https://github.com/random-maven/scalor-maven-plugin/tree/master/src/it/test-cross)\n* `scalor-maven-plugin` project itself is a cross\n[master](https://github.com/random-maven/scalor-maven-plugin/blob/master/pom.xml)\n/\n[module](https://github.com/random-maven/scalor-maven-plugin/blob/master/cross/2.12/pom.xml)\nbuild\n* [Extensible Dimensional Analysis](https://github.com/hunterpayne/terra)\n* [Extensible Properties for Scala](https://github.com/hunterpayne/eprop)\n\nCommand line invocation:\n\n```bash\nmvn clean install -P scalor\n```\n\n```xml\n        \u003cprofile\u003e\n            \u003cid\u003escalor\u003c/id\u003e\n            \u003cbuild\u003e\n                \u003cplugins\u003e\n\n                   \u003c!-- Disable default compiler. --\u003e\n                   \u003cplugin\u003e\n                        \u003cgroupId\u003eorg.apache.maven.plugins\u003c/groupId\u003e\n                        \u003cartifactId\u003emaven-compiler-plugin\u003c/artifactId\u003e\n                        \u003cconfiguration\u003e\n                            \u003cskip\u003etrue\u003c/skip\u003e\n                            \u003cskipMain\u003etrue\u003c/skipMain\u003e\n                        \u003c/configuration\u003e\n                    \u003c/plugin\u003e\n\n                   \u003c!-- Enable alternative compiler. --\u003e\n                    \u003cplugin\u003e\n                        \u003cgroupId\u003ecom.carrotgarden.maven\u003c/groupId\u003e\n                        \u003cartifactId\u003escalor-maven-plugin_2.12\u003c/artifactId\u003e\n                        \u003cconfiguration\u003e\n\n                           \u003c!-- Compiler bridge. --\u003e\n                            \u003cdefineBridge\u003e\n                                \u003cdependency\u003e\n                                    \u003cgroupId\u003eorg.scala-sbt\u003c/groupId\u003e\n                                    \u003cartifactId\u003ecompiler-bridge_${version.scala.epoch}\u003c/artifactId\u003e\n                                    \u003cversion\u003e${version.scala.zinc}\u003c/version\u003e\n                                \u003c/dependency\u003e\n                            \u003c/defineBridge\u003e\n\n                           \u003c!-- Scala compiler. --\u003e\n                            \u003cdefineCompiler\u003e\n                                \u003cdependency\u003e\n                                    \u003cgroupId\u003eorg.scala-lang\u003c/groupId\u003e\n                                    \u003cartifactId\u003escala-compiler\u003c/artifactId\u003e\n                                    \u003cversion\u003e${version.scala.release}\u003c/version\u003e\n                                \u003c/dependency\u003e\n                            \u003c/defineCompiler\u003e\n\n                           \u003c!-- Compiler plugins. --\u003e\n                            \u003cdefinePluginList\u003e\n                                \u003cdependency\u003e\n                                    \u003cgroupId\u003eorg.scalamacros\u003c/groupId\u003e\n                                    \u003cartifactId\u003eparadise_${version.scala.release}\u003c/artifactId\u003e\n                                    \u003cversion\u003e${version.scala.plugin.macro}\u003c/version\u003e\n                                \u003c/dependency\u003e\n                                \u003cdependency\u003e\n                                    \u003cgroupId\u003eorg.scala-js\u003c/groupId\u003e\n                                    \u003cartifactId\u003escalajs-compiler_${version.scala.release}\u003c/artifactId\u003e\n                                    \u003cversion\u003e${version.scalajs.release}\u003c/version\u003e\n                                \u003c/dependency\u003e\n                            \u003c/definePluginList\u003e\n\n                        \u003c/configuration\u003e\n                        \u003cexecutions\u003e\n                            \u003cexecution\u003e\n\n                                \u003c!-- Subset of available. --\u003e\n                                \u003cgoals\u003e\n\n                                    \u003c!-- Setup Eclipse plugin. --\u003e\n                                    \u003cgoal\u003eeclipse-config\u003c/goal\u003e\n\n                                    \u003c!-- Transfer format settings. --\u003e\n                                    \u003cgoal\u003eeclipse-format\u003c/goal\u003e\n\n                                    \u003c!-- Manage test application. --\u003e\n                                    \u003cgoal\u003eeclipse-restart\u003c/goal\u003e\n\n                                    \u003c!-- Manage presentation compiler. --\u003e\n                                    \u003cgoal\u003eeclipse-prescomp\u003c/goal\u003e\n\n                                    \u003c!-- Add compilation sources. --\u003e\n                                    \u003cgoal\u003eregister-macro\u003c/goal\u003e\n                                    \u003cgoal\u003eregister-main\u003c/goal\u003e\n                                    \u003cgoal\u003eregister-test\u003c/goal\u003e\n\n                                    \u003c!-- Compile sources. --\u003e\n                                    \u003cgoal\u003ecompile-macro\u003c/goal\u003e\n                                    \u003cgoal\u003ecompile-main\u003c/goal\u003e\n                                    \u003cgoal\u003ecompile-test\u003c/goal\u003e\n\n                                    \u003c!-- Link runtime JS script. --\u003e\n                                    \u003cgoal\u003escala-js-link-main\u003c/goal\u003e\n                                    \u003cgoal\u003escala-js-link-test\u003c/goal\u003e\n\n                                    \u003c!-- Provide JS-VM environment for testing. --\u003e\n                                    \u003cgoal\u003escala-js-env-prov-webjars\u003c/goal\u003e\n                                    \u003cgoal\u003escala-js-env-prov-nodejs\u003c/goal\u003e\n                                    \u003cgoal\u003escala-js-env-conf-nodejs\u003c/goal\u003e\n\n                                \u003c/goals\u003e\n\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\n### Build yourself\n\nLinux\n```bash\ncd /tmp\ngit clone git@github.com:random-maven/scalor-maven-plugin.git\ncd scalor-maven-plugin\n./mvnw.sh clean install -B -P skip-test\n```\n\nWindows\n* follow [windows build setup](https://github.com/random-maven/scalor-maven-plugin/blob/master/note/windows-setup.md)\n\n[licence_icon]: https://img.shields.io/github/license/random-maven/scalor-maven-plugin.svg?label=License\n[licence_link]: http://www.apache.org/licenses/\n\n[travis_icon]: https://travis-ci.org/random-maven/scalor-maven-plugin.svg\n[travis_link]: https://travis-ci.org/random-maven/scalor-maven-plugin/builds\n\n[appvey_icon]: https://ci.appveyor.com/api/projects/status/5ena8xeyujneqqog?svg=true\n[appvey_link]: https://ci.appveyor.com/project/random-maven/scalor-maven-plugin/history \n\n[tokei_basic_icon]: https://tokei.rs/b1/github/random-maven/scalor-maven-plugin\n[tokei_basic_link]: https://github.com/random-maven/scalor-maven-plugin \n\n[central_212_icon]: https://img.shields.io/maven-central/v/com.carrotgarden.maven/scalor-maven-plugin_2.12.svg \n[central_212_link]: http://search.maven.org/#search%7Cga%7C1%7Cscalor-maven-plugin\n\n[bintray_212_icon]: https://api.bintray.com/packages/random-maven/maven/scalor-maven-plugin_2.12/images/download.svg\n[bintray_212_link]: https://bintray.com/random-maven/maven/scalor-maven-plugin_2.12\n\n[gemnasium_icon]: https://gemnasium.com/random-maven/scalor-maven-plugin.svg\n[gemnasium_link]: https://gemnasium.com/random-maven/scalor-maven-plugin\n\n[setup_link]: https://github.com/random-maven/scalor-maven-plugin/tree/develop/setup\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frandom-maven%2Fscalor-maven-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frandom-maven%2Fscalor-maven-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frandom-maven%2Fscalor-maven-plugin/lists"}