Coder Social home page Coder Social logo

random-maven / scalor-maven-plugin Goto Github PK

View Code? Open in Web Editor NEW
50.0 8.0 6.0 2.92 MB

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

Home Page: https://random-maven.github.io/scalor-maven-plugin/2.12/plugin-info.html

License: Other

Shell 9.01% Batchfile 0.38% Scala 81.72% Java 7.93% Groovy 0.82% C 0.07% C++ 0.01% HTML 0.05%
maven eclipse maven-plugin eclipse-plugin m2e scala-ide java scala macros scalajs

scalor-maven-plugin's People

Contributors

andrei-pozolotin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scalor-maven-plugin's Issues

zinc server

Hello everybody,
I know that the external zinc server from typesafe has been deprecated but I find it to be the fastest option when building multi-module maven projects.
When I build multi-module projects on my laptop having a zinc-server running and enabling it through the good-old scala maven plugin, builds take less than half the time compared with a scalor build, even when zinc is enabled.

I think the speed up comes from the fact that the external zinc server does not need to be restarted once per module but just keep running through the whole build process.

Would it be possible on scalor to launch a zinc server only once?
Otherwise can scalor use an external zinc-server like scala-maven-plugin does?

defineCompiler should be optional

I guess some people might have to configure a specific compiler version, but by default, the plugin should be able to infer the proper scala-compiler artifact (groupId and artifactId are well known and version can be inferred from the scala-library jar that's in the project dependency tree).

(that's what I do in the gatling-maven-plugin)

relax plugin version verification rules

Trying to use scalor-maven-plugin on a project that uses kind-projector I got:

[ERROR] C:\Users\md401\eclipse-workspace\tierney-aggregator\core\pom.xml [1:1]: Execution failure
java.lang.RuntimeException: Version mismatch: FileItem(C:\Users\md401\.m2\repository\org\scala-lang\scala-compiler\2.12.4\scala-compiler-2.12.4.jar,2.12.4) vs FileItem(C:\Users\md401\.m2\repository\org\spire-math\kind-projector_2.12\0.9.4\kind-projector_2.12-0.9.4.jar,2.12)
    at com.carrotgarden.maven.scalor.zinc.Version$.versionFailure (Version.scala:31)
    at com.carrotgarden.maven.scalor.zinc.Version$.assertVersionExact (Version.scala:24)
    at com.carrotgarden.maven.scalor.zinc.Version$.$anonfun$assertVersion$1 (Version.scala:116)
    at com.carrotgarden.maven.scalor.zinc.Version$.$anonfun$assertVersion$1$adapted (Version.scala:114)
    at scala.collection.mutable.ArrayBuffer.foreach (ArrayBuffer.scala:48)
    at com.carrotgarden.maven.scalor.zinc.Version$.assertVersion (Version.scala:114)
    at com.carrotgarden.maven.scalor.zinc.Compiler$Context.<init> (Compiler.scala:242)
    at com.carrotgarden.maven.scalor.zinc.Compiler.zincPerformCompile (Compiler.scala:283)
    at com.carrotgarden.maven.scalor.zinc.Compiler.zincPerformCompile$ (Compiler.scala:282)
    at com.carrotgarden.maven.scalor.CompileMainMojo.zincPerformCompile (CompileMojo.scala:112)
    at com.carrotgarden.maven.scalor.CompileAnyMojo.performCompile (CompileMojo.scala:37)
    at com.carrotgarden.maven.scalor.CompileAnyMojo.performCompile$ (CompileMojo.scala:36)
    at com.carrotgarden.maven.scalor.CompileMainMojo.performCompile (CompileMojo.scala:112)
    at com.carrotgarden.maven.scalor.CompileAnyMojo.perform (CompileMojo.scala:45)
    at com.carrotgarden.maven.scalor.CompileAnyMojo.perform$ (CompileMojo.scala:40)
    at com.carrotgarden.maven.scalor.CompileMainMojo.perform (CompileMojo.scala:112)
    at com.carrotgarden.maven.scalor.base.Mojo.execute (Mojo.scala:65)
    at com.carrotgarden.maven.scalor.base.Mojo.execute$ (Mojo.scala:50)
    at com.carrotgarden.maven.scalor.CompileMainMojo.execute (CompileMojo.scala:112)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:564)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
[ERROR] [compile-main] Execution failure: Version mismatch: FileItem(C:\Users\md401\.m2\repository\org\scala-lang\scala-compiler\2.12.4\scala-compiler-2.12.4.jar,2.12.4) vs FileItem(C:\Users\md401\.m2\repository\org\spire-math\kind-projector_2.12\0.9.4\kind-projector_2.12-0.9.4.jar,2.12)

I assume this is trying to fail-fast when one uses a plugin compiled for an incorrect version of Scala, but kind-projector built for 2.12 should be fine with Scala compiler 2.12.4. Is there any way to specify which versions should be treated as compatible or something on those lines?

Bloop support

https://gitter.im/jvican

Jorge @jvican Jun 05 2018 12:43
Hey Andrei! I've seen you're the maintainer of https://github.com/random-maven/scalor-maven-plugin, awesome plugin!
I wanted to get in touch with you to check if you'd be interested in providing a bloop integration in your plugin.
Bloop is a compiler plugin focused on compilatoin performance. At the Scala Center we're aiming to give to any Scala user, no matter what their build tool is, the best compilation performance possible.
https://github.com/random-maven/scalor-maven-plugin
Currently, we support scala-maven-plugin with some tricks in the plugin system to get the configurations from pom.xml without depending on the scala-maven-plugin directly. This solution is less than ideal and lacking. I think we would all benefit from a high-quality integration with scalor-maven-plugin.

SNAPSHOT cross release for Scala 2.11 & Scala 2.13?

Just a suggestion from what I have read so far :

If you have a CI server, you should consider adding publishing artifact for other Scala versions into your build pipeline, as your plugin is already designed for cross-build

Many enterprise software in Scala are written for Apache Spark 1.6 & 2.x, which haven't upgraded to Scala 2.12 yet.

Better advanced usage link

The link in the readme just points to the main github page of the plugin. I've written a library called Terra that uses your plugin to do a cross build of 2.11, 2.12, and 2.13 plus JS and native support where its possible. Its a pretty good example of an advanced usage of your plugin. https://github.com/hunterpayne/terra

resolve source artifacts optionally

I have this declared:

<plugin>
	<groupId>com.carrotgarden.maven</groupId>
	<artifactId>scalor-maven-plugin_${version.scala}</artifactId>
	<version>${version.scalor-maven-plugin}</version>
	<configuration>
		<defineBridge>
			<dependency>
				<groupId>org.scala-sbt</groupId>
				<artifactId>compiler-bridge_${version.scala}</artifactId>
				<version>${version.scala.zinc}</version>
			</dependency>
		</defineBridge>
		<defineCompiler>
			<dependency>
				<groupId>org.scala-lang</groupId>
				<artifactId>scala-compiler</artifactId>
				<version>${version.scalalibs}</version>
			</dependency>
		</defineCompiler>
		<definePluginList>
			<dependency>
				<groupId>com.artima.supersafe</groupId>
				<artifactId>supersafe_${version.scalalibs}</artifactId>
				<version>${version.supersafe}</version>
			</dependency>
		</definePluginList>
		<zincCompileOptions>
			-target:jvm-1.8
			-encoding
			${project.build.sourceEncoding}
		</zincCompileOptions>
	</configuration>
	<executions>
		<execution>

			<!-- Subset of available. -->
			<goals>
				<!-- 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>

			</goals>

		</execution>
	</executions>
</plugin>

I'ts trying to load sources:

org.eclipse.aether.resolution.DependencyResolutionException: Could not find artifact com.artima.supersafe:supersafe_2.12.4:jar:sources:1.1.3 in milton-repo (http://dl.bintray.com/milton/Milton)

which are not available...

Any hints?

Plugin thinks default target is 1.8, but is 1.6 when compiling for Scala 2.11.12

This was a particularly difficult bug to work out.

Running scalac -help for 2.11.12 gives

-target:<target>                Target platform for object files. All JVM 1.5 targets are deprecated. (jvm-1.5,jvm-1.6,jvm-1.7,jvm-1.8) default:jvm-1.6

However scalor is reporting in target/scalor/scala-options-report.txt

...
-target
   description: Target platform for object files. All JVM 1.5 - 1.7 targets are deprecated. Choices: (jvm-1.5,jvm-1.6,jvm-1.7,jvm-1.8), default: jvm-1.8.
   syntax format: -target:<target>
   effective value: jvm-1.8
   user provided entry:

I have also tried manually specifying zincOptionsScala to no luck. (scalar reports default is 1.8)

My pom is as follows

<properties>
  <scala.zinc.version>1.1.1</scala.zinc.version>
  <scala.version>2.11.12</scala.version>
  <scala.plugin.macro.version>2.1.1<scala.plugin.macro.version>
</properties>
<plugin>
    <groupId>com.carrotgarden.maven</groupId>
    <artifactId>scalor-maven-plugin_2.12</artifactId>
    <version>1.4.2.20180508161326</version>
    <configuration>

        <!-- Required bridge. -->
        <defineBridge>
            <dependency>
                <groupId>org.scala-sbt</groupId>
                <artifactId>compiler-bridge_${scala.binary.version}</artifactId>
                <version>${scala.zinc.version}</version>
            </dependency>
        </defineBridge>

        <!-- Required compiler. -->
        <defineCompiler>
            <dependency>
                <groupId>org.scala-lang</groupId>
                <artifactId>scala-compiler</artifactId>
                <version>${scala.version}</version>
            </dependency>
        </defineCompiler>

        <!-- Optional compiler plugins. -->
        <definePluginList>
            <dependency>
                <groupId>org.scalamacros</groupId>
                <artifactId>paradise_${scala.version}</artifactId>
                <version>${scala.plugin.macro.version}</version>
            </dependency>
        </definePluginList>

        <zincLogActiveLevel>info</zincLogActiveLevel>

        <buildMainSourceScalaFolders>
            <source>${project.build.sourceDirectory}/../scala</source>
            <source>${project.build.directory}/generated-sources/avro</source>
        </buildMainSourceScalaFolders>

        <zincLogCompilerOptions>true</zincLogCompilerOptions>

    </configuration>
    <executions>
        <execution>
            <goals>

                <goal>register-main</goal>
                <goal>register-test</goal>

                <goal>compile-main</goal>
                <goal>compile-test</goal>

                <goal>scaladoc-main</goal>

            </goals>
        </execution>
    </executions>
</plugin>

remove osgi bundle header: Require-Capability: JavaSE-9

Hi there,

I get the following stacktrace:

Execution failure: (com.carrotgarden.maven:scalor-maven-plugin_2.12:1.2.2.20180214213630:eclipse-config:default:initialize) 
 org.apache.maven.plugin.MojoFailureException: Execution failure: at com.carrotgarden.maven.scalor.base.Mojo.execute(Mojo.scala:57) 
 at com.carrotgarden.maven.scalor.base.Mojo.execute$(Mojo.scala:40) at 
 com.carrotgarden.maven.scalor.EclipseConfigMojo.execute(EclipseMojo.scala:106) at 
 org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) at 
 org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:331) at 
 org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1362) at 
 org.eclipse.m2e.core.internal.embedder.MavenImpl$11.call(MavenImpl.java:1) at 
 org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177) at 
 org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112) at 
 org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1360) at 
 org.eclipse.m2e.core.project.configurator.MojoExecutionBuildParticipant.build(MojoExecutionBuildParticipant.java:52) at 
 org.eclipse.m2e.core.internal.builder.MavenBuilderImpl.build(MavenBuilderImpl.java:137) at 
 org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:172) at 
 org.eclipse.m2e.core.internal.builder.MavenBuilder$1.method(MavenBuilder.java:1) at 
 org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1$1.call(MavenBuilder.java:115) at 
 org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177) at 
 org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112) at 
 org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod$1.call(MavenBuilder.java:105) at 
 org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:177) at 
 org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151) at 
 org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99) at 
 org.eclipse.m2e.core.internal.builder.MavenBuilder$BuildMethod.execute(MavenBuilder.java:86) at 
 org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:200) at 
 org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:735) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:
 42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206) at 
 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246) at 
 org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:301) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:
 42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:304) at 
 org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:360) at 
 org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:383) at 
 org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:142) at 
 org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:232) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) 
 Caused by: org.osgi.framework.BundleException: Could not resolve module: com.carrotgarden.maven.scalor-maven-
 plugin_2.12_1.2.2.20180214213630 [600] Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)
 (version=9.0))" at org.eclipse.osgi.container.Module.start(Module.java:444) at 
 org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) at 
 org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:402) at 
 com.carrotgarden.maven.scalor.EclipseConfigMojo.performEclipse(EclipseMojo.scala:142) at 
 com.carrotgarden.maven.scalor.EclipseAnyMojo.perform(EclipseMojo.scala:93) at 
 com.carrotgarden.maven.scalor.EclipseAnyMojo.perform$(EclipseMojo.scala:84) at 
 com.carrotgarden.maven.scalor.EclipseConfigMojo.perform(EclipseMojo.scala:106) at 
 com.carrotgarden.maven.scalor.base.Mojo.execute(Mojo.scala:51) ... 34 more

