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

Maven artifact fingerprints are computed and recorded twice

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: maven-plugin
    • Labels:
      None
    • Similar Issues:

      Description

      The artifacts which are produced by a maven job have their artifacts fingerprinted twice. Once in MavenFingerprinter and once in MavenArtifactArchiver . This adds unnecessary overhead to maven jobs.

      Proposal: as fingerprints are needed in the MavenArtifact records generated in the MavenArtifactArchiver, it probably doesn't make much sense to remove the fingerprinting from there. Instead, I'd propose to fingerprint all 'used' artifacts in the MavenFingerprinter and all 'produced' artifacts in the MavenArtifactArchiver

      *) Note that fingerprints are even generated in MavenArtifactArchiver if automatic artifact archiving is disabled

        Attachments

          Issue Links

            Activity

            kutzi kutzi created issue -
            Hide
            youri youri bonnaffe added a comment -

            I'm seeing a huge difference between a maven build using a freestyle job and maven job (taking twice the time). It seems that it might be related to fingerprints.
            I guess I could try to build the maven plugin locally with https://github.com/jenkinsci/jenkins/blob/master/maven-plugin/src/main/java/hudson/maven/reporters/MavenArtifactArchiver.java line 147 removed.

            Show
            youri youri bonnaffe added a comment - I'm seeing a huge difference between a maven build using a freestyle job and maven job (taking twice the time). It seems that it might be related to fingerprints. I guess I could try to build the maven plugin locally with https://github.com/jenkinsci/jenkins/blob/master/maven-plugin/src/main/java/hudson/maven/reporters/MavenArtifactArchiver.java line 147 removed.
            kutzi kutzi made changes -
            Field Original Value New Value
            Assignee kutzi [ kutzi ]
            Hide
            kutzi kutzi added a comment -

            Okay, I'll try to create a pull request based on my proposal.

            Show
            kutzi kutzi added a comment - Okay, I'll try to create a pull request based on my proposal.
            Hide
            youri youri bonnaffe added a comment -

            I've tried with the line mar.recordFingerprints(); commented but I see no difference in build time.
            From MavenFingerPrinter it seems that fingerprinting is required to keep track of dependencies so maybe it is necessary to launch others build when snapshot dependencies change or to use only build changed modules option.
            Note that the I use maven jobs with automatic artifact archiving disabled.

            Show
            youri youri bonnaffe added a comment - I've tried with the line mar.recordFingerprints(); commented but I see no difference in build time. From MavenFingerPrinter it seems that fingerprinting is required to keep track of dependencies so maybe it is necessary to launch others build when snapshot dependencies change or to use only build changed modules option. Note that the I use maven jobs with automatic artifact archiving disabled.
            Hide
            kutzi kutzi added a comment -

            There are other reasons why a Maven job might be slower than a freestyle job. You might want to try the Timestamper plugin to get a clue where the time is spent.

            Show
            kutzi kutzi added a comment - There are other reasons why a Maven job might be slower than a freestyle job. You might want to try the Timestamper plugin to get a clue where the time is spent.
            kutzi kutzi made changes -
            Link This issue is related to JENKINS-16301 [ JENKINS-16301 ]
            jglick Jesse Glick made changes -
            Link This issue is related to JENKINS-11333 [ JENKINS-11333 ]
            Hide
            jglick Jesse Glick added a comment -

            It looks like this was quietly fixed as part of the fix of JENKINS-20487.

            Show
            jglick Jesse Glick added a comment - It looks like this was quietly fixed as part of the fix of JENKINS-20487 .
            jglick Jesse Glick made changes -
            Link This issue duplicates JENKINS-20487 [ JENKINS-20487 ]
            jglick Jesse Glick made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/java/hudson/maven/reporters/MavenArtifact.java
            src/main/java/hudson/maven/reporters/MavenArtifactRecord.java
            http://jenkins-ci.org/commit/maven-plugin/2320cc985b27abab948fff971be5813ad2bca5f8
            Log:
            JENKINS-11814 JENKINS-20487 Cleaning up dead code now that MavenArtifactArchiver does not call recordFingerprints.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/hudson/maven/reporters/MavenArtifact.java src/main/java/hudson/maven/reporters/MavenArtifactRecord.java http://jenkins-ci.org/commit/maven-plugin/2320cc985b27abab948fff971be5813ad2bca5f8 Log: JENKINS-11814 JENKINS-20487 Cleaning up dead code now that MavenArtifactArchiver does not call recordFingerprints.
            ircbot Jenkins IRC Bot made changes -
            Component/s maven-plugin [ 16033 ]
            Component/s maven2 [ 15487 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 142057 ] JNJira + In-Review [ 189955 ]

              People

              • Assignee:
                kutzi kutzi
                Reporter:
                kutzi kutzi
              • Votes:
                2 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: