Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-55022

(windows10+jenkins 2.153) can build project with warnings, but (centos 7+jenkins 2.153) build failed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • maven-plugin
    • windows 10 professional+ jenkins 2.153
      CentOS Linux release 7.3.1611 (Core) + jenkins 2.153

      Env A: 

      1. windows 10 professional + jenkins 2.153; 
      2.   ".\mvn -v" shows: 
        Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-25T02:41:47+08:00)
        Maven home: C:\Jenkins\tools\hudson.tasks.Maven_MavenInstallation\maven\bin\..
        Java version: 1.8.0_191, vendor: Oracle Corporation, runtime: C:\Program Files (x86)\Java\jre1.8.0_191
        Default locale: zh_CN, platform encoding: GBK
        OS name: "windows 10", version: "10.0", arch: "x86", family: "windows"
      3. jenkins Location: C:\Jenkins

      Env B: 

      1. CentOS: CentOS Linux release 7.3.1611 (Core) 
      2. mvn -v
        Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-25T02:41:47+08:00)
        Maven home: /usr/local/maven
        Java version: 1.8.0_191, vendor: Oracle Corporation, runtime: /usr/java/jdk1.8.0_191-amd64/jre
        Default locale: en_US, platform encoding: UTF-8
        OS name: "linux", version: "3.10.0-514.16.1.el7.x86_64", arch: "amd64", family: "unix"
      3. jenkins locations: /home/tomcat/.jenkins/

      Steps: 

      1. in both Envs, Build a maven project, all the configurations of them are same: such as Git URL, Root Pom, Goals and options,
      2. the windows build successfully with warnings, but Linux build failed:

       

      Logs: 

           1. Windows : 
      C:\Jenkins\workspace\eHospital5-parent 中
      > C:\Program Files\Git\bin\git.exe rev-parse --is-inside-work-tree # timeout=10
      Fetching changes from the remote Git repository
      > C:\Program Files\Git\bin\git.exe config remote.origin.url ssh://git@witon.us:2022/witon_git_ehospital5_server.git # timeout=10
      Fetching upstream changes from ssh://git@witon.us:2022/witon_git_ehospital5_server.git
      > C:\Program Files\Git\bin\git.exe --version # timeout=10
      using GIT_SSH to set credentials
      > C:\Program Files\Git\bin\git.exe fetch --tags --progress ssh://git@witon.us:2022/witon_git_ehospital5_server.git +refs/heads/:refs/remotes/origin/
      > C:\Program Files\Git\bin\git.exe rev-parse "refs/remotes/origin/master^{commit}" # timeout=10
      > C:\Program Files\Git\bin\git.exe rev-parse "refs/remotes/origin/origin/master^{commit}" # timeout=10
      Checking out Revision bf510999d76d631f386aa447b7b5926994e24a56 (refs/remotes/origin/master)
      > C:\Program Files\Git\bin\git.exe config core.sparsecheckout # timeout=10
      > C:\Program Files\Git\bin\git.exe checkout -f bf510999d76d631f386aa447b7b5926994e24a56
      Commit message: "Merge branch 'inpatient'"
      > C:\Program Files\Git\bin\git.exe rev-list --no-walk 01519bbf6908f2faba85dfdfda297c01652dd930 # timeout=10
      Parsing POMs
      Established TCP socket on 62936
      [parent] $ C:\Jenkins\tools\hudson.model.JDK\java/bin/java -cp C:\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven35-agent-1.12.jar;C:\Jenkins\tools\hudson.tasks.Maven_MavenInstallation\maven\boot\plexus-classworlds-2.5.2.jar;C:\Jenkins\tools\hudson.tasks.Maven_MavenInstallation\maven/conf/logging jenkins.maven3.agent.Maven35Main C:\Jenkins\tools\hudson.tasks.Maven_MavenInstallation\maven C:\Jenkins\war\WEB-INF\lib\remoting-3.27.jar C:\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven35-interceptor-1.12.jar C:\Jenkins\plugins\maven-plugin\WEB-INF\lib\maven3-interceptor-commons-1.12.jar 62936
      <===[JENKINS REMOTING CAPACITY]===>channel started
      Executing Maven: -B -f C:\Jenkins\workspace\eHospital5-parent\eHospital5\parent\pom.xml clean package
      [INFO] Scanning for projects...[WARNING] [WARNING] Some problems were encountered while building the effective model for com.witontek.ehospital5:core:jar:5.0.0[WARNING] 'groupId' contains an expression but should be a constant. @ ${project.groupId}:${project.artifactId}:${project.version}, C:\Jenkins\workspace\eHospital5-parent\eHospital5\core\pom.xml, line 16, column 11[WARNING] 'artifactId' contains an expression but should be a constant. @ ${project.groupId}:${project.artifactId}:${project.version}, C:\Jenkins\workspace\eHospital5-parent\eHospital5\core\pom.xml, line 17, column 17[WARNING] 'version' contains an expression but should be a constant. @ ${project.groupId}:${project.artifactId}:${project.version}, C:\Jenkins\workspace\eHospital5-parent\eHospital5\core\pom.xml, line 18, column 14[WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.[WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.[WARNING] [INFO] ------------------------------------------------------------------------
      [INFO] Reactor Build Order:
      [INFO]
      [INFO] parent [pom]
      [INFO] core [jar]
      [INFO]
      [INFO] ------------------< com.witontek.ehospital5:parent >------------------
      [INFO] Building parent 5.0.0 [1/2]
      [INFO] -------------------------------[ pom ]--------------------------------
      [INFO]
      [INFO]

            • maven-clean-plugin:3.0.0:clean (default-clean) @ parent ---*
              [INFO]
              [INFO] -------------------< com.witontek.ehospital5:core >-------------------
              [INFO] Building core 5.0.0 [2/2]
              [INFO] -------------------------------[ jar ]--------------------------------
              [INFO]
              [INFO]
            • maven-clean-plugin:3.0.0:clean (default-clean) @ core ---*
              [INFO] Deleting C:\Jenkins\workspace\eHospital5-parent\eHospital5\core\target
              [INFO]
              [INFO]
            • maven-resources-plugin:3.0.2:resources (default-resources) @ core ---*
              [INFO] Using 'UTF-8' encoding to copy filtered resources.
              [INFO] skip non existing resourceDirectory C:\Jenkins\workspace\eHospital5-parent\eHospital5\core\src\main\resources
              [INFO] skip non existing resourceDirectory C:\Jenkins\workspace\eHospital5-parent\eHospital5\core\src\main\resources
              [INFO]
              [INFO]
            • maven-compiler-plugin:3.7.0:compile (default-compile) @ core ---*
              [INFO] Changes detected - recompiling the module!
              [INFO] Compiling 26 source files to C:\Jenkins\workspace\eHospital5-parent\eHospital5\core\target\classes
              [INFO]
              [INFO]
            • maven-resources-plugin:3.0.2:testResources (default-testResources) @ core ---*
              [INFO] Using 'UTF-8' encoding to copy filtered resources.
              [INFO] skip non existing resourceDirectory C:\Jenkins\workspace\eHospital5-parent\eHospital5\core\src\test\resources
              [INFO]
              [INFO]
            • maven-compiler-plugin:3.7.0:testCompile (default-testCompile) @ core ---*
              [INFO] No sources to compile
              [INFO]
              [INFO]
            • maven-surefire-plugin:2.21.0:test (default-test) @ core ---*
              [INFO] No tests to run.
              [JENKINS] Recording test results[WARNING] Attempt to (de-)serialize anonymous class hudson.maven.reporters.BuildInfoRecorder$1; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/[INFO]
              [INFO]
            • maven-jar-plugin:2.6:jar (default-jar) @ core ---*
              [INFO] Building jar: C:\Jenkins\workspace\eHospital5-parent\eHospital5\core\target\core-5.0.0.jar
              [INFO] ------------------------------------------------------------------------
              [INFO] Reactor Summary for parent 5.0.0:
              [INFO]
              [INFO] parent ............................................. SUCCESS [ 0.874 s]
              [INFO] core ............................................... SUCCESS [ 8.009 s]
              [INFO] ------------------------------------------------------------------------
              [INFO] BUILD SUCCESS
              [INFO] ------------------------------------------------------------------------
              [INFO] Total time: 9.703 s
              [INFO] Finished at: 2018-12-04T15:46:45+08:00
              [INFO] ------------------------------------------------------------------------
              Waiting for Jenkins to finish collecting data
              [JENKINS] Archiving C:\Jenkins\workspace\eHospital5-parent\eHospital5\core\pom.xml to com.witontek.ehospital5/core/5.0.0/core-5.0.0.pom
              [JENKINS] Archiving C:\Jenkins\workspace\eHospital5-parent\eHospital5\core\target\core-5.0.0.jar to com.witontek.ehospital5/core/5.0.0/core-5.0.0.jar
              [JENKINS] Archiving C:\Jenkins\workspace\eHospital5-parent\eHospital5\parent\pom.xml to com.witontek.ehospital5/parent/5.0.0/parent-5.0.0.pom
              channel stopped
              Finished: SUCCESS
            • 2. Linux log: 
              Started by user
              yangping
              Building in workspace /home/tomcat/.jenkins/workspace/eHospital5-parent
              > git rev-parse --is-inside-work-tree # timeout=10
              Fetching changes from the remote Git repository
              > git config remote.origin.url ssh://git@witon.us:2022/witon_git_ehospital5_server.git # timeout=10
              Fetching upstream changes from ssh://git@witon.us:2022/witon_git_ehospital5_server.git
              > git --version # timeout=10
              using GIT_SSH to set credentials
              > git fetch --tags --progress ssh://git@witon.us:2022/witon_git_ehospital5_server.git +refs/heads/:refs/remotes/origin/
              > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
              > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
              Checking out Revision bf510999d76d631f386aa447b7b5926994e24a56 (refs/remotes/origin/master)
              > git config core.sparsecheckout # timeout=10
              > git checkout -f bf510999d76d631f386aa447b7b5926994e24a56
              Commit message: "Merge branch 'inpatient'"
              > git rev-list --no-walk bf510999d76d631f386aa447b7b5926994e24a56 # timeout=10
              Parsing POMs
              ERROR: Failed to parse POMs
              org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
              [WARNING] 'groupId' contains an expression but should be a constant. @ line 16, column 11
              [WARNING] 'artifactId' contains an expression but should be a constant. @ line 17, column 17
              [WARNING] 'version' contains an expression but should be a constant. @ line 18, column 14
              [FATAL] Non-resolvable parent POM: Failure to find com.witontek.ehospital5:parent:pom:5.0.0 in
              http://repo.maven.apache.org/maven2
              was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at no local POM @ line 7, column 10

      at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:364)
      at hudson.maven.MavenEmbedder.buildProjects(MavenEmbedder.java:361)
      at hudson.maven.MavenEmbedder.readProjects(MavenEmbedder.java:331)
      at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1328)
      at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1125)
      at hudson.FilePath.act(FilePath.java:1076)
      at hudson.FilePath.act(FilePath.java:1059)
      at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.parsePoms(MavenModuleSetBuild.java:986)
      at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:691)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
      at hudson.model.Run.execute(Run.java:1810)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543)
      at hudson.model.ResourceController.execute(ResourceController.java:97)
      at hudson.model.Executor.run(Executor.java:429)
      Finished: FAILURE
       

      4. More Info: 

      A. I attached POM.xml below:

      B. I googled and follow different ways trying to solve the issue, like clean ./m2/repository, 

      C. the pom was coded by dev, and he insist that the pom is OK, since he can compile in his eclipse + maven 3.3.3;  and also can be build in windows +jenkins.

      D. all the jenkins 'config.xml' and maven 'setting.xml' are not changed

      E. any needed info please feel free to add comments.

        1. [Linux]settings.xml
          10 kB
        2. [windows10]settings.xml
          10 kB
        3. pom.xml
          4 kB

            Unassigned Unassigned
            pyoung p young
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: