<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" 
  xmlns:content="http://purl.org/rss/1.0/modules/content/" 
  xmlns:dc="http://purl.org/dc/elements/1.1/" 
  xmlns:atom="http://www.w3.org/2005/Atom" 
  xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" 
  xmlns:media="http://search.yahoo.com/mrss/">
  <channel>
    <title>nexus-staging-plugin on Solid Soft</title>
    <link>https://blog.solidsoft.pl/tags/nexus-staging-plugin/</link>
    <description>Recent content in nexus-staging-plugin on Solid Soft</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <copyright>©{year}, All Rights Reserved</copyright>
    <lastBuildDate>Fri, 26 Feb 2021 10:00:00 +0200</lastBuildDate>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>2</sy:updateFrequency>
    
        <atom:link href="https://blog.solidsoft.pl/tags/nexus-staging-plugin/index.xml" rel="self" type="application/rss+xml" />
    
    
    

      
      <item>
        <title>Unified Gradle projects releasing to Maven Central in 2021 &#43; migration guide</title>
        <link>https://blog.solidsoft.pl/2021/02/26/unified-gradle-projects-releasing-to-maven-central-in-2021-migration-guide/</link>
        <pubDate>Fri, 26 Feb 2021 10:00:00 +0200</pubDate>
        
        <atom:modified>Fri, 26 Feb 2021 10:00:00 +0200</atom:modified>
        <guid>https://blog.solidsoft.pl/2021/02/26/unified-gradle-projects-releasing-to-maven-central-in-2021-migration-guide/</guid>
        <description>As a counterbalance to an imminent JCenter shutdown, get know the unified (and united) power of releasing to Maven Central with a brand new Gradle Nexus Publish Plugin. A migration guide from the old plugins is included.
  
TL;TR. A brand new Gradle Nexus Publish Plugin is currently the best solution for releasing projects to Maven Central. 2 big things in Q1 2021 The beginning of 2021 electrified the JVM ecosystem by an unexpected decision of the fast upcoming shutdown of JCenter , a quite popular place to keep FOSS projects&amp;rsquo; binary artifacts.</description>
        <content:encoded>&lt;blockquote&gt;
&lt;p&gt;As a counterbalance to an imminent JCenter shutdown, get know the unified (and united) power of releasing to Maven Central with a brand new Gradle Nexus Publish Plugin. A migration guide from the old plugins is included.&lt;/p&gt;
&lt;/blockquote&gt;


&lt;figure &gt;
  
    &lt;img src=&#34;https://blog.solidsoft.pl/images/posts/2021/unified-releasing-gradle-2021.jpg&#34;  style=&#34;width:;height:;&#34;/&gt;
  
  
&lt;/figure&gt;

&lt;p&gt;&lt;br /&gt;&lt;br /&gt;
&lt;div class=&#34;alert alert-info&#34; role=&#34;alert&#34; data-dir=&#34;ltr&#34;&gt;&lt;strong&gt;TL;TR&lt;/strong&gt;. A brand new &lt;a href=&#34;https://github.com/gradle-nexus/publish-plugin/&#34; target=&#34;_blank&#34;&gt;Gradle Nexus Publish Plugin&lt;/a&gt; is currently the best solution for releasing projects to Maven Central.&lt;/div&gt;
&lt;/p&gt;
&lt;h2 id=&#34;2-big-things-in-q1-2021&#34;&gt;2 big things in Q1 2021&lt;/h2&gt;
&lt;p&gt;The beginning of 2021 electrified the JVM ecosystem by an unexpected decision of the fast &lt;a href=&#34;https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/&#34; target=&#34;_blank&#34;&gt;upcoming shutdown of JCenter&lt;/a&gt;
, a quite popular place to keep FOSS projects&amp;rsquo; binary artifacts. Business is for making money, not for supporting the community that helped the company got to the successful IPO a few months earlier, so the need &amp;ldquo;to streamline the productivity of the JFrog Platform&amp;rdquo; has to be understood.&lt;/p&gt;
&lt;p&gt;As a (positive) side effect, I and Marc Phillip &lt;em&gt;streamlined&lt;/em&gt; our focus to release a stable version of our unified Gradle plugin for publishing projects to Maven Central. &lt;strong&gt;&lt;a href=&#34;https://github.com/gradle-nexus/publish-plugin/&#34; target=&#34;_blank&#34;&gt;1.0.0&lt;/a&gt;
&lt;/strong&gt; hit the repository soon after. That version provides an initial set of functionality which should allow the majority of the Gradle projects to publish artifacts to Maven Central (aka The Central Repository).&lt;/p&gt;
&lt;div class=&#34;alert alert-info&#34; role=&#34;alert&#34; data-dir=&#34;ltr&#34;&gt;Please note, this is &lt;strong&gt;not&lt;/strong&gt; an article about migration from JCenter to Maven Central, only about migration from the Gradle Nexus Staging Plugin and Nexus Publish Plugin duo to the new, unified &lt;a href=&#34;https://github.com/gradle-nexus/publish-plugin/&#34;&gt;Gradle Nexus Publish Plugin&lt;/a&gt;. People switching their projects from JCenter definitely can use the new plugin, but I plan to cover the migration from JCenter in a separate post, but in the meantime you can take a look at &lt;a href=&#34;https://github.com/rwinch/gradle-publish-ossrh-sample&#34;&gt;this sample project&lt;/a&gt;.&lt;/div&gt;

