Plugin build step not appearing

47 views
Skip to first unread message

Greg Allen

unread,
May 5, 2015, 11:27:09 AM5/5/15
to jenkin...@googlegroups.com
I am sure I am missing something simple but I can't see it. Hopefully
another set of eyes will help.

I am trying to create a custom build step but it is not appearing in the
list of build steps in the dropdown in the GUI.

My really simple code follows. Can anyone tell me what is missing?

Thanks,

-- Greg


import hudson.Extension;
import hudson.Launcher;
import hudson.model.BuildListener;
import hudson.model.AbstractBuild;
import hudson.model.AbstractProject;
import hudson.tasks.BuildStepDescriptor;
import hudson.tasks.Builder;

public final class TestBuildStep extends Builder {

@Extension
public static final class TestBuildStepDescriptor extends
BuildStepDescriptor<Builder> {

@Override
public String getDisplayName() {
return "Test Build Step";
}

@Override
public boolean isApplicable(final Class<? extends
AbstractProject> jobType) {
return true;
}

}

@Override
public boolean perform(final AbstractBuild<?, ?> build, final
Launcher launcher, final BuildListener listener) {
return false;
}
}


Laurence Bordowitz

unread,
May 5, 2015, 11:47:27 AM5/5/15
to jenkin...@googlegroups.com
Did you create a matching config.jelly in the resources? Be sure to check out how Stapler works; this is how the jelly file's fields "staple" to Java fields and methods. All the tags you should need are in the taglibs link on this page:

 
 
 
 
 
 
Architecture - Jenkins - Jenkins Wiki
Jenkins is primarily a set of Java classes that model the concepts of a build system in a straight-forward fashion (and if you are using Jenkins, you've seen most of those already).
Preview by Yahoo
 

While we're on the subject; what's the latest state-of-the-art for plugin views? Jelly, groovy, or something else? If so, I'd like this page updated because that's the page that helped me get started.
 
-- Larry Bordowitz



--
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-dev+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/5548E147.6060309%40redhat.com.
For more options, visit https://groups.google.com/d/optout.


Greg Allen

unread,
May 5, 2015, 12:37:10 PM5/5/15
to jenkin...@googlegroups.com
I didn't think the config.jelly was needed as this extension doesn't expose any configuration options.  But I've added one with just the <jelly></jelly> tags and it still doesn't appear.

-- Greg
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/1417213378.394294.1430840799097.JavaMail.yahoo%40mail.yahoo.com.

Jesse Glick

unread,
May 5, 2015, 12:49:30 PM5/5/15
to Jenkins Dev
On Tue, May 5, 2015 at 11:27 AM, Greg Allen <gal...@redhat.com> wrote:
> I am trying to create a custom build step but it is not appearing in the
> list of build steps in the dropdown in the GUI.

Try

mvn clean hpi:run

Greg Allen

unread,
May 5, 2015, 1:04:39 PM5/5/15
to jenkin...@googlegroups.com
Thanks, Jesse. I'm not sure why, but that did it.

I had been building the plugin and installing it on my jenkins server
outside of eclipse and the build step wasn't showing up. And I had tried
a mvn clean as well. I did as you suggesting and the build step showed
up in the jenkins that started. So I then ran mvn:package and installed
the plugin manually on my jenkins server and it appeared there as well.

Thanks again!

-- Greg

Jesse Glick

unread,
May 5, 2015, 1:06:26 PM5/5/15
to Jenkins Dev
On Tue, May 5, 2015 at 1:04 PM, Greg Allen <gal...@redhat.com> wrote:
> I'm not sure why, but that did it.

Probably Eclipse does not run the relevant annotation processor reliably.
Reply all
Reply to author
Forward
0 new messages