ev0lution37 February 2016

Scala/Java Project not finding Dependencies during Maven compile

I have a Java/Scala hybrid project. When building in Intellij, things work fine. However, trying to run Maven builds from command line is giving me this error when running 'mvn clean install':

    [ERROR] /IdeaProjects/user-lib-common/src/main/scala/com/test/userlib/rest/UserServiceRestClient.scala:12: error: object model is not a member of package com.test.userlib
    [ERROR] import com.test.userlib.model.cte.{ItemResponse, CteUser}
    [ERROR]                                      ^
    [ERROR] /IdeaProjects/user-lib-common/src/main/scala/com/test/userlib/rest/UserServiceRestClient.scala:13: error: object utils is not a member of package com.test.userlib
    [ERROR] import com.test.userlib.utils.UserLibProperties
    [ERROR]                                      ^
    [ERROR] /IdeaProjects/user-lib-common/src/main/scala/com/test/userlib/rest/UserServiceRestClient.scala:26: error: not found: value UserLibProperties
    [ERROR]       .hosts(UserLibProperties.CTE_USERSERVICE_HOST + ":" + UserLibProperties.CTE_USERSERVICE_PORT)
    [ERROR]              ^
    [ERROR] /IdeaProjects/user-lib-common/src/main/scala/com/test/userlib/rest/UserServiceRestClient.scala:32: error: not found: value UserLibProperties
    [ERROR]     ClientAuthTlsConfigUtil.createSslContext(new File(UserLibProperties.CTE_USERSERVICE_KEYSTORE),UserLibProperties.CTE_USERSERVICE_KEYSTORE_PASSWORD,new File(UserLibProperties.CTE_USERSERVICE_TRUSTSTORE),UserLibProperties.CTE_USERSERVICE_TRUSTSTORE_PASSWORD)
    [ERROR]                                                       ^
    [ERROR] /IdeaProjects/user-lib-common/src/main/scala/com/test/userlib/rest/UserServiceRestClient.scala:35: error: not found: type CteUser
    [ERROR]   protected def getUser(dn :String) :CteUser = {
    [ERROR]                                      ^
    [ERROR] /IdeaProjects/user-lib-common/src/main/scala/com/test/userlib/rest/UserServiceRestClient.scala:36: error: not found: value UserLibProperties
    [ERROR]           

Answers


purplebee February 2016

I think, SBT is best way to build a hybrid project.

For example: https://github.com/databricks/learning-spark/blob/master/build.sbt

It has little learning curve, but worth to invest time in SBT.

Post Status

Asked in February 2016
Viewed 1,903 times
Voted 7
Answered 1 times

Search




Leave an answer