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

Maven artifact fingerprints are computed and recorded twice

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved (View Workflow)
    • Minor
    • Resolution: Fixed
    • maven-plugin
    • None

    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

            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.

            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 added a comment -

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

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

            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.

            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.
            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 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.
            jglick Jesse Glick added a comment -

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

            jglick Jesse Glick added a comment - It looks like this was quietly fixed as part of the fix of JENKINS-20487 .

            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.

            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.

            People

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

              Dates

                Created:
                Updated:
                Resolved: