How to consume incrementals?

60 views
Skip to first unread message

Ullrich Hafner

unread,
Nov 23, 2019, 12:09:43 PM11/23/19
to Jenkins Developers
I’m currently enabling incrementals in my plugins. I was quite easy to produce them, e.g. the following PRs successfully deployed a incremental release:

Now I wanted to use the created versions in a downstream plugin:


I did run 

mvn -U incrementals:update -Dbranch=jenkinsci/release
or
mvn -U incrementals:update -Dbranch=release
or 
mvn -U incrementals:update

But nothing happens. I get a lot of info messages in the style of 
[INFO] artifact com.puppycrawl.tools:checkstyle: checking for updates from central
But no message that a new incremental has been found or not. 
Also the pom does not change.

Do I need to mark the dependencies in my pom somehow so that the incrementals plugin knows what to release? I think I am missing something simple and obvious here but I do not find anything in the documentation that points me into the right direction...

Gavin Mogan

unread,
Nov 23, 2019, 12:23:18 PM11/23/19
to jenkin...@googlegroups.com
I believe you have to use an incrementals once before it can be updated

The incrementals docs say:
> Once you have some dependencies on incremental versions in your POM, you can
<do the maven stuff>

I think you need to add io.jenkins.plugins:jquery3-api:3.4.1-1-beta2-rc52.da76aa84ddb7

--
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/11D106CE-9AF1-45AB-83F1-AFF3744486E2%40gmail.com.

Ullrich Hafner

unread,
Nov 23, 2019, 2:28:43 PM11/23/19
to Jenkins Developers
Thanks, that was exactly the problem! Now it is working as expected.

Ullrich Hafner

unread,
Nov 25, 2019, 5:50:35 AM11/25/19
to Jenkins Developers
Well, it works perfectly on the console.

In order to get everything resolved in IntelliJ I needed to add to my pom:
<repositories>
<repository>
<id>repo.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/public/</url>
</repository>
<repository>
<id>incrementals.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/incrementals/</url>
</repository>
</repositories>
Otherwise IntelliJ will not find the dependencies…

James Nord

unread,
Nov 25, 2019, 6:20:13 AM11/25/19
to Jenkins Developers
You should just need to enable the "consume-incrementals" profile, rather than adding extras to the pom


If you are not using a mirror in your settings.xml then yes, I have always had to bootstrap the repositories section for repo.jenkins-ci.org, to work from the command line (so supporsied that you needed to add this just now if it was already working)


On Monday, November 25, 2019 at 10:50:35 AM UTC, Ullrich Hafner wrote:
Well, it works perfectly on the console.

In order to get everything resolved in IntelliJ I needed to add to my pom:
<repositories>
<repository>
<id>repo.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/public/</url>
</repository>
<repository>
<id>incrementals.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/incrementals/</url>
</repository>
</repositories>
Otherwise IntelliJ will not find the dependencies…


Am 23.11.2019 um 20:28 schrieb Ullrich Hafner <ullric...@gmail.com>:

Thanks, that was exactly the problem! Now it is working as expected.
Am 23.11.2019 um 18:22 schrieb 'Gavin Mogan' via Jenkins Developers <jenkin...@googlegroups.com>:

I believe you have to use an incrementals once before it can be updated

The incrementals docs say:
> Once you have some dependencies on incremental versions in your POM, you can
<do the maven stuff>

I think you need to add io.jenkins.plugins:jquery3-api:3.4.1-1-beta2-rc52.da76aa84ddb7

On Sat, Nov 23, 2019 at 9:09 AM Ullrich Hafner <ullric...@gmail.com> wrote:
I’m currently enabling incrementals in my plugins. I was quite easy to produce them, e.g. the following PRs successfully deployed a incremental release:

Now I wanted to use the created versions in a downstream plugin:


I did run 

mvn -U incrementals:update -Dbranch=jenkinsci/release
or
mvn -U incrementals:update -Dbranch=release
or 
mvn -U incrementals:update

But nothing happens. I get a lot of info messages in the style of 
[INFO] artifact com.puppycrawl.tools:checkstyle: checking for updates from central
But no message that a new incremental has been found or not. 
Also the pom does not change.

Do I need to mark the dependencies in my pom somehow so that the incrementals plugin knows what to release? I think I am missing something simple and obvious here but I do not find anything in the documentation that points me into the right direction...

--
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 jenkin...@googlegroups.com.

--
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 jenkin...@googlegroups.com.

Ullrich Hafner

unread,
Nov 25, 2019, 1:59:35 PM11/25/19
to Jenkins Developers
I see. It would be helpful if the 

mvn incrementals:incrementalify 

would do this automatically as well.


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/73d6c8dd-8829-417d-84f3-99e46007a1ef%40googlegroups.com.

Jesse Glick

unread,
Nov 25, 2019, 3:38:35 PM11/25/19
to Jenkins Dev
On Mon, Nov 25, 2019 at 1:59 PM Ullrich Hafner <ullrich...@gmail.com> wrote:
> I see. It would be helpful if the
>
> mvn incrementals:incrementalify
>
> would do this automatically as well.

It does:

https://github.com/jenkinsci/incrementals-tools/blob/f6fb2fd644fa0aa7be5c5173506d9368b542dd2d/maven-plugin/src/main/java/io/jenkins/tools/incrementals/maven/IncrementalifyMojo.java#L99

Ullrich Hafner

unread,
Nov 25, 2019, 4:20:04 PM11/25/19
to Jenkins Developers
Ok, then IntelliJ simply does not read ‚maven.config‘.

(I found a way to activate the profiles manually in the IntelliJ UI though…)
> --
> 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/CANfRfr1zLF1s5J4HmQsp52Qv3P6-cqNcmjV7OLNRrmLD_O8i%2Bw%40mail.gmail.com.

James Nord

unread,
Nov 25, 2019, 8:45:15 PM11/25/19
to Jenkins Developers
> Ok, then IntelliJ simply does not read ‚maven.config‘. 

That's a shame.  I was planning on using that to activate the jenkins-bom profile but I have also found issues in large agregator projects where some modules want it enabled and some do not.

I'm wondering if we should generically switch to using file based activation rather than property :-/



On Monday, November 25, 2019 at 9:20:04 PM UTC, Ullrich Hafner wrote:
Ok, then IntelliJ simply does not read ‚maven.config‘.

(I found a way to activate the profiles manually in the IntelliJ UI though…)
 

> Am 25.11.2019 um 21:38 schrieb Jesse Glick <jgl...@cloudbees.com>:
>
> On Mon, Nov 25, 2019 at 1:59 PM Ullrich Hafner <ullric...@gmail.com> wrote:
>> I see. It would be helpful if the
>>
>> mvn incrementals:incrementalify
>>
>> would do this automatically as well.
>
> It does:
>
> https://github.com/jenkinsci/incrementals-tools/blob/f6fb2fd644fa0aa7be5c5173506d9368b542dd2d/maven-plugin/src/main/java/io/jenkins/tools/incrementals/maven/IncrementalifyMojo.java#L99
>
> --
> 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 jenkin...@googlegroups.com.

Jesse Glick

unread,
Nov 26, 2019, 10:26:32 AM11/26/19
to Jenkins Dev
On Mon, Nov 25, 2019 at 8:45 PM James Nord <jn...@cloudbees.com> wrote:
>> IntelliJ simply does not read maven.config
>
> That's a shame.

Uh, is it not open source (at least the core part)? I fixed this bug
for NetBeans. Granted, I had a head start in that case.

Joseph P

unread,
Nov 28, 2019, 6:04:15 PM11/28/19
to Jenkins Developers

Matt Sicker

unread,
Dec 2, 2019, 12:17:30 PM12/2/19
to jenkin...@googlegroups.com
If you change your IntelliJ config to delegate to Maven rather than
using its own build code, most of these Maven-specific extensions work
fine (I've had to do that with Maven projects that rely heavily on
Maven toolchain support for example).
> --
> 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/66ee9eef-f892-4adf-859d-c2ef2c0ed576%40googlegroups.com.



--
Matt Sicker
Senior Software Engineer, CloudBees

Jesse Glick

unread,
Dec 3, 2019, 10:10:16 AM12/3/19
to Jenkins Dev
On Mon, Dec 2, 2019 at 12:17 PM Matt Sicker <msi...@cloudbees.com> wrote:
> change your IntelliJ config to delegate to Maven rather than
> using its own build code

Probably not sufficient. The issue is that the IDE needs to understand
the Maven classpath for use from its editor. In the case of NetBeans,
which always runs Maven builds using a forked `mvn`, builds were never
an issue, but the IDE’s internal model had to be patched to grok
`-Pconsume-incrementals` in `.mvn/maven.config`. Otherwise it did not
know about the alternate repository location, and failed to locate
some transitive dependencies.

Possibly we could switch to activating this profile (and
`might-produce-incrementals`, though that is likely irrelevant to an
IDE) using a property set in `pom.xml` rather than relying on
`maven.config`. I cannot recall whether I tried that option during
JEP-305 research. It would be compatible, I think, and might be
supported better by IDEs.

(We also have some file-activated profiles using e.g.
`.mvn_exec_node`. I do not think that has any benefit over using a
property in this case; there is different inheritance behavior when
you have an intermediate parent POM derived from `plugin-pom`.)

Jesse Glick

unread,
Dec 9, 2019, 3:30:48 PM12/9/19
to Jenkins Dev
On Tue, Dec 3, 2019 at 10:09 AM Jesse Glick <jgl...@cloudbees.com> wrote:
> Possibly we could switch to activating this profile […]
> using a property set in `pom.xml` rather than relying on
> `maven.config`. I cannot recall whether I tried that option during
> JEP-305 research.

Unfortunately this does not work: https://stackoverflow.com/a/1505674/12916
Reply all
Reply to author
Forward
0 new messages