JenkinsRule resolution of snapshot dependencies in IntelliJ

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

JenkinsRule resolution of snapshot dependencies in IntelliJ

Ulli Hafner
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?

--
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 [hidden email].
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.
Reply | Threaded
Open this post in threaded view
|

Re: JenkinsRule resolution of snapshot dependencies in IntelliJ

Mark Waite-2
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.


On Thu, Dec 6, 2018 at 7:46 AM Ullrich Hafner <[hidden email]> wrote:
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?

--
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 [hidden email].
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

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAO49JtFQ3vpCuHkR8maEmj8eO_c8R4qj7HWWULG0BfFYPL%3DcxA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: JenkinsRule resolution of snapshot dependencies in IntelliJ

Jesse Glick-4
In reply to this post by Ulli Hafner
On Thu, Dec 6, 2018 at 9:46 AM Ullrich Hafner <[hidden email]> 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.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr2xLq%2Bkjfc9nNh0NNpUgxuPSaDF-szZDy41ymJzub4AAw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.