Generating dbDoc reports with 2.0-rc6 in Maven

Hi,

I’ve been trying to generate the dbDoc reports using the maven plugin in 2.0-rc6, but can’t get it working. liquibase:update and liquibase:updateSql work fine. The Maven plugin doesn’t seem to be able to find the change logs, but the error is a bit odd:

$ mvn clean package liquibase:dbDoc -e

  • Error stacktraces are turned on.
    [INFO] Scanning for projects…
    [INFO] ------------------------------------------------------------------------
    [INFO] Building dbupdates
    [INFO]    task-segment: [clean, package, liquibase:dbDoc]
    [INFO] ------------------------------------------------------------------------
    [INFO] [clean:clean {execution: default-clean}]
    [INFO] Deleting directory /Users/johnsmart/Projects/Clients/ubs/dbupdates/dbupdates/target
    [INFO] [resources:resources {execution: default-resources}]
    [WARNING] Using platform encoding (MacRoman actually) to copy filtered resources, i.e. build is platform dependent!
    [INFO] Copying 5 resources
    [INFO] [compiler:compile {execution: default-compile}]
    [INFO] Nothing to compile - all classes are up to date
    [INFO] [resources:testResources {execution: default-testResources}]
    [WARNING] Using platform encoding (MacRoman actually) to copy filtered resources, i.e. build is platform dependent!
    [INFO] skip non existing resourceDirectory /Users/johnsmart/Projects/Clients/ubs/dbupdates/dbupdates/src/test/resources
    [INFO] [compiler:testCompile {execution: default-testCompile}]
    [INFO] Nothing to compile - all classes are up to date
    [INFO] [surefire:test {execution: default-test}]
    [INFO] No tests to run.
    [INFO] [jar:jar {execution: default-jar}]
    [INFO] Building jar: /Users/johnsmart/Projects/Clients/ubs/dbupdates/dbupdates/target/dbupdates-0.0.1-SNAPSHOT.jar
    [INFO] [liquibase:dbDoc {execution: default-cli}]
    [INFO] ------------------------------------------------------------------------
    [INFO] Loading artfacts into URLClassLoader
    [INFO]  artifact: file:/Users/johnsmart/.m2/repository/com/oracle/ojdbc/11.2.0.2.0/ojdbc-11.2.0.2.0.jar
    [INFO]  artifact: file:/Users/johnsmart/.m2/repository/mysql/mysql-connector-java/5.1.13/mysql-connector-java-5.1.13.jar
    [INFO]  artifact: file:/Users/johnsmart/Projects/Clients/ubs/dbupdates/dbupdates/target/dbupdates-0.0.1-SNAPSHOT.jar
    [INFO]  artifact: file:/Users/johnsmart/Projects/Clients/ubs/dbupdates/dbupdates/target/test-classes
    [INFO] ------------------------------------------------------------------------
    [INFO] Settings----------------------------
    [INFO]    driver: com.mysql.jdbc.Driver
    [INFO]    url: jdbc:mysql://localhost/sseng
    [INFO]    username: root
    [INFO]    password: null
    [INFO]    use empty password: false
    [INFO]    properties file: null
    [INFO]    properties file will override? false
    [INFO]    prompt on non-local database? false
    [INFO]    clear checksums? false
    [INFO] ------------------------------------------------------------------------
    [INFO] Executing on Database: jdbc:mysql://localhost/sseng
    Nov 23, 2010 6:59:47 AM liquibase.logging.jvm.JavaUtilLogger info
    INFO: Generating Database Documentation
    Nov 23, 2010 6:59:47 AM liquibase.logging.jvm.JavaUtilLogger info
    INFO: Successfully acquired change log lock
    Nov 23, 2010 6:59:47 AM liquibase.logging.jvm.JavaUtilLogger info
    INFO: Successfully released change log lock
    Nov 23, 2010 6:59:47 AM liquibase.logging.jvm.JavaUtilLogger info
    INFO: Successfully released change log lock
    [INFO] ------------------------------------------------------------------------
    [ERROR] BUILD ERROR
    [INFO] ------------------------------------------------------------------------
    [INFO] Error setting up or running Liquibase: Cannot find parser that supports

[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error setting up or running Liquibase: Cannot find parser that supports
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
        at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error setting up or running Liquibase: Cannot find parser that supports
        at org.liquibase.maven.plugins.AbstractLiquibaseMojo.execute(AbstractLiquibaseMojo.java:292)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
        … 17 more
Caused by: liquibase.exception.LiquibaseException: Cannot find parser that supports
        at liquibase.parser.ChangeLogParserFactory.getParser(ChangeLogParserFactory.java:61)
        at liquibase.Liquibase.generateDocumentation(Liquibase.java:662)
        at liquibase.Liquibase.generateDocumentation(Liquibase.java:652)
        at org.liquibase.maven.plugins.LiquibaseDBDocMojo.performLiquibaseTask(LiquibaseDBDocMojo.java:32)
        at org.liquibase.maven.plugins.AbstractLiquibaseMojo.execute(AbstractLiquibaseMojo.java:288)
        … 19 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Tue Nov 23 06:59:47 GMT 2010
[INFO] Final Memory: 20M/81M
[INFO] ------------------------------------------------------------------------

The pom.xml configuration looks like this:

<build>
	<plugins>
		<plugin>
			<groupId>org.liquibase</groupId>
			<artifactId>liquibase-maven-plugin</artifactId>
			<version>2.0-rc6</version>
			<configuration>
				<changeLogFile>changelog/db.changelog-master.xml</changeLogFile>
				<verbose>true</verbose>
				<driver>com.mysql.jdbc.Driver</driver>
				<url>jdbc:mysql://localhost/test</url>
				<username>root</username>
				<password></password>
				<promptOnNonLocalDatabase>false</promptOnNonLocalDatabase>
				<logging>debug</logging>
			</configuration>
		</plugin>
	</plugins>
</build>

Any ideas?

(BTW, It works fine if I use the Ant tasks)

I think I found what the problem was: it wasn’t picking up your changelog setting correctly.  I committed a fix, it should be in the next release.  If you are able to do a build of it yourself and test it, that would be great, otherwise I’m hoping for the next release to be next week.

Nathan

I built it and tried it out - looks like that’s fixed it, thanks!