Release plugin: why are my releases tagged as snapshots?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Release plugin: why are my releases tagged as snapshots?

Chris-3
I've been informed at https://issues.sonatype.org/browse/OSSRH-34445 that:
"The logs show that the build is trying to checkout the release branch, but
whatever it checks out probably still has 0.9.2.7-SNAPSHOT as the version
instead of 0.9.2.8

Once the build things it's building a SNAPSHOT version, it has no choice
but to deploy to the Snapshots repo"

I've changed my release shell script a little bit since then to properly
integrate the Proguard step, but I'm still having the same issue. A more
up-to-date output log is here: https://pastebin.ca/3866418 The script I'm
running is at
https://github.com/Pr0methean/BetterRandom/blob/66901100812a4bca1243ac7639c34a837d6aecfa/release.sh
and
the pom.xml is at
https://github.com/Pr0methean/BetterRandom/blob/master/betterrandom/pom.xml
.

What do I need to do differently to generate a release with a non-snapshot
tag?
Reply | Threaded
Open this post in threaded view
|

Re: Release plugin: why are my releases tagged as snapshots?

Russell Gold-3
I see that after you build the release version, you are then building the snapshot version. It is the latter that is being uploaded:

>                
>     Uploaded: https://oss.sonatype.org/content/repositories/snapshots/io/github/pr0methean/betterrandom/BetterRandom/0.9.2.11-SNAPSHOT/BetterRandom-0.9.2.11-20170910.184022-3.jar (74 KB at 140.7 KB/sec)
>     Uploading: https://oss.sonatype.org/content/repositories/snapshots/io/github/pr0methean/betterrandom/BetterRandom/0.9.2.11-SNAPSHOT/BetterRandom-0.9.2.11-20170910.184022-3.pom

I’m not sure you are even checking the right versions into Git. Why don’t you check your local repo as well as the one on GitHub and make sure that the tags match the versions you expect.

> On Sep 10, 2017, at 2:52 PM, Chris <[hidden email]> wrote:
>
> I've been informed at https://issues.sonatype.org/browse/OSSRH-34445 that:
> "The logs show that the build is trying to checkout the release branch, but
> whatever it checks out probably still has 0.9.2.7-SNAPSHOT as the version
> instead of 0.9.2.8
>
> Once the build things it's building a SNAPSHOT version, it has no choice
> but to deploy to the Snapshots repo"
>
> I've changed my release shell script a little bit since then to properly
> integrate the Proguard step, but I'm still having the same issue. A more
> up-to-date output log is here: https://pastebin.ca/3866418 The script I'm
> running is at
> https://github.com/Pr0methean/BetterRandom/blob/66901100812a4bca1243ac7639c34a837d6aecfa/release.sh
> and
> the pom.xml is at
> https://github.com/Pr0methean/BetterRandom/blob/master/betterrandom/pom.xml
> .
>
> What do I need to do differently to generate a release with a non-snapshot
> tag?

Reply | Threaded
Open this post in threaded view
|

Re: Release plugin: why are my releases tagged as snapshots?

Karl Heinz Marbaise-3
In reply to this post by Chris-3
Hi Chris,

If i correctly see in your pom file you have defined Git URL in the root
location of your project as well as in the sub module which is simply
wrong...
Cause you are trying to release a multi module build which means these
things should only be at the root of that...

Furthermore your child (skinny-wars-javaee5/pom.xml) duplicates many
things...Apart from that your child (which is not the case) based on the
things in Git repo:

    <!--  <parent>
     <artifactId>root</artifactId>
     <groupId>io.github.pr0methean.betterrandom</groupId>
     <version>0.9.2.6-SNAPSHOT</version>
     <relativePath>../pom.xml</relativePath>
   </parent> -->
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <prefix />
     <maven.compiler.source>1.8</maven.compiler.source>
     <maven.compiler.target>1.8</maven.compiler.target>
     <annotatedJdk>${org.checkerframework:jdk8:jar}</annotatedJdk>
     <github.global.server>github</github.global.server>
   </properties>
   <groupId>io.github.pr0methean.betterrandom</groupId>
   <artifactId>BetterRandom</artifactId>
   <version>0.9.2.15-SNAPSHOT</version>
   <name>BetterRandom</name>


So in the end the parent is an aggregator...So my question if why are
you trying to release a single module ? Why not the whole in one go?

Furthermore you see the difference in the version ?

BTW: I'm not sure but there have been improvements made in more recent
versions of maven-release-plugin (but I'm not sure if really support
releases of childs at the moment?)...

Kind regards
Karl Heinz Marbaise






On 10/09/17 20:52, Chris wrote:

