Scalor Maven Plugin 2.12

Build integrator for Java, Scala, Scala.macro, Scala.js, Scala.native, Eclipse and Maven

License

License

Apache-2.0
Categories

Categories

Maven Build Tools
GroupId

GroupId

com.carrotgarden.maven
ArtifactId

ArtifactId

scalor-maven-plugin_2.12
Last Version

Last Version

1.5.0.20190502185130
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

Scalor Maven Plugin 2.12
Build integrator for Java, Scala, Scala.macro, Scala.js, Scala.native, Eclipse and Maven
Project URL

Project URL

https://github.com/random-maven/scalor-maven-plugin
Project Organization

Project Organization

CarrotGarden
Source Code Management

Source Code Management

https://github.com/random-maven/scalor-maven-plugin

Download scalor-maven-plugin_2.12

How to add to project

<plugin>
    <groupId>com.carrotgarden.maven</groupId>
    <artifactId>scalor-maven-plugin_2.12</artifactId>
    <version>1.5.0.20190502185130</version>
</plugin>

Dependencies

compile (24)

Group / Artifact Type Version
org.scala-sbt : compiler-bridge_2.12 jar 1.2.5
com.carrotgarden.sjs : scala-js-junit-tools_2.12 jar 1.1.2.20180226041527
com.github.klieber : phantomjs-maven-plugin jar 0.7
org.sonatype.plexus : plexus-build-api jar 0.0.7
org.scala-native : tools_2.12 jar 0.3.9
com.lihaoyi : sourcecode_2.12 jar 0.1.4
org.scala-js : scalajs-tools_2.12 jar 0.6.27
org.apache.maven : maven-compat jar 3.5.4
org.apache.commons : commons-compress jar 1.18
org.apache.maven : maven-archiver jar 3.2.0
org.scala-sbt : zinc_2.12 jar 1.2.5
com.github.eirslett : frontend-maven-plugin jar 1.6
org.apache.maven.reporting : maven-reporting-api jar 3.0
org.apache.maven : maven-plugin-api jar 3.5.4
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.5.2
com.carrotgarden.maven : maven-plugin-tools-annotations jar 1.2.20190427171248
org.webjars : webjars-locator-core jar 0.37
com.lihaoyi : upickle_2.12 jar 0.5.1
org.apache.maven : maven-core jar 3.5.4
org.scala-lang.modules : scala-xml_2.12 jar 1.2.0
org.scalariform : scalariform_2.12 jar 0.2.8
org.scala-lang : scala-compiler jar 2.12.7
org.twdata.maven : mojo-executor jar 2.3.0
org.eclipse.jdt : org.eclipse.jdt.core jar 3.12.3

provided (11)

Group / Artifact Type Version
org.eclipse.platform : org.eclipse.jface jar 3.15.100
org.eclipse.platform : org.eclipse.ui.workbench jar 3.113.0
org.eclipse.jdt : org.eclipse.jdt.launching jar 3.9.51
org.eclipse.m2e » org.eclipse.m2e.core jar 1.10.0
org.eclipse.m2e » org.eclipse.m2e.jdt jar 1.10.0
org.osgi : org.osgi.core jar 6.0.0
org.eclipse.jdt : org.eclipse.jdt.ui jar 3.13.51
org.eclipse.platform : org.eclipse.equinox.common jar 3.10.300
org.eclipse.m2e » org.eclipse.m2e.maven.runtime jar 1.10.0
org.eclipse.m2e » org.eclipse.m2e.core.ui jar 1.10.0
org.scala-ide » org.scala-ide.sdt.core jar 4.7.1

Project Modules

There are no modules declared in this project.

Scalor Maven Plugin

Build integrator for Java, Scala, Scala.macro, Scala.js, Scala.native, Eclipse and Maven.

Project License Travis Status Appvey Status Lines of Code

Install Production Release Development Release
Scalor Plugin 1.X for Scala IDE 4.7
Central Bintray

Similar plugins

Getting started

Plugin features

Scala

Scala.macro

Scala.js

Scala.native

Eclipse and Maven

Primary Maven goals

Complete goals reference

Eclipse setup

Prerequisites:

Involves two steps:

  1. 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

  2. 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:

Version mapping

Normally, Scala IDE itself runs on the latest stable Scala Library at the time frame.

For example:

  • Scala IDE 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:

  • Scala IDE 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>

Usage example

Project Examples:

Command 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>

Build yourself

Linux

cd /tmp
git clone [email protected]:random-maven/scalor-maven-plugin.git
cd scalor-maven-plugin
./mvnw.sh clean install -B -P skip-test

Windows