Hi,
I update maven version from 2.2.1 to 3.1.1 and I notice that when I compile
a jooq maven project from a directory that isn't the root project's
directory I have always compilation problem related to jooq's generated
classes.
Compilation works fine when is executed from within project directory.
This issue doesn't exist when I use maven 2.2.1.
Maybe the issue is not directly related to jooq.
Using maven 3.1.1 from within project directory:
daniele.antonini@l03 ~/SVN/JooqModelMapperTest $ mvn clean compile
....
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO]
------------------------------------------------------------------------
Using maven 3.1.1 from parent project directory:
daniele.antonini@l03 ~/SVN $ mvn clean compile -f
JooqModelMapperTest/pom.xml
[INFO] Scanning for projects...
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] Building JooqModelMapperTest 0.0.1-SNAPSHOT
[INFO]
------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @
JooqModelMapperTest ---
[INFO] Deleting
/home/likewise-open/FHOSTER/daniele.antonini/SVN/JooqModelMapperTest/target
[INFO]
[INFO] --- sql-maven-plugin:1.5:execute (create-database-mysql) @
JooqModelMapperTest ---
[INFO] Executing file: /tmp/jooqCreateDatabase.582153621sql
[INFO] Executing file: /tmp/db.627352720sql
[INFO] 5 of 5 SQL statements executed successfully
[INFO]
[INFO] --- jooq-codegen-maven:3.1.0:generate (default) @
JooqModelMapperTest ---
[INFO] Using this configuration:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<configuration xmlns="http://www.jooq.org/xsd/jooq-codegen-3.0.0.xsd">
<jdbc>
<driver>com.mysql.jdbc.Driver</driver>
<url>jdbc:mysql://localhost:3306/db_test</url>
<user>test</user>
<password>test</password>
</jdbc>
<generator>
<name>org.jooq.util.DefaultGenerator</name>
<database>
<name>org.jooq.util.mysql.MySQLDatabase</name>
<includes>.*</includes>
<excludes></excludes>
<recordVersionFields></recordVersionFields>
<recordTimestampFields></recordTimestampFields>
<dateAsTimestamp>false</dateAsTimestamp>
<unsignedTypes>true</unsignedTypes>
<inputSchema>db_test</inputSchema>
<forcedTypes>
<forcedType>
<name>BOOLEAN</name>
<expressions>.*\.deleted|.*\.under_maintenance|.*enabled|.*\.suspended</expressions>
</forcedType>
<forcedType>
<name>BIGINT</name>
<expressions>.*\.id|.*\.account_id</expressions>
</forcedType>
</forcedTypes>
</database>
<generate>
<relations>true</relations>
<deprecated>true</deprecated>
<instanceFields>true</instanceFields>
<generatedAnnotation>true</generatedAnnotation>
<records>true</records>
<pojos>false</pojos>
<immutablePojos>false</immutablePojos>
<interfaces>false</interfaces>
<daos>false</daos>
<jpaAnnotations>false</jpaAnnotations>
<validationAnnotations>false</validationAnnotations>
<globalObjectReferences>true</globalObjectReferences>
</generate>
<target>
<packageName>test.jooq</packageName>
<directory>target/generated-sources/jooq</directory>
<---------------------------- maybe do I need to use maven built in
variable to reference project target directory?
</target>
</generator>
</configuration>
[INFO] Database parameters
[INFO] ----------------------------------------------------------
[INFO] dialect : MYSQL
[INFO] target dir : target/generated-sources/jooq
[INFO] target package : test.jooq
[INFO] ----------------------------------------------------------
[INFO]
[INFO] DefaultGenerator parameters
[INFO] ----------------------------------------------------------
[INFO] strategy : class
org.jooq.util.DefaultGeneratorStrategy
[INFO] deprecated : true
[INFO] generated annotation : true
[INFO] JPA annotations : false
[INFO] validation annotations : false
[INFO] instance fields : true
[INFO] records : true
[INFO] pojos : false
[INFO] immutable pojos : false
[INFO] interfaces : false
[INFO] daos : false
[INFO] relations : true
[INFO] global references : true
[INFO] ----------------------------------------------------------
[INFO] Emptying :
/home/likewise-open/FHOSTER/daniele.antonini/SVN/target/generated-sources/jooq/test/jooq
<------------------- missing project directory!
[INFO] Generating schemata : Total: 1
[INFO] Generating schema : DbTest.java
[INFO] ----------------------------------------------------------
[INFO] Sequences fetched : 0 (0 included, 0 excluded)
[INFO] Tables fetched : 1 (1 included, 0 excluded)
[INFO] UDTs fetched : 0 (0 included, 0 excluded)
[INFO] Generating tables
[INFO] Generating table : AccountUser.java [input=account_user,
output=account_user, pk=KEY_account_user_PRIMARY]
[INFO] ARRAYs fetched : 0 (0 included, 0 excluded)
[INFO] Enums fetched : 0 (0 included, 0 excluded)
[INFO] Tables generated : Total: 222.548ms
[INFO] Generating table references
[INFO] Table refs generated : Total: 223.175ms, +0.626ms
[INFO] Generating Keys
[INFO] Keys generated : Total: 224.368ms, +1.193ms
[INFO] Generating records
[INFO] Generating record : AccountUserRecord.java
[INFO] Table records generated : Total: 230.508ms, +6.139ms
[INFO] Routines fetched : 0 (0 included, 0 excluded)
[INFO] Packages fetched : 0 (0 included, 0 excluded)
[INFO] GENERATION FINISHED! : Total: 233.556ms, +3.047ms
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @
JooqModelMapperTest ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @
JooqModelMapperTest ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8,
i.e. build is platform dependent!
[INFO] Compiling 1 source file to
/home/likewise-open/FHOSTER/daniele.antonini/SVN/JooqModelMapperTest/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR]
/home/likewise-open/FHOSTER/daniele.antonini/SVN/JooqModelMapperTest/src/main/java/MavenIssue.java:[1,31]
package test.jooq.tables does not exist
[ERROR]
/home/likewise-open/FHOSTER/daniele.antonini/SVN/JooqModelMapperTest/src/main/java/MavenIssue.java:[1,1]
static import only from classes and interfaces
[ERROR]
/home/likewise-open/FHOSTER/daniele.antonini/SVN/JooqModelMapperTest/src/main/java/MavenIssue.java:[5,17]
package ACCOUNT_USER does not exist
[INFO] 3 errors
[INFO] -------------------------------------------------------------
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1.698s
[INFO] Finished at: Tue Oct 29 19:27:36 CET 2013
[INFO] Final Memory: 11M/239M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:3.1:compile
(default-compile) on project JooqModelMapperTest: Compilation failure:
Compilation failure:
[ERROR]
/home/likewise-open/FHOSTER/daniele.antonini/SVN/JooqModelMapperTest/src/main/java/MavenIssue.java:[1,31]
package test.jooq.tables does not exist
[ERROR]
/home/likewise-open/FHOSTER/daniele.antonini/SVN/JooqModelMapperTest/src/main/java/MavenIssue.java:[1,1]
static import only from classes and interfaces
[ERROR]
/home/likewise-open/FHOSTER/daniele.antonini/SVN/JooqModelMapperTest/src/main/java/MavenIssue.java:[5,17]
package ACCOUNT_USER does not exist
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
--
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/groups/opt_out.