Closed Lupanoide closed 6 years ago
I'm using Scala 2.9.3 successfully. Here is my pom.xml file.
<!--
Copyright 2014 Idio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<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>org.idio</groupId>
<artifactId>idio-spotlight-model</artifactId>
<version>0.1.0</version>
<name>${project.artifactId}</name>
<description>My wonderful scala app</description>
<inceptionYear>2010</inceptionYear>
<licenses>
<license>
<name>My License</name>
<url>http://....</url>
<distribution>repo</distribution>
</license>
</licenses>
<properties>
<maven.compiler.source>1.5</maven.compiler.source>
<maven.compiler.target>1.5</maven.compiler.target>
<encoding>UTF-8</encoding>
<scala.version>2.9.3</scala.version>
</properties>
<pluginRepositories>
<pluginRepository>
<id>scala-tools.org</id>
<name>Scala-Tools Maven2 Repository</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>${scala.version}</version>
<!--
License: Scala License
http://www.scala-lang.org/node/146
-->
</dependency>
<dependency>
<groupId>org.scala-tools.testing</groupId>
<artifactId>specs_2.9.3</artifactId>
<version>1.6.9</version>
<!--
License: MIT
-->
</dependency>
<dependency>
<groupId>org.dbpedia</groupId>
<artifactId>spotlight</artifactId>
<version>0.7</version>
<!--
License: Apache Software License, Version 2.0
-->
</dependency>
<dependency>
<groupId>com.github.scopt</groupId>
<artifactId>scopt_2.9.3</artifactId>
<version>3.2.0</version>
<!--
License: MIT
-->
</dependency>
<!-- Test -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
<!--
License: MIT
-->
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.1</version>
<scope>test</scope>
<!--
License: Eclipse Public License - v 1.0
-->
</dependency>
<dependency>
<groupId>org.scala-tools.testing</groupId>
<artifactId>specs_${scala.version}</artifactId>
<version>1.6.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.scalatest</groupId>
<artifactId>scalatest</artifactId>
<version>1.2</version>
<scope>test</scope>
<!--
License: Apache Software License, Version 2.0
-->
</dependency>
</dependencies>
<build>
<sourceDirectory>src/main/scala</sourceDirectory>
<testSourceDirectory>src/test/scala</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>appassembler-maven-plugin</artifactId>
<version>1.8</version>
<configuration>
<programs>
<program>
<mainClass>org.idio.dbpedia.spotlight.Main</mainClass>
<id>model-editor</id>
<jvmSettings>
<initialMemorySize>15000M</initialMemorySize>
<maxMemorySize>15000M</maxMemorySize>
</jvmSettings>
</program>
</programs>
<assembleDirectory> ${project.build.directory} </assembleDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
<version>2.15.0</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
<configuration>
<args>
<arg>-make:transitive</arg>
<arg>-dependencyfile</arg>
<arg>${project.build.directory}/.scala_dependencies</arg>
</args>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.6</version>
<configuration>
<useFile>false</useFile>
<disableXmlReport>true</disableXmlReport>
<!-- If you have classpath issue like NoDefClassError,... -->
<!-- useManifestOnlyJar>false</useManifestOnlyJar -->
<includes>
<include>**/*Test.*</include>
<include>**/*Suite.*</include>
</includes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-5</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>org.idio.dbpedia.spotlight.Main</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>idio-spotlight-releases-repository</id>
<url>https://bytebucket.org/idio/mvn-repo/raw/master/releases</url>
</repository>
</repositories>
</project>`
Closing as part of archiving process.
Hello, I have cloned the repo and then I have tried to compile it. It returns me an error, it seems that some packages require another version of scala:
[WARNING] POM for 'org.scala-lang:scala-compiler:pom:2.9.1:compile' is invalid.
Its dependencies (if any) will NOT be available to the current build. [WARNING] Expected all dependencies to require Scala version: 2.9.1 [WARNING] org.idio:idio-spotlight-model:0.1.0 requires scala version: 2.9.1 [WARNING] org.scala-tools.testing:specs_2.9.1:1.6.9 requires scala version: 2.9.1 [WARNING] org.scala-tools.testing:specs_2.9.1:1.6.9 requires scala version: 2.9.1 [WARNING] com.github.scopt:scopt_2.9.3:3.2.0 requires scala version: 2.9.3 [WARNING] Multiple versions of scala libraries detected! [INFO] includes = [*/.scala,*/.java,] [INFO] excludes = [] [INFO] /home/utente/spotlight-model-editor/src/main/scala:-1: info: compiling [INFO] Compiling 13 source files to /home/utente/spotlight-model-editor/target/classes at 1497348835528 [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] wrap: org.apache.maven.project.InvalidProjectModelException: Not a v4.0.0 POM. for project org.scala-lang:scala-compiler at /root/.m2/repository/org/scala-lang/scala-compiler/2.9.1/scala-compiler-2.9.1.pom
[INFO]