找不到Jhipster Prod构建失败以及Cloudfoundry错误

时间:2018-08-04 11:40:41

标签: java maven jhipster cloudfoundry yarnpkg

Jhipster产品概要文件构建失败,导致执行

时出现访问被拒绝的错误
  

纱线安装

它已在早期版本中使用开发人员配置文件生成了.war。通过子生成器将.war上传到cloudfoundry时,应用程序状态正在运行。但是,应用程序不可访问。

  

访问root时出错:

Sorry, an error has occurred.
Status: Not Found (Not Found)
Message: Not Found

Maven构建错误:

Microsoft Windows [Version 10.0.15063]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\codelab\a2z\dhulai>mvnw -Pprod -DskipTests
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Dhulai 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> spring-boot-maven-plugin:1.5.13.RELEASE:run (default-cli) > test-compile @ dhulai >>>
[INFO]
[INFO] --- maven-resources-plugin:3.0.1:copy-resources (default-resources) @ dhulai ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO] Copying 23 resources
[INFO]
[INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) @ dhulai ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO] Copying 23 resources
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0-M1:enforce (enforce-versions) @ dhulai ---
[INFO]
[INFO] --- maven-resources-plugin:3.0.1:copy-resources (docker-resources) @ dhulai ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- jacoco-maven-plugin:0.7.9:prepare-agent (pre-unit-tests) @ dhulai ---
[INFO] argLine set to -javaagent:C:\\Users\\patelri\\.m2\\repository\\org\\jacoco\\org.jacoco.agent\\0.7.9\\org.jacoco.agent-0.7.9-runtime.jar=destfile=C:\\codelab\\
a2z\\dhulai\\target\\test-results\\coverage\\jacoco\\jacoco.exec -Djava.security.egd=file:/dev/./urandom -Xmx256m
[INFO]
[INFO] --- git-commit-id-plugin:2.2.4:revision (default) @ dhulai ---
[INFO]
[INFO] --- spring-boot-maven-plugin:1.5.13.RELEASE:build-info (default) @ dhulai ---
[INFO]
[INFO] --- frontend-maven-plugin:1.6:yarn (yarn install) @ dhulai ---
[INFO] Running 'yarn install' in C:\codelab\a2z\dhulai
[ERROR] Access is denied.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.581 s
[INFO] Finished at: 2018-08-04T16:50:28+05:30
[INFO] Final Memory: 35M/422M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:yarn (yarn install) on project dhulai: Failed to run task: 'yarn install' failed. org.ap
ache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1]
[ERROR]

Jhipster的配置文件:

  

.yo-rc.json

{
  "generator-jhipster": {
    "promptValues": {
      "packageName": "com.np.dhulai",
      "nativeLanguage": "en"
    },
    "jhipsterVersion": "4.14.4",
    "baseName": "dhulai",
    "packageName": "com.np.dhulai",
    "packageFolder": "com/np/dhulai",
    "serverPort": "8080",
    "authenticationType": "jwt",
    "cacheProvider": "ehcache",
    "enableHibernateCache": true,
    "websocket": false,
    "databaseType": "sql",
    "devDatabaseType": "h2Disk",
    "prodDatabaseType": "postgresql",
    "searchEngine": false,
    "messageBroker": false,
    "serviceDiscoveryType": false,
    "buildTool": "maven",
    "enableSocialSignIn": false,
    "enableSwaggerCodegen": false,
    "jwtSecretKey": "DELETED",
    "clientFramework": "angularX",
    "useSass": false,
    "clientPackageManager": "yarn",
    "applicationType": "monolith",
    "testFrameworks": [],
    "jhiPrefix": "jhi",
    "enableTranslation": true,
    "nativeLanguage": "en",
    "languages": [
      "en",
      "nl"
    ]
  }
}

其他详细信息 操作系统:Windows 10 Enterprise 64 bit enter image description here

[更新1] 更新了pom文件以使其具有详细标志,并建议它显示堆栈跟踪

   [INFO] --- frontend-maven-plugin:1.6:install-node-and-yarn (install node and yarn) @ dhulai ---
[INFO] Installing node version v10.4.0
[INFO] Copying node binary from C:\Users\patelri\.m2\repository\com\github\eirslett\node\10.4.0\node-10.4.0-win-x64.exe to C:\codelab\a2z\dhulai\node\node.exe
[INFO] Installed node locally.
[INFO] Installing Yarn version v1.9.4
[INFO] Downloading https://github.com/yarnpkg/yarn/releases/download/v1.9.4/yarn-v1.9.4.tar.gz to C:\Users\patelri\.m2\repository\com\github\eirslett\yarn\1.9.4\yarn
-1.9.4.tar.gz
[INFO] No proxies configured
[INFO] No proxy was configured, downloading directly
Aug 04, 2018 6:21:53 PM org.apache.http.client.protocol.ResponseProcessCookies processCookies
WARNING: Invalid cookie header: "Set-Cookie: has_recent_activity=1; path=/; expires=Sat, 04 Aug 2018 13:51:55 -0000". Invalid 'expires' attribute: Sat, 04 Aug 2018 1
3:51:55 -0000
Aug 04, 2018 6:21:53 PM org.apache.http.client.protocol.ResponseProcessCookies processCookies
WARNING: Invalid cookie header: "Set-Cookie: logged_in=no; domain=.github.com; path=/; expires=Wed, 04 Aug 2038 12:51:55 -0000; secure; HttpOnly". Invalid 'expires'
attribute: Wed, 04 Aug 2038 12:51:55 -0000
[INFO] Unpacking C:\Users\patelri\.m2\repository\com\github\eirslett\yarn\1.9.4\yarn-1.9.4.tar.gz into C:\codelab\a2z\dhulai\node\yarn
[INFO] Installed Yarn locally.
[INFO] 
[INFO] --- frontend-maven-plugin:1.6:yarn (webpack build dev) @ dhulai ---
[INFO] yarn not inheriting proxy config from Maven
[INFO] Running 'yarn run webpack:build' in C:\codelab\a2z\dhulai
[ERROR] Access is denied.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 49.223 s
[INFO] Finished at: 2018-08-04T18:22:33+05:30
[INFO] Final Memory: 39M/330M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:yarn (webpack build dev) on project dhulai: Failed to run task: 'yarn run webpack:build'
 failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1]

但是,如果我独立执行yarn run webpack:build,则访问权限没有问题

1 个答案:

答案 0 :(得分:0)

我也遇到了同样的问题。尝试将node.versionyarn.version都更改为pom.xml中的较低版本(可能是生成项目时计算机上安装的版本)。我不是您的问题所在,但这对我有用。希望会有所帮助