在Maven项目中启用宏天堂Scala编译器插件 [英] Enabling the macro-paradise Scala compiler plugin in Maven projects
本文介绍了在Maven项目中启用宏天堂Scala编译器插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
仅通过将scala-reflect.jar库作为pom的依赖项包含在内,我就可以在maven项目中使用普通的scala-2.10宏,但是我需要打开宏天堂吗?我正在使用scala-2.10和scala-maven-plugin-3.1.5.
I have the ordinary scala-2.10 macros working in a maven project just by including the scala-reflect.jar library as a dependency in the pom, but what do I need to turn on macro-paradise? I am using scala-2.10 and scala-maven-plugin-3.1.5.
推荐答案
好像我可以将其与pom.xml的以下新增内容一起使用
Looks like I got it to work with the following additions to the pom.xml
<repositories>
...
<repository>
<id>oss.sonatype.org</id>
<name>sonatype sapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
...
</repositories>
和
<plugins>
...
<plugin>
... scala-maven-plugin identification...
<configuration>
...
<compilerPlugins>
<compilerPlugin>
<groupId>org.scala-lang.plugins</groupId>
<artifactId>macro-paradise_2.10.2</artifactId>
<version>2.0.0-SNAPSHOT</version>
</compilerPlugin>
</compilerPlugins>
...
</configuration>
...
</plugin>
...
</plugins>
这篇关于在Maven项目中启用宏天堂Scala编译器插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文