I suspect this happens because I run eclipse with JDK8.
Even though I have Java 9 on my machine, I force eclipse to launch with Java 8 (set -vm option in eclipse.ini). I cannot launch with Java 9 because I've stumbled upon a bug in m2e and forcing Java 8 is the only work around I have so far.

Regards

Problems compiling twirl-templates

I use the twirl-maven-plugin (v.1.1) to generate Scala-sources from Twirl-templates. These sources are generated in target/generated-sources/twirl/ and it seems the Scalor-maven-plugin is unable to find these sources and I'm getting the following error compiling this line (InvoicePdfHelper.scala:38)

val xmlResult = com.visena.invoice.report.pdf.xml.InvoiceTimesheetGroupedOnInvoiceLinesPDF.render(invoicePrintDto, includePrices)
[ERROR] [compile-main] [FAIL] [Error] /home/andreak/dev/origo-branches/scalor-maven-plugin/core/src/main/scala/no/officenet/origo/core/domain/model/invoice/InvoicePdfHelper.scala:38: object visena is not a member of package com

validate compile phases

NPE when adding nonexistent argument (-Xprint-phases) to zincOptionsScala in 1.4.0

Minor but I misspelled a compiler argument while testing, and got an NPE rather than a clear error:

[ERROR] [compile-main] [FAIL] ## Exception when compiling 6 sources to C:\Users\md401\eclipse-workspace\tierney-aggregator\core\target\classes
[ERROR] C:\Users\md401\eclipse-workspace\tierney-aggregator\core\pom.xml [1:1]: Execution failure
java.lang.NullPointerException
    at xsbt.ZincCompiler.phaseDescriptors$lzycompute (CallbackGlobal.scala:121)
    at xsbt.ZincCompiler.phaseDescriptors (CallbackGlobal.scala:119)
    at scala.tools.nsc.Global$Run.<init> (Global.scala:1186)
    at scala.tools.nsc.Global.phaseNames$lzycompute (Global.scala:708)
    at scala.tools.nsc.Global.phaseNames (Global.scala:707)
    at scala.tools.nsc.Global.phaseHelp (Global.scala:739)
    at scala.tools.nsc.Global.phaseDescriptions (Global.scala:713)
    at scala.tools.nsc.CompilerCommand.getInfoMessage (CompilerCommand.scala:99)
    at xsbt.CachedCompiler0.run (CompilerInterface.scala:121)
    at xsbt.CachedCompiler0.run (CompilerInterface.scala:105)
    at xsbt.CompilerInterface.run (CompilerInterface.scala:31)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:564)
    at sbt.internal.inc.AnalyzingCompiler.call (AnalyzingCompiler.scala:237)
    at sbt.internal.inc.AnalyzingCompiler.compile (AnalyzingCompiler.scala:111)
    at sbt.internal.inc.AnalyzingCompiler.compile (AnalyzingCompiler.scala:90)
    at sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$3 (MixedAnalyzingCompiler.scala:83)
    at scala.runtime.java8.JFunction0$mcV$sp.apply (JFunction0$mcV$sp.java:12)
    at sbt.internal.inc.MixedAnalyzingCompiler.timed (MixedAnalyzingCompiler.scala:134)
    at sbt.internal.inc.MixedAnalyzingCompiler.compileScala$1 (MixedAnalyzingCompiler.scala:74)
    at sbt.internal.inc.MixedAnalyzingCompiler.compile (MixedAnalyzingCompiler.scala:117)
    at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1 (IncrementalCompilerImpl.scala:305)
    at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1$adapted (IncrementalCompilerImpl.scala:305)
    at sbt.internal.inc.Incremental$.doCompile (Incremental.scala:101)
    at sbt.internal.inc.Incremental$.$anonfun$compile$4 (Incremental.scala:82)
    at sbt.internal.inc.IncrementalCommon.recompileClasses (IncrementalCommon.scala:110)
    at sbt.internal.inc.IncrementalCommon.cycle (IncrementalCommon.scala:57)
    at sbt.internal.inc.Incremental$.$anonfun$compile$3 (Incremental.scala:84)
    at sbt.internal.inc.Incremental$.manageClassfiles (Incremental.scala:129)
    at sbt.internal.inc.Incremental$.compile (Incremental.scala:75)
    at sbt.internal.inc.IncrementalCompile$.apply (Compile.scala:61)
    at sbt.internal.inc.IncrementalCompilerImpl.compileInternal (IncrementalCompilerImpl.scala:309)
    at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileIncrementally$1 (IncrementalCompilerImpl.scala:267)
    at sbt.internal.inc.IncrementalCompilerImpl.handleCompilationError (IncrementalCompilerImpl.scala:158)
    at sbt.internal.inc.IncrementalCompilerImpl.compileIncrementally (IncrementalCompilerImpl.scala:237)
    at sbt.internal.inc.IncrementalCompilerImpl.compile (IncrementalCompilerImpl.scala:68)
    at com.carrotgarden.maven.scalor.zinc.Compiler.zincPerformCompile (Compiler.scala:356)
    at com.carrotgarden.maven.scalor.zinc.Compiler.zincPerformCompile$ (Compiler.scala:282)
    at com.carrotgarden.maven.scalor.CompileMainMojo.zincPerformCompile (CompileMojo.scala:112)
    at com.carrotgarden.maven.scalor.CompileAnyMojo.performCompile (CompileMojo.scala:37)
    at com.carrotgarden.maven.scalor.CompileAnyMojo.performCompile$ (CompileMojo.scala:36)
    at com.carrotgarden.maven.scalor.CompileMainMojo.performCompile (CompileMojo.scala:112)
    at com.carrotgarden.maven.scalor.CompileAnyMojo.perform (CompileMojo.scala:45)
    at com.carrotgarden.maven.scalor.CompileAnyMojo.perform$ (CompileMojo.scala:40)
    at com.carrotgarden.maven.scalor.CompileMainMojo.perform (CompileMojo.scala:112)
    at com.carrotgarden.maven.scalor.base.Mojo.execute (Mojo.scala:65)
    at com.carrotgarden.maven.scalor.base.Mojo.execute$ (Mojo.scala:50)
    at com.carrotgarden.maven.scalor.CompileMainMojo.execute (CompileMojo.scala:112)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:564)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)

