You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by Laurent Goujon <la...@dremio.com> on 2020/04/28 16:26:07 UTC
How to build and publish non-SNAPSHOT version?
Hi,
I'd like to build my own non-SNAPSHOT version of Calcite and publish it in
my internal repository but I haven't found a way to do it with gradle. As
far as I can tell, there is a release plugin
(com.github.vlsi.stage-vote-release) which supports `-Prelease` property,
and will remove the -SNAPSHOT suffix, but it also triggers pushing to maven
central, git, svn, ....
What I am looking for is a gradle command with a couple of properties on
the commandline to specify the full version (or be able to change -SNAPSHOT
into something else) and push to my personal repository (something I was
able to do easily with the maven version).
Thanks in advance,
Laurent
Re: How to build and publish non-SNAPSHOT version?
Posted by Laurent Goujon <la...@dremio.com>.
Worked fine for me (small variation: I didn't put the file in my ~/.gradle
directory and instead use the -I option to point to it).
Thanks for the help
On Tue, Apr 28, 2020 at 10:41 AM Vladimir Sitnikov <
sitnikov.vladimir@gmail.com> wrote:
> > a couple of properties on the commandline to specify the full version
>
> The version comes from calcite.version property (see
>
> https://github.com/apache/calcite/blob/e44beba286ea9049c5fd00c3a3b0e4a4f1c03356/gradle.properties#L26
> )
> so you can augment it via -Pcalcite.version=... on the command line.
>
> By default it adds -SNAPSHOT, and, you can add -Prelease to make release
> version.
> The idea there is changing versions (e.g. snapshot vs release) can be done
> without making code changes.
>
> Vladimir
>
Re: How to build and publish non-SNAPSHOT version?
Posted by Vladimir Sitnikov <si...@gmail.com>.
> a couple of properties on the commandline to specify the full version
The version comes from calcite.version property (see
https://github.com/apache/calcite/blob/e44beba286ea9049c5fd00c3a3b0e4a4f1c03356/gradle.properties#L26
)
so you can augment it via -Pcalcite.version=... on the command line.
By default it adds -SNAPSHOT, and, you can add -Prelease to make release
version.
The idea there is changing versions (e.g. snapshot vs release) can be done
without making code changes.
Vladimir
Re: How to build and publish non-SNAPSHOT version?
Posted by Laurent Goujon <la...@dremio.com>.
quick followup: I usually encode the sha directly into the suffix for test
versions, so tagging into git has not been required until now.
On Tue, Apr 28, 2020 at 9:47 AM Laurent Goujon <la...@dremio.com> wrote:
> Thanks, very useful. Will give it a try.
>
> On Tue, Apr 28, 2020 at 9:38 AM Julian Hyde <jh...@apache.org> wrote:
>
>> PS Oops. You'll obviously want to change
>>
>> val baseUrl = "https://nexusrepo.looker.com"
>>
>> to reference your repo, not Looker's. :)
>>
>> On Tue, Apr 28, 2020 at 9:36 AM Julian Hyde <jh...@apache.org> wrote:
>> >
>> > I got some some advice from Vladimir, but ran into problems with
>> > releases, as you did. I came up with this. Put the following in your
>> > ~/.gradle/init.gradle.kts file, and change the username and password:
>> >
>> > allprojects {
>> > plugins.withId("maven-publish") {
>> > configure<PublishingExtension> {
>> > repositories {
>> > maven {
>> > name = "secretNexus"
>> > val baseUrl = "https://nexusrepo.looker.com"
>> > val releasesUrl =
>> "$baseUrl/repository/maven-releases"
>> > val snapshotsUrl =
>> "$baseUrl/repository/maven-snapshots"
>> > val release =
>> > !project.version.toString().endsWith("-SNAPSHOT")
>> > // val release = project.hasProperty("release")
>> > url = uri(if (release) releasesUrl else
>> snapshotsUrl)
>> > credentials {
>> > username = "xxx"
>> > password = "xxx"
>> > }
>> > }
>> > }
>> > }
>> > }
>> > }
>> >
>> > To deploy a release, do this:
>> >
>> > ./gradlew -Prelease -PskipSign
>> publishAllPublicationsToSecretNexusRepository
>> >
>> > If you like change 'secretNexus' to something more meaningful.
>> >
>> > You'll probably also want to tag the release commit and push the tag
>> > to your github fork.
>> >
>> > Julian
>> >
>> > On Tue, Apr 28, 2020 at 9:26 AM Laurent Goujon <la...@dremio.com>
>> wrote:
>> > >
>> > > Hi,
>> > >
>> > > I'd like to build my own non-SNAPSHOT version of Calcite and publish
>> it in
>> > > my internal repository but I haven't found a way to do it with
>> gradle. As
>> > > far as I can tell, there is a release plugin
>> > > (com.github.vlsi.stage-vote-release) which supports `-Prelease`
>> property,
>> > > and will remove the -SNAPSHOT suffix, but it also triggers pushing to
>> maven
>> > > central, git, svn, ....
>> > >
>> > > What I am looking for is a gradle command with a couple of
>> properties on
>> > > the commandline to specify the full version (or be able to change
>> -SNAPSHOT
>> > > into something else) and push to my personal repository (something I
>> was
>> > > able to do easily with the maven version).
>> > >
>> > > Thanks in advance,
>> > >
>> > > Laurent
>>
>
Re: How to build and publish non-SNAPSHOT version?
Posted by Laurent Goujon <la...@dremio.com>.
Thanks, very useful. Will give it a try.
On Tue, Apr 28, 2020 at 9:38 AM Julian Hyde <jh...@apache.org> wrote:
> PS Oops. You'll obviously want to change
>
> val baseUrl = "https://nexusrepo.looker.com"
>
> to reference your repo, not Looker's. :)
>
> On Tue, Apr 28, 2020 at 9:36 AM Julian Hyde <jh...@apache.org> wrote:
> >
> > I got some some advice from Vladimir, but ran into problems with
> > releases, as you did. I came up with this. Put the following in your
> > ~/.gradle/init.gradle.kts file, and change the username and password:
> >
> > allprojects {
> > plugins.withId("maven-publish") {
> > configure<PublishingExtension> {
> > repositories {
> > maven {
> > name = "secretNexus"
> > val baseUrl = "https://nexusrepo.looker.com"
> > val releasesUrl =
> "$baseUrl/repository/maven-releases"
> > val snapshotsUrl =
> "$baseUrl/repository/maven-snapshots"
> > val release =
> > !project.version.toString().endsWith("-SNAPSHOT")
> > // val release = project.hasProperty("release")
> > url = uri(if (release) releasesUrl else snapshotsUrl)
> > credentials {
> > username = "xxx"
> > password = "xxx"
> > }
> > }
> > }
> > }
> > }
> > }
> >
> > To deploy a release, do this:
> >
> > ./gradlew -Prelease -PskipSign
> publishAllPublicationsToSecretNexusRepository
> >
> > If you like change 'secretNexus' to something more meaningful.
> >
> > You'll probably also want to tag the release commit and push the tag
> > to your github fork.
> >
> > Julian
> >
> > On Tue, Apr 28, 2020 at 9:26 AM Laurent Goujon <la...@dremio.com>
> wrote:
> > >
> > > Hi,
> > >
> > > I'd like to build my own non-SNAPSHOT version of Calcite and publish
> it in
> > > my internal repository but I haven't found a way to do it with gradle.
> As
> > > far as I can tell, there is a release plugin
> > > (com.github.vlsi.stage-vote-release) which supports `-Prelease`
> property,
> > > and will remove the -SNAPSHOT suffix, but it also triggers pushing to
> maven
> > > central, git, svn, ....
> > >
> > > What I am looking for is a gradle command with a couple of properties
> on
> > > the commandline to specify the full version (or be able to change
> -SNAPSHOT
> > > into something else) and push to my personal repository (something I
> was
> > > able to do easily with the maven version).
> > >
> > > Thanks in advance,
> > >
> > > Laurent
>
Re: How to build and publish non-SNAPSHOT version?
Posted by Julian Hyde <jh...@apache.org>.
PS Oops. You'll obviously want to change
val baseUrl = "https://nexusrepo.looker.com"
to reference your repo, not Looker's. :)
On Tue, Apr 28, 2020 at 9:36 AM Julian Hyde <jh...@apache.org> wrote:
>
> I got some some advice from Vladimir, but ran into problems with
> releases, as you did. I came up with this. Put the following in your
> ~/.gradle/init.gradle.kts file, and change the username and password:
>
> allprojects {
> plugins.withId("maven-publish") {
> configure<PublishingExtension> {
> repositories {
> maven {
> name = "secretNexus"
> val baseUrl = "https://nexusrepo.looker.com"
> val releasesUrl = "$baseUrl/repository/maven-releases"
> val snapshotsUrl = "$baseUrl/repository/maven-snapshots"
> val release =
> !project.version.toString().endsWith("-SNAPSHOT")
> // val release = project.hasProperty("release")
> url = uri(if (release) releasesUrl else snapshotsUrl)
> credentials {
> username = "xxx"
> password = "xxx"
> }
> }
> }
> }
> }
> }
>
> To deploy a release, do this:
>
> ./gradlew -Prelease -PskipSign publishAllPublicationsToSecretNexusRepository
>
> If you like change 'secretNexus' to something more meaningful.
>
> You'll probably also want to tag the release commit and push the tag
> to your github fork.
>
> Julian
>
> On Tue, Apr 28, 2020 at 9:26 AM Laurent Goujon <la...@dremio.com> wrote:
> >
> > Hi,
> >
> > I'd like to build my own non-SNAPSHOT version of Calcite and publish it in
> > my internal repository but I haven't found a way to do it with gradle. As
> > far as I can tell, there is a release plugin
> > (com.github.vlsi.stage-vote-release) which supports `-Prelease` property,
> > and will remove the -SNAPSHOT suffix, but it also triggers pushing to maven
> > central, git, svn, ....
> >
> > What I am looking for is a gradle command with a couple of properties on
> > the commandline to specify the full version (or be able to change -SNAPSHOT
> > into something else) and push to my personal repository (something I was
> > able to do easily with the maven version).
> >
> > Thanks in advance,
> >
> > Laurent
Re: How to build and publish non-SNAPSHOT version?
Posted by Julian Hyde <jh...@apache.org>.
I got some some advice from Vladimir, but ran into problems with
releases, as you did. I came up with this. Put the following in your
~/.gradle/init.gradle.kts file, and change the username and password:
allprojects {
plugins.withId("maven-publish") {
configure<PublishingExtension> {
repositories {
maven {
name = "secretNexus"
val baseUrl = "https://nexusrepo.looker.com"
val releasesUrl = "$baseUrl/repository/maven-releases"
val snapshotsUrl = "$baseUrl/repository/maven-snapshots"
val release =
!project.version.toString().endsWith("-SNAPSHOT")
// val release = project.hasProperty("release")
url = uri(if (release) releasesUrl else snapshotsUrl)
credentials {
username = "xxx"
password = "xxx"
}
}
}
}
}
}
To deploy a release, do this:
./gradlew -Prelease -PskipSign publishAllPublicationsToSecretNexusRepository
If you like change 'secretNexus' to something more meaningful.
You'll probably also want to tag the release commit and push the tag
to your github fork.
Julian
On Tue, Apr 28, 2020 at 9:26 AM Laurent Goujon <la...@dremio.com> wrote:
>
> Hi,
>
> I'd like to build my own non-SNAPSHOT version of Calcite and publish it in
> my internal repository but I haven't found a way to do it with gradle. As
> far as I can tell, there is a release plugin
> (com.github.vlsi.stage-vote-release) which supports `-Prelease` property,
> and will remove the -SNAPSHOT suffix, but it also triggers pushing to maven
> central, git, svn, ....
>
> What I am looking for is a gradle command with a couple of properties on
> the commandline to specify the full version (or be able to change -SNAPSHOT
> into something else) and push to my personal repository (something I was
> able to do easily with the maven version).
>
> Thanks in advance,
>
> Laurent