- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个带有前端项目模块的 Maven 项目,我用 eirslett:frontend-maven-plugin 打包。它在本地运行良好,但在 gitlab.com 上构建失败。
我用这个 .gitlab-ci.yml 启动构建:
image: maven:3.3.9-jdk-8-onbuild
build:
script: "mvn clean install -B -X"
还有这个 pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>fr.nev.oms</groupId>
<artifactId>oms-frontend</artifactId>
<packaging>jar</packaging>
<parent>
<groupId>fr.nev.oms</groupId>
<artifactId>myproject</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<build>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.3</version>
<configuration>
<!--<configuration>-->
<nodeVersion>v4.4.7</nodeVersion>
<npmVersion>3.10.5</npmVersion>
<!--</configuration>-->
<environmentVariables>
<NODE_ENV>production</NODE_ENV>
<API_URL></API_URL>
<APP_VERSION></APP_VERSION>
</environmentVariables>
</configuration>
<executions>
<execution>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
</execution>
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>install</arguments>
</configuration>
</execution>
<execution>
<id>npm run build</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>run build</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
在 gitlab.com 上,我有这个痕迹:
[DEBUG] Configuring mojo com.github.eirslett:frontend-maven-plugin:1.3:install-node-and-npm from plugin realm ClassRealm[plugin>com.github.eirslett:frontend-maven-plugin:1.3, parent: sun.misc.Launcher$AppClassLoader@677327b6]
[DEBUG] Configuring mojo 'com.github.eirslett:frontend-maven-plugin:1.3:install-node-and-npm' with basic configurator -->
[DEBUG] (f) environmentVariables = {API_URL=null, APP_VERSION=null, NODE_ENV=production}
[DEBUG] (f) nodeDownloadRoot = https://nodejs.org/dist/
[DEBUG] (f) nodeVersion = v4.4.7
[DEBUG] (f) npmDownloadRoot = http://registry.npmjs.org/npm/-/
[DEBUG] (f) npmVersion = 3.10.5
[DEBUG] (f) project = MavenProject: fr.nev.oms:oms-frontend:1.0.0-SNAPSHOT @ /builds/nieven/on-my-shelves/oms-frontend/pom.xml
[DEBUG] (f) repositorySystemSession = org.eclipse.aether.DefaultRepositorySystemSession@a10c1b5
[DEBUG] (f) session = org.apache.maven.execution.MavenSession@644abb8f
[DEBUG] (f) skip = false
[DEBUG] (f) skipTests = false
[DEBUG] (f) workingDirectory = /builds/nieven/on-my-shelves/oms-frontend
[DEBUG] (f) execution = com.github.eirslett:frontend-maven-plugin:1.3:install-node-and-npm {execution: install node and npm}
[DEBUG] -- end configuration --
[INFO] Installing node version v4.4.7
[DEBUG] Creating install directory /builds/nieven/on-my-shelves/oms-frontend/node
[DEBUG] Creating temporary directory /builds/nieven/on-my-shelves/oms-frontend/node/tmp
[INFO] Downloading https://nodejs.org/dist/v4.4.7/node-v4.4.7-linux-x64.tar.gz to /root/.m2/repository/com/github/eirslett/node/4.4.7/node-4.4.7-linux-x64.tar.gz
[INFO] No proxies configured
[INFO] No proxy was configured, downloading directly
[INFO] Unpacking /root/.m2/repository/com/github/eirslett/node/4.4.7/node-4.4.7-linux-x64.tar.gz into /builds/nieven/on-my-shelves/oms-frontend/node/tmp
[INFO] Copying node binary from /builds/nieven/on-my-shelves/oms-frontend/node/tmp/node-v4.4.7-linux-x64/bin/node to /builds/nieven/on-my-shelves/oms-frontend/node/node
[DEBUG] Deleting temporary directory /builds/nieven/on-my-shelves/oms-frontend/node/tmp
[INFO] Installed node locally.
[INFO] Installing npm version 3.10.5
[INFO] Downloading http://registry.npmjs.org/npm/-/npm-3.10.5.tgz to /root/.m2/repository/com/github/eirslett/npm/3.10.5/npm-3.10.5.tar.gz
[INFO] No proxies configured
[INFO] No proxy was configured, downloading directly
[INFO] Unpacking /root/.m2/repository/com/github/eirslett/npm/3.10.5/npm-3.10.5.tar.gz into /builds/nieven/on-my-shelves/oms-frontend/node/node_modules
[INFO] Installed npm locally.
[INFO]
[INFO] --- frontend-maven-plugin:1.3:npm (npm install) @ oms-frontend ---
[DEBUG] Configuring mojo com.github.eirslett:frontend-maven-plugin:1.3:npm from plugin realm ClassRealm[plugin>com.github.eirslett:frontend-maven-plugin:1.3, parent: sun.misc.Launcher$AppClassLoader@677327b6]
[DEBUG] Configuring mojo 'com.github.eirslett:frontend-maven-plugin:1.3:npm' with basic configurator -->
[DEBUG] (f) arguments = install
[DEBUG] (f) environmentVariables = {API_URL=null, APP_VERSION=null, NODE_ENV=production}
[DEBUG] (f) npmInheritsProxyConfigFromMaven = true
[DEBUG] (f) project = MavenProject: fr.nev.oms:oms-frontend:1.0.0-SNAPSHOT @ /builds/nieven/on-my-shelves/oms-frontend/pom.xml
[DEBUG] (f) repositorySystemSession = org.eclipse.aether.DefaultRepositorySystemSession@a10c1b5
[DEBUG] (f) session = org.apache.maven.execution.MavenSession@644abb8f
[DEBUG] (f) skip = false
[DEBUG] (f) skipTests = false
[DEBUG] (f) workingDirectory = /builds/nieven/on-my-shelves/oms-frontend
[DEBUG] (f) execution = com.github.eirslett:frontend-maven-plugin:1.3:npm {execution: npm install}
[DEBUG] -- end configuration --
[INFO] Running 'npm install' in /builds/nieven/on-my-shelves/oms-frontend
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] myproject .......................................... SUCCESS [ 3.446 s]
[INFO] oms-frontend ....................................... FAILURE [ 8.628 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.254 s
[INFO] Finished at: 2016-12-11T12:14:19+00:00
[INFO] Final Memory: 14M/197M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.3:npm (npm install) on project oms-frontend: Execution npm install of goal com.github.eirslett:frontend-maven-plugin:1.3:npm failed. NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.3:npm (npm install) on project oms-frontend: Execution npm install of goal com.github.eirslett:frontend-maven-plugin:1.3:npm failed.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution npm install of goal com.github.eirslett:frontend-maven-plugin:1.3:npm failed.
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 20 more
Caused by: java.lang.NullPointerException
at java.lang.ProcessEnvironment.validateValue(ProcessEnvironment.java:120)
at java.lang.ProcessEnvironment.access$400(ProcessEnvironment.java:61)
at java.lang.ProcessEnvironment$Value.valueOf(ProcessEnvironment.java:203)
at java.lang.ProcessEnvironment$StringEnvironment.put(ProcessEnvironment.java:243)
at java.lang.ProcessEnvironment$StringEnvironment.put(ProcessEnvironment.java:221)
at java.util.AbstractMap.putAll(AbstractMap.java:281)
at com.github.eirslett.maven.plugins.frontend.lib.ProcessExecutor.createProcessBuilder(ProcessExecutor.java:103)
at com.github.eirslett.maven.plugins.frontend.lib.ProcessExecutor.<init>(ProcessExecutor.java:37)
at com.github.eirslett.maven.plugins.frontend.lib.NodeExecutor.<init>(NodeExecutor.java:20)
at com.github.eirslett.maven.plugins.frontend.lib.NodeTaskExecutor.execute(NodeTaskExecutor.java:58)
at com.github.eirslett.maven.plugins.frontend.mojo.NpmMojo.execute(NpmMojo.java:62)
at com.github.eirslett.maven.plugins.frontend.mojo.AbstractFrontendMojo.execute(AbstractFrontendMojo.java:89)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
... 21 more
[ERROR]
你对这个问题的解决方案有什么想法吗?
最佳答案
我遇到了类似的问题(构建在 win 中传递并在 linux 上使用此 NullPointer 失败)并将 frontend-maven-plugin
更新到最新版本(在我的情况下为 1.4)有所帮助。
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.4</version>
关于java - 使用 eirslett :frontend-maven-plugin 在 gitlab.com 上运行 maven build,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41086494/
我有一些关于 Gitlab Server 和 Gitlab Runner 的问题。 必须安装 GitLab Runner 才能执行 CI/CD 部署吗? 必须为 GitLab Runner 安装 Gi
我正在docker上运行gitlab/gitlab-ce容器。然后,在其中,我想通过提供docker作为运行器来运行gitlab-runner服务。而我运行的每个命令(例如docker ps,dock
刚刚在全新的高性能服务器上安装了全新的 6.8 Gitlab。 在考虑忘记我的存储库历史记录(评论、问题等...)之前,有人知道一种将存储库数据从 Gitlab 服务器导出到另一个 Gitlab 服务
我读了这篇比较 https://about.gitlab.com/pricing/self-managed/feature-comparison/在 Gitlab 上,很多事情还不清楚。我想问一下在某
我的配置文件: external_url "http://192.168.3.23" # note the use of a dotted ip gitlab_rails['gitlab_email
GitLab 支持多种 Push Options .有什么方法可以在 Web 用户界面或其他方式中检查管道或作业中使用了哪些推送选项?特别是,哪些 ci.variable 推送选项与作业或管道相关联?
所以,我试图在子目录上安装 gitlab。许多在线文章都表明现在可以这样做。 我安装了 omnibus-gitlab,但它似乎不包含使 gitlab 在 application.rb 等子目录中运行所
我当前的设置是我有一个安装了 gitlab (gitlabVM) 的 Ubuntu VM。 Gitlab 通过 8888 端口在 nginx 上运行 我的路由器配置如下: 外部 4322 -> git
我最近通过 Gitlab 更新了,但是备份文件是旧版本,新版本不兼容。所以我想将 Gitlab 回滚到以前的版本。怎么做? 最佳答案 GitLab 升级过程应该升级数据库(并且其他文件应该兼容)。 但
我在不同的网络上有两个单独的 git-lab 实例。我可以为他们每个人使用相同的运行者吗?假设,两个 git-lab 实例都可以访问带有运行器的服务器。是否可以为我的两个 git-lab 实例使用一个
我刚刚将我们的存储库从 github 转换为内部 gitlab。我首先获得了一个裸本地存储库,并且已经能够将一个新的 master 引入 gitlab。 在我的本地存储库中, git tag 显示了我
我看过这个:`git clone project2` in gitlab-ci.yml?以及一堆类似答案的类似帖子,暗示应该使用 Git 子模块。 如果不讨论 Git 中的子模块是否运行良好的争论,就
谁能帮我在 git lab 中自动生成发行说明。有什么方法可以执行此操作。 请让我知道。 谢谢 最佳答案 您可以使用 API 列出里程碑中的所有问题,请参阅 https://docs.gitlab.c
GitLab为与特定项目合作的“团队成员”提供项目访问级别“ guest ”,“报告者”,“开发者”和“大师”。 “主人”和“客人”是不言自明的,但是其他人对我的范围和粒度并不十分清楚。这些级别之间有
我已经在 CentOS 6.6 上安装了 Gitlab Omnibus gitlab-7.4.3_omnibus.5.1.0.ci-1.el6.x86_64.rpm。我创建了一些项目并且运行良好,但我
我想知道在 2GB 内存和 2 个处理核心的情况下,GitLab 中允许的存储库和用户数量是否有上限。 最佳答案 这主要在GitLab requirements中指定。文档(如 CPU section
我很长一段时间都是 Bitbucket 的重度用户,但由于 GL 拥有先进的强大功能,我转向了 GitLab。 但是 Bitbucket 有一个令人惊叹的功能,我在 GitLab 中找不到……“下载”
在 GitLab 中,“聊天”选项卡始终显示没有事件用户: 如何启用它? 最佳答案 几年前,Gitlab 收购了一家公司,该公司生产 Slack 替代聊天系统,名为 Mattermost。您的 Git
在我的项目设置中我看到: 可用于任何项目的公共(public)部署 key (15) Rewind CFMM Ansible Deployment LRM Puppet Test gitlab-run
当我尝试创建 new project 时在 GitLab使用模板我提供了三个选项 * Ruby on Rails * Spring * NodeJSExpress 除了现有模板之外,是否可以添加自定义
我是一名优秀的程序员,十分优秀!