• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Differences in build on Jenkins?

 
Ranch Hand
Posts: 119
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I configure Jenkins to build a project from git, i'm using maven:

Warning: JAVA_HOME environment variable is not set.
Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T08:57:37-03:00)
Maven home: /opt/maven
Java version: 1.7.0_95, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.95.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.32-573.el6.x86_64", arch: "amd64", family: "unix"

However, the project build is incomplete:




In a terminal the build occurred correct:



In both case no error occurs and a build is finished with sucess.

I don't know exactly, why the differences are happening.
 
Rancher
Posts: 904
22
Netbeans IDE Oracle MySQL Database Tomcat Server C++ Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fix this warning and see if it makes any difference.


Warning: JAVA_HOME environment variable is not set.


Always start with the complaints and work into the more obscure.
 
Edson Cezar
Ranch Hand
Posts: 119
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did, but still not working



Thanks a lot.
 
Les Morgan
Rancher
Posts: 904
22
Netbeans IDE Oracle MySQL Database Tomcat Server C++ Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are welcome.

Now you need to go into each product and check the internal paths and see if they point to the same, clean up your work area and make sure you do not have old class files or source in any of either of the products' paths.

BTW: that includes clearning out old build files and any temporary space used by either program.

Edson Cezar wrote:Thanks a lot.

 
Edson Cezar
Ranch Hand
Posts: 119
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is as if It wasn't doing a pull from GIT repository, when I update a file, there are no changes in Jenkins source in workspace.
 
Les Morgan
Rancher
Posts: 904
22
Netbeans IDE Oracle MySQL Database Tomcat Server C++ Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have the ability to do the same with any other project? If so, try and see if it is actually pulling form the repository. Things do break from time to time.

Edson Cezar wrote:It is as if It wasn't doing a pull from GIT repository, when I update a file, there are no changes in Jenkins source in workspace.

 
author & internet detective
Posts: 40212
816
Eclipse IDE VI Editor Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you try clicking "wipe out workspace" to force a refresh on the next build?
 
Edson Cezar
Ranch Hand
Posts: 119
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I checked that the git plugin in Jenkins does not did a check out from the lasted version, then I navigate to a folder in my OS and use a pull git "pull origin branch", I checked that there are many differences, however for some reason It stopped work:



Here the log in jenkins:

 
Edson Cezar
Ranch Hand
Posts: 119
2
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was making two mistakes:

1 - At the first time I was not especifying the correct branch

2 - For some reason, that I don't know exactly, the first workspce that I had created, the pull was not working, then I deleted my workspace and recreated it.

Then it's worked fine for me.

Thanks for all.
 
Jeanne Boyarsky
author & internet detective
Posts: 40212
816
Eclipse IDE VI Editor Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Edson,
Great to hear. Have a cow for sharing the answer!

I've seen Jenkins "get stuck" after a bad build. (hence the wipe out workspace suggestion). It's like the Jenkins equivalent of "reboot the computer" .
 
Edson Cezar
Ranch Hand
Posts: 119
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Jeanne Boyarsky !
 
Replace the word "snake" with "danger noodle" in all tiny ads.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic