gpt4 book ai didi

gradle - Vaadin Gradle插件:任务vaadinBuildFrontend失败,出现依赖性错误

转载 作者:行者123 更新时间:2023-12-03 05:05:01 25 4
gpt4 key购买 nike

我的应用基于包括Vaadin 14的Spring Boot 2.2.5。该项目是使用Vaadin Gradle Plugin 0.6.0与Gradle 5.6.4一起构建的

Jenkins构建管道因以下错误而失败:

Welcome to Gradle 5.6.4!

Here are the highlights of this release:
- Incremental Groovy compilation
- Groovy compile avoidance
- Test fixtures for Java projects
- Manage plugin versions via settings script

For more details see https://docs.gradle.org/5.6.4/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)
> Task :clean
> Task :nodeSetup
> Task :vaadinPrepareNode
> Task :compileJava
> Task :vaadinPrepareFrontend
> Task :processResources
> Task :classes

> Task :vaadinBuildFrontend FAILED
Command `/var/lib/jenkins/workspace/build-mokka-app/gradle/node/node /var/lib/jenkins/workspace/build-mokka-app/gradle/node/node_modules/npm/bin/npm-cli.js --no-update-notifier install` failed:

>>> Dependency ERROR. Check that all required dependencies are deployed in npm repositories.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':vaadinBuildFrontend'.
> com.vaadin.flow.server.ExecutionFailedException: Npm install has exited with non zero status. Some dependencies are not installed. Check npm command output

* 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.

这是我的文物...

build.gradle
plugins {
id 'org.springframework.boot' version '2.2.5.RELEASE'
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
id 'org.siouan.frontend' version '1.3.1'
id 'com.vaadin' version '0.6.0'
id 'java'
}

group = 'mygroup'
version = '1.4.0-rc.1'

sourceCompatibility = '1.8'
targetCompatibility = '1.8'

configurations {
compileOnly {
extendsFrom annotationProcessor
}
}

ext {
commonsLangVersion = '3.9'
vaadinVersion = '14.1.18'
}

repositories {
mavenCentral()
maven { url 'https://maven.vaadin.com/vaadin-addons' }
}

dependencyManagement {
imports {
mavenBom "com.vaadin:vaadin-bom:${vaadinVersion}"
}
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'com.vaadin:vaadin-spring-boot-starter'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
compile "org.apache.commons:commons-lang3:${commonsLangVersion}"
}

test {
useJUnitPlatform()
}

Jenkinsfile
pipeline {
agent any

triggers { pollSCM('H/5 * * * *') }

environment {
APP_NAME = 'MyApp'

// Gradle settings
GRADLE_DOCKER_IMAGE = 'gradle:5.6.4-jdk8'
GRADLE_DOCKER_ARGS = '-v ${HOME}/.m2:/maven/.m2'
GRADLE_DEPENDENCY_PATH = 'build/dependency'
}

stages {
stage('Compile') {
steps {
script {
docker.image(GRADLE_DOCKER_IMAGE).inside("${GRADLE_DOCKER_ARGS}") {
sh './gradlew clean vaadinPrepareNode build -Pvaadin.productionMode'
sh "mkdir -p ${GRADLE_DEPENDENCY_PATH} && (cd ${GRADLE_DEPENDENCY_PATH}; jar -xf ../libs/*.jar)"
}
}
}
}
}
}

最佳答案

谢谢,已经在https://github.com/vaadin/vaadin-gradle-plugin/issues/54上打开了一个错误报告;请让我们继续那里的讨论。

关于gradle - Vaadin Gradle插件:任务vaadinBuildFrontend失败,出现依赖性错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60785841/

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