&lt;h2 id=&#34;a-story-of-three-plugins&#34;&gt;A story of three plugins&lt;/h2&gt;
&lt;p&gt;In 2015, &lt;a href=&#34;https://blog.solidsoft.pl/&#34; target=&#34;_blank&#34;&gt;I&lt;/a&gt;
 created &lt;a href=&#34;https://github.com/Codearte/gradle-nexus-staging-plugin/&#34; target=&#34;_blank&#34;&gt;gradle-nexus-staging-plugin&lt;/a&gt;
 which was providing - not available earlier for the Gradle users - an ability to close and release staging repositories in Nexus repository manager without touching Nexus UI. It opened an opportunity to manage releasing Gradle projects to Maven Central completely from code (also using a CI server). Over the years, it has been adopted by the various projects and companies &lt;a href=&#34;https://github.com/Codearte/gradle-nexus-staging-plugin/#notable-users&#34; target=&#34;_blank&#34;&gt;across the globe&lt;/a&gt;
, however there was a small problem. Due to technical limitations in the publishing process in Gradle, it was required to use heuristics to track implicitly created staging repositories, what often failed for multiple repositories in a given state. The situation became even worse when Travis changed its network architecture in late 2019 and the majority of releases started to fail.&lt;br /&gt;
Here, &lt;a href=&#34;https://github.com/marcphilipp/&#34; target=&#34;_blank&#34;&gt;Marc Philipp&lt;/a&gt;
 entered the stage who created &lt;a href=&#34;https://github.com/marcphilipp/nexus-publish-plugin&#34; target=&#34;_blank&#34;&gt;Nexus Publish Plugin&lt;/a&gt;
 which was enriching the publishing mechanism in Gradle to explicitly create staging repositories and publish (upload) artifacts directly to it.&lt;/p&gt;
&lt;p&gt;Those two plugins nicely worked together, providing a reliable way to handle publishing artifacts to Maven Central (and to other Nexus instances in general). However, the need of using two plugins was very often confusing for users. As a result, an idea to create one plugin mixing the aforementioned capabilities emerged. It took us some time, but sunsetting JCenter motivated us to intensify work and &lt;strong&gt;&lt;a href=&#34;https://github.com/gradle-nexus/publish-plugin/&#34; target=&#34;_blank&#34;&gt;Gradle Nexus Publish Plugin 1.0.0&lt;/a&gt;
&lt;/strong&gt; has been released in February 2021 as joint effort.&lt;/p&gt;
&lt;h2 id=&#34;migration-guide&#34;&gt;Migration guide&lt;/h2&gt;
&lt;p&gt;The new plugin was intended as a natural successor of the aforementioned two plugins. We tried to keep the syntax unchanged where feasible. As a result a migration guide - in the majority of cases - is straightforward.&lt;/p&gt;
&lt;h3 id=&#34;plugins&#34;&gt;Plugins&lt;/h3&gt;
&lt;p&gt;Let&amp;rsquo;s start with the plugins declaration.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;plugins {   //old
    id &amp;quot;io.codearte.nexus-staging&amp;quot; version &amp;quot;0.22.0&amp;quot;
    id &amp;quot;de.marcphilipp.nexus-publish&amp;quot; version &amp;quot;0.4.0&amp;quot;
}
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The old two has to be replaced with the new one:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-gradle&#34; data-lang=&#34;gradle&#34;&gt;&lt;span class=&#34;n&#34;&gt;plugins&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;
    &lt;span class=&#34;n&#34;&gt;id&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;io.github.gradle-nexus.publish-plugin&amp;#34;&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;version&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;1.0.0&amp;#34;&lt;/span&gt;
&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h3 id=&#34;configuration---simple-case&#34;&gt;Configuration - simple case&lt;/h3&gt;
&lt;p&gt;If only default plugins settings were used:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nexusStaging {   //old
    packageGroup = &amp;quot;com.example.mycompany.myproject&amp;quot;
    stagingProfileId = &amp;quot;yourStagingProfileId&amp;quot;
}

