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

Cannot run tests in IntelliJ IDEA with plugin parent POM 2.30

      Specifically seems to be maven-hpi-plugin 2.0 that's causing this, with the JENKINS-24064 fix. Now we get an error like

      java.lang.AssertionError: jenkins.war is not in the classpath. If you are running this from the core workspace, run 'mvn install' to create the war image in war/target/jenkins
      

      whenever trying to run tests. jglick says this is due to Intellij not honoring https://github.com/jenkinsci/maven-hpi-plugin/blob/137e435d0770f78edbbd2ed54d91809b7e7be5aa/src/main/resources/META-INF/plexus/components.xml#L134, so we need to figure out how to, like, get it to honor that.

          [JENKINS-45245] Cannot run tests in IntelliJ IDEA with plugin parent POM 2.30

          Jesse Glick added a comment -

          And no, reverting is not actually simple at all. Working around the problem for IDEA is likely to be significantly more straightforward and less risky.

          Jesse Glick added a comment - And no, reverting is not actually simple at all. Working around the problem for IDEA is likely to be significantly more straightforward and less risky.

          Andrew Bayer added a comment -

          How is reverting not simple? Serious question. It seems awfully trivial to me.

          Andrew Bayer added a comment - How is reverting not simple? Serious question. It seems awfully trivial to me.

          Andrew Bayer added a comment -

          Also, system scope doesn't work either.

          Andrew Bayer added a comment - Also, system scope doesn't work either.

          Andrew Bayer added a comment -

          and fwiw, I feel pretty strongly that requiring any manual hacks to settings.xml or Intellij settings in order to run unit tests for a Jenkins plugin isn't an acceptable solution. If a new dev finds that they can't run unit tests for Jenkins plugins in Intellij, but can for, like, every other Java project, we're at best creating friction/pain for them as they google to find out how to make it work, and at worst, we discourage them from running unit tests at all. That's goofy when reverting really does appear to be absolutely trivial.

          Andrew Bayer added a comment - and fwiw, I feel pretty strongly that requiring any manual hacks to settings.xml or Intellij settings in order to run unit tests for a Jenkins plugin isn't an acceptable solution. If a new dev finds that they can't run unit tests for Jenkins plugins in Intellij, but can for, like, every other Java project, we're at best creating friction/pain for them as they google to find out how to make it work, and at worst, we discourage them from running unit tests at all. That's goofy when reverting really does appear to be absolutely trivial.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/java/org/jvnet/hudson/test/WarExploder.java
          http://jenkins-ci.org/commit/jenkins-test-harness/4c9b50065ab49870293680cd47802c56de86f4f2
          Log:
          JENKINS-45245 Work around failure of IDEA to add jenkins-war.war to the test CP.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/org/jvnet/hudson/test/WarExploder.java http://jenkins-ci.org/commit/jenkins-test-harness/4c9b50065ab49870293680cd47802c56de86f4f2 Log: JENKINS-45245 Work around failure of IDEA to add jenkins-war.war to the test CP.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/java/org/jvnet/hudson/test/WarExploder.java
          http://jenkins-ci.org/commit/jenkins-test-harness/b45ae9bb02999e82d14dd16f95c1b8fd2b277343
          Log:
          Merge pull request #73 from jglick/IDEA-is-broken-JENKINS-45245

          JENKINS-45245 Work around failure of IDEA to add jenkins-war.war to the test CP

          Compare: https://github.com/jenkinsci/jenkins-test-harness/compare/2a12efb35ad1...b45ae9bb0299

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/org/jvnet/hudson/test/WarExploder.java http://jenkins-ci.org/commit/jenkins-test-harness/b45ae9bb02999e82d14dd16f95c1b8fd2b277343 Log: Merge pull request #73 from jglick/IDEA-is-broken- JENKINS-45245 JENKINS-45245 Work around failure of IDEA to add jenkins-war.war to the test CP Compare: https://github.com/jenkinsci/jenkins-test-harness/compare/2a12efb35ad1...b45ae9bb0299

          Code changed in jenkins
          User: Jesse Glick
          Path:
          pom.xml
          http://jenkins-ci.org/commit/plugin-pom/8ba282fa56c33266be81bfd21643a2eca369497b
          Log:
          Update jenkins-test-harness to 2.27 to pick up JENKINS-45245 fix.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: pom.xml http://jenkins-ci.org/commit/plugin-pom/8ba282fa56c33266be81bfd21643a2eca369497b Log: Update jenkins-test-harness to 2.27 to pick up JENKINS-45245 fix.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          pom.xml
          http://jenkins-ci.org/commit/plugin-pom/ad2a3715aa4c52d7aa7a80ab4ea4eee3431ecbe1
          Log:
          Merge pull request #76 from jglick/JTH-JENKINS-45245

          Update jenkins-test-harness to 2.27 to pick up JENKINS-45245 fix

          Compare: https://github.com/jenkinsci/plugin-pom/compare/bd1cf68495e8...ad2a3715aa4c

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: pom.xml http://jenkins-ci.org/commit/plugin-pom/ad2a3715aa4c52d7aa7a80ab4ea4eee3431ecbe1 Log: Merge pull request #76 from jglick/JTH- JENKINS-45245 Update jenkins-test-harness to 2.27 to pick up JENKINS-45245 fix Compare: https://github.com/jenkinsci/plugin-pom/compare/bd1cf68495e8...ad2a3715aa4c

          Jesse Glick added a comment -

          Should be fixed for users of parent 2.35.

          Jesse Glick added a comment - Should be fixed for users of parent 2.35.

          Code changed in jenkins
          User: Pavel Grigorenko
          Path:
          pom.xml
          http://jenkins-ci.org/commit/token-macro-plugin/65aec126153cf839602b3ae4c12cf50e027a4eff
          Log:
          Bumped json-path version to 2.4.0 to solve dependency issue (#32)

          • Updated json-path to 2.4.0
          • Fixed NoClassDefFoundErrors in tests
          • Parent pom version to 3.2

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Pavel Grigorenko Path: pom.xml http://jenkins-ci.org/commit/token-macro-plugin/65aec126153cf839602b3ae4c12cf50e027a4eff Log: Bumped json-path version to 2.4.0 to solve dependency issue (#32) Updated json-path to 2.4.0 Updated pom parent to 2.35 due to JENKINS-45245 Fixed NoClassDefFoundErrors in tests Parent pom version to 3.2

            jglick Jesse Glick
            abayer Andrew Bayer
            Votes:
            4 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: