gpt4 book ai didi

java - 未能在项目 hapi-fhir-jpaserver-starter 上执行目标 org.apache.maven.plugins :maven-war-plugin:3. 2.3:war (default-war)

转载 作者:行者123 更新时间:2023-12-04 19:08:08 30 4
gpt4 key购买 nike

因此,在 VPS Ubuntu 服务器上尝试使用 Maven 进行全新安装时出现此错误。
我已经安装了必要的元素来制作它,但仍然无济于事。

root@iHRS:~/hapi-fhir-jpaserver-starter# mvn clean install

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method

java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
[WARNING] The project ca.uhn.hapi.fhir:hapi-fhir-jpaserver-starter:war:5.1.0 uses prerequisites which is only intended for maven-plugin projects but not for non maven-plugin projects. For such purposes you should use the maven-enforcer-plugin. See https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html

[INFO]
[INFO] ------------< ca.uhn.hapi.fhir:hapi-fhir-jpaserver-starter >------------
[INFO] Building HAPI FHIR JPA Server - Starter Project 5.1.0
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.1.0:clean (default-clean) @ hapi-fhir-jpaserver-starter ---
[INFO] Deleting /root/hapi-fhir-jpaserver-starter/target
[INFO]

[INFO] --- maven-enforcer-plugin:3.0.0-M2:enforce (enforce-maven) @ hapi-fhir-jpaserver-starter ---
[INFO]

[INFO] --- jacoco-maven-plugin:0.8.5:prepare-agent (default-prepare-agent) @ hapi-fhir-jpaserver-starter ---

> [INFO] argLine set to
> -javaagent:/root/.m2/repository/org/jacoco/org.jacoco.agent/0.8.5/org.jacoco.agent-0.8.5-runtime.jar=destfile=/root/hapi-fhir-jpaserver-starter/target/jacoco.exec,excludes=ca/uhn/fhir/model/dstu2/**/*.class:ca/uhn/fhir/jpa/rp/r5/*.class:ca/uhn/fhir/jpa/rp/r4/*.class:ca/uhn/fhir/jpa/rp/dstu3/*.class:ca/uhn/fhir/jpa/rp/dstu2/*.class,dumponexit=true

[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ hapi-fhir-jpaserver-starter ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ hapi-fhir-jpaserver-starter ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 11 source files to /root/hapi-fhir-jpaserver-starter/target/classes
[WARNING] Unable to autodetect 'javac' path, using 'javac' from the environment.
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ hapi-fhir-jpaserver-starter ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /root/hapi-fhir-jpaserver-starter/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ hapi-fhir-jpaserver-starter ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 7 source files to /root/hapi-fhir-jpaserver-starter/target/test-classes
[WARNING] Unable to autodetect 'javac' path, using 'javac' from the environment.
[INFO]
[INFO] --- maven-surefire-plugin:3.0.0-M3:test (default-test) @ hapi-fhir-jpaserver-starter ---
[INFO]
[INFO] --- maven-war-plugin:3.2.3:war (default-war) @ hapi-fhir-jpaserver-starter ---
[INFO] Packaging webapp
[INFO] Assembling webapp [hapi-fhir-jpaserver-starter] in [/root/hapi-fhir-jpaserver-starter/target/hapi]
[INFO] Processing war project
[INFO] Copying webapp resources [/root/hapi-fhir-jpaserver-starter/src/main/webapp]
[INFO] Processing overlay [ id ca.uhn.hapi.fhir:hapi-fhir-testpage-overlay]
[INFO] Webapp assembled in [990 msecs]
[INFO] Building war: /root/hapi-fhir-jpaserver-starter/target/hapi.war
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:3.2.3:war (default-war) on project hapi-fhir-jpaserver-starter: Error assembling WAR: Problem creating war: Execution exception: Java heap space -> [Help 1]
所以我从昨天开始尝试设置 iHRS 请我需要帮助

最佳答案

问题在于这条日志消息(见最后一行!)

Error assembling WAR: Problem creating war: Execution exception: Java heap space


之前 通过 mvn clean install 触发构建,在同一 shell/终端中发出以下命令:
export MAVEN_OPTS="-Xmx2048m -XX:MaxPermSize=128m"
它将允许 Maven 在构建阶段使用更多 RAM - 这里最多 2048 MB。如果它不起作用,您可以进一步增加此值以查看构建是否通过。请记住,您的机器/工作站需要这么多可用的物理 RAM。否则,构建显然会:再次失败。

关于java - 未能在项目 hapi-fhir-jpaserver-starter 上执行目标 org.apache.maven.plugins :maven-war-plugin:3. 2.3:war (default-war),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63904387/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com