JenkinsRule resolution of snapshot dependencies in IntelliJ

5 views
Skip to first unread message

Ullrich Hafner

unread,
Dec 6, 2018, 9:46:04 AM12/6/18
to Jenkins Developers
Has someone a tip on how to run Jenkins integration tests in IntelliJ that use snapshot dependencies?
I have the warnings-ng plugin that depends on the analysis-model-api plugin. If I set the dependency analysis-model-api to the snapshot version, then I get the exception:

java.io.IOException: Could not resolve analysis-model-api:1.0.0-beta15-SNAPSHOT in [classpath]
at org.jvnet.hudson.test.JenkinsRule$Jpl.resolveDependencies(JenkinsRule.java:1863)
at org.jvnet.hudson.test.JenkinsRule.decorateHomeFor(JenkinsRule.java:1808)
at org.jvnet.hudson.test.JenkinsRule$7.decorateHome(JenkinsRule.java:1795)
at org.jvnet.hudson.test.JenkinsRule.newHudson(JenkinsRule.java:625)
at org.jvnet.hudson.test.JenkinsRule.before(JenkinsRule.java:394)
at org.jvnet.hudson.test.JenkinsRule$1.evaluate(JenkinsRule.java:547)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.lang.Thread.run(Thread.java:748)

(The test works on the command line with maven). If I replace the snapshot dependency with a released version then the tests work in IntelliJ. Do I need to specify a different class path?

Mark Waite

unread,
Dec 6, 2018, 10:11:42 AM12/6/18
to jenkinsci-dev
Have you considered enabling incrementals in your repository?  Then you could refer to an incrementals version rather than referring to a SNAPSHOT version.

I've been very pleased with the addition of incrementals to the git client plugin and the git plugin, thanks to Jesse Glick.  It makes it much easier to depend on unreleased versions.


--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/30220528-282A-4156-80C1-8992CBD5C8EA%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


--
Thanks!
Mark Waite

Jesse Glick

unread,
Dec 10, 2018, 4:43:38 PM12/10/18
to Jenkins Dev
On Thu, Dec 6, 2018 at 9:46 AM Ullrich Hafner <ullrich...@gmail.com> wrote:
> Has someone a tip on how to run Jenkins integration tests in IntelliJ that use snapshot dependencies?

I do not use IntelliJ, but others do. As a general, make sure you

mvn -f ../analysis-model-api-plugin -DskipTests clean install

first.

Regarding Incrementals: yes this is very useful for making sure that
CI builds are reproducible, but you will still want to use snapshot
dependencies temporarily while developing coördinated changes prior to
commit.
Reply all
Reply to author
Forward
0 new messages