> I've been informed at https://issues.sonatype.org/browse/OSSRH-34445 that:
> "The logs show that the build is trying to checkout the release branch, but
> whatever it checks out probably still has 0.9.2.7-SNAPSHOT as the version
> instead of 0.9.2.8
>
> Once the build things it's building a SNAPSHOT version, it has no choice
> but to deploy to the Snapshots repo"
>
> I've changed my release shell script a little bit since then to properly
> integrate the Proguard step, but I'm still having the same issue. A more
> up-to-date output log is here: https://pastebin.ca/3866418 The script I'm
> running is at
> https://github.com/Pr0methean/BetterRandom/blob/66901100812a4bca1243ac7639c34a837d6aecfa/release.sh
> and
> the pom.xml is at
> https://github.com/Pr0methean/BetterRandom/blob/master/betterrandom/pom.xml
> .
>
> What do I need to do differently to generate a release with a non-snapshot
> tag?
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Release plugin: why are my releases tagged as snapshots?

Chris-3
Actually, the parent pom.xml can probably be deleted now. I was trying to
keep the child one together with a sibling pom.xml, which builds some
benchmarks (that I'm not going to push to Maven Central since they wouldn't
be useful as a library). I'll do that and see if it makes any difference.
You'll notice that release.sh descends into a subfolder to do the build; so
do my other build scripts.

On Sun, Sep 10, 2017 at 12:45 PM Karl Heinz Marbaise <[hidden email]>
wrote:

> Hi Chris,
>
> If i correctly see in your pom file you have defined Git URL in the root
> location of your project as well as in the sub module which is simply
> wrong...
> Cause you are trying to release a multi module build which means these
> things should only be at the root of that...
>
> Furthermore your child (skinny-wars-javaee5/pom.xml) duplicates many
> things...Apart from that your child (which is not the case) based on the
> things in Git repo:
>
>     <!--  <parent>
>      <artifactId>root</artifactId>
>      <groupId>io.github.pr0methean.betterrandom</groupId>
>      <version>0.9.2.6-SNAPSHOT</version>
>      <relativePath>../pom.xml</relativePath>
>    </parent> -->
>    <properties>
>      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
>      <prefix />
>      <maven.compiler.source>1.8</maven.compiler.source>
>      <maven.compiler.target>1.8</maven.compiler.target>
>      <annotatedJdk>${org.checkerframework:jdk8:jar}</annotatedJdk>
>      <github.global.server>github</github.global.server>
>    </properties>
>    <groupId>io.github.pr0methean.betterrandom</groupId>
>    <artifactId>BetterRandom</artifactId>
>    <version>0.9.2.15-SNAPSHOT</version>
>    <name>BetterRandom</name>
>
>
> So in the end the parent is an aggregator...So my question if why are
> you trying to release a single module ? Why not the whole in one go?
>
> Furthermore you see the difference in the version ?
>
> BTW: I'm not sure but there have been improvements made in more recent
> versions of maven-release-plugin (but I'm not sure if really support
> releases of childs at the moment?)...
>
> Kind regards
> Karl Heinz Marbaise
>
>
>
>
>
>
> On 10/09/17 20:52, Chris wrote:
> > I've been informed at https://issues.sonatype.org/browse/OSSRH-34445
> that:
> > "The logs show that the build is trying to checkout the release branch,
> but
> > whatever it checks out probably still has 0.9.2.7-SNAPSHOT as the version
> > instead of 0.9.2.8
> >
> > Once the build things it's building a SNAPSHOT version, it has no choice
> > but to deploy to the Snapshots repo"
> >
> > I've changed my release shell script a little bit since then to properly
> > integrate the Proguard step, but I'm still having the same issue. A more
> > up-to-date output log is here: https://pastebin.ca/3866418 The script
> I'm
> > running is at
> >
> https://github.com/Pr0methean/BetterRandom/blob/66901100812a4bca1243ac7639c34a837d6aecfa/release.sh
> > and
> > the pom.xml is at
> >
> https://github.com/Pr0methean/BetterRandom/blob/master/betterrandom/pom.xml
> > .
> >
> > What do I need to do differently to generate a release with a
> non-snapshot
> > tag?
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Release plugin: why are my releases tagged as snapshots?

Karl Heinz Marbaise-3
Hi Chris,

based on the log output:

[INFO] Executing: /bin/sh -c cd
/home/ubuntu/workspace/betterrandom/target/checkout && git checkout
BetterRandom-0.9.2.14
[INFO] Working directory:
/home/ubuntu/workspace/betterrandom/target/checkout
[INFO] Executing: /bin/sh -c cd
/home/ubuntu/workspace/betterrandom/target/checkout && git ls-files
[INFO] Working directory:
/home/ubuntu/workspace/betterrandom/target/checkout
[INFO] Invoking perform goals in directory
/home/ubuntu/workspace/betterrandom/target/checkout/betterrandom
[INFO] Executing goals 'deploy'...
[INFO] Executing: /bin/sh -c cd
/home/ubuntu/workspace/betterrandom/target/checkout/betterrandom &&
/usr/share/maven/bin/mvn -s /tmp/release-settings4188024815796759751.xml
deploy --no-plugin-updates -DperformRelease=true -f pom.xml
     [WARNING] Command line option -npu is deprecated and will be
