Build integrator for Java, Scala, Scala.macro, Scala.js, Scala.native, Eclipse and Maven.
Similar plugins
Getting started
Scala
Scala.macro
Scala.js
Scala.native
Eclipse and Maven
Primary Maven goals
Complete goals reference
Prerequisites:
Involves two steps:
declare scalor-maven-plugin
in pom.xml
editor
this makes plugin available for Maven and Eclipse M2E
make sure to provide Maven plugin goal eclipse-config
invoke from menu Eclipse -> Project -> { Auto, Clean, Build }
this allows Maven plugin to install own Eclipse companion plugin
which in turn invokes M2E project configurator for Scala projects
Project update tips:
After an edit of pom.xml
, propagate changes to Scala IDE
via context menu Project -> Maven -> Update Project...
Activate M2E Maven Console to review
Maven plugin and Eclipse plugin messages.
If in doubt, review generated Eclipse descriptors:
.project, .classpath, .settings/scala-ide.
Normally, Scala IDE itself runs on the latest stable Scala Library at the time frame.
For example:
4.7.0
-> Scala Library 2.12.3
Eclipse companion plugin provided by this Maven plugin needs to interact with Scala IDE and hence must run on the Scala Library from the same epoch:
4.7.0
-> scalor-maven-plugin_2.12
However, compiler-bridge
module provides an isolation gateway which allows scalor-maven-plugin_2.12
to build projects with different Scala epoch, such as 2.11
, 2.12
, 2.13
Required version mapping is provided via scalor-maven-plugin
configuration entries:
<defineAuto> <defineBridge> <defineCompiler> <definePluginList>
Project Examples:
scalor-maven-plugin
project itself is a cross master / module buildCommand line invocation:
mvn clean install -P scalor
<profile> <id>scalor</id> <build> <plugins> <!-- Disable default compiler. --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <skip>true</skip> <skipMain>true</skipMain> </configuration> </plugin> <!-- Enable alternative compiler. --> <plugin> <groupId>com.carrotgarden.maven</groupId> <artifactId>scalor-maven-plugin_2.12</artifactId> <configuration> <!-- Compiler bridge. --> <defineBridge> <dependency> <groupId>org.scala-sbt</groupId> <artifactId>compiler-bridge_${version.scala.epoch}</artifactId> <version>${version.scala.zinc}</version> </dependency> </defineBridge> <!-- Scala compiler. --> <defineCompiler> <dependency> <groupId>org.scala-lang</groupId> <artifactId>scala-compiler</artifactId> <version>${version.scala.release}</version> </dependency> </defineCompiler> <!-- Compiler plugins. --> <definePluginList> <dependency> <groupId>org.scalamacros</groupId> <artifactId>paradise_${version.scala.release}</artifactId> <version>${version.scala.plugin.macro}</version> </dependency> <dependency> <groupId>org.scala-js</groupId> <artifactId>scalajs-compiler_${version.scala.release}</artifactId> <version>${version.scalajs.release}</version> </dependency> </definePluginList> </configuration> <executions> <execution> <!-- Subset of available. --> <goals> <!-- Setup Eclipse plugin. --> <goal>eclipse-config</goal> <!-- Transfer format settings. --> <goal>eclipse-format</goal> <!-- Manage test application. --> <goal>eclipse-restart</goal> <!-- Manage presentation compiler. --> <goal>eclipse-prescomp</goal> <!-- Add compilation sources. --> <goal>register-macro</goal> <goal>register-main</goal> <goal>register-test</goal> <!-- Compile sources. --> <goal>compile-macro</goal> <goal>compile-main</goal> <goal>compile-test</goal> <!-- Link runtime JS script. --> <goal>scala-js-link-main</goal> <goal>scala-js-link-test</goal> <!-- Provide JS-VM environment for testing. --> <goal>scala-js-env-prov-webjars</goal> <goal>scala-js-env-prov-nodejs</goal> <goal>scala-js-env-conf-nodejs</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </profile>
Linux
cd /tmp git clone git@github.com:random-maven/scalor-maven-plugin.git cd scalor-maven-plugin ./mvnw.sh clean install -B -P skip-test
Windows
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4