# "Unresolved reference: println" in maven project

**URL:** <https://discuss.kotlinlang.org/t/unresolved-reference-println-in-maven-project/1517>\
**Category:** Support\
**Created:** [March 7, 2016, 3:38pm UTC](https://discuss.kotlinlang.org/t/unresolved-reference-println-in-maven-project/1517 "2016-03-07T15:38:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tookuk](https://avatars.discourse-cdn.com/v4/letter/t/7ea924/32.png) [@tookuk](https://discuss.kotlinlang.org/u/tookuk)\
**Post date:** [March 7, 2016, 3:38pm UTC](https://discuss.kotlinlang.org/t/unresolved-reference-println-in-maven-project/1517/1 "2016-03-07T15:38:49Z")

</div>

Hello!  
My simple Kotlin maven project has somehow broken down.  
After some actions with maven my Idea cannot resolve Kotlin functions like ‘println’, ‘contains’ etc.

I know, that this means no Kotlin runtime library is presented in project. But what should I do to fix that?  
Maven reimport, maven-clean and maven-install have no effect on this. How can I plug the library back into my project?

Excuse my possible grammar mistakes and thank you for reading.

---

<div class="post-metadata">

**Author:** ![tookuk](https://avatars.discourse-cdn.com/v4/letter/t/7ea924/32.png) [@tookuk](https://discuss.kotlinlang.org/u/tookuk)\
**Post date:** [March 7, 2016, 7:00pm UTC](https://discuss.kotlinlang.org/t/unresolved-reference-println-in-maven-project/1517/2 "2016-03-07T19:00:11Z")

</div>

It’s strange… When I connect Kotlin libraries by adding JARs through Ideas “project configuration” my project works fine.  
But with Maven I have the problem described above.

Maybe there is something wrong with my pom.xml?  
Here it is:

> ```
> <repositories>
> <repository>
> <snapshots>
> <enabled>false</enabled>
> </snapshots>
> <id>central</id>
> <name>Maven Repository Switchboard</name>
> <url>http://repo1.maven.org/maven2</url>
> </repository>
> </repositories>
> 
> ```

> ```
> <properties>
> <kotlin.version>1.0.0</kotlin.version>
> <junit.version>4.10</junit.version>
> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
> </properties>
> 
> ```

> ```
> <dependencies>
> <dependency>
> <groupId>org.jetbrains.kotlin</groupId>
> <artifactId>kotlin-stdlib</artifactId>
> <version>${kotlin.version}</version>
> </dependency>
> <dependency>
> <groupId>org.jetbrains.kotlin</groupId>
> <artifactId>kotlin-test-junit</artifactId>
> <version>${kotlin.version}</version>
> <scope>test</scope>
> </dependency>
> <dependency>
> <groupId>joda-time</groupId>
> <artifactId>joda-time</artifactId>
> <version>2.2</version>
> </dependency>
> <dependency>
> <groupId>org.springframework</groupId>
> <artifactId>spring-jdbc</artifactId>
> <version>4.2.4.RELEASE</version>
> </dependency>
> <dependency>
> <groupId>org.springframework.boot</groupId>
> <artifactId>spring-boot-starter</artifactId>
> <version>1.3.2.RELEASE</version>
> </dependency>
> <dependency>
> <groupId>postgresql</groupId>
> <artifactId>postgresql</artifactId>
> <version>9.1-901-1.jdbc4</version>
> </dependency>
> <dependency>
> <groupId>jdom</groupId>
> <artifactId>jdom</artifactId>
> <version>1.1</version>
> </dependency>
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>${junit.version}</version>
> <scope>test</scope>
> </dependency>
> </dependencies>
> 
> ```

> ```
> <build>
> <sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
> <testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>
> <plugins>
> <plugin>
> <artifactId>kotlin-maven-plugin</artifactId>
> <groupId>org.jetbrains.kotlin</groupId>
> <version>${kotlin.version}</version>
> <configuration/>
> <executions>
> <execution>
> <id>compile</id>
> <phase>compile</phase>
> <goals>
> <goal>compile</goal>
> </goals>
> </execution>
> <execution>
> <id>test-compile</id>
> <phase>test-compile</phase>
> <goals>
> <goal>test-compile</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>exec-maven-plugin</artifactId>
> <version>1.2.1</version>
> <executions>
> <execution>
> <phase>test</phase>
> <goals>
> <goal>java</goal>
> </goals>
> </execution>
> </executions>
> <configuration>
> <mainClass>MainKt</mainClass>
> </configuration>
> </plugin>
> </plugins>
> </build>
> 
> ```

---

<div class="post-metadata">

**Author:** ![yole](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/yole/32/1425_2.png) [@yole](https://discuss.kotlinlang.org/u/yole)\
**Post date:** [March 8, 2016, 4:45pm UTC](https://discuss.kotlinlang.org/t/unresolved-reference-println-in-maven-project/1517/3 "2016-03-08T16:45:58Z")

</div>

Please ensure that the version of the IntelliJ IDEA Kotlin plugin you have installed matches the version of Kotlin you’re using in your Maven pom.xml (1.0.0).
