Hosting Plugins

We encourage plugin developers to host the plugins on java.net. This makes it easier for the community to help you more easily, as well as to have the community benefit from the plugin. In this way, even when you move on to something else, the community can find someone else to pick up the work. You can take a quick look at how we work for more information.

Request hosting

Simply send e-mail to dev@hudson.dev.java.net and tell us your java.net ID, so that we can give you a commit access.

Importing source code

Once you get the commit access, you can import your source code. First you pick your plugin name, then you'd do:

$ svn mkdir https://svn.dev.java.net/svn/hudson/trunk/hudson/plugins/XYZ/
$ svn co https://svn.dev.java.net/svn/hudson/trunk/hudson/plugins/XYZ/
(this will create ./XYZ)
$ mv path/to/your/plugin/* ./XYZ
$ cd XYZ
$ svn add
$ svn commit -m "imported XYZ plugin"

Be sure not to include the work directory when you check in. If you need help, contact the dev list.

Adding a Wiki page

A plugin should have its own Wiki page on this wiki, and the URL to the Wiki page should be listed in your POM like this:

<project>
  ...
  <url>http://wiki.hudson-ci.org/display/HUDSON/My+Plugin</url>
</project>

This ensures that the update center will list your plugin correctly.

Give your wiki page a label like "plugin-scm" or "plugin-misc" (click Labels at the bottom of the wiki Edit page and start typing "plugin-" to see all the possible labels). This will ensure the page shows up as a link in the appropriate section of Plugins.

Also be sure to include {hudson-plugin-info:pluginId=your-artifact} at the top of your wiki entry, to have the standard plugin infobox show up on your wiki entry.

If your plugin's component in JIRA is different than its artifact ID, use {hudson-plugin-info:pluginId=your-artifact|jiraComponent=your-plugin-component} - if your plugin's source is not in a sub-directory of "plugins" with the same name as your artifact, add "|sourceDir=your-plugin-dir" as well.

Adding Maintainer Information

In your POM, make sure to include developer information, such as:

<project>
  ...
  <developers>
    <developer>
      <id>devguy</id>
      <name>Developer Guy</name>
      <email>devguy@developerguy.blah</email>
    </developer>
  </developer
</project>

This ensures that the update center and related tools are able to properly display the maintainer for your plugin. The email address is optional (it will be used in the plugin infobox on the wiki if provided in the POM).

Releasing to hudson-ci.org

If you have the commit access to the java.net hudson project (and we are giving it away for any plugin developer — you just need to ask) and the java.net maven2-repository project (again you just need to ask), then the easiest way to publish a plugin is to run the maven release plugin:

$ mvn release:prepare release:perform

This will perform all the usual release activity, and it will also post the plugin to the download section, as well as adding an announcement to the Hudson RSS feed. If you run with the -B option, Maven will automatically use all the default values without prompting.

The released plugin will show up in the update center in half a day or so.

Don't forget to configure your login information, which is required for the uploading to succeed. See this document for details
If release fails with the following error, run "svn list https://svn.dev.java.net/svn/hudson" manually and accept the certificate permanently.
[INFO] Unable to tag SCM
Provider message:
The svn tag command failed.
Command output:
svn: PROPFIND request failed on '/svn/hudson/tags/vmware-0.8'
svn: PROPFIND of '/svn/hudson/tags/vmware-0.8': Server certificate
verification failed: issuer is not trusted (https://svn.dev.java.
net)
Similarly, if a release fails with the following error, pay particular attention to the host name on the last line, then run "svn list https://***.dev.java.net/svn/hudson" where "***.dev.java.net" is the host name that appears in the error message. If you see this error on Mac OS X, see this workaround.
[INFO] Unable to commit files
Provider message:
The svn command failed.
Command output:
svn: Commit failed (details follow):
svn: OPTIONS request failed on '/svn/hudson/trunk/hudson/plugins/URLSCM'
svn: OPTIONS of '/svn/hudson/trunk/hudson/plugins/URLSCM': authorization failed (https://hudson.dev.java.net)
If a release fails with the following error, that means you don't have hudson/plugins/pom.xml installed in your local repository. Run mvn -N install at the plugins directory and retry a release.
[INFO] Executing: mvn deploy hpi:upload hpi:announce
--no-plugin-updates -DperformRelease=true
    [INFO] Scanning for projects...
    Downloading:
http://repo1.maven.org/maven2/org/jvnet/hudson/plugins/plugin/1.NNN/plugin-1.NNN.pom
    [INFO] ------------------------------------------------------------------------
    [ERROR] FATAL ERROR
    [INFO] ------------------------------------------------------------------------
    [INFO] Error building POM (may not be this project's POM).


    Project ID: null:xxxxxx:hpi:N.N
If a release fails with the following error, that means the version number for your plugin in pom.xml does not end with -SNAPSHOT. Add this suffix and commit the change, then try again.
    [INFO] ------------------------------------------------------------------------
    [ERROR] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] You don't have a SNAPSHOT project in the reactor projects list.
If release:perform fails with the following error, you'd need to run mvn -N install in the plugins directory and retry release:perform.
[INFO] Scanning for projects...
        Downloading: http://repo1.maven.org/maven2/org/jvnet/hudson/plugins/plugin/1.212/plugin-1.212.pom
        [INFO] ------------------------------------------------------------------------
        [ERROR] FATAL ERROR
        [INFO] ------------------------------------------------------------------------
        [INFO] Failed to resolve artifact.

    GroupId: org.jvnet.hudson.plugins
        ArtifactId: plugin
        Version: 1.212

    Reason: Unable to download the artifact from any repository

      org.jvnet.hudson.plugins:plugin:pom:1.212

    from the specified remote repositories:
          central (http://repo1.maven.org/maven2)
Subversion 409 Conflict
If a release:perform fails with an error like the following, retry mvn release:perform later. We don't know the root cause of this problem, but the problem does seem to disappear after a whie.
[INFO] [INFO] Error deploying artifact: Connection failed: Unable to connect to
  https://svn.dev.java.net/svn/maven2-repository/trunk/repository/
[INFO]
[INFO] svn: The specified baseline is not the latest baseline, so it may not be checked out.
[INFO] svn: CHECKOUT of '/svn/maven2-repository/!svn/bln/1348162': 409 Conflict (https://svn.dev.java.net)
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] For more information, run Maven with the -e switch
[INFO] [INFO] ------------------------------------------------------------------------
If a release:prepare fails with an error like the following, then it's probably because you are hitting a bug between Maven and Subversion 1.5 (see more details.) In such a case, run "svn up" on your workspace then retry:
[INFO] Unable to tag SCM
Provider message:
The svn tag command failed.
Command output:
svn: Commit failed (details follow):
svn: File '/svn/hudson/tags/foo/bar/zot/...' already exists

If changes to your pom.xml seem to be having no effect, try one of these to clear out any intermediate files and start over:

mvn -Dresume=false release:prepare release:perform
mvn release:rollback
mvn release:clean
Subversion 1.6 authentication problem

Subversion 1.6 has a known problem with the --non-interactive switch that Maven uses, in that the presence of this switch prevents Subversion from accessing your authentication credentials. See this thread for more background discussion.
You can verify wehther this is the cause of your problem by comparing the behavior between svn ls --non-interactive https://hudson.dev.java.net/svn/hudson and svn ls https://hudson.dev.java.net/svn/hudson. Once verified that this is the root cause, tell Subversion to store the password in plain text

OutOfMemoryError: Java heap space

If the release fails because Maven runs out of heap space, you may need to increase its limit by defining the MAVEN_OPTS environment variable. For example, in a bash shell, you could add the following to ~/.profile:

~/.profile
export MAVEN_OPTS=-Xmx300m

If you are running Maven inside IntelliJ 9.0.1, its setting for Maven > Runner > VM Parameters applies to only the parent Maven process, but it may be a child Maven process that is running out of memory. Furthermore, if you are running IntelliJ on MacOSX 10.6, normal environment variables, i.e., exported from ~/.profile, are not seen by apps launched from Finder. So, to increase the heap limit of child Maven processes in IntelliJ, you can configure MAVEN_OPTS in /etc/launchd.conf instead. Create or edit the file, e.g. sudo vi /etc/launchd.conf and add:

/etc/launchd.conf on MacOSX
setenv MAVEN_OPTS -Xmx300m

Help! My plugin is not showing up in the update center.

  1. First, check https://svn.dev.java.net/svn/maven2-repository/trunk/repository/org/jvnet/hudson/plugins/ (use your java.net ID and password to see this, or "guest" with empty password) and see if your plugin is listed there. If not, your release process failed, and it never left your PC. If you can't resolve this issue, redirect the output from mvn release:prepare release:perform and send it to the dev list.
  2. If your plugin is there, check http://maven.dyndns.org/2/org/jvnet/hudson/plugins/ and see if it's there. If it's not here, then the mirroring process hasn't kicked in yet. It takes up to 1 hour for the sync to kick in. If you don't see the artifact in here after a few hours, notify Kohsuke that the java.net maven2 repository mirroring isn't happening.
  3. Check if your new version is in http://hudson-ci.org/update-center.json. This file is updated every 6 hours, so there's some delay before your new version appears here.
  4. If none above applies, it's time for Kohsuke to start investigating.

Labels:

Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.