嗨,我是 liquibase 的新手,我在编译后导入现有项目我得到这个构建失败,我无法理解原因和解决方案我试图理解代码但我真的发现问题要做它 。
这是运行后的结果mvn compile
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.squashtest.tm:squashtest-csp-distribution:pom:1.2.0.RELEASE
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: ${project.groupId}:org.squashtest.csp.core.log4j:jar -> duplicate declaration of version ${project.version} @ line 419, column 17
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: ${project.groupId}:org.squashtest.csp.core.jetty.start.osgi:jar -> duplicate declaration of version ${project.version} @ line 424, column 17
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: ${project.groupId}:org.squashtest.csp.core.service:jar -> duplicate declaration of version ${project.version} @ line 450, column 17
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: ${project.groupId}:squashtest-csp-launcher:jar -> duplicate declaration of version ${project.version} @ line 455, column 17
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: ${project.groupId}:org.squashtest.csp.tm.web:war -> duplicate declaration of version ${project.version} @ line 461, column 17
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: ${project.groupId}:org.squashtest.csp.tm.service:jar -> duplicate declaration of version ${project.version} @ line 467, column 17
[WARNING] 'profiles.profile[build-mysql].plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.codehaus.mojo:sql-maven-plugin @ line 682, column 15
[WARNING] 'profiles.profile[build-mysql].plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.liquibase:liquibase-maven-plugin @ line 724, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building squashtest-tm-distribution 1.2.0.RELEASE
[INFO] ------------------------------------------------------------------------
[WARNING] Failed to retrieve plugin descriptor for org.codehaus.izpack:izpack-maven-plugin:1.0-alpha-5: Plugin org.codehaus.izpack:izpack-maven-plugin:1.0-alpha-5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.codehaus.izpack:izpack-maven-plugin:jar:1.0-alpha-5
[INFO]
[INFO] --- liquibase-maven-plugin:2.0.1:update (default-cli) @ squashtest-csp-distribution ---
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2:12.500s
[INFO] Finished at: Fri Jul 13 10:25:08 GMT+01:00 2012
[INFO] Final Memory: 8M/19M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:2.0.1:update (default-cli) on project squashtest-csp-distribution: The driver has not been specified either as a parameter or in a properties file. -> [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
这是 pom.xml liquibase 部分:
<!-- We first run a full install against MySQL -->
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<configuration>
<skip>${mysql.distro.skip}</skip>
</configuration>
<executions>
<execution>
<id>generate-mysql-full-install-script</id>
<phase>process-resources</phase>
<goals>
<goal>updateSQL</goal>
</goals>
<configuration>
<dropFirst>true</dropFirst>
<changeLogFile>${master.changelog}</changeLogFile>
<driver>com.mysql.jdbc.Driver</driver>
<url>${liquibase.mysql.url}</url>
<username>${liquibase.mysql.username}</username>
<password>${liquibase.mysql.password}</password>
<migrationSqlOutputFile>${database.script.directory}/mysql-full-install-
version-${project.version}.sql</migrationSqlOutputFile>
</configuration>
</execution>
</executions>
</plugin>
<!-- We now run an incremental install against MySQL -->
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<configuration>
<skip>${mysql.distro.skip}</skip>
</configuration>
<executions>
<execution>
<id>generate-mysql-0.15.0-script</id>
<phase>prepare-package</phase>
<goals>
<goal>updateSQL</goal>
</goals>
<configuration>
<dropFirst>true</dropFirst>
<changeLogFile>${upgrade.0.15.0.changelog}</changeLogFile>
<driver>com.mysql.jdbc.Driver</driver>
<url>${liquibase.mysql.url}</url>
<username>${liquibase.mysql.username}</username>
<password>${liquibase.mysql.password}</password>
<migrationSqlOutputFile>${database.script.directory}/mysql-upgrade-
to-0.15.0.sql</migrationSqlOutputFile>
</configuration>
</execution>
<execution>
<id>generate-mysql-0.17.0-script</id>
<phase>prepare-package</phase>
<goals>
<goal>updateSQL</goal>
</goals>
<configuration>
<dropFirst>false</dropFirst>
<changeLogFile>${upgrade.0.17.0.changelog}</changeLogFile>
<driver>com.mysql.jdbc.Driver</driver>
<url>${liquibase.mysql.url}</url>
<username>${liquibase.mysql.username}</username>
<password>${liquibase.mysql.password}</password>
<migrationSqlOutputFile>${database.script.directory}/mysql-upgrade-
to-0.17.0.sql</migrationSqlOutputFile>
</configuration>
</execution>
<execution>
<id>generate-mysql-0.20.0-script</id>
<phase>prepare-package</phase>
<goals>
<goal>updateSQL</goal>
</goals>
<configuration>
<dropFirst>false</dropFirst>
<changeLogFile>${upgrade.0.20.0.changelog}</changeLogFile>
<driver>com.mysql.jdbc.Driver</driver>
<url>${liquibase.mysql.url}</url>
<username>${liquibase.mysql.username}</username>
<password>${liquibase.mysql.password}</password>
<migrationSqlOutputFile>${database.script.directory}/mysql-upgrade-
to-0.20.0.sql</migrationSqlOutputFile>
</configuration>
</execution>
<execution>
<id>generate-mysql-0.23.0-script</id>
<phase>prepare-package</phase>
<goals>
<goal>updateSQL</goal>
</goals>
<configuration>
<dropFirst>false</dropFirst>
<changeLogFile>${upgrade.0.23.0.changelog}</changeLogFile>
<driver>com.mysql.jdbc.Driver</driver>
<url>${liquibase.mysql.url}</url>
<username>${liquibase.mysql.username}</username>
<password>${liquibase.mysql.password}</password>
<migrationSqlOutputFile>${database.script.directory}/mysql-upgrade-
to-0.23.0.sql</migrationSqlOutputFile>
</configuration>
</execution>
<execution>
<id>generate-mysql-1.1.0-script</id>
<phase>prepare-package</phase>
<goals>
<goal>updateSQL</goal>
</goals>
<configuration>
<dropFirst>false</dropFirst>
<changeLogFile>${upgrade.1.1.0.changelog}</changeLogFile>
<driver>com.mysql.jdbc.Driver</driver>
<url>${liquibase.mysql.url}</url>
<username>${liquibase.mysql.username}</username>
<password>${liquibase.mysql.password}</password>
<migrationSqlOutputFile>${database.script.directory}/mysql-upgrade-
to-1.1.0.sql</migrationSqlOutputFile>
</configuration>
</execution>
<execution>
<id>generate-mysql-1.1.1-script</id>
<phase>prepare-package</phase>
<goals>
<goal>updateSQL</goal>
</goals>
<configuration>
<dropFirst>false</dropFirst>
<changeLogFile>${upgrade.1.1.1.changelog}</changeLogFile>
<driver>com.mysql.jdbc.Driver</driver>
<url>${liquibase.mysql.url}</url>
<username>${liquibase.mysql.username}</username>
<password>${liquibase.mysql.password}</password>
<migrationSqlOutputFile>${database.script.directory}/mysql-upgrade-
to-1.1.1.sql</migrationSqlOutputFile>
</configuration>
</execution>
<execution>
<id>generate-mysql-1.2.0-script</id>
<phase>prepare-package</phase>
<goals>
<goal>updateSQL</goal>
</goals>
<configuration>
<dropFirst>false</dropFirst>
<changeLogFile>${upgrade.1.2.0.changelog}</changeLogFile>
<driver>com.mysql.jdbc.Driver</driver>
<url>${liquibase.mysql.url}</url>
<username>${liquibase.mysql.username}</username>
<password>${liquibase.mysql.password}</password>
<migrationSqlOutputFile>${database.script.directory}/mysql-upgrade-
to-${squashTmVersion}.sql</migrationSqlOutputFile>
</configuration>
</execution>
</executions>
</plugin>