[英]Error when running liquibase-maven-plugin install
I am trying to run liquibase-maven-plugin install but I am getting the following error我正在尝试运行 liquibase-maven-plugin install 但我收到以下错误
[ERROR] Failed to execute goal on project liquibase-maven-plugin: Could not resolve dependencies for project org.liquibase:liquibase-maven-plugin:maven-plugin:4.3.2-local-SNAPSHOT: The following artifacts could not be resolved: org.liquibase:liquibase-core:jar:4.3.2-local-SNAPSHOT, org.liquibase:liquibase-core:jar:tests:4.3.2-local-SNAPSHOT: Could not find artifact org.liquibase:liquibase-core:jar:4.3.2-local-SNAPSHOT -> [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/DependencyResolutionException
Also when I try liquibase-maven-plugin compile I get this error另外,当我尝试 liquibase-maven-plugin compile 时,我收到此错误
[WARNING] The POM for org.liquibase:liquibase-core:jar:4.3.2-local-SNAPSHOT is missing, no dependency information available
[WARNING] The POM for org.liquibase:liquibase-core:jar:tests:4.3.2-local-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.302 s
[INFO] Finished at: 2021-03-26T14:43:32Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project liquibase-maven-plugin: Could not resolve dependencies for project org.liquibase:liquibase-maven-plugin:maven-plugin:4.3.2-local-SNAPSHOT: Could not find artifact org.liquibase:liquibase-core:jar:4.3.2-local-SNAPSHOT -> [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/DependencyResolutionException
Process finished with exit code 1
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-base-module</artifactId>
<version>${liquibase.version}</version>
<relativePath>../base-module.pom.xml</relativePath>
</parent>
<artifactId>liquibase-maven-plugin</artifactId>
<packaging>maven-plugin</packaging>
<description>A Maven plugin wraps up some of the functionality of Liquibase</description>
<properties>
<targetMavenVersion>3.3.9</targetMavenVersion>
</properties>
<dependencies>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>${targetMavenVersion}</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>${targetMavenVersion}</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>${targetMavenVersion}</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-compat</artifactId>
<version>${targetMavenVersion}</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-testing</groupId>
<artifactId>maven-plugin-testing-harness</artifactId>
<version>3.3.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-verifier</artifactId>
<version>1.6</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<author>false</author>
<doctitle>Liquibase Maven Plugin ${project.version} API</doctitle>
<quiet>true</quiet>
<doclint>none</doclint>
<encoding>UTF-8</encoding>
<jarOutputDirectory>${project.basedir}/target</jarOutputDirectory>
</configuration>
<executions>
<execution>
<id>jar-javadoc</id>
<goals>
<goal>jar</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<id>generated-helpmojo</id>
<goals>
<goal>helpmojo</goal>
</goals>
</execution>
</executions>
<configuration>
<mojoDependencies>
<param>org.liquibase:liquibase-maven-plugin</param>
</mojoDependencies>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.1.0</version>
<configuration>
<updatePomFile>true</updatePomFile>
<outputDirectory>${project.build.directory}/flattened-pom</outputDirectory>
<flattenedPomFilename>release.pom.xml</flattenedPomFilename>
<pomElements>
<profiles>remove</profiles>
<organization/>
<issueManagement/>
</pomElements>
<flattenMode>ossrh</flattenMode>
</configuration>
<executions>
<execution>
<id>flatten</id>
<phase>process-resources</phase>
<goals>
<goal>flatten</goal>
</goals>
</execution>
<execution>
<id>flatten.clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<!-- Converts the generated flattened-pom into a cleaner version for maven distribution -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
<version>1.0.2</version>
<executions>
<execution>
<id>transform-deploy-pom</id>
<phase>process-resources</phase>
<goals>
<goal>transform</goal>
</goals>
</execution>
</executions>
<configuration>
<forceCreation>true</forceCreation>
<transformationSets>
<transformationSet>
<dir>${project.build.directory}/flattened-pom</dir>
<includes>release.pom.xml</includes>
<outputDir>${project.build.directory}</outputDir>
<stylesheet>${project.basedir}/src/main/maven/liquibase-deployment-pom.xslt</stylesheet>
</transformationSet>
</transformationSets>
</configuration>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<configuration>
<artifactId>${project.artifactId}</artifactId>
<file>${project.build.directory}/${project.artifactId}-${version}.jar</file>
<sources>${project.build.directory}/${project.artifactId}-${version}-sources.jar</sources>
<javadoc>${project.build.directory}/${project.artifactId}-${version}-javadoc.jar</javadoc>
<pomFile>${project.build.directory}/release.pom.xml</pomFile>
</configuration>
<executions>
<execution>
<id>custom-install</id>
<phase>install</phase>
<goals>
<goal>install-file</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.snyk</groupId>
<artifactId>snyk-maven-plugin</artifactId>
<configuration>
<skip>false</skip>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>2.6</version>
</plugin>
</plugins>
</reporting>
<profiles>
<profile>
<id>gpg-sign</id>
<activation>
<property>
<name>env.GPG_PASSPHRASE</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<configuration>
<passphrase>${env.GPG_PASSPHRASE}</passphrase>
<gpgArguments>
<arg>--batch</arg>
<arg>--no-tty</arg>
<!-- This is necessary for gpg to not try to use the pinentry programs -->
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
<skip>false</skip>
<repositoryId>${deploy.repositoryId}</repositoryId>
<artifactId>${project.artifactId}</artifactId>
<version>${liquibase.version}</version>
<url>${deploy.url}</url>
<file>${project.build.directory}/${project.artifactId}-${liquibase.version}.jar</file>
<sources>${project.build.directory}/${project.artifactId}-${version}-sources.jar</sources>
<javadoc>${project.build.directory}/${project.artifactId}-${version}-javadoc.jar</javadoc>
<pomFile>${project.build.directory}/release.pom.xml</pomFile>
</configuration>
<executions>
<execution>
<id>custom-deploy</id>
<phase>deploy</phase>
<goals>
<goal>sign-and-deploy-file</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Since this is liquibase source code shouldn't the files already be there?由于这是 liquibase 源代码,文件不应该已经存在吗? Also even though I didn't change anything in the source code, IntelliJ says that the pom file as errors(could this be a problem in the source code?) What's wrong with it?此外,即使我没有更改源代码中的任何内容,IntelliJ 说 pom 文件是错误的(这可能是源代码中的问题吗?)它有什么问题?
Can you add this block into pom.xml你能把这个块添加到 pom.xml
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>4.3.2</version>
</dependency>
and run command as shown below并运行命令,如下所示
> mvn clean install
finally, you should click reload project via maven tab最后,您应该通过 maven 选项卡单击重新加载项目
The version of the liquibase the Maven is complaining about is 4.3.2-local-SNAPSHOT
. Maven 抱怨的 liquibase 版本是4.3.2-local-SNAPSHOT
。 -SNAPSHOT
part here is suggesting that you are trying to use a version of the liquibase which is not released. -SNAPSHOT
部分暗示您正在尝试使用未发布的 liquibase 版本。 Therefore you have to run the local build for the missing modules org.liquibase:liquibase-core
.因此,您必须为缺少的模块org.liquibase:liquibase-core
运行本地构建。
Another approach would be to change the version of the parent to the released version, for example:另一种方法是将父版本更改为已发布版本,例如:
<parent>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-base-module</artifactId>
<version>4.3.2</version>
<relativePath>../base-module.pom.xml</relativePath>
</parent>
In this case, your local liquibase-maven-plugin
depends on the released version of the liquibase-base-module
and liquibase-core
, which are resolved from the public repositories.在这种情况下,您的本地liquibase-maven-plugin
取决于liquibase-base-module
和liquibase-core
的发布版本,它们是从公共存储库中解析的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.