由于“无法找到bom-all.jar”,因此无法构建thorntail-examples / gradle-examples / jaxrs-cdi

时间:2019-01-17 04:27:24

标签: java gradle wildfly thorntail

从thorntail git-hub站点: https://github.com/thorntail/thorntail-examples/blob/master/gradle-examples/jaxrs-cdi/

我尝试构建此示例示例项目。但是,我不断收到此错误:

$ gradle build

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':thorntail-package'.
> Could not find bom-all.jar (io.thorntail:bom-all:2.3.0.Final).
  Searched in the following locations:
      file:/home/wsi/.m2/repository/io/thorntail/bom-all/2.3.0.Final/bom-all-2.3.0.Final.jar

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 6s
6 actionable tasks: 6 executed

我的系统是Ubuntu 18.04:

$ gradle --version

------------------------------------------------------------
Gradle 5.0
------------------------------------------------------------

Build time:   2018-11-26 11:48:43 UTC
Revision:     7fc6e5abf2fc5fe0824aec8a0f5462664dbcd987

Kotlin DSL:   1.0.4
Kotlin:       1.3.10
Groovy:       2.5.4
Ant:          Apache Ant(TM) version 1.9.13 compiled on July 10 2018
JVM:          10.0.2 (Oracle Corporation 10.0.2+13-Ubuntu-1ubuntu0.18.04.4)
OS:           Linux 4.15.0-43-generic amd64

请注意,使用VERSION_THORNTAIL = 2.3.0.Final或2.2.1Final会得出相同的结果

任何帮助将不胜感激,我想使用gradle来构建我的项目,但是如果我无法使它正常工作,那么我将不得不回到maven。我猜他们的build.gradle文件或thorntail插件中以及依赖项的配置方式中都存在错误。我想如果没有人知道答案,我将为此发出JIRA问题。

编辑:针对以下评论,我将添加更多信息: 首先使用Java 10:

12:45 wsi@ubuntu ~/dev/workspace-thorntail-examples/gradle-examples/jaxrs-cdi [master]: Up-to-date
$ java --version
openjdk 10.0.2 2018-07-17
OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4)
OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4, mixed mode)

12:45 wsi@ubuntu ~/dev/workspace-thorntail-examples/gradle-examples/jaxrs-cdi [master]: Up-to-date
$ ./gradlew clean build -DthorntailVersion=2.2.1.Final

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'example-gradle'.
> Could not resolve all dependencies for configuration ':classpath'.
   > Multiple build operations failed.
         Could not initialize class org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.PomReader
         Could not initialize class org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.PomReader
         Could not initialize class org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.PomReader
         Could not initialize class org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.PomReader

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s

使用Java 8可以构建,但是测试失败

$ java -version
openjdk version "1.8.0_191"
OpenJDK Runtime Environment (build 1.8.0_191-8u191-b12-0ubuntu0.18.04.1-b12)
OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)

12:47 wsi@ubuntu ~/dev/workspace-thorntail-examples/gradle-examples/jaxrs-cdi [master]: Up-to-date
$ ./gradlew clean build -DthorntailVersion=2.2.1.Final

> Task :test

org.wildfly.swarm.examples.gradle.ArqWarDeploymentTest > classMethod FAILED
    org.jboss.arquillian.container.spi.client.container.DeploymentException
        Caused by: org.jboss.shrinkwrap.resolver.api.NoResolvedResultException
            Caused by: org.eclipse.aether.resolution.DependencyResolutionException
                Caused by: org.eclipse.aether.collection.DependencyCollectionException
                    Caused by: org.eclipse.aether.resolution.ArtifactDescriptorException
                        Caused by: org.eclipse.aether.resolution.ArtifactResolutionException
                            Caused by: org.eclipse.aether.transfer.ArtifactTransferException
                                Caused by: org.apache.maven.wagon.authorization.AuthorizationException

org.wildfly.swarm.examples.gradle.ArqContainerTest > classMethod FAILED
    org.jboss.arquillian.container.spi.client.container.DeploymentException
        Caused by: org.jboss.shrinkwrap.resolver.api.NoResolvedResultException
            Caused by: org.eclipse.aether.resolution.DependencyResolutionException
                Caused by: org.eclipse.aether.collection.DependencyCollectionException
                    Caused by: org.eclipse.aether.resolution.ArtifactDescriptorException
                        Caused by: org.eclipse.aether.resolution.ArtifactResolutionException
                            Caused by: org.eclipse.aether.transfer.ArtifactTransferException
                                Caused by: org.apache.maven.wagon.authorization.AuthorizationException

2 tests completed, 2 failed

> Task :test FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':test'.
> There were failing tests. See the report at: file:///home/wsi/dev/workspace-thorntail-examples/gradle-examples/jaxrs-cdi/build/reports/tests/test/index.html

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 2m 51s
9 actionable tasks: 9 executed

编辑2:从 文件:///home/wsi/dev/workspace-thorntail-examples/gradle-examples/jaxrs-cdi/build/reports/tests/test/index.html 报告

堆栈跟踪很长,但这是2个测试失败的原因:

  1. org.wildfly.swarm.examples.gradle> ArqContainerTest

    Caused by: org.apache.maven.wagon.authorization.AuthorizationException: Access denied to: http://maven-server:8081/nexus/content/groups/releases/com/fasterxml/classmate/1.3.3/classmate-1.3.3.pom
    
  2. org.wildfly.swarm.examples.gradle> ArqWarDeploymentTest

    Caused by: org.apache.maven.wagon.authorization.AuthorizationException: Access denied to: http://maven-server:8081/nexus/content/groups/releases/io/thorntail/msc/2.2.1.Final/msc-2.2.1.Final.pom
    

0 个答案:

没有答案