Код: Выделить всё
...
org.jetbrains.kotlin
kotlin-stdlib
${kotlin.version}
...
org.apache.maven.plugins
maven-compiler-plugin
${compiler-plugin-version}
${java-version}
${java-version}
${project.build.sourceEncoding}
kotlin-maven-plugin
org.jetbrains.kotlin
${kotlin.plugin.version}
compile
process-sources
compile
test-compile
process-test-sources
test-compile
false
Код: Выделить всё
org.jetbrains.kotlin
kotlin-stdlib
...
kotlin-maven-plugin
org.jetbrains.kotlin
${project.basedir}/src/main/kotlin
Код: Выделить всё
Stateless
open class DummyServiceImpl : DummyService {
PersistenceContext(unitName = Consts.UNIT_NAME)
private val em: EntityManager? = null
override fun get(id: Long?): Dummy {
return em!!.find(javaClass(), id)
}
override fun sayHi(): String {
return "Dummy service says \"Hi!\"."
}
}
Код: Выделить всё
DummyServiceКлассы Поэтому, когда я компилирую модуль, содержащий DummyServiceImpl, с помощью Maven, это выглядит следующим образом:< /p>
Код: Выделить всё
[error] C:\somepath\service\DummyServiceImpl.kt: (14, 31) Unresolved reference: DummyService
[error] C:\somepath\service\DummyServiceImpl.kt: (16, 35) Unresolved reference: Consts
Код: Выделить всё
[ERROR] /C:/somepath/service/impl/DummyServiceClientImpl.java:[5,27] cannot find symbol
[ERROR] symbol: class DummyServiceImpl
Подробнее здесь: https://stackoverflow.com/questions/293 ... sing-maven
Мобильная версия