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

Make fingerprinting configurable in Maven projects

      Currently, in a Maven Project, fingerprints are generated for all build artifacts (created and used).

      In a freestyle project, you can manually select files to be fingerprinted using the Fingerprinter publisher.

      This needs to be possible for Maven Projects, too.

      Consider for example a Maven project that uses post-build steps to create additional artifacts. You can archive them (without them being fingerprinted), but you cannot choose to fingerprint them.

      Looking at hudson.tasks.Fingerprinter, I see no reason why this publisher should not be available for configuration.

      If you enter the publisher by hand into the config.xml of a job, it works (until you reconfig that job, of course), so this seems to be a display issue. One small drawback: two fingerprintActions are included.

      Tasks:

      • make Fingerprinter available for Maven projects
      • prevent Fingerprinter from always creating a new FingerprintAction (i.e. let it check for any existing FingerprintActions (like MavenFingerprinter does))

      the second part is trivial, I can create a pull request for that.

          [JENKINS-11333] Make fingerprinting configurable in Maven projects

          Andrew Bayer added a comment -

          Already is there.

          Andrew Bayer added a comment - Already is there.

          Beg to differ.

          Using a vanilla installation of jenkins 1.448

          Create a new freestyle job. In job configuration, you select "record fingerprints..." and "archive artifacts"

          Create a new Maven job. In job configuration, you can only select "archive artifacts", but not record fingerprints

          Stephan Pauxberger added a comment - Beg to differ. Using a vanilla installation of jenkins 1.448 Create a new freestyle job. In job configuration, you select "record fingerprints..." and "archive artifacts" Create a new Maven job. In job configuration, you can only select "archive artifacts", but not record fingerprints

          Screenshot of Publishers for freestyle and Maven projects

          Stephan Pauxberger added a comment - Screenshot of Publishers for freestyle and Maven projects

          Jesse Glick added a comment -

          I would like to broaden the scope of this a bit: you ought to be able to disable automatic fingerprinting for Maven projects, readding some manually configured fingerprints when required. The reason is that field data suggests that fingerprinting all consumed & produced artifacts can add a lot of overhead to the post-build phase, and it affects the more precious Jenkins master as well as the more disposable slave (since Fingerprint.save does disk I/O).

          Jesse Glick added a comment - I would like to broaden the scope of this a bit: you ought to be able to disable automatic fingerprinting for Maven projects, readding some manually configured fingerprints when required. The reason is that field data suggests that fingerprinting all consumed & produced artifacts can add a lot of overhead to the post-build phase, and it affects the more precious Jenkins master as well as the more disposable slave (since Fingerprint.save does disk I/O).

          Jesse Glick added a comment -

          The fix to Fingerprinter was already done in JENKINS-17606.

          Jesse Glick added a comment - The fix to Fingerprinter was already done in JENKINS-17606 .

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/java/hudson/maven/MavenModule.java
          src/main/java/hudson/maven/MavenModuleSet.java
          src/main/java/hudson/maven/reporters/MavenArtifactArchiver.java
          src/main/java/hudson/maven/reporters/MavenFingerprinter.java
          src/main/resources/hudson/maven/MavenModuleSet/configure-entries.jelly
          src/main/webapp/fingerprintingDisabled.html
          src/test/java/hudson/maven/MavenModuleSetTest.java
          http://jenkins-ci.org/commit/maven-plugin/33c52c897e893029631615cc5bebacd15d535454
          Log:
          [FIXED JENKINS-11333] Allow users to disable automatic fingerprinting, but add in explicit fingerprinting if desired.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/hudson/maven/MavenModule.java src/main/java/hudson/maven/MavenModuleSet.java src/main/java/hudson/maven/reporters/MavenArtifactArchiver.java src/main/java/hudson/maven/reporters/MavenFingerprinter.java src/main/resources/hudson/maven/MavenModuleSet/configure-entries.jelly src/main/webapp/fingerprintingDisabled.html src/test/java/hudson/maven/MavenModuleSetTest.java http://jenkins-ci.org/commit/maven-plugin/33c52c897e893029631615cc5bebacd15d535454 Log: [FIXED JENKINS-11333] Allow users to disable automatic fingerprinting, but add in explicit fingerprinting if desired.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/java/hudson/maven/MavenModule.java
          src/main/java/hudson/maven/MavenModuleSet.java
          src/main/java/hudson/maven/reporters/MavenArtifactArchiver.java
          src/main/java/hudson/maven/reporters/MavenFingerprinter.java
          src/main/resources/hudson/maven/MavenModuleSet/configure-entries.jelly
          src/main/webapp/fingerprintingDisabled.html
          src/test/java/hudson/maven/MavenModuleSetTest.java
          http://jenkins-ci.org/commit/maven-plugin/728878bed3c854dcc5c63aec1b7b12e3a133da51
          Log:
          [FIXED JENKINS-11333] Allow users to disable automatic fingerprinting, but add in explicit fingerprinting if desired.
          Conflicts:
          src/main/java/hudson/maven/MavenModuleSet.java
          src/main/resources/hudson/maven/MavenModuleSet/configure-entries.jelly

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/hudson/maven/MavenModule.java src/main/java/hudson/maven/MavenModuleSet.java src/main/java/hudson/maven/reporters/MavenArtifactArchiver.java src/main/java/hudson/maven/reporters/MavenFingerprinter.java src/main/resources/hudson/maven/MavenModuleSet/configure-entries.jelly src/main/webapp/fingerprintingDisabled.html src/test/java/hudson/maven/MavenModuleSetTest.java http://jenkins-ci.org/commit/maven-plugin/728878bed3c854dcc5c63aec1b7b12e3a133da51 Log: [FIXED JENKINS-11333] Allow users to disable automatic fingerprinting, but add in explicit fingerprinting if desired. Conflicts: src/main/java/hudson/maven/MavenModuleSet.java src/main/resources/hudson/maven/MavenModuleSet/configure-entries.jelly

          Joseph Benken added a comment -

          Does this address https://issues.jenkins-ci.org/browse/JENKINS-18615? Is there a target version for this enhancement?

          Joseph Benken added a comment - Does this address https://issues.jenkins-ci.org/browse/JENKINS-18615? Is there a target version for this enhancement?

          Jesse Glick added a comment -

          @benken_parasoft yes and it has been released.

          Jesse Glick added a comment - @benken_parasoft yes and it has been released.

            jglick Jesse Glick
            paux Stephan Pauxberger
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: