Hi,

I'm new to plug-in development, and having studied a couple of basic 
examples, plus the archetypes, I'm in the process of creating a plug-in for 
our specific use-case.

My problem is that I want to be able to have different build steps in the 
plug-in, for example, a ReleaseFile step and a PatchFile step.  I have 
created 2 Builder classes and 2 associated Callables  My Builders look like 
the below.

When I install the plugin into Jenkins, only the HeathviewPatchBuilder is 
available.  The HeathviewReleaseBuilder creates an error in the log:

class com.etas.jenkins.plugins.HeathviewPlugin.HeathviewReleaseBuilder is 
missing its descriptor

Any and all suggestions as to what I'm doing wrong gratefully received!

Thanks in advance!

Jase

public class HeathviewReleaseBuilder extends Builder {
@DataBoundConstructor
public HeathviewReleaseBuilder(boolean beginOutput, String patchOrder, 
String buildName) {
... 
}

    @Override
public boolean perform(AbstractBuild build, Launcher launcher, BuildListener 
listener) {
    ...
}


@Override
public HVReleaseDescriptorImpl getDescriptor() {
return (HVReleaseDescriptorImpl)super.getDescriptor();
}


@Extension // This indicates to Jenkins that this is an implementation of 
an extension point.
public static final class HVReleaseDescriptorImpl extends 
BuildStepDescriptor<Builder> {

public HVReleaseDescriptorImpl() {
load();
}

public boolean isApplicable(Class<? extends AbstractProject> aClass) {
return true;
}

public String getDisplayName() {
return "Heathview: Create Release File header or footer XML section.";
}

@Override
public boolean configure(StaplerRequest req, JSONObject formData) throws 
FormException {
save();
return super.configure(req,formData);
}
}
}



public class HeathviewPatchBuilder extends Builder {
@DataBoundConstructor
public HeathviewPatchBuilder(boolean beginOutput, String buildName) {
... 
}

    @Override
public boolean perform(AbstractBuild build, Launcher launcher, BuildListener 
listener) {
    ...
}


@Override
public HVPatchDescriptorImpl getDescriptor() {
return (HVPatchDescriptorImpl)super.getDescriptor();
}


@Extension // This indicates to Jenkins that this is an implementation of 
an extension point.
public static final class HVPatchDescriptorImpl extends BuildStepDescriptor<
Builder> {

public HVPatchDescriptorImpl() {
load();
}

public boolean isApplicable(Class<? extends AbstractProject> aClass) {
return true;
}
public String getDisplayName() {
return "Heathview: Create Patch File header or footer XML section.";
}

@Override
public boolean configure(StaplerRequest req, JSONObject formData) throws 
FormException {
save()
return super.configure(req,formData);
}
}
}


-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/f21d7760-cc9e-46d1-a6a3-c1756b28badb%40googlegroups.com.

Reply via email to