pax_global_header 0000666 0000000 0000000 00000000064 12071422743 0014514 g ustar 00root root 0000000 0000000 52 comment=9cb0078d6bd38ffc062a425d3814ece0ad39c819
maven-hpi-plugin-maven-hpi-plugin-1.93/ 0000775 0000000 0000000 00000000000 12071422743 0020006 5 ustar 00root root 0000000 0000000 maven-hpi-plugin-maven-hpi-plugin-1.93/.gitignore 0000664 0000000 0000000 00000000067 12071422743 0022001 0 ustar 00root root 0000000 0000000 *.iml
*.ipr
*.iws
target
.classpath
.settings
.project
maven-hpi-plugin-maven-hpi-plugin-1.93/README.md 0000664 0000000 0000000 00000000472 12071422743 0021270 0 ustar 00root root 0000000 0000000 Maven plugin to build Jenkins plugins.
See the [Extend Jenkins](https://wiki.jenkins-ci.org/display/JENKINS/Extend+Jenkins) wiki page for details.
[](https://buildhive.cloudbees.com/job/jenkinsci/job/maven-hpi-plugin/)
maven-hpi-plugin-maven-hpi-plugin-1.93/copyArchetype.xml 0000664 0000000 0000000 00000003453 12071422743 0023354 0 ustar 00root root 0000000 0000000
* When the user configures the project and enables this builder, * {@link DescriptorImpl#newInstance(StaplerRequest)} is invoked * and a new {@link HelloWorldBuilder} is created. The created * instance is persisted to the project configuration XML by using * XStream, so this allows you to use instance fields (like {@link #name}) * to remember the configuration. * *
* When a build is performed, the {@link #perform(AbstractBuild, Launcher, BuildListener)} * method will be invoked. * * @author Kohsuke Kawaguchi */ public class HelloWorldBuilder extends Builder { private final String name; // Fields in config.jelly must match the parameter names in the "DataBoundConstructor" @DataBoundConstructor public HelloWorldBuilder(String name) { this.name = name; } /** * We'll use this from the config.jelly. */ public String getName() { return name; } @Override public boolean perform(AbstractBuild build, Launcher launcher, BuildListener listener) { // This is where you 'build' the project. // Since this is a dummy, we just say 'hello world' and call that a build. // This also shows how you can consult the global configuration of the builder if (getDescriptor().getUseFrench()) listener.getLogger().println("Bonjour, "+name+"!"); else listener.getLogger().println("Hello, "+name+"!"); return true; } // Overridden for better type safety. // If your plugin doesn't really define any property on Descriptor, // you don't have to do this. @Override public DescriptorImpl getDescriptor() { return (DescriptorImpl)super.getDescriptor(); } /** * Descriptor for {@link HelloWorldBuilder}. Used as a singleton. * The class is marked as public so that it can be accessed from views. * *
* See src/main/resources/hudson/plugins/hello_world/HelloWorldBuilder/*.jelly
* for the actual HTML fragment for the configuration screen.
*/
@Extension // This indicates to Jenkins that this is an implementation of an extension point.
public static final class DescriptorImpl extends BuildStepDescriptor
* If you don't want fields to be persisted, use transient.
*/
private boolean useFrench;
/**
* Performs on-the-fly validation of the form field 'name'.
*
* @param value
* This parameter receives the value that the user has typed.
* @return
* Indicates the outcome of the validation. This is sent to the browser.
*/
public FormValidation doCheckName(@QueryParameter String value)
throws IOException, ServletException {
if (value.length() == 0)
return FormValidation.error("Please set a name");
if (value.length() < 4)
return FormValidation.warning("Isn't the name too short?");
return FormValidation.ok();
}
public boolean isApplicable(Class extends AbstractProject> aClass) {
// Indicates that this builder can be used with all kinds of project types
return true;
}
/**
* This human readable name is used in the configuration screen.
*/
public String getDisplayName() {
return "Say hello world";
}
@Override
public boolean configure(StaplerRequest req, JSONObject formData) throws FormException {
// To persist global configuration information,
// set that to properties and call save().
useFrench = formData.getBoolean("useFrench");
// ^Can also use req.bindJSON(this, formData);
// (easier when there are many fields; need set* methods for this, like setUseFrench)
save();
return super.configure(req,formData);
}
/**
* This method returns true if the global configuration says we should speak French.
*
* The method name is bit awkward because global.jelly calls this method to determine
* the initial state of the checkbox by the naming convention.
*/
public boolean getUseFrench() {
return useFrench;
}
}
}
maven-hpi-plugin-maven-hpi-plugin-1.93/hpi-archetype/src/main/resources/ 0000775 0000000 0000000 00000000000 12071422743 0026275 5 ustar 00root root 0000000 0000000 maven-hpi-plugin-maven-hpi-plugin-1.93/hpi-archetype/src/main/resources/HelloWorldBuilder/ 0000775 0000000 0000000 00000000000 12071422743 0031657 5 ustar 00root root 0000000 0000000 config.jelly 0000664 0000000 0000000 00000001022 12071422743 0034101 0 ustar 00root root 0000000 0000000 maven-hpi-plugin-maven-hpi-plugin-1.93/hpi-archetype/src/main/resources/HelloWorldBuilder
* When the user configures the project and enables this builder,
* {@link org.jenkins.HelloWorldBuilder.DescriptorImpl#newInstance(org.kohsuke.stapler.StaplerRequest)} is invoked
* and a new {@link org.jenkins.HelloWorldBuilder} is created. The created
* instance is persisted to the project configuration XML by using
* XStream, so this allows you to use instance fields (like {@link #name})
* to remember the configuration.
*
*
* When a build is performed, the {@link #perform(AbstractBuild, Launcher, BuildListener)} method
* will be invoked.
*
* @author Kohsuke Kawaguchi
*/
public class HelloWorldBuilder extends Builder {
private final String name;
// Fields in config.jelly must match the parameter names in the "DataBoundConstructor"
@DataBoundConstructor
public HelloWorldBuilder(String name) {
this.name = name;
}
/**
* We'll use this from the config.jelly.
*/
public String getName() {
return name;
}
@Override
public boolean perform(AbstractBuild build, Launcher launcher, BuildListener listener) {
// this is where you 'build' the project
// since this is a dummy, we just say 'hello world' and call that a build
// this also shows how you can consult the global configuration of the builder
if(getDescriptor().useFrench())
listener.getLogger().println("Bonjour, "+name+"!");
else
listener.getLogger().println("Hello, "+name+"!");
return true;
}
// overrided for better type safety.
// if your plugin doesn't really define any property on Descriptor,
// you don't have to do this.
@Override
public DescriptorImpl getDescriptor() {
return (DescriptorImpl)super.getDescriptor();
}
/**
* Descriptor for {@link org.jenkins.HelloWorldBuilder}. Used as a singleton.
* The class is marked as public so that it can be accessed from views.
*
*
* See views/hudson/plugins/hello_world/HelloWorldBuilder/*.jelly
* for the actual HTML fragment for the configuration screen.
*/
@Extension // this marker indicates Hudson that this is an implementation of an extension point.
public static final class DescriptorImpl extends BuildStepDescriptor
* If you don't want fields to be persisted, use transient.
*/
private boolean useFrench;
/**
* Performs on-the-fly validation of the form field 'name'.
*
* @param value
* This parameter receives the value that the user has typed.
* @return
* Indicates the outcome of the validation. This is sent to the browser.
*/
public FormValidation doCheckName(@QueryParameter String value) throws IOException, ServletException {
if(value.length()==0)
return FormValidation.error("Please set a name");
if(value.length()<4)
return FormValidation.warning("Isn't the name too short?");
return FormValidation.ok();
}
public boolean isApplicable(Class extends AbstractProject> aClass) {
// indicates that this builder can be used with all kinds of project types
return true;
}
/**
* This human readable name is used in the configuration screen.
*/
public String getDisplayName() {
return "Say hello world";
}
@Override
public boolean configure(StaplerRequest req, JSONObject formData) throws FormException {
// To persist global configuration information,
// set that to properties and call save().
useFrench = formData.getBoolean("useFrench");
// ^Can also use req.bindJSON(this, formData);
// (easier when there are many fields; need set* methods for this, like setUseFrench)
save();
return super.configure(req,formData);
}
/**
* This method returns true if the global configuration says we should speak French.
*/
public boolean useFrench() {
return useFrench;
}
}
}
maven-hpi-plugin-maven-hpi-plugin-1.93/src/it/compile-fork-it/src/main/resources/ 0000775 0000000 0000000 00000000000 12071422743 0027737 5 ustar 00root root 0000000 0000000 maven-hpi-plugin-maven-hpi-plugin-1.93/src/it/compile-fork-it/src/main/resources/index.jelly 0000664 0000000 0000000 00000000346 12071422743 0032112 0 ustar 00root root 0000000 0000000