Welcome to the Linux Foundation Forum!

Maven repository in lab9

Hello,
When I try to build the maven project from the lab 9, i get the error attached in the image. Does anyone know how to solve this. I suppose that it try to use the default repository path that is 'var/jenkins_home/.m2/repository' but this does not exist. I don't know though where to change this configuration from since the jenkins is run inside a container.

If I am still asking this, I have another doubt. How can I push my changes from Jenkins to Github if the build is successful? If you remember in one of the labs, there was a pipeline in which an archive.jar was being created. How could I, for example push that to github?

Comments

  • jacqueminv
    jacqueminv Posts: 12

    Hi,

    Have you tried to replay the build and add the suggested -X to get more information?
    I'd say either a permission or diskspace issue just like that.

    HTH
    Valentin

  • ericegan
    ericegan Posts: 35
    1. There could be a configuration issue somewhere. Do you have the maven plugin installed? I'll run through lab and see if I can find any insight.
    2. In terms of accessing the .jar you can do so from a build's page. There will be a link to produced artifacts. Or, in this case, because it's a Java program that is using Maven, you can find the artifacts inside the Jenkins docker container like so:

    docker exec -it setup-jenkins-1 bash
    ls /var/jenkins_home/workspace/instavote_monopipe_master/worker/target/

    The main take away here though is that generally you don't ever care about accessing these artifacts directly. You only ever touch the code. You push the code after a small change. You do this often for Continuous Integration. Your CI/CD pipeline, in this case run by Jenkins, builds, tests, and deploys your code but will stop short of deploying if the build and testing fail. Issues aren't generally found in .jar files. Issues will be found in your code. Also keep in mind that this is very language dependent.

  • zacts
    zacts Posts: 40

    I'm getting the exact same error when trying to build lab9 right now.

  • zacts
    zacts Posts: 40
    edited October 7

    Any suggestions as how I might go about debugging this? I also tried adding clean test -e -X to the maven Build Goals and Options command and it's not giving me full debug output.

  • luisviveropena
    luisviveropena Posts: 1,249

    Hi,

    1.- I made a test case as shown in the Lab, and it worked for me, so I was unable to reproduce the issue.
    2.- Updated the new post here: https://forum.linuxfoundation.org/discussion/comment/41018#Comment_41018.
    3.- Check if you have enough free space in the system you are working on.
    4.- Check the Maven version. I'm using maven 3.9.8.

    Regards,
    Luis.

Categories

Upcoming Training