use separate source regex for compile and scaladoc

Config to exclude files from scaladoc?

Could a config option to exclude specific source files from the scaladoc goal be added (or did I miss one that was there already)? Scaladoc doesn't seem to process files that use kind-projector correctly, so when using the maven-scala-plugin I used to exclude those files.

Thanks as always.

Provide Scala.js sbt plugin to Maven translation guide

Consider the build.sbt from scalajs-react-template. For the most part, it's just dependencies, and translating them to Maven using scalor-maven-plugin is straightforward.

There are basically at least three other concerns:

  1. Settings such as packageJSDependencies. jsDependencies, etc.
  2. Scoping those Settings per task, such as fastOptJS in Compile scope.
  3. Providing some equivalent to Workbench for rapid iteration of Scala.js projects in Maven.

1 and 2 can probably be addressed with a Wiki page describing how the sbt plugin settings map to arguments in the scalor plugin. 3 might be addressed by using Eclipse and building on save, but it's not clear to me how scalor plugin settings are being reflected as Eclipse project settings such that e.g. an HTML page referring by relative path to the local compile target will be pointing to where the pom.xml says rather than whatever the default target path is after Eclipse imports a Maven project.

More generally, it would be nice if there were more standalone examples than the demo and the scalor-maven-plugin project itself, and ideally, if some of these examples were conversions of Scala.js projects in sbt, for comparison's sake.

Scala library doesn't get picked if it's in test scope

Hello,

I have a project (Gatling based) that only contains test sources, hence only test dependencies (that pull scala-library transitively).

I then get the following crash:

java.lang.RuntimeException: Missing library, see: defineAuto, regexScalaLibrary.
at com.carrotgarden.maven.scalor.util.Error$Throw$.apply (Error.scala:34)
at com.carrotgarden.maven.scalor.base.ParamsCompiler.$anonfun$defineFindLibrary$1 (Params.scala:253)
at scala.Option.getOrElse (Option.scala:121)
at com.carrotgarden.maven.scalor.base.ParamsCompiler.defineFindLibrary (Params.scala:253)
at com.carrotgarden.maven.scalor.base.ParamsCompiler.defineFindLibrary$ (Params.scala:251)
at com.carrotgarden.maven.scalor.CompileMainMojo.defineFindLibrary (CompileMojo.scala:113)

Things work if I change the scope of the library to compile, but it's not right.
I'd like to advertise this plugin to Gatling users, but this one is a blocker for me.

how to use in idea for scala.js?

I built the project by referring to the template, and then executed mvn clean scanner: scala-js-link
Generated runtime.js and runtime.min.js
Are these the compiled js files

use constant default options for JavaC and ScalaC

If maven.compiler.target not set, compiler is invoked with -target jvm-${maven.compiler.target}

Minor but it makes the error less clear than it should be, since one only sees the error message from the compiler itself. (I think I also saw an error in Eclipse from that string being used somewhere)

definePluginList should be optional

Most projects won't compile any ScalaJs nor macros.
It would be convenient that the <definePluginList> configuration block isn't mandatory.
Currently, it needs to be defined, even if it's empty (<definePluginList></definePluginList>) otherwise the plugin crashes with a NPE.

test-cross sample project setup

Thanks for making this plugin, I'm very interested in using it to publish artifacts across 2.11 and 2.12 for some of our existing Maven projects. Most of our team is familiar with Maven and we were trying to avoid having to use SBT for cross-builds if possible. We are looking for a plugin that can create cross-build artifacts on the commandline, and don't care about integration with any particular IDE.

I downloaded the source and tried compiling the test-cross project, but it doesn't build with the usual mvn clean install commandline.

What commandline should we use to build the test-cross project?

Here's an example with Maven 3.5.2 on my Mac. I have replaced the true host/port of our internal Maven repository to the fake hostname repo.mycompany.com

~/src/scalor-maven-plugin/src/it/test-cross$ mvn -version
Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 2017-10-18T00:58:13-07:00)
Maven home: /Users/jimmccabe/bin/apache-maven-3.5.2
Java version: 1.8.0_152, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.13.2", arch: "x86_64", family: "mac"

