我有一个Gradle Java项目,我正在使用JSF和PrimeFaces。
为了更改它的主题,我在build.gradle
文件中添加了所需的依赖项,其中最重要的部分配置如下:
apply plugin: 'war'
apply plugin: 'eclipse-wtp'
sourceCompatibility = 1.8
version = '1.0'
jar {
manifest {
attributes 'Implementation-Title': 'Arch Project',
'Implementation-Version': version
}
}
repositories {
mavenCentral()
jcenter()
maven { url 'https://repository.primefaces.org' }
maven { url 'https://repository.jboss.org/nexus/content/groups/public' }
}
configurations {
provided
}
sourceSets {
main.compileClasspath += configurations.provided
test.compileClasspath += configurations.provided
test.runtimeClasspath += configurations.provided
}
dependencies {
/* Cryptography API for BCrypt algorithm. */
compile 'de.svenkubiak:jBCrypt:0.4'
/* Primefaces. */
compile 'org.primefaces:primefaces:5.3'
/* Primefaces pepper grinder theme. */
compile 'org.primefaces.themes:pepper-grinder:1.0.10'
... another few dependencies
}
但是,当我在控制台上运行gradle build
时,我收到以下错误:
C:\Users\bruno.gasparotto\git\archproject\archproject>gradle build
:compileJava
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all dependencies for configuration ':compile'.
> Could not resolve org.primefaces.themes:pepper-grinder:1.0.10.
Required by:
:archproject:1.0
> Could not HEAD 'https://repository.primefaces.org/org/primefaces/themes/pepper-grinder/1.0.10/pepper-grinder-1.0.10.pom'.
> peer not authenticated
到目前为止我尝试过但没有工作的内容:
pepper-grinder
更改为all-themes
。 https
文件中的PrimeFaces repo配置中用http
替换了build.gradle
。此外,重要的是要提及:
https://repository.primefaces.org/org/primefaces/themes/pepper-grinder/1.0.10/pepper-grinder-1.0.10.pom
。 pepper-grinder
依赖项,它就可以正常运行。有什么想法吗? 谢谢你的到来。