Hi,

We are evaluating JOOQ for production use, but not able to run gradle build 
on generated sources.  Sources are generated fine using the trial version.

The source files are generated under the under the main sourceset here :  
\src\main\java\com\thirdpoint\server\model\generated
I would expect the compile fileTree entry to add the jooq jars into the 
classpath, since the same entry the buildScript section works in generating 
the files.


But running "gradle build" command ends with the following error on all 
generated classes:

 
\src\main\java\com\thirdpoint\server\model\generated\accounting\stage\Stage.java:34:
 : 
error: package org.jooq does not exist

Any help is most appreciated!!


GRADLE 
CONFIG=================================================================================================

buildscript {

ext {
springBootVersion = '2.0.4.RELEASE'
}
repositories {

flatDir dirs: ["$projectDir/libs/JOOQ/3.11.4/JOOQ-lib"]
jcenter()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}",
"nu.studer:gradle-jooq-plugin:3.0.1",
"com.microsoft.sqlserver:mssql-jdbc:6.2.2.jre8",
"org.flywaydb:flyway-gradle-plugin:4.1.1"
)

classpath fileTree(dir: '$projectDir/libs/JOOQ/3.11.4/JOOQ-lib', include: 
'*.jar', exclude: 'jooq-scala-*.jar')
}
}

apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'org.flywaydb.flyway'

group = 'com.thirdpoint.server'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8

repositories {

flatDir dirs: ["$projectDir/libs/JOOQ/3.11.4/JOOQ-lib"]
jcenter()
}

ext {
springCloudVersion = 'Finchley.SR1'
}

ext['jooq.version'] = '3.11.4'

dependencies {

compile fileTree(dir: '$projectDir/libs/JOOQ/3.11.4/JOOQ-lib', include: 
'*.jar', exclude: 'jooq-scala-*.jar')
        compile('org.springframework.boot:spring-boot-starter-actuator')
compile('org.springframework.boot:spring-boot-starter-websocket')
compile('org.springframework.cloud:spring-cloud-starter-aws')
compile('org.springframework.cloud:spring-cloud-stream')
compile('org.springframework.cloud:spring-cloud-stream-binder-kafka')
compile('org.springframework.kafka:spring-kafka')
compile('org.flywaydb:flyway-core:3.2.1')

testCompile('org.springframework.boot:spring-boot-starter-test')
testCompile('org.springframework.cloud:spring-cloud-stream-test-support')
}

dependencyManagement {
imports {
mavenBom 
"org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}

task generateAccounting {
doLast {

def writer = new StringWriter()
def xml = new groovy.xml.MarkupBuilder(writer)
.configuration('xmlns': 'http://www.jooq.org/xsd/jooq-codegen-3.11.0.xsd') {
jdbc() {
driver('com.microsoft.sqlserver.jdbc.SQLServerDriver')
url('jdbc:sqlserver://XXXX;integratedSecurity=true;databaseName=Accounting')
}
generator() {
database() {

schemata() {
schema() {
inputSchema('XXX')
}
schema() {
inputSchema('XXX')
}
schema() {
inputSchema('XXX')
}
}
}

generate([:]) {
pojos true
daos true
}
target() {
packageName('com.thirdpoint.server.model.generated.accounting')
directory('src/main/java/')
}
}
}

org.jooq.codegen.GenerationTool.generate(
javax.xml.bind.JAXB.unmarshal(new StringReader(writer.toString()), 
org.jooq.meta.jaxb.Configuration.class)
)
}
}


task generateAll {
dependsOn generateAccounting
}


-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to