sbt - Dependent task runs only when main task called directly -


so, have sbt project, 2 custom tasks jooq:codegen , flyway:migrate [ https://github.com/sean8223/jooq-sbt-plugin, https://github.com/sean8223/flyway-sbt-plugin ]

not relevant here, flyway:migrate task creates schema in database, , jooq:codegen generates code schema. hence, imperative flyway:migrate runs before jooq:codegen. so, added following line in build.sbt

(codegen in jooq) <<= (codegen in jooq) dependson (migrate in flyway) 

also, compile needs generated code jooq:codegen, plugin takes care of default.

here weird part. when run sbt compile, get:

~/n/p/d/davion git:data-access ❯❯❯ sbt compile [info] loading project definition /users/rohan/nomadly/projects/davion-projects/davion/project [info] set current project davion (in build file:/users/rohan/nomadly/projects/davion-projects/davion/) [info] done updating. [info] initialising properties  : /jooq-config4460313300896426081.xml ... output truncated ... [info] table records generated  : total: 669.172ms, +44.536ms [info] routines fetched         : 0 (0 included, 0 excluded) [info] packages fetched         : 0 (0 included, 0 excluded) [info] generation finished!     : total: 688.254ms, +19.082ms [info] compiling 7 scala sources , 17 java sources /users/rohan/nomadly/projects/davion-projects/davion/target/classes... [success] total time: 24 s, completed 14 may, 2015 12:13:35 pm 

so, flyway:migrate task doesn't run. when run sbt jooq:codegen, happens:

~/n/p/d/davion git:data-access ❯❯❯ sbt jooq:codegen [info] loading project definition /users/rohan/nomadly/projects/davion-projects/davion/project [info] set current project davion (in build file:/users/rohan/nomadly/projects/davion-projects/davion/) [info] flyway (command-line tool) v.2.0.3 [info] [info] current schema version: 6 [info] schema date. no migration necessary. [info] initialising properties  : /jooq-config6431105742854017589.xml [info] license parameters ... output truncated ... 

i have no idea why happening. if task chain setup 'a' depends on 'b' depends on 'c', shouldn't running 'a' execute both 'c' , 'b' (and in order)? why 'c' not run transitive dependency , how can remedy this?


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -