How to release a new plugin version?

108 views
Skip to first unread message

Jan Niklas Hasse

unread,
Oct 15, 2015, 4:49:18 AM10/15/15
to Jenkins Developers
Hi!

I'm trying to release a new version of the python-plugin (https://github.com/jenkinsci/python-plugin). I couldn't find a guide for this and also my Java / Maven skills are pretty low. My guess is, that I need to run

mvn release:prepare

but this gives me (after a lot of Downloading) the following errors:

[INFO] Verifying that there are no local modifications...
[INFO] Executing: /bin/sh -c cd /home/hasse/python-plugin && git status
[INFO] Working directory: /home/hasse/python-plugin
[INFO] Checking dependencies and plugins for snapshots ...
What is the release version for "Python Plugin"? (org.jenkins-ci.plugins:python) 1.3: : 1.3
What is SCM release tag or label for "Python Plugin"? (org.jenkins-ci.plugins:python) python-1.3: :
What is the new development version for "Python Plugin"? (org.jenkins-ci.plugins:python) 1.4-SNAPSHOT: :
[INFO] Transforming 'Python Plugin'...
Downloading: http://repo.maven.apache.org/maven2/org/jenkins-ci/tools/maven-hpi-plugin/1.67/maven-hpi-plugin-1.67.pom
[WARNING] The POM for org.jenkins-ci.tools:maven-hpi-plugin:jar:1.67 is missing, no dependency information available
Downloading: http://repo.maven.apache.org/maven2/org/jenkins-ci/tools/maven-hpi-plugin/1.67/maven-hpi-plugin-1.67.jar
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar (165 KB at 1598.2 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5:56.382s
[INFO] Finished at: Thu Oct 15 10:47:32 CEST 2015
[INFO] Final Memory: 15M/110M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.0-beta-9:prepare (default-cli) on project python: Execution default-cli of goal org.apache.maven.plugins:maven-release-plugin:2.0-beta-9:prepare failed: Failed to build parent project for org.jenkins-ci.plugins:python:hpi:1.3-SNAPSHOT: Some problems were encountered while processing the POMs:
[ERROR] [ERROR] Unresolveable build extension: Plugin org.jenkins-ci.tools:maven-hpi-plugin:1.67 or one of its dependencies could not be resolved: Could not find artifact org.jenkins-ci.tools:maven-hpi-plugin:jar:1.67 in central (http://repo.maven.apache.org/maven2) @: 1 problem was encountered while building the effective model for org.jenkins-ci.plugins:plugin:1.409
[ERROR] [ERROR] Unresolveable build extension: Plugin org.jenkins-ci.tools:maven-hpi-plugin:1.67 or one of its dependencies could not be resolved: Could not find artifact org.jenkins-ci.tools:maven-hpi-plugin:jar:1.67 in central (http://repo.maven.apache.org/maven2) @
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

It looks to me that some dependencies changed their names, but I'm pretty clueless how to fix this. Can someone help me out?

Robert Sandell

unread,
Oct 15, 2015, 5:12:19 AM10/15/15
to jenkin...@googlegroups.com
Hmm, it seems that it's looking in maven central for the hpi-plugin when it should be looking in repo.jenkins-ci.org/public

Have you configured your maven settings as described here? https://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial#Plugintutorial-SettingUpEnvironment

/B

--
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/603ba840-f579-4ea9-be31-9b60fe1729a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Robert Sandell
Software Engineer
CloudBees Inc.

Jim SERRA

unread,
Oct 15, 2015, 5:15:32 AM10/15/15
to Jenkins Developers
I don't know if it will be useful but i use this command to update the version of my plugin:

mvn versions:set versions:commit -DnewVersion={You number version}
mvn package
(mvn install)

Arnaud Héritier

unread,
Oct 15, 2015, 5:42:45 AM10/15/15
to jenkin...@googlegroups.com
Hi

org.apache.maven.plugins:maven-release-plugin:2.0-beta-9:prepare is a really too old version of the maven release plugin
For sure it is failing for a git incompatibility issue or something like this.

If you want to release without changing in your project you should use

mvn org.apache.maven.plugins:maven-release-plugin:2.5.1:prepare org.apache.maven.plugins:maven-release-plugin:2.5.1:perform

Otherwise you should consider to enforce the version of this plugin in your pluginManagement section





On Thu, Oct 15, 2015 at 10:49 AM, Jan Niklas Hasse <jha...@gmail.com> wrote:

--
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/603ba840-f579-4ea9-be31-9b60fe1729a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
-----
Arnaud Héritier
Mail/GTalk: aheritier AT gmail DOT com
Twitter/Skype : aheritier

Arnaud Héritier

unread,
Oct 15, 2015, 5:43:48 AM10/15/15
to jenkin...@googlegroups.com
Jim, from my POV, it is really better/safe to correctly configure the release plugin to be sure to have a coherent build and tags.

--
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.

For more options, visit https://groups.google.com/d/optout.

Jan Niklas Hasse

unread,
Oct 15, 2015, 6:10:30 AM10/15/15
to jenkin...@googlegroups.com
On Thu, 15 Oct 2015, at 11:12, Robert Sandell wrote:
> Hmm, it seems that it's looking in maven central for the hpi-plugin when it should be looking in repo.jenkins-ci.org/public
> Have you configured your maven settings as described here? https://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial#Plugintutorial-SettingUpEnvironment

No I haven't, thanks! Now I'm running into:

[INFO] WARNUNG: Error injecting: org.jenkinsci.maven.plugins.hpi.AptCompiler
[INFO] java.lang.NoClassDefFoundError: com/sun/mirror/apt/AnnotationProcessorFactory

Which might be because I'm still on Ubuntu 14.04?

Vincent Latombe

unread,
Oct 15, 2015, 6:31:48 AM10/15/15
to Jenkins Dev
It's probably failing because the plugin depends from a very old core version which doesn't support jdk 8, and you are using a jdk 8 to build the project.

Either :
- install a jdk 7
- update the parent version to something more recent (such as 1.565.1, one year old, but should work better than the current 1.409)

Vincent

--
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.

Jim SERRA

unread,
Oct 15, 2015, 6:47:02 AM10/15/15
to Jenkins Developers
I agree.

Jan Niklas Hasse

unread,
Oct 27, 2015, 9:12:09 AM10/27/15
to Jenkins Developers
It's probably failing because the plugin depends from a very old core version which doesn't support jdk 8, and you are using a jdk 8 to build the project.

Either :
- install a jdk 7
- update the parent version to something more recent (such as 1.565.1, one year old, but should work better than the current 1.409)

Thanks! I updated to 1.565.1 and now it works.

Unfortunately `mvn release:prepare` didn't set the version to 1.3, but left 1.3-SNAPSHOT: https://github.com/jenkinsci/python-plugin/blob/python-1.3/pom.xml
The other tags don't have -SNAPSHOT in them: https://github.com/jenkinsci/python-plugin/blob/python-1.1/pom.xml

Is this bad? Can I fix it?

Daniel Beck

unread,
Oct 27, 2015, 10:02:22 AM10/27/15
to jenkin...@googlegroups.com

On 27.10.2015, at 14:12, Jan Niklas Hasse <jha...@gmail.com> wrote:

> Unfortunately `mvn release:prepare` didn't set the version to 1.3, but left 1.3-SNAPSHOT: https://github.com/jenkinsci/python-plugin/blob/python-1.3/pom.xml
> The other tags don't have -SNAPSHOT in them: https://github.com/jenkinsci/python-plugin/blob/python-1.1/pom.xml
>
> Is this bad? Can I fix it?

The plugin hasn't actually been released to the update center, snapshots are ignored.

It's the first item here: https://wiki.jenkins-ci.org/display/JENKINS/Hosting+Plugins#HostingPlugins-Workingaroundcommonissues

Jan Niklas Hasse

unread,
Oct 29, 2015, 5:21:38 AM10/29/15
to jenkin...@googlegroups.com
On Tue, 27 Oct 2015, at 15:02, Daniel Beck wrote:
> The plugin hasn't actually been released to the update center, snapshots are ignored.
>
> It's the first item here: https://wiki.jenkins-ci.org/display/JENKINS/Hosting+Plugins#HostingPlugins-Workingaroundcommonissues

Thanks! Now it works. Sorry I didn't RTFM ;)
Reply all
Reply to author
Forward
0 new messages