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

Vaadin Gradle插件:任务vaadinBuildFrontend失败,出现依赖项错误,gradle,vaadin,vaadin14,Gradle,Vaadin,Vaadin14,我的应用程序基于SpringBoot2.2.5,包括Vaadin14。本项目采用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 - Manag

我的应用程序基于SpringBoot2.2.5,包括Vaadin14。本项目采用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.
这是我的手工艺品

格雷德尔先生

詹金斯档案


谢谢,错误报告已在打开;请让我们继续讨论

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()
}
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)"
                    }
                }
            }
        }
    }
}