What Can Plugins Do?

Jenkins defines extensibility points, which are interfaces or abstract classes that model an aspect of a build system. Those interfaces define contracts of what need to be implemented, and Jenkins allows plugins to contribute those implementations. See this document for more about extension points.

In this document, we'll be implementing a Builder that says hello. (built-in builders include Ant, Maven, and shell script. Builders build a project.)

Setting Up Environment

Nexus UsersIf you are using the Nexus Maven Repository Manager, you can ignore these instructions, and instead, click here for instructions on how to add Jenkins build prerequisites and the proper settings.xml entries.

It may be helpful to add the following to your ~/.m2/settings.xml (Windows users will find them in %USERPROFILE%\.m2\settings.xml):

<settings><pluginGroups><pluginGroup>org.jenkins-ci.tools</pluginGroup></pluginGroups><profiles><!-- Give access to Jenkins plugins --><profile><id>jenkins</id><activation><activeByDefault>true</activeByDefault><!-- change this to false, if you don't like to have it on per default --></activation><repositories><repository><id>repo.jenkins-ci.org</id><url>http://repo.jenkins-ci.org/public/</url></repository></repositories><pluginRepositories><pluginRepository><id>repo.jenkins-ci.org</id><url>http://repo.jenkins-ci.org/public/</url></pluginRepository></pluginRepositories></profile></profiles><mirrors><mirror><id>repo.jenkins-ci.org</id><url>http://repo.jenkins-ci.org/public/</url><mirrorOf>m.g.o-public</mirrorOf></mirror></mirrors></settings>

This will let you use short names for Jenkins Maven plugins (i.e. hpi:create instead of org.jenkins-ci.tools:maven-hpi-plugin:1.61:create),
though this is unnecessary once you are already working in a plugin project (only useful for initial hpi:create).
Note that adding the Jenkins repositories in a profile like this is not really necessary since most (all?) plugins already define these repositories.
And the mirror declaration is probably unnecessary.

Creating a New Plugin

To start a new plugin, use the online skeleton generator, or use an IDE (below).
Alternatively, if you are more comfortable with Maven, run the following command:

$ mvn -U org.jenkins-ci.tools:maven-hpi-plugin:create

This will ask you a few questions, like the groupId (the Maven jargon for the package name) and the artifactId (the Maven jargon for your project name), then create a skeleton plugin from which you can start with. Make sure you can build this:

$ cd newly-created-directory
$ mvn package

Explanations:

-U means that Maven should update all relevant Maven plugins (check for plugin updates)hpi: this prefix specifies that the Jenkins HPI Plugin is being invoked, a plugin that supports development of Jenkins pluginscreate is the goal which creates the directory layout and the POM for your new Jenkins plugin and it adds it to the module listpackage is a standard phase which compiles all sources, runs the tests and creates a package - when used by the HPI plugin it will create an *.hpi file

Building a Plugin

To build a plugin, run mvn install. This will create the file ./target/pluginname.hpi that you can deploy to Jenkins.

$ mvn install

Setting up a productive environment with your IDE

NetBeans

NetBeans users can use the IDE's Maven support to open the project directly.

As you navigate through the code, you can tell NetBeans to attach source code JAR files by clicking the "Attach" button that appears in the top of the main content window. This allows you to read the Jenkins core source code as you develop plugins. (Or just select Download Sources on the Dependencies node.)

IntelliJ IDEA

IntelliJ 7.0 (or later) users can load pom.xml directly from IDE, and you should see all the source code of libraries and Jenkins core all the way to the bottom. Consider installing IntelliJ IDEA plugin for Stapler to make the development easier.

IntelliJ defaults to downloading sources and JavaDocs on demand. So, to see the source, you may need to click the Download artifacts button in the Maven Projects tab.

Eclipse

Use Eclipse Juno (4.2) or later for the best experience.

As Jenkins plugins are Maven projects, Eclipse users have two ways to load a Jenkins plugin project. One is to use m2e, which tries to make Eclipse understand Maven "natively", and the other is to use Maven Eclipse plugin, which makes Maven generate Eclipse project definitions. At the moment, unless you have some prior experience with m2e, we currently recommend plugin developers to go with the Maven Eclipse plugin.

Eclipse users can run the following Maven command to generate Eclipse project files (the custom outputDirectory parameter is used to work around the lack of JSR-269 annotation processor support in Eclipse:)

See Eclipse alternative build setup for an alternative way of setting up the Eclipse build environment, that is a bit more technically involved than using maven, but can give faster build times.

