[英]How to use GitHub Repo using JitPack.io in Maven
I wants to use https://github.com/liquibase/liquibase version 3.5.0-SNAPSHOT 我想使用https://github.com/liquibase/liquibase版本3.5.0-SNAPSHOT
I have added the following in pom.xml 我在pom.xml中添加了以下内容
<dependency>
<groupId>liquibase</groupId>
<artifactId>liquibase-core</artifactId>
<version>3.5.0-SNAPSHOT</version>
</dependency>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
but got following error when compile: 但是编译时出现以下错误:
[ERROR] Failed to execute goal on project XYZ: Could not resolve dependencies for project com.XYZ:jar:0.0.1-SNAPSHOT: Failure to find org.liquibase:liquibase-core:jar:3.5.0-SNAPSHOT in https://github.com/liquibase/liquibase was cached in the local repository, resolution will not be reattempted until the update interval of liquibase-repository has elapsed or updates are forced -> [Help 1] [错误]无法在项目XYZ上执行目标:无法解析项目com.XYZ:jar:0.0.1-SNAPSHOT的依赖项:无法在https中找到org.liquibase:liquibase-core:jar:3.5.0-SNAPSHOT : //github.com/liquibase/liquibase已缓存在本地存储库中,直到经过liquibase-repository的更新间隔或强制执行更新后,解析才会重新尝试-> [帮助1]
There seems to be an issue with JitPack and downloading this repository. JitPack和下载此存储库似乎存在问题。 According to the maven modular example that JitPack provides, the dependency should be defined as follows:
根据JitPack提供的maven模块化示例 ,依赖关系应定义如下:
<dependency>
<groupId>com.github.User.Repo</groupId>
<artifactId>Module</artifactId>
<version>Commit/Tag</version>
</dependency>
The following should then work: 然后,以下应该工作:
<dependency>
<groupId>com.github.liquibase.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
<version>f7f3b8f60b</version>
</dependency>
But it also fails resolving the dependency: 但是它也无法解决依赖关系:
[ERROR] Failed to execute goal on project my-app: Could not resolve dependencies for project com.mycompany.app:my-app:jar:1.0-SNAPSHOT: Failure to find com.github.liquibase.liquibase:liquibase-core:jar:0885bc4 in https://jitpack.io was cached in the local repository, resolution will not be reattempted until the update interval of jitpack.io has elapsed or updates are forced -> [Help 1]
[错误]无法在项目my-app上执行目标:无法解析项目com.mycompany.app:my-app:jar:1.0-SNAPSHOT的依赖项:找不到com.github.liquibase.liquibase:liquibase-core: https://jitpack.io中的 jar:0885bc4已缓存在本地存储库中,直到jitpack.io的更新间隔到期或强制执行更新后,才会重新尝试解析-> [帮助1]
You can see that this is definitely an issue by just trying to use the liquibase parent repository (not just the liquibase-core module) as follows: 通过尝试使用liquibase父存储库(而不仅仅是liquibase-core模块),您可以看到这绝对是一个问题,如下所示:
<dependency>
<groupId>com.github.liquibase</groupId>
<artifactId>liquibase</artifactId>
<version>f7f3b8f60b</version>
</dependency>
Which also errors out. 哪也出错了。 According to JitPack's log for this commit, it looks like there is a compilation error with the source:
根据此提交的JitPack日志 ,看起来源出现编译错误:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project liquibase-core: Compilation failure
[错误]无法在项目liquibase-core上执行目标org.apache.maven.plugins:maven-compiler-plugin:3.1:compile(默认编译):编译失败
[ERROR] /home/jitpack/build/liquibase-core/src/main/java/liquibase/parser/core/formattedsql/FormattedSqlChangeLogParser.
[错误] / home / jitpack / build / liquibase-core / src / main / java / liquibase / parser / core / formattedsql / FormattedSqlChangeLogParser。 java:[213,209] ')' expected
java:[213,209]')'预期
It seems like the best route would be to file an issue with the JitPack folks and see if they can shed some light on it. 似乎最好的方法似乎是向JitPack人员提出问题 ,看看他们是否可以对此有所了解。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.