具有不同行为的同一个行家 [英] Same maven with different behaviours

查看:523
本文介绍了具有不同行为的同一个行家的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用VagrantJenkins创建我的new virtual machine,以确保构建/项目的质量.该项目还需要使用RPostgres.一切在我的本地计算机上都可以正常运行,但是现在我正在尝试使环境一致,可重现.当我尝试在新的虚拟机中运行mvn clean package时,maven中断了test,该test在本地计算机中正常运行,但在新的虚拟机中不是.

I'm trying to use Vagrant to create my new virtual machine with Jenkins to ensure the quality of my builds/projects. The project needs to use R and Postgres as well. Everything works fine in my local machine, but now I'm trying to make my environment consistent, reproducible. When I try to run mvn clean package in my new virtual machine, maven breaks in a test which runs normally in my local machine but not in my new vm.

我已经检查了JavaMavenPostgresR(及其packages)的版本,所有内容都是相同的.但是,我的maven项目在此测试中失败.

I have checked the versions for Java, Maven, Postgres, R (and its packages) everything is the same. But still, my maven project breaks in this test.

我在这里想念什么?任何想法,建议都会受到赞赏,因为我现在还没有想法,到目前为止,我已经尝试了所有方法. (在这个问题上超过12个小时.)

What am I missing here ? Any idea, suggestion is well appreciated because I'm out of ideas right now, I tried everything so far. (more than 12 hours on this issue..)

编辑

Java-主机

valter@eniac:document-engine$ java -version
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)

Java-虚拟机

vagrant@vagrant-ubuntu-trusty-64:~/$ java -version
java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)

Maven-主机

valter@eniac:document-engine$ mvn -version
Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.8.0_66, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.19.0-31-generic", arch: "amd64", family: "unix"

Maven-虚拟机

vagrant@vagrant-ubuntu-trusty-64:~$ mvn -version
Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.8.0_65, vendor: Oracle Corporation
Java home: /opt/jdk/jdk1.8.0_65/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.13.0-66-generic", arch: "amd64", family: "unix"
vagrant@vagrant-ubuntu-trusty-64:~$

Postgresql-主机

Postgresql - Host Machine

valter@eniac:document-engine$ psql --version
psql (PostgreSQL) 9.3.10

Postgresql-虚拟机

Postgresql - Virtual Machine

vagrant@vagrant-ubuntu-trusty-64:~$ psql --version
psql (PostgreSQL) 9.3.10

R-主机

> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.3 LTS

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=de_DE.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=de_DE.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=de_DE.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] PerformanceAnalytics_1.4.3541 xts_0.9-7                    
 [3] zoo_1.7-12                    HiddenMarkov_1.8-4           
 [5] gplots_2.17.0                 gmodels_2.16.2               
 [7] gtools_3.5.0                  lattice_0.20-33              
 [9] MASS_7.3-44                   tseries_0.10-34              
[11] fGarch_3010.82                fBasics_3011.87              
[13] timeSeries_3012.99            timeDate_3012.100            
[15] Rserve_1.7-3                 

loaded via a namespace (and not attached):
[1] quadprog_1.5-5     bitops_1.0-6       grid_3.2.2         KernSmooth_2.23-15
[5] gdata_2.17.0       caTools_1.17.1

R-虚拟机

> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.3 LTS

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=de_DE.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=de_DE.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=de_DE.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] PerformanceAnalytics_1.4.3541 xts_0.9-7                    
 [3] zoo_1.7-12                    HiddenMarkov_1.8-4           
 [5] gplots_2.17.0                 gmodels_2.16.2               
 [7] gtools_3.5.0                  lattice_0.20-33              
 [9] MASS_7.3-44                   tseries_0.10-34              
[11] fGarch_3010.82                fBasics_3011.87              
[13] timeSeries_3012.99            timeDate_3012.100            
[15] Rserve_1.7-3                 

loaded via a namespace (and not attached):
[1] quadprog_1.5-5     bitops_1.0-6       grid_3.2.2         KernSmooth_2.23-15
[5] gdata_2.17.0       caTools_1.17.1

推荐答案

只是让您知道我的问题发生了什么. 问题出在 TIMEZONE .我不知道为什么,但是R或我们用于计算的某些程序包要求时区相同.

Just to let you know what happened with my issue. The problem was the TIMEZONE. I don't know exactly why, but R or some of the packages that we use for our calculations requires the timezone to be the same.

我位于德国(时区CET为 +1 UTC )并且我将虚拟机设置为使用UTC,因此出现了问题.噢,伙计,我真的很高兴解决这个问题(为此连续工作了三天!),但是现在一切都很好!非常感谢我的同事@Ralf的提示!

I'm located in Germany (timezone CET which is +1 UTC) and I was setting my virtual machine to use UTC and thus the problem. Oh man, I'm really glad to solve this issue (3 days straight working on this!) but now everything is fine! A huge thank you to my colleague @Ralf for the tip!

其他相关问题: 1 2 3 . 我希望这可以帮助别人! :)

Other issue related:1, 2, 3. I hope this helps someone! :)

这篇关于具有不同行为的同一个行家的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