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

Extract Maven builder to a separate plugin

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      At least:

      • Move hudson.tasks.Maven, hudson.tasks._maven.*, and jenkins.mvn.* plus resources
      • hudson.model.Project implements hudson.tasks.Maven.ProjectWithMaven; Maven should rather have special logic for Project (perhaps)
      • Move tests
      • Invert dep from config-file-provider-plugin

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment - - edited

            Possible script for git filter-branch --tree-filter:

            #!/bin/bash
            set -e
            move() {
                mkdir -p $(dirname $2)
                git mv $1 $2
            }
            move core/src/main/java/hudson/tasks/Maven.java KEEP/src/main/java/hudson/tasks/Maven.java
            move core/src/main/java/hudson/tasks/_maven KEEP/src/main/java/hudson/tasks/_maven
            move core/src/main/java/jenkins/mvn KEEP/src/main/java/jenkins/mvn
            move core/src/main/resources/hudson/tasks/Maven KEEP/src/main/resources/hudson/tasks/Maven
            move core/src/main/resources/jenkins/mvn KEEP/src/main/resources/jenkins/mvn
            move test/src/test/java/hudson/tasks/MavenTest.java KEEP/src/test/java/hudson/tasks/MavenTest.java
            move core/src/test/java/hudson/tasks/_maven KEEP/src/test/java/hudson/tasks/_maven
            git ls-files -z | fgrep -v -z -Z KEEP | xargs -0 git rm -q
            git mv KEEP/* .
            rmdir KEEP
            # TODO for debugging:
            git st | egrep -i 'maven|mvn'
            git reset --hard HEAD
            
            Show
            jglick Jesse Glick added a comment - - edited Possible script for git filter-branch --tree-filter : #!/bin/bash set -e move() { mkdir -p $(dirname $2) git mv $1 $2 } move core/src/main/java/hudson/tasks/Maven.java KEEP/src/main/java/hudson/tasks/Maven.java move core/src/main/java/hudson/tasks/_maven KEEP/src/main/java/hudson/tasks/_maven move core/src/main/java/jenkins/mvn KEEP/src/main/java/jenkins/mvn move core/src/main/resources/hudson/tasks/Maven KEEP/src/main/resources/hudson/tasks/Maven move core/src/main/resources/jenkins/mvn KEEP/src/main/resources/jenkins/mvn move test/src/test/java/hudson/tasks/MavenTest.java KEEP/src/test/java/hudson/tasks/MavenTest.java move core/src/test/java/hudson/tasks/_maven KEEP/src/test/java/hudson/tasks/_maven git ls-files -z | fgrep -v -z -Z KEEP | xargs -0 git rm -q git mv KEEP/* . rmdir KEEP # TODO for debugging: git st | egrep -i 'maven|mvn' git reset --hard HEAD
            Hide
            cleclerc Cyrille Le Clerc added a comment -
            Show
            cleclerc Cyrille Le Clerc added a comment - In progress with https://github.com/jenkinsci/jenkins/pull/2352
            Hide
            alobato Alvaro Lobato added a comment -

            Created a PR 2352 for the first step of the split.

            Show
            alobato Alvaro Lobato added a comment - Created a PR 2352 for the first step of the split.
            Hide
            alobato Alvaro Lobato added a comment -

            Submitted changes with the extension point to allow MavenInstallation selection and created downstream PR-72 for Maven Plugin.

            Show
            alobato Alvaro Lobato added a comment - Submitted changes with the extension point to allow MavenInstallation selection and created downstream PR-72 for Maven Plugin.
            Hide
            jglick Jesse Glick added a comment -

            I think the whole hudson.tasks._maven package (and corresponding feature in pipeline-maven-plugin) would best be deprecated. With recent versions of Maven, it is better to use (for example)

            ansiColor('xterm') {
              withEnv(['MAVEN_OPTS=-Djansi.force=true']) { // MNG-6380
                sh 'mvn -B -Dstyle.color=always -ntp clean verify'
              }
            }
            

            which produces richer and better coloration than Jenkins ever did.

            Show
            jglick Jesse Glick added a comment - I think the whole hudson.tasks._maven package (and corresponding feature in pipeline-maven-plugin ) would best be deprecated. With recent versions of Maven, it is better to use (for example) ansiColor( 'xterm' ) { withEnv([ 'MAVEN_OPTS=-Djansi.force= true ' ]) { // MNG-6380 sh 'mvn -B -Dstyle.color=always -ntp clean verify' } } which produces richer and better coloration than Jenkins ever did.

              People

              Assignee:
              alobato Alvaro Lobato
              Reporter:
              jglick Jesse Glick
              Votes:
              5 Vote for this issue
              Watchers:
              16 Start watching this issue

                Dates

                Created:
                Updated: