maven-scala-plugin warnings for multiple scala libraries detected

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

maven-scala-plugin warnings for multiple scala libraries detected

Harit Himanshu
When I compile my code using maven (JDK 1.8), I see logs as  

How can I get rid of these warnings?

[INFO] ------------------------------------------------------------------------
[INFO] Building Main Application 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ main ---
[INFO] Deleting /Users/harit/Downloads/sbt_tutorial/ec/main/target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ main ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ main ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-scala-plugin:2.15.2:compile (default) @ main ---
[INFO] Checking for multiple versions of scala
[WARNING]  Expected all dependencies to require Scala version: 2.11.6
[WARNING]  com.shn:monitor:1.0-SNAPSHOT requires scala version: 2.11.6
[WARNING]  com.shn:currentprocessor:1.0-SNAPSHOT requires scala version: 2.11.6
[WARNING]  com.shn:main:1.0-SNAPSHOT requires scala version: 2.11.6
[WARNING]  com.typesafe.akka:akka-actor_2.11:2.3.11 requires scala version: 2.11.5
[WARNING] Multiple versions of scala libraries detected!
[INFO] includes = [**/*.java,**/*.scala,]
[INFO] excludes = []

My plugin settings are  

           <plugin>
                <groupId>org.scala-tools</groupId>
                <artifactId>maven-scala-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <scalaCompatVersion>${maven-scala-plugin.scalaCompatVersion}</scalaCompatVersion>
                    <scalaVersion>${scala.version}</scalaVersion>
                    <scalaVersion>${scala.version}</scalaVersion>
                    <args>
                        <arg>-target:jvm-1.8</arg>
                    </args>
                </configuration>
            </plugin>

and my entire pom.xml looks like  

<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.shn</groupId>
    <artifactId>EnterpriseConnector</artifactId>
    <packaging>pom</packaging>
    <version>1.0-SNAPSHOT</version>
    <inceptionYear>2008</inceptionYear>
    <modules>
        <module>main</module>
        <module>monitor</module>
        <module>current_processor</module>
    </modules>
    <properties>
        <scala.version>2.11.6</scala.version>
        <junit.version>4.12</junit.version>
        <scalatest_2.11.version>2.2.5</scalatest_2.11.version>
        <akka-actor_2.11.version>${akka-slf4j_2.11.version}</akka-actor_2.11.version>
        <akka-slf4j_2.11.version>${akka-testkit_2.11.version}</akka-slf4j_2.11.version>
        <akka-testkit_2.11.version>2.3.11</akka-testkit_2.11.version>
        <mockito-all.version>1.10.19</mockito-all.version>
        <maven-scala-plugin.scalaCompatVersion>2.11.6</maven-scala-plugin.scalaCompatVersion>
    </properties>

    <repositories>
        <repository>
            <id>scala-tools.org</id>
            <name>Scala-Tools Maven2 Repository</name>
            <url>http://scala-tools.org/repo-releases</url>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>scala-tools.org</id>
            <name>Scala-Tools Maven2 Repository</name>
            <url>http://scala-tools.org/repo-releases</url>
        </pluginRepository>
    </pluginRepositories>

    <dependencies>
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-library</artifactId>
            <version>${scala.version}</version>
        </dependency>
        <dependency>
            <groupId>com.typesafe.akka</groupId>
            <artifactId>akka-actor_2.11</artifactId>
            <version>${akka-actor_2.11.version}</version>
        </dependency>
        <dependency>
            <groupId>com.typesafe.akka</groupId>
            <artifactId>akka-slf4j_2.11</artifactId>
            <version>${akka-slf4j_2.11.version}</version>
        </dependency>
        <dependency>
            <groupId>com.typesafe.akka</groupId>
            <artifactId>akka-testkit_2.11</artifactId>
            <version>${akka-testkit_2.11.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.scalatest</groupId>
            <artifactId>scalatest_2.11</artifactId>
            <version>${scalatest_2.11.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>${mockito-all.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <defaultGoal>clean install</defaultGoal>
        <plugins>
            <plugin>
                <groupId>org.scala-tools</groupId>
                <artifactId>maven-scala-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <scalaCompatVersion>${maven-scala-plugin.scalaCompatVersion}</scalaCompatVersion>
                    <scalaVersion>${scala.version}</scalaVersion>
                    <scalaVersion>${scala.version}</scalaVersion>
                    <args>
                        <arg>-target:jvm-1.8</arg>
                    </args>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <reporting>
        <plugins>
            <plugin>
                <groupId>org.scala-tools</groupId>
                <artifactId>maven-scala-plugin</artifactId>
                <configuration>
                    <scalaVersion>${scala.version}</scalaVersion>
                </configuration>
            </plugin>
        </plugins>
    </reporting>
</project>

--
You received this message because you are subscribed to the Google Groups "scala-tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.