~/src/scalor-maven-plugin/src/it/test-cross$ mvn clean install
Downloading from repo-nexus: http://repo.mycompany.com/nexus/content/groups/public/com/carrotgarden/maven/arkon-maven-extension/maven-metadata.xml
Downloaded from repo-nexus: http://repo.mycompany.com/nexus/content/groups/public/com/carrotgarden/maven/arkon-maven-extension/maven-metadata.xml (389 B at 1.1 kB/s)
Downloading from repo-nexus: http://repo.mycompany.com/nexus/content/groups/public/com/carrotgarden/maven/profile-activator-extension/maven-metadata.xml
Downloaded from repo-nexus: http://repo.mycompany.com/nexus/content/groups/public/com/carrotgarden/maven/profile-activator-extension/maven-metadata.xml (439 B at 2.6 kB/s)
[INFO] Arkon: provisioning...
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] scalor-maven-plugin-test-cross
[INFO] scalor-maven-plugin-test-cross_2.11
[INFO] scalor-maven-plugin-test-cross_2.12
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building scalor-maven-plugin-test-cross 0.0.0.20180125155158
[INFO] ------------------------------------------------------------------------
Downloading from repo-nexus: http://repo.mycompany.com/nexus/content/groups/public/@project/groupId@/@project.artifactId@/@project.version@/@project.artifactId@[email protected]@.pom
[WARNING] The POM for @project.groupId@:@project.artifactId@:jar:@project.version@ is missing, no dependency information available
Downloading from repo-nexus: http://repo.mycompany.com/nexus/content/groups/public/@project/groupId@/@project.artifactId@/@project.version@/@project.artifactId@[email protected]@.jar
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] scalor-maven-plugin-test-cross ..................... FAILURE [  0.280 s]
[INFO] scalor-maven-plugin-test-cross_2.11 ................ SKIPPED
[INFO] scalor-maven-plugin-test-cross_2.12 ................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.063 s
[INFO] Finished at: 2018-01-25T07:51:59-08:00
[INFO] Final Memory: 10M/204M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin @project.groupId@:@project.artifactId@:@project.version@ or one of its dependencies could not be resolved: Could not find artifact @project.groupId@:@project.artifactId@:jar:@project.version@ in repo-nexus (http://repo.mycompany.com/nexus/content/groups/public) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

work around invalid component injector in m2e-1.8

Creating a simple Maven project with the following pom.xml exhibits the above error when updating the project settings:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>com.duck</groupId>
	<artifactId>invest</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<name>invest</name>

	<properties>

		<version.java>1.8</version.java>

		<version.scala.epoch>2.11</version.scala.epoch>
		<version.scala.release>2.11.12</version.scala.release>

		<version.scala.plug.macro>2.1.0</version.scala.plug.macro>
		<version.scala.zinc>1.1.0</version.scala.zinc>

		<version.sjs.epoch>0.6</version.sjs.epoch>
		<version.sjs.release>${version.sjs.epoch}.21</version.sjs.release>
		<version.sjs.library>sjs${version.sjs.epoch}_${version.scala.epoch}</version.sjs.library>
		<version.sjs.scalacss>0.5.4</version.sjs.scalacss>
		<version.sjs.scalatags>0.6.7</version.sjs.scalatags>
		<version.sjs.autowire>0.2.6</version.sjs.autowire>
		<version.sjs.prickle>1.1.14</version.sjs.prickle>
		<version.sjs.upickle>0.5.1</version.sjs.upickle>
		<version.sjs.scalarx>0.3.2</version.sjs.scalarx>
		<version.sjs.utest>0.6.2</version.sjs.utest>
	</properties>

	<repositories>
		<repository>
			<id>random-maven</id>
			<name>Random Maven</name>
			<url>https://dl.bintray.com/random-maven/maven</url>
		</repository>
	</repositories>

	<dependencies>

		<dependency>
			<groupId>org.scala-lang</groupId>
			<artifactId>scala-library</artifactId>
			<version>${version.scala.release}</version>
		</dependency>

		<dependency>
			<groupId>org.scala-js</groupId>
			<artifactId>scalajs-library_${version.scala.epoch}</artifactId>
			<version>${version.sjs.release}</version>
			<scope>provided</scope>
		</dependency>

	</dependencies>

	<build>
		<plugins>

			<!-- Disable default compiler. -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.3</version>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
					<skip>true</skip>
					<skipMain>true</skipMain>
				</configuration>
			</plugin>

			<!-- Enable alternative compiler. -->
			<plugin>
				<groupId>com.carrotgarden.maven</groupId>
				<artifactId>scalor-maven-plugin_2.12</artifactId>
				<!-- <version>RELEASE</version> -->
				<version>1.0.1.20180112171513</version>

				<configuration>

					<skip>false</skip>

					<zincLogSourcesList>true</zincLogSourcesList>
					<zincLogProjectClassPath>true</zincLogProjectClassPath>
					<zincLogCompilerClassPath>true</zincLogCompilerClassPath>
					<zincLogCompilerPluginList>true</zincLogCompilerPluginList>

					<!-- <skipLogReason>true</skipLogReason> -->
					<!-- <eclipseLogBuildParticipant>true</eclipseLogBuildParticipant> -->

					<zincCompileOptions>
						-target:jvm-${version.java}
						-encoding
						${project.build.sourceEncoding}
						-deprecation
						-unchecked
						-feature
						-P:scalajs:sjsDefinedByDefault
						-compileorder:Mixed
					</zincCompileOptions>

					<defineBridge>
						<dependency>
							<groupId>org.scala-sbt</groupId>
							<artifactId>compiler-bridge_${version.scala.epoch}</artifactId>
							<version>${version.scala.zinc}</version>
						</dependency>
					</defineBridge>
					<defineCompiler>
						<dependency>
							<groupId>org.scala-lang</groupId>
							<artifactId>scala-compiler</artifactId>
							<version>${version.scala.release}</version>
							<exclusions>
								<exclusion>
									<groupId>jline</groupId>
									<artifactId>jline</artifactId>
								</exclusion>
							</exclusions>
						</dependency>
					</defineCompiler>
					<definePluginList>
						<dependency>
							<groupId>org.scala-js</groupId>
							<artifactId>scalajs-compiler_${version.scala.release}</artifactId>
							<version>${version.sjs.release}</version>
						</dependency>
						<dependency>
							<groupId>org.scalamacros</groupId>
							<artifactId>paradise_${version.scala.release}</artifactId>
							<version>${version.scala.plug.macro}</version>
						</dependency>
					</definePluginList>

				</configuration>

				<executions>
					<execution>
						<goals>

							<goal>eclipse-config</goal>

							<goal>register-macro</goal>
							<goal>register-main</goal>
							<goal>register-test</goal>

							<goal>clean-macro</goal>
							<goal>clean-main</goal>
							<goal>clean-test</goal>

							<goal>compile-macro</goal>
							<goal>prepack-macro</goal>

							<goal>compile-main</goal>
							<goal>prepack-main</goal>

							<goal>compile-test</goal>
							<goal>prepack-test</goal>

							<goal>link-scala-js-main</goal>
							<goal>prepack-linker-main</goal>

							<goal>link-scala-js-test</goal>
							<goal>prepack-linker-test</goal>

						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>

Replacing the new project's pom.xml rightly presents the issue that the project's settings need updating. Doing so, however, results in the error in the subject.

Scala 3 Support

Hi, just tried out the plugin with Scala 2.13.6 and it's working great.

For Scala 3 some of the dependencies (checked by regex) have changed.

The compiler bridge went from

                        <dependency>
                            <groupId>org.scala-sbt</groupId>
                            <artifactId>compiler-bridge_2.13</artifactId>
                            <version>1.5.5</version>
                        </dependency>

to

                        <dependency>
                            <groupId>org.scala-lang</groupId>
                            <artifactId>scala3-sbt-bridge</artifactId>
                            <version>3.0.0</version>
                        </dependency>

And the compiler from

                        <dependency>
                            <groupId>org.scala-lang</groupId>
                            <artifactId>scala-compiler</artifactId>
                            <version>2.13.6</version>
                        </dependency>

to

                        <dependency>
                            <groupId>org.scala-lang</groupId>
                            <artifactId>scala3-compiler_3</artifactId>
                            <version>3.0.0</version>
                        </dependency>

document windows build setup

On windows, build must be run as admin at least once to create symlink

Running mvn install on a clean checkout as a user I get:

C:\Users\md401\eclipse-workspace\scalor-maven-plugin>mvn install
[INFO] Arkon: provisioning...
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.carrotgarden.maven:scalor-maven-plugin_2.12:maven-plugin:1.4.1.20180330144420
[WARNING] 'build.plugins.plugin.version' for com.carrotgarden.maven:scalor-maven-plugin_2.12 is missing. @ com.carrotgarden.maven:scalor-maven-plugin:0-SNAPSHOT, C:\Users\md401\eclipse-workspace\scalor-maven-plugin\pom.xml, line 478, column 21
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.carrotgarden.maven:scalor-maven-plugin:pom:0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for com.carrotgarden.maven:scalor-maven-plugin_2.12 is missing. @ line 478, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Scalor Maven Plugin
[INFO] Scalor Maven Plugin 2.12
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Scalor Maven Plugin 0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.scala-ide:org.scala-ide.sdt.core:jar:4.7.1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO]
[INFO] --- scalor-maven-plugin_2.12:1.4.1.20180329193631:setup-cross (default) @ scalor-maven-plugin ---
[INFO] [setup-cross] Ensuring module folders.
[INFO] [setup-cross]    folder: C:\Users\md401\eclipse-workspace\scalor-maven-plugin\cross\2.12
[INFO] [setup-cross] Ensuring resource symlinks.
[INFO] [setup-cross]    symlink: C:\Users\md401\eclipse-workspace\scalor-maven-plugin\cross\2.12\src -> C:\Users\md401\eclipse-workspace\scalor-maven-plugin\src
[ERROR] C:\Users\md401\eclipse-workspace\scalor-maven-plugin\pom.xml [1:1]: Execution failure
java.nio.file.FileSystemException: C:\Users\md401\eclipse-workspace\scalor-maven-plugin\cross\2.12\src: A required privilege is not held by the client.

    at sun.nio.fs.WindowsException.translateToIOException (WindowsException.java:92)
    at sun.nio.fs.WindowsException.rethrowAsIOException (WindowsException.java:103)
    at sun.nio.fs.WindowsException.rethrowAsIOException (WindowsException.java:108)
    at sun.nio.fs.WindowsFileSystemProvider.createSymbolicLink (WindowsFileSystemProvider.java:581)
    at java.nio.file.Files.createSymbolicLink (Files.java:1051)
    at com.carrotgarden.maven.scalor.util.Folder$.ensureSymlink (Folder.scala:359)
    at com.carrotgarden.maven.scalor.SetupCrossAnyMojo.$anonfun$performInvocation$3 (SetupProjectMojo.scala:74)
    at com.carrotgarden.maven.scalor.SetupCrossAnyMojo.$anonfun$performInvocation$3$adapted (SetupProjectMojo.scala:69)
    at scala.collection.immutable.List.map (List.scala:283)
    at com.carrotgarden.maven.scalor.SetupCrossAnyMojo.$anonfun$performInvocation$2 (SetupProjectMojo.scala:69)
    at scala.collection.immutable.List.flatMap (List.scala:335)
    at com.carrotgarden.maven.scalor.SetupCrossAnyMojo.performInvocation (SetupProjectMojo.scala:68)
    at com.carrotgarden.maven.scalor.SetupCrossAnyMojo.performInvocation$ (SetupProjectMojo.scala:52)
    at com.carrotgarden.maven.scalor.SetupCrossArkonMojo.performInvocation (SetupProjectMojo.scala:97)
    at com.carrotgarden.maven.scalor.SetupCrossAnyMojo.perform (SetupProjectMojo.scala:83)
    at com.carrotgarden.maven.scalor.SetupCrossAnyMojo.perform$ (SetupProjectMojo.scala:78)
    at com.carrotgarden.maven.scalor.SetupCrossArkonMojo.perform (SetupProjectMojo.scala:97)
    at com.carrotgarden.maven.scalor.base.Mojo.execute (Mojo.scala:65)
    at com.carrotgarden.maven.scalor.base.Mojo.execute$ (Mojo.scala:50)
    at com.carrotgarden.maven.scalor.SetupCrossArkonMojo.execute (SetupProjectMojo.scala:97)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:564)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
