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

CWP 1.6 throws error if pom.xml is used for plugins and casc for configuration

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      Custom WAR Packager 1.7

      Description

      It is a regression after https://github.com/jenkinsci/custom-war-packager/commit/ce66be7b8a6236171ab8e7ffa900f4a15a603742 , because "jar" dependencies always take the "core" path now and lead to noop in all other cases

       

      % make clean build run   
      rm -rf tmp
      java \
          -jar ../../custom-war-packager-cli/target/custom-war-packager-cli-1.6-jar-with-dependencies.jar \
          -configPath packager-config.yml -version 256.0-test
      Picked up _JAVA_OPTIONS: -Dhttp.proxyHost=proxy.mms-dresden.de -Dhttp.proxyPort=8080 -Dhttps.proxyHost=proxy.mms-dresden.de -Dhttps.proxyPort=8080
      Exception in thread "main" java.io.IOException: CasC section is declared, but CasC plugin is not declared in the plugins list
      	at io.jenkins.tools.warpackager.lib.impl.Builder.verifyConfig(Builder.java:66)
      	at io.jenkins.tools.warpackager.lib.impl.Builder.build(Builder.java:73)
      	at io.jenkins.tools.warpackager.cli.Main.main(Main.java:56)
      make: *** [Makefile:15: tmp/output/target/jenkins-casc-demo-256.0-test.war] Error 1
      
      

       

      I used the the effective pom from the jcasc plugin.

      my test code can be found here https://github.com/Xaseron/custom-war-packager/tree/bugreport/demo/casc

        Attachments

          Issue Links

            Activity

            oleg_nenashev Oleg Nenashev created issue -
            oleg_nenashev Oleg Nenashev made changes -
            Field Original Value New Value
            Epic Link JENKINS-54342 [ 194995 ]
            oleg_nenashev Oleg Nenashev made changes -
            Link This issue is related to JENKINS-54340 [ JENKINS-54340 ]
            oleg_nenashev Oleg Nenashev made changes -
            Description {code:java}
            % make clean build run
            rm -rf tmp
            java \
                -jar ../../custom-war-packager-cli/target/custom-war-packager-cli-1.4-SNAPSHOT-jar-with-dependencies.jar \
                -configPath packager-config.yml -version 256.0-test
            Picked up _JAVA_OPTIONS: -Dhttp.proxyHost=proxy.mms-dresden.de -Dhttp.proxyPort=8080 -Dhttps.proxyHost=proxy.mms-dresden.de -Dhttps.proxyPort=8080
            Exception in thread "main" java.io.IOException: CasC section is declared, but CasC plugin is not declared in the plugins list
            at io.jenkins.tools.warpackager.lib.impl.Builder.verifyConfig(Builder.java:66)
            at io.jenkins.tools.warpackager.lib.impl.Builder.build(Builder.java:73)
            at io.jenkins.tools.warpackager.cli.Main.main(Main.java:56)
            make: *** [Makefile:15: tmp/output/target/jenkins-casc-demo-256.0-test.war] Error 1

            {code}
             

            I used the the effective pom from the jcasc plugin.

            my test code can be found here https://github.com/Xaseron/custom-war-packager/tree/bugreport/demo/casc
            It is a regression after [https://github.com/jenkinsci/custom-war-packager/commit/ce66be7b8a6236171ab8e7ffa900f4a15a603742] , because "jar" dependencies always take the "core" path now and lead to noop in all other cases

             
            {code:java}

            % make clean build run
            rm -rf tmp
            java \
                -jar ../../custom-war-packager-cli/target/custom-war-packager-cli-1.6-jar-with-dependencies.jar \
                -configPath packager-config.yml -version 256.0-test
            Picked up _JAVA_OPTIONS: -Dhttp.proxyHost=proxy.mms-dresden.de -Dhttp.proxyPort=8080 -Dhttps.proxyHost=proxy.mms-dresden.de -Dhttps.proxyPort=8080
            Exception in thread "main" java.io.IOException: CasC section is declared, but CasC plugin is not declared in the plugins list
            at io.jenkins.tools.warpackager.lib.impl.Builder.verifyConfig(Builder.java:66)
            at io.jenkins.tools.warpackager.lib.impl.Builder.build(Builder.java:73)
            at io.jenkins.tools.warpackager.cli.Main.main(Main.java:56)
            make: *** [Makefile:15: tmp/output/target/jenkins-casc-demo-256.0-test.war] Error 1

            {code}
             

            I used the the effective pom from the jcasc plugin.

            my test code can be found here [https://github.com/Xaseron/custom-war-packager/tree/bugreport/demo/casc]
            oleg_nenashev Oleg Nenashev made changes -
            Labels regression
            oleg_nenashev Oleg Nenashev made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            oleg_nenashev Oleg Nenashev made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            oleg_nenashev Oleg Nenashev made changes -
            Remote Link This issue links to "https://github.com/jenkinsci/custom-war-packager/pull/99 (Web Link)" [ 23003 ]
            oleg_nenashev Oleg Nenashev made changes -
            Labels regression jcasc-compatibility regression
            batmat Baptiste Mathus made changes -
            Labels jcasc-compatibility regression jcasc-compatibility regression triaged
            oleg_nenashev Oleg Nenashev made changes -
            Released As Custom WAR Packager 1.7
            Resolution Fixed [ 1 ]
            Status In Review [ 10005 ] Resolved [ 5 ]

              People

              Assignee:
              oleg_nenashev Oleg Nenashev
              Reporter:
              oleg_nenashev Oleg Nenashev
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: