Search code examples
sbtjooq-sbt-plugin

Sbt, local sbt plugin, using jooq code generation plugin


I'm trying to use jooq-sbt-plugin to generate some code.

I downloaded the code, compiled it and copied jar into lib directory, but on sbt load i get this error:

 [warn]  Note: Some unresolved dependencies have extra attributes.  Check that th
 ese dependencies exist with the requested attributes.
 [warn]          sean8223:jooq-sbt-plugin:1.4 (sbtVersion=0.13, scalaVersion=2.10
 )

in project/plugins.sbt i have this

 resolvers += Resolver.file("lib-repo", file("lib")) transactional()

 addSbtPlugin("lib-repo" %% "jooq-sbt-plugin" % "1.4")

Is this plugin "detected" and cannot be loaded or sbt does't see it?

P.S. By default plugin does not work because it depends on jooq-3.2.1 which is not available on maven and I get error - unresolved dependencies. According to plugin readme i could set jooqVersion in build.sbt to other version, but this doesn't seem to work.


Solution

  • In my project/plugins.sbt:

    resolvers += "sean8223 Releases" at "https://github.com/sean8223/repository/raw/master/releases"
    
    addSbtPlugin("sean8223" %% "jooq-sbt-plugin" % "1.3")
    

    In my build.sbt:

    seq(jooqSettings:_*)
    
    jooqVersion := "3.3.1"
    

    And everything is successfully resolved. I didn't run any tasks, but since you say that the problem is in resolving jooq, show your build.sbt if it still doesn't work for you.