Migrated Maven multi modules project to Kotlin and...
# announcements
v
Migrated Maven multi modules project to Kotlin and get problems with sub modules dependencies. Every submodule that use another submodule write error:
Unresolved reference: moduleName
Does anybody knows what can cause this problems?
l
I had that problem, fixed it by changing
pom.xml
Copy code
<plugin>
				<groupId>org.jetbrains.kotlin</groupId>
				<artifactId>kotlin-maven-plugin</artifactId>
				<version>${kotlin.version}</version>
				<executions>
					<execution>
						<id>compile</id>
						<phase>compile</phase>
						<goals>
							<goal>compile</goal>
						</goals>
						<configuration>
							<sourceDirs>
								<source>src/main/java</source>
								<source>src/main/kotlin</source>
							</sourceDirs>
						</configuration>
					</execution>
					<execution>
						<id>test-compile</id>
						<phase>test-compile</phase>
						<goals>
							<goal>test-compile</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<jvmTarget>1.8</jvmTarget>
				</configuration>
			</plugin>
I think the
<sourceDirs>
section is what fixes it, but I'm not too sure