nexusPublishing {
    repositories {
        sonatype()
    }
}
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;code&gt;packageGroup&lt;/code&gt; and &lt;code&gt;stagingProfileId&lt;/code&gt; have to be moved to the &lt;code&gt;nexusPublishing&lt;/code&gt; section:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;9
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-gradle&#34; data-lang=&#34;gradle&#34;&gt;&lt;span class=&#34;n&#34;&gt;nexusPublishing&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;
    &lt;span class=&#34;n&#34;&gt;packageGroup&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;com.example.mycompany.myproject&amp;#34;&lt;/span&gt;  &lt;span class=&#34;c1&#34;&gt;//defaults to &amp;#39;project.group&amp;#39;
&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;    &lt;span class=&#34;n&#34;&gt;repositories&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;
        &lt;span class=&#34;n&#34;&gt;sonatype&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;   &lt;span class=&#34;c1&#34;&gt;//custom repository name - &amp;#39;sonatype&amp;#39; is pre-configured
&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;                     &lt;span class=&#34;c1&#34;&gt;//for Sonatype Nexus (OSSRH) which is used for The Central Repository
&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;            &lt;span class=&#34;n&#34;&gt;stagingProfileId&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;yourStagingProfileId&amp;#34;&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;//can reduce execution time by even 10 seconds
&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;        &lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;
    &lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Due to the improved support for releasing to multiple Nexus instances in one project, the credentials configuration has changed in non-backward compatible way. gradle-nexus-staging-plugin by default was using &lt;code&gt;nexusUsername&lt;/code&gt; and &lt;code&gt;nexusPassword&lt;/code&gt; project properties which could be reused by nexus-publish-plugin. With the new plugin it has been unified to &lt;code&gt;sonatypeUsername&lt;/code&gt; and &lt;code&gt;sonatypePassword&lt;/code&gt;, where a prefix reflects a name of a configured repository (here &lt;code&gt;sonatype&lt;/code&gt;).&lt;/p&gt;
&lt;h3 id=&#34;configuration---more-customizations&#34;&gt;Configuration - more customizations&lt;/h3&gt;
&lt;p&gt;Having more customizations in place:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;//majority of the properties is optional, you might just don&#39;t have them in your project       //old
nexusStaging {
    packageGroup = &amp;quot;com.example.mycompany.myproject&amp;quot;
    stagingProfileId = &amp;quot;yourStagingProfileId&amp;quot;

    //by default project properties &#39;nexusUsername&#39; and &#39;nexusPassword&#39; are used
    username = project.findProperty(&amp;quot;...&amp;quot;)   
    password = project.findProperty(&amp;quot;...&amp;quot;)
    numberOfRetries = 40
    delayBetweenRetriesInMillis = 3000
}

nexusPublishing {
    repositories {
        sonatype {
            //by default value from above &#39;nexusStaging&#39; closure is used (alternative project properties &#39;sonatypeUsername&#39; and &#39;sonatypePassword&#39;)
            username = project.findProperty(&amp;quot;...&amp;quot;)  
            password = project.findProperty(&amp;quot;...&amp;quot;)
        }
    }

    clientTimeout = Duration.ofSeconds(300)
    connectTimeout = Duration.ofSeconds(60)

}
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;they also have to be moved to the &lt;code&gt;nexusPublishing&lt;/code&gt; closure:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt; 1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 5
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 6
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 7
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 8
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt; 9
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;10
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;11
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;12
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;13
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;14
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;15
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;16
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;17
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;18
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;19
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;20
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;21
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-gradle&#34; data-lang=&#34;gradle&#34;&gt;&lt;span class=&#34;n&#34;&gt;nexusPublishing&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;
    &lt;span class=&#34;n&#34;&gt;packageGroup&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;com.example.mycompany.myproject&amp;#34;&lt;/span&gt;  &lt;span class=&#34;c1&#34;&gt;//defaults to &amp;#39;project.group&amp;#39;
&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;
    &lt;span class=&#34;n&#34;&gt;repositories&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;
        &lt;span class=&#34;n&#34;&gt;sonatype&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;   &lt;span class=&#34;c1&#34;&gt;//or custom repository name
&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;            &lt;span class=&#34;n&#34;&gt;stagingProfileId&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;yourStagingProfileId&amp;#34;&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;//can reduce execution time by even 10 seconds
&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;
            &lt;span class=&#34;c1&#34;&gt;//defaults to project properties &amp;#39;sonatypeUsername&amp;#39; and &amp;#39;sonatypePassword&amp;#39;, where &amp;#39;sonatype&amp;#39; is name of configured repository