removed in future Maven versions.
     [INFO] Scanning for projects...
     [WARNING]
     [WARNING] Some problems were encountered while building the
effective model for
io.github.pr0methean.betterrandom:BetterRandom:jar:0.9.2.11-SNAPSHOT
     [WARNING] 'build.plugins.plugin.version' for
org.apache.maven.plugins:maven-deploy-plugin is missing.
     [WARNING]
     [WARNING] It is highly recommended to fix these problems because
they threaten the stability of your build.
     [WARNING]
     [WARNING] For this reason, future Maven versions might no longer
support building such malformed projects.
     [WARNING]
     [INFO]

     [INFO]
------------------------------------------------------------------------

There is being checkout a tag BetterRandom-0.9.2.14 which seemed to
contain the wrong version...Have you ever had such a tag ? May be done
via command line ?

Furthermore the output on Github shows something:

https://github.com/Pr0methean/BetterRandom/commit/0ce146b58ab0f18da93d665e8604dfa15eebdf09

Revert "Merge coverage and post-Proguard testing into same run."
This reverts commit a7f1da8.
instead of the usual messages like:
"[maven-release-plugin] prepare release ..."


Haven't you deleted this tag if something has failed with the release on
the remote ?

Kind regards
Karl Heinz Marbaise





On 10/09/17 21:52, Chris wrote:

> Actually, the parent pom.xml can probably be deleted now. I was trying
> to keep the child one together with a sibling pom.xml, which builds some
> benchmarks (that I'm not going to push to Maven Central since they
> wouldn't be useful as a library). I'll do that and see if it makes any
> difference. You'll notice that release.sh descends into a subfolder to
> do the build; so do my other build scripts.
>
> On Sun, Sep 10, 2017 at 12:45 PM Karl Heinz Marbaise <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hi Chris,
>
>     If i correctly see in your pom file you have defined Git URL in the root
>     location of your project as well as in the sub module which is simply
>     wrong...
>     Cause you are trying to release a multi module build which means these
>     things should only be at the root of that...
>
>     Furthermore your child (skinny-wars-javaee5/pom.xml) duplicates many
>     things...Apart from that your child (which is not the case) based on the
>     things in Git repo:
>
>          <!--  <parent>
>           <artifactId>root</artifactId>
>           <groupId>io.github.pr0methean.betterrandom</groupId>
>           <version>0.9.2.6-SNAPSHOT</version>
>           <relativePath>../pom.xml</relativePath>
>         </parent> -->
>         <properties>
>           <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
>           <prefix />
>           <maven.compiler.source>1.8</maven.compiler.source>
>           <maven.compiler.target>1.8</maven.compiler.target>
>           <annotatedJdk>${org.checkerframework:jdk8:jar}</annotatedJdk>
>           <github.global.server>github</github.global.server>
>         </properties>
>         <groupId>io.github.pr0methean.betterrandom</groupId>
>         <artifactId>BetterRandom</artifactId>
>         <version>0.9.2.15-SNAPSHOT</version>
>         <name>BetterRandom</name>
>
>
>     So in the end the parent is an aggregator...So my question if why are
>     you trying to release a single module ? Why not the whole in one go?
>
>     Furthermore you see the difference in the version ?
>
>     BTW: I'm not sure but there have been improvements made in more recent
>     versions of maven-release-plugin (but I'm not sure if really support
>     releases of childs at the moment?)...
>
>     Kind regards
>     Karl Heinz Marbaise
>
>
>
>
>
>
>     On 10/09/17 20:52, Chris wrote:
>      > I've been informed at
>     https://issues.sonatype.org/browse/OSSRH-34445 that:
>      > "The logs show that the build is trying to checkout the release
>     branch, but
>      > whatever it checks out probably still has 0.9.2.7-SNAPSHOT as the
>     version
>      > instead of 0.9.2.8
>      >
>      > Once the build things it's building a SNAPSHOT version, it has no
>     choice
>      > but to deploy to the Snapshots repo"
>      >
>      > I've changed my release shell script a little bit since then to
>     properly
>      > integrate the Proguard step, but I'm still having the same issue.
>     A more
>      > up-to-date output log is here: https://pastebin.ca/3866418 The
>     script I'm
>      > running is at
>      >
>     https://github.com/Pr0methean/BetterRandom/blob/66901100812a4bca1243ac7639c34a837d6aecfa/release.sh
>      > and
>      > the pom.xml is at
>      >
>     https://github.com/Pr0methean/BetterRandom/blob/master/betterrandom/pom.xml
>      > .
>      >
>      > What do I need to do differently to generate a release with a
>     non-snapshot
>      > tag?
>      >
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]