[ERROR] [setup-cross] Execution failure: C:\Users\md401\eclipse-workspace\scalor-maven-plugin\cross\2.12\src: A required privilege is not held by the client.

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Scalor Maven Plugin ................................ FAILURE [  3.526 s]
[INFO] Scalor Maven Plugin 2.12 ........................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.220 s
[INFO] Finished at: 2018-03-30T15:44:25+01:00
[INFO] Final Memory: 36M/119M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.carrotgarden.maven:scalor-maven-plugin_2.12:1.4.1.20180329193631:setup-cross (default) on project scalor-maven-plugin: Execution failure: C:\Users\md401\eclipse-workspace\scalor-maven-plugin\cross\2.12\src: A required privilege is not held by the client. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Can be worked around by running the build once as admin, which sets the symlink correctly, after that subsequent builds get past this step (though I'm still hitting #16 at the moment).

Provide Scala.js sbt plugin to Scalor mapping guide

Consider the build.sbt from scalajs-react-template. For the most part, it's just dependencies, and translating them to Maven using scalor-maven-plugin is straightforward.

There are basically at least three other concerns:

  1. Settings such as packageJSDependencies. jsDependencies, etc.
  2. Scoping those Settings per task, such as fastOptJS in Compile scope.
  3. Providing some equivalent to Workbench for rapid iteration of Scala.js projects in Maven.

1 and 2 can probably be addressed with a Wiki page describing how the sbt plugin settings map to arguments in the scalor plugin. 3 might be addressed by using Eclipse and building on save, but it's not clear to me how scalor plugin settings are being reflected as Eclipse project settings such that e.g. an HTML page referring by relative path to the local compile target will be pointing to where the pom.xml says rather than whatever the default target path is after Eclipse imports a Maven project.

More generally, it would be nice if there were more standalone examples than the demo and the scalor-maven-plugin project itself, and ideally, if some of these examples were conversions of Scala.js projects in sbt, for comparison's sake.

mysterious encoding during flatten:flatten

"character 27 is not allowed in output" build error

Similar failures with the master and develop branches, using the included mvnw or system maven:

C:\Users\md401\eclipse-workspace\scalor-maven-plugin>mvnw install
[INFO] Arkon: provisioning...
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.carrotgarden.maven:scalor-maven-plugin_2.12:maven-plugin:1.3.3.20180312170837
[WARNING] 'build.plugins.plugin.version' for com.carrotgarden.maven:scalor-maven-plugin_2.12 is missing. @ com.carrotgarden.maven:scalor-maven-plugin:0-SNAPSHOT, C:\Users\md401\eclipse-workspace\scalor-maven-plugin\pom.xml, line 433, column 21
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.carrotgarden.maven:scalor-maven-plugin:pom:0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for com.carrotgarden.maven:scalor-maven-plugin_2.12 is missing. @ line 433, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Scalor Maven Plugin
[INFO] Scalor Maven Plugin 2.12
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Scalor Maven Plugin 0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.scala-ide:org.scala-ide.sdt.core:jar:4.7.1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO]
[INFO] --- scalor-maven-plugin_2.12:1.4.0.20180306184848:eclipse-config (default) @ scalor-maven-plugin ---
[INFO]
[INFO] --- scalor-maven-plugin_2.12:1.4.0.20180306184848:register-macro (default) @ scalor-maven-plugin ---
[INFO]
[INFO] --- scalor-maven-plugin_2.12:1.4.0.20180306184848:register-main (default) @ scalor-maven-plugin ---
[INFO]
[INFO] --- scalor-maven-plugin_2.12:1.4.0.20180306184848:register-test (default) @ scalor-maven-plugin ---
[INFO]
[INFO] --- scalor-maven-plugin_2.12:1.4.0.20180306184848:compile-macro (default) @ scalor-maven-plugin ---
[INFO]
[INFO] --- scalor-maven-plugin_2.12:1.4.0.20180306184848:compile-main (default) @ scalor-maven-plugin ---
[INFO]
[INFO] --- scalor-maven-plugin_2.12:1.4.0.20180306184848:compile-test (default) @ scalor-maven-plugin ---
[INFO]
[INFO] --- maven-plugin-plugin:3.5:descriptor (default-descriptor) @ scalor-maven-plugin ---
[WARNING] Unsupported packaging type pom, execution skipped
[INFO]
[INFO] --- scalor-maven-plugin_2.12:1.4.0.20180306184848:eclipse-prescomp (default) @ scalor-maven-plugin ---
[INFO]
[INFO] --- flatten-maven-plugin:1.3.20180210195103:flatten (default) @ scalor-maven-plugin ---
[INFO] Resolving dependencies.
[INFO] Can't extract module name from scala-xml_2.12-1.1.0.jar: scala.xml.2.12: Invalid module name: '2' is not a Java identifier
[INFO] Can't extract module name from scalajs-tools_2.12-0.6.22.jar: scalajs.tools.2.12: Invalid module name: '2' is not a Java identifier
[INFO] Can't extract module name from zinc_2.12-1.1.1.jar: zinc.2.12: Invalid module name: '2' is not a Java identifier
[INFO] Can't extract module name from upickle_2.12-0.5.1.jar: upickle.2.12: Invalid module name: '2' is not a Java identifier
[INFO] Can't extract module name from scalariform_2.12-0.2.6.jar: scalariform.2.12: Invalid module name: '2' is not a Java identifier
[INFO] Can't extract module name from compiler-bridge_2.12-1.1.1.jar: compiler.bridge.2.12: Invalid module name: '2' is not a Java identifier
[INFO] Removing pom.xml model members.
[ERROR] C:\Users\md401\eclipse-workspace\scalor-maven-plugin\pom.xml [1:1]: Flatten failure
java.lang.IllegalStateException: character 27 is not allowed in output
    at org.codehaus.plexus.util.xml.pull.MXSerializer.writeElementContent (MXSerializer.java:1191)
    at org.codehaus.plexus.util.xml.pull.MXSerializer.text (MXSerializer.java:958)
    at org.apache.maven.model.io.xpp3.MavenXpp3Writer.writeDependency (MavenXpp3Writer.java:572)
    at org.apache.maven.model.io.xpp3.MavenXpp3Writer.writeModel (MavenXpp3Writer.java:1108)
    at org.apache.maven.model.io.xpp3.MavenXpp3Writer.write (MavenXpp3Writer.java:115)
    at com.carrotgarden.maven.flatten.FlattenMojo.writePom (FlattenMojo.java:210)
    at com.carrotgarden.maven.flatten.FlattenMojo.persistModel (FlattenMojo.java:374)
    at com.carrotgarden.maven.flatten.FlattenMojo.execute (FlattenMojo.java:466)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:564)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:564)
    at org.apache.maven.wrapper.BootstrapMainStarter.start (BootstrapMainStarter.java:39)
    at org.apache.maven.wrapper.WrapperExecutor.execute (WrapperExecutor.java:122)
    at org.apache.maven.wrapper.MavenWrapperMain.main (MavenWrapperMain.java:55)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Scalor Maven Plugin ................................ FAILURE [  5.732 s]
[INFO] Scalor Maven Plugin 2.12 ........................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.975 s
[INFO] Finished at: 2018-03-12T17:08:45Z
[INFO] Final Memory: 54M/179M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.carrotgarden.maven:flatten-maven-plugin:1.3.20180210195103:flatten (default) on project scalor-maven-plugin: Flatten failure: character 27 is not allowed in output -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.