&lt;/span&gt;&lt;span class=&#34;c1&#34;&gt;&lt;/span&gt;            &lt;span class=&#34;n&#34;&gt;username&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;project&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;findProperty&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;...&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;  
            &lt;span class=&#34;n&#34;&gt;password&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;project&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;findProperty&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;...&amp;#34;&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;
        &lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;
    &lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;

    &lt;span class=&#34;n&#34;&gt;clientTimeout&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Duration&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;ofSeconds&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;300&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;
    &lt;span class=&#34;n&#34;&gt;connectTimeout&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Duration&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;ofSeconds&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;60&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;

    &lt;span class=&#34;n&#34;&gt;transitionCheckOptions&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;
        &lt;span class=&#34;n&#34;&gt;maxRetries&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;set&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;40&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;
        &lt;span class=&#34;n&#34;&gt;delayBetween&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;set&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;java&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;time&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;Duration&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;na&#34;&gt;ofMillis&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;3000&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;))&lt;/span&gt;
    &lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;
&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;It is worth to mention - in addition to changed default project properties to read credentials from - that the configuration of retries during the close and release attempts has been renamed to &lt;code&gt;transitionCheckOptions&lt;/code&gt; with more modern duration types.&lt;/p&gt;
&lt;h3 id=&#34;tasks---simple-case&#34;&gt;Tasks - simple case&lt;/h3&gt;
&lt;p&gt;At the task level - due to support for multiple repositories - the following common execution:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;./gradlew publish closeAndReleaseRepository        //old
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;has to be enhanced with a repository name:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To short the second task name slightly, there is still a simplified variant &lt;code&gt;closeAndReleaseStagingRepository&lt;/code&gt; which closes and releases the staging repositories in all configured Nexus instances (one by default).&lt;/p&gt;
&lt;h2 id=&#34;summary&#34;&gt;Summary&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;For the new projects, using &lt;a href=&#34;https://github.com/gradle-nexus/publish-plugin/&#34; target=&#34;_blank&#34;&gt;gradle-nexus-publish-plugin&lt;/a&gt;
 is the only logical choice&lt;/strong&gt;. The main authors&amp;rsquo; effort will be put in its development. The whole process of onboarding to Soantype Nexus (together with a sample project) is nicely described by &lt;a href=&#34;https://github.com/rwinch/gradle-publish-ossrh-sample&#34; target=&#34;_blank&#34;&gt;Rob Winch&lt;/a&gt;
.&lt;/p&gt;
&lt;p&gt;For the projects migrating from releasing from JCenter to Maven Central - I plan to cover it in a separate blog post - it also holds.&lt;/p&gt;
&lt;p&gt;I hope this short blog post clearly showed that migration - in the majority of cases - from the old due-solution should be trouble-free. All the projects should - eventually - migrate to the new plugin.&lt;/p&gt;
&lt;p&gt;For existing projects, temporary staying with the already working (old) duo-solution also is an acceptable choice. The migration might wait for the next big configuration change in the project (e.g. a migration to Gradle 7). The new plugin is less mature and there might be some features missing. In that case, however, please &lt;a href=&#34;https://github.com/gradle-nexus/publish-plugin/issues&#34; target=&#34;_blank&#34;&gt;let us know&lt;/a&gt;
!&lt;/p&gt;
&lt;span style=&#34;opacity: 0.6&#34;&gt;Lead photo by &lt;a href=&#34;https://pixabay.com/users/thedigitalartist-202249/&#34;&gt;TheDigitalArtist&lt;/a&gt;, published in &lt;a href=&#34;https://pixabay.com/photos/birds-flock-flying-nature-4261965/&#34;&gt;Pixabay&lt;/a&gt;, Pixabay License.&lt;/span&gt;
</content:encoded>
        <dc:creator>Marcin Zajączkowski</dc:creator>
        <media:content url="https://blog.solidsoft.pl/images/posts/2021/unified-releasing-gradle-2021-thumbnail.jpg" medium="image"><media:title type="html">featured image</media:title></media:content>
        
        <media:content url="https://blog.solidsoft.pl/images/posts/2021/unified-releasing-gradle-2021-ratio.jpg" medium="image"><media:title type="html">meta image</media:title></media:content>
        
          
            
              <category>gradle</category>
            
          
            
              <category>maven-central</category>
            
          
            
              <category>my-tools</category>
            
          
            
              <category>nexus-staging-plugin</category>
            
          
            
              <category>nexus-publish-plugin</category>
            
          
            
              <category>GNPP</category>
            
          
            
              <category>jcenter</category>
            
          
            
              <category>bintray</category>
            
          
            
              <category>migration</category>
            
          
        
        
          
            
              <category>Tools</category>
            
          
        
        
      </item>
      

    
  </channel>
</rss>