Plugin Workspace Layout

The plugin workspace consists of the following major pieces:

pom.xml

Maven uses it for building your plugin.

src/main/java

Java source files of the plugin.

src/main/resources

Jelly/Groovy views of the plugin. See this document for more about it.

src/main/webapp

Static resources of the plugin, such as images and HTML files.

Source Code

PluginImpl approach

(deprecated in favor of the Extension points approach below)

A plugin's main entry point may be a PluginImpl class that extends from Plugin. Once Jenkins detects this plugin class (via its inheritance relationship from Plugin), it will create an instance, and invoke methods.

Extension points approach

A Plugin class is optional; a plugin may simply implement extension points, registering them with the @hudson.Extension annotation for automatic detection by Jenkins.

The bulk work in the plugin consists in implementing those extension points. See the sample source code for more information about how a Builder is implemented and what it does.

Here are a few things about extension:

in general a plugin extension should extend an existing extension point (a class that implements ExtensionPoint), and define an inner static class extending the corresponding descriptor (a class extending hudson.model.Descriptor)

the @Extension annotation must be placed on the inner descriptor class to let Jenkins know about this extension

the descriptor handles the global configuration of the extension while the extension class itself handles the individual configuration of the extension. For instance in a plugin defining a class extending LabelAtomProperty, an object of this class is instantiated for each LabelAtom (provided that the plugin is activated by the user in the label's configuration page). If configuration parameters for each individual instance are required, they're handled via a config.jelly file stored in a resource package named after the extension class. When the configuration form is saved, Jenkins calls the extension constructor marked with the @org.kohsuke.stapler.DataBoundConstructor annotation, matching parameters by name

Debugging a Plugin

NetBeans 6.7+ users can just hit Debug. For all others, run the following command to launch Jenkins with your plugin:
Convenient:

If you open http://localhost:8080/jenkins in your browser, you should see the Jenkins page running in Jetty. The MAVEN_OPTS portion launches this whole thing with the debugger port 8000, so you should be able to start a debug session to this port from your IDE.

Once this starts running, keep it running. Jetty will pick up all the changes automatically.

When you make changes to view files in src/main/resources or resource files in src/main/webapp, just hit F5 in your browser to see the changes.

When you change Java source files, compile them in your IDE (NetBeans 6.7+: Debug > Apply Code Changes) and Jetty should automatically redeploy Jenkins to pick up those changes. There is no need to run mvn at all.

MAVEN_OPTS can be used to specify all sorts of other JVM parameters, like -Xmx

Changing port

If you need to launch the Jenkins on a different port than 8080, set the port through the system property jetty.port.

$ mvn hpi:run -Djetty.port=8090

Setting context path

maven-hpi-plugin 1.65 or later (used by parent POM 1.401 or later) can set the context path by using a system property. On more recent versions of Jenkins the "/jenkins" prefix is added automatically.

$ mvn hpi:run -Dhpi.prefix=/jenkins

Changing code while debugging

Depending on what you change, you can see it in the running instance without restarting the whole Maven process:

Views: Groovy/Jelly views are re-compiled every time a browser requests a page, so just reload a page in the browser and you'll see the changes. This is also true for help files you write.

Java code: If you are debugging, JVM's hot swap feature can be used to reload code so long as you don't touch the method signature. Beyond that, you can hit ENTER in the Maven process and it'll reload the Jenkins webapp. See Developing with JRebel for how to get a JRebel license for OSS projects to improve this experience.

POM: If you change POM, you'll have to stop and restart Maven to see the changes.

Distributing a Plugin

To create a distribution image of your plugin, run the following Maven command:

$ mvn package

This should create target/*.hpi file. Other users can use Jenkins' web UI to upload this plugin to Jenkins (or place it in $JENKINS_HOME/plugins.)

Releasing a Plugin and Hosting a Plugin on jenkins-ci.org

If you got to this point, you should definitely consider hosting your plugin on jenkins-ci.org. Move on to this document for how to do that. This includes the instructions for releasing the plugin.

Using custom builds of plugins included in the Jenkins WAR

If you are building a patched version of one of the plugins in the Jenkins core, the deployment process is a bit different. This is because Jenkins will itself manage these plugins unless you tell it not to.

Other tips

Consider running Maven like this mvn -o ... to avoid hitting repositories every time. This will make various operations considerably faster.

Subscribe to the users' alias from here so that we can get in touch with you.

When you bump up the version of Jenkins you depend on, make sure to run mvn clean once, in particular to delete target/work that Jetty uses. Newer versions may just use work, not target/work. Otherwise your Jetty may continue to pick up old left-over JAR files.

If you have a high latency network connection to the Maven repository, you might find it faster to first run the build once on a server near to the maven repository, then rsync the .m2/repository folder across to your local computer

The 'package' and 'install' targets will by default run many tests. You can add '-DskipTests' on the command-line to skip these (of course you should run the tests before committing any changes)

The 'compiler:compile' goal is faster than 'compile', because it is a goal, rather than a lifecycle event, and therefore avoids certain earlier goals, such as setting up resources

Other resources

Besides this tutorial, there are other tutorials and examples available on line:

I followed the instructions and I get the following error when I do mvn hp...

I followed the instructions and I get the following error when I do mvn hpi:run:[INFO] Started Jetty Server
[INFO] Starting scanner at interval of 1 seconds.
2008-03-04 13:15:12.765:/:INFO: Stapler: init
2008-03-04 13:15:12.781::WARN: EXCEPTION
javax.servlet.ServletException: there's no "app" attribute in the application context.
at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:446)
at org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:370)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:468)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1074)
at hudson.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:79)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1065)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:285)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:751)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:500)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
I am using Maven 2.0.8, Java 1.6.0_02 on Windows XP Pro SP2. Am I doing something wrong? I am new to Maven.

[FATAL ERROR] Container realm = plexus.core
urls[0] = file:/opt/setups/apache-maven-2.0.9/lib/maven-2.0.9-uber.jar
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] com.sun.tools.apt.Main
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NoClassDefFoundError: com.sun.tools.apt.Main
at org.jvnet.hudson.maven.plugins.hpi.AptCompiler.compileInProcess(AptCompiler.java:62)
at org.jvnet.hudson.maven.plugins.hpi.AptCompiler.compile(AptCompiler.java:50)
at org.jvnet.hudson.maven.plugins.hpi.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:486)
at org.jvnet.hudson.maven.plugins.hpi.CompilerMojo.execute(CompilerMojo.java:111)
at org.jvnet.hudson.maven.plugins.hpi.AptMojo.execute(AptMojo.java:21)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

Munish, I take it from the appearance of codehaus in your stack backtrace that y...

Munish, I take it from the appearance of codehaus in your stack backtrace that you may be using the "mevenide" plugin for netbeans. If so, please look at the email archives for the last few days at http://www.nabble.com/codehaus---mevenide-f11958.html because there appears to be a problem with the latest version of the plugin.

I like Hudson, and would like to contribute a plugin. However, in spite of the fact that I've built and deployed more than 100 enterprise Java projects since 1999, Maven absolutely makes me sick. I cringe at all the wonderful projects that are adopting it.

I followed all the directions above, and tried anything in the comments that looked like it would help. Please reconsider your choice of this miserable tool.

When following the instructions above, and running mvn hpi:create I receive a me...

When following the instructions above, and running mvn hpi:create I receive a message saying that it is missing: com.sun:tools:jar:1.5. When running in debug mode I can see that it is looking for the file C:\Program Files\Java\jdk1.6.0_13\..\lib\tools.jar. Where did the ..\ came from? My JAVA_HOME path is set to C:\Program Files\Java\jdk1.6.0_13.

I am running instructions on wndows with java 1.5 on windows with mvn (Apache Ma...

I am running instructions on wndows with java 1.5 on windows with mvn (Apache Maven 2.1.0 (r755702; 2009-03-18 19:10:27+0000)) and I get the following error...

C:\stuartb\java\HUDSON~1>mvn -e hpi:create
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'hpi'.
[INFO] org.jvnet.hudson.tools: checking for updates from m.g.o-public
[WARNING] repository metadata for: 'org.jvnet.hudson.tools' could not be retrieved from repository: m.g.o-public due to
an error: Error transferring file: maven.glassfish.org
[INFO] Repository 'm.g.o-public' will be blacklisted
[INFO] org.jvnet.hudson.tools: checking for updates from central
[WARNING] repository metadata for: 'org.jvnet.hudson.tools' could not be retrieved from repository: central due to an er
ror: Error transferring file: repo1.maven.org
[INFO] Repository 'central' will be blacklisted
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The plugin 'org.apache.maven.plugins:maven-hpi-plugin' does not exist or no valid version could be found
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: The plugin 'org.apache.maven.plugins:maven-hpi-plugin' does not
exist or no valid version could be found
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1546)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:1786)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.segmentTaskListByAggregationNeeds(DefaultLifecycleExecuto
r.java:446)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:176)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:356)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.version.PluginVersionNotFoundException: The plugin 'org.apache.maven.plugins:maven-hp
i-plugin' does not exist or no valid version could be found
at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.
java:229)
at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.
java:91)
at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:172)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1517)
... 14 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Tue May 26 12:08:54 BST 2009
[INFO] Final Memory: 1M/3M
[INFO] ------------------------------------------------------------------------
C:\stuartb\java\HUDSON~1>

Any thoughts on this?
Looks like mvn is not all together happy. Possible network issue?
The path to mvn is strewn with small hurdles. A clever but not simple build process.

when compiling on OS X even though java -version says you are using Java > 1.6 you might need to set JAVA_HOME manually to /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home or something like that, to be sure that maven uses JDK6.

I have a problem with running/debugging my plugin. I have set up everything acco...

I have a problem with running/debugging my plugin. I have set up everything according to the guide and it compiles nicely. I can even create a .hpi-package and install in Hudson with the tutorial. But I can't seem to debug.

I try to run "mvn hpi:run" which shows some output and from what I can see everything goes well, but I can't connect to localhost?

To resolve this problem I checked whether the class 'Archetype' is in the Maven repository on my disk. I found a directory in %USERPROFILE%\.m2\repository\org\apache\maven\archetype so I thought that I have to add this path to any Maven configuration file or something like this.

Could anybody give me some suggestions or some keywords where I could read on to get started on writing the plugin?

I am in the same boat as Adrian - I have it built, I have it installed but I don...

I am in the same boat as Adrian - I have it built, I have it installed but I don't see anywhere where this manifests itself in my hudson instance? Any ideas? I checked my eclipse project and it is JDK 1.6 compliant.

An I am in the same boat as Adrian and Russ, a year later.
Christophe's suggest...

An I am in the same boat as Adrian and Russ, a year later.

Christophe's suggestion doesn't help me as I am not using any IDE. I'm using command line with OpenJDK 1.6 (except that for my standalone Hudson webapp I'm running Tomcat 6 with Sun JDK 1.6).

I have the same exact situation as Adrian Smith explained, regardless whether I use "mvn...: run" or install the .hpi into a standalone Hudson webapp.

As the problem persists after year and a half, surely others will continue to run into this. Could somebody give us a clue about where we should see the plugin in the Hudson UI? Like on which Hudson page(s). Seeing that the new plugin is a "Builder", I expected to see a new item on the Hudson "New Job" page, but I do not.

I'm a tutorial writer, and I don't understand why somebody would dedicate the time to write one but end at the installation step-- giving no hint about how to use or verify the final product.

Sorry to self-reply, but I wanted to report back that my issues are resolved.
T...

Sorry to self-reply, but I wanted to report back that my issues are resolved.

The reason it took me so long is that Hudson either does very little validation of installed plugins, or that validation is poor. Hudson has no idea when incompatible and non-functional plugins are installed.

The answer to my primary question is, when a plugin is installed successfully, a stanza for that plugin will appear in the global config page ("Configure System" link, URL /CONTEXT-ROOT/configure). I deduced this after reading one of the Confluence pages about Jelly.

My problems were due to not-knowing-where-to-look, compounded by building an incompatible version of the plugin. When installing the plugin whose source was incompatible with my Hudson web app, the plugin did install but was crippled and did not appear on the global config screen.

Hi,
is there an update on the issue with missing class AnnotationProcessorFacto...

Hi,

is there an update on the issue with missing class AnnotationProcessorFactory?
I used the hpi archetype from within Eclipse and set the version of the parent pom to the version I use of Hudson (also tried 1.323 and 1.310):

Internal error in the plugin manager executing goal 'org.jvnet.hudson.tools:maven-hpi-plugin:1.45:apt-compile': Unable to load the mojo 'org.jvnet.hudson.tools:maven-hpi-plugin:1.45:apt-compile' in the plugin 'org.jvnet.hudson.tools:maven-hpi-plugin'. A required class is missing: com/sun/mirror/apt/AnnotationProcessorFactory

After some deeper analysis, the problem was related to my JVM. It's slightly dif...

After some deeper analysis, the problem was related to my JVM. It's slightly different and missed that class. Need to find out why, but since the hpi plugins expect the above mentioned class to be present they couldn't work in my case. Maybe declaring an explicit dependency could improve the situation? I found the class also in other artifacts on Maven Central and Glassfish (which first confused me), so others have repackaged the stuff (it's not strictly part of the main runtime libraries, but the apt tools library). Ok, that was just fyi. Cheers, Vedran

OK, after investigation, the issue for me is from Eclipse IAM (Maven integration...

OK, after investigation, the issue for me is from Eclipse IAM (Maven integration) that does not include JDK jars (only JRE), so tools.jar is not included, even if everything is pointing on the JDK. Its a classical Eclipse/JRE/JDK classpath hell. It is not a hudson maven packaging issue (command-line maven works fine in all cases).

I created a new plugin using mvn -cpu hpi:create which went fine. The plugin...

I created a new plugin using mvn -cpu hpi:create which went fine. The plugin worked for a while and I could modify it, adding new things and whatnot, but eventually I ended up with the following error. I also ended up with the error if I left the plugin untouched and just rebuilt it frequently. mvn clean does nothing to help the situation.

Not fatal to the tutorial, since I can use the (very) long Maven plugin strings,...

Not fatal to the tutorial, since I can use the (very) long Maven plugin strings, but the [Setting Up Environment] step above is completely useless for me. Although I have put the setup.xml file in place, the mvn commands only work if I give the long strings. I.e., hpi:ANYTHING does not work.

As required by the instructions here, I am using a fairly recent version of Maven (ie. 2.0.9 or newer). Namely 3.0.1 (which they say is backwards compatible and still uses $HOME/.m2/setup.xml). As of today, this is the main public release of Maven and the one recommended by the Maven project.

WarningIf (like me) you can't use short Maven plugin strings, do not supply a version number like "1.23" in [the tutorial] unless you really want to work with an old version of Hudson.

If you want to deploy the .hpi to an app server and are running a recent Hudson distribution webapp, you will want to get the latest version of plugin source by specifying no version label.

For chapter setting up environment , in nexus hints, "you can ignore these instr...

For chapter setting up environment , in nexus hints, "you can ignore these instructions" it leads misunderstanding, since I think no matter nexus or not, we still need to set "org.jvnet.hudson.tools" for plugins group in settings.xml

Our Jenkins is in a DMZ, where we can't have acces to the jekins-ci.orh maven re...

Our Jenkins is in a DMZ, where we can't have acces to the jekins-ci.orh maven repo. We haven our own nexus server mirroing jenkins nexus. We can access our own nexus, where all jenkins plugins are mirrored. How can we creat an "update-center.json" file with our nexus domain url?

Hi, This may be a dumb problem, but I can't seem to build any plug-in from sourc...

Hi, This may be a dumb problem, but I can't seem to build any plug-in from source.

I followed the instructions on this page: installed Maven 3.0.3, edited the settingx.xml as instructed on this page, got the source for the Doxygen plug-in, ran 'mvn install' waited for a bit for all the packages to be downloaded and I finally got this:

Hi, I'm using Maven with Eclipse and I don't have a mvn executable because Maven...

Hi, I'm using Maven with Eclipse and I don't have a mvn executable because Maven is integrated in the Eclipse plugin structure.

But I have a "New Maven Project" wizard in Eclipse. Does someone know how to create new Maven plugins suitable for Jenkins with this Maven-Eclipse-Integration (i.e. without the need for a standalone maven command-line version)?

I get following error, multiple attempts.
HTTP ERROR: 500INTERNAL_SERVER_ERRORR...

I get following error, multiple attempts.

HTTP ERROR: 500INTERNAL_SERVER_ERRORRequestURI=/job/test/configSubmit

Caused by:java.lang.UnsupportedOperationException

at org.jvnet.hudson.test.HudsonTestCase$TestBuildWrapper$TestBuildWrapperDescriptor.newInstance(HudsonTestCase.java:1962)
at org.jvnet.hudson.test.HudsonTestCase$TestBuildWrapper$TestBuildWrapperDescriptor.newInstance(HudsonTestCase.java:1953)
at hudson.util.DescribableList.rebuild(DescribableList.java:154)
at hudson.model.Project.submit(Project.java:196)
at hudson.model.Job.doConfigSubmit(Job.java:989)

This tutorial directs users to compile with Maven 2, however the feedback I got ...

This tutorial directs users to compile with Maven 2, however the feedback I got on the Jenkins google group directed me to use Maven 3 to properly compile the subversion-plugin (https://groups.google.com/forum/?fromgroups=#!topic/jenkinsci-dev/ccolOycM1gI). Compilation fails using Maven 2 and JDK 1.6.0_24, but works with Maven 3.0.5. This could be worth noting in this write-up if it's not a corner-case.