提交 5abc651c 编写于 作者: K Kohsuke Kawaguchi

Merge branch 'groovy-view'

Conflicts:
	core/src/main/java/hudson/ExtensionComponent.java
	core/src/main/resources/hudson/PluginManager/sidepanel.jelly
......@@ -45,6 +45,17 @@ THE SOFTWARE.
<build>
<plugins>
<plugin>
<groupId>org.jenkins-ci.tools</groupId>
<artifactId>maven-hpi-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>generate-taglib-interface</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jvnet.hudson.tools</groupId>
<artifactId>maven-encoding-plugin</artifactId>
......@@ -387,8 +398,8 @@ THE SOFTWARE.
</dependency>
<dependency>
<groupId>org.kohsuke.stapler</groupId>
<artifactId>stapler-jelly</artifactId>
<version>1.164</version>
<artifactId>stapler-groovy</artifactId>
<version>1.167</version>
<exclusions>
<exclusion>
<groupId>commons-jelly</groupId>
......@@ -398,6 +409,11 @@ THE SOFTWARE.
<groupId>commons-jexl</groupId>
<artifactId>commons-jexl</artifactId>
</exclusion>
<exclusion>
<!-- we bundle groovy-all -->
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
......
......@@ -77,7 +77,7 @@ public class ExtensionComponent<T> implements Comparable<ExtensionComponent<T>>
// make the order bit more deterministic among extensions of the same ordinal
if (this.instance instanceof Descriptor) {
return Util.fixNull(((Descriptor)this.instance).getDisplayName()).compareTo(Util.fixNull((((Descriptor)that.instance).getDisplayName())));
return Util.fixNull(((Descriptor)this.instance).getDisplayName()).compareTo(Util.fixNull(((Descriptor)that.instance).getDisplayName()));
} else {
return this.instance.getClass().getName().compareTo(that.instance.getClass().getName());
}
......
......@@ -223,20 +223,20 @@ public final class WebAppMain implements ServletContextListener {
}
}, 1000*10);
} catch (Error e) {
LOGGER.log(Level.SEVERE, "Failed to initialize Hudson",e);
LOGGER.log(Level.SEVERE, "Failed to initialize Jenkins",e);
context.setAttribute(APP,new HudsonFailedToLoad(e));
throw e;
} catch (Exception e) {
LOGGER.log(Level.SEVERE, "Failed to initialize Hudson",e);
LOGGER.log(Level.SEVERE, "Failed to initialize Jenkins",e);
context.setAttribute(APP,new HudsonFailedToLoad(e));
}
}
}.start();
} catch (Error e) {
LOGGER.log(Level.SEVERE, "Failed to initialize Hudson",e);
LOGGER.log(Level.SEVERE, "Failed to initialize Jenkins",e);
throw e;
} catch (RuntimeException e) {
LOGGER.log(Level.SEVERE, "Failed to initialize Hudson",e);
LOGGER.log(Level.SEVERE, "Failed to initialize Jenkins",e);
throw e;
}
}
......
......@@ -36,6 +36,7 @@ import hudson.views.ListViewColumn;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.kohsuke.stapler.*;
import org.kohsuke.stapler.jelly.JellyCompatibleFacet;
import org.springframework.util.StringUtils;
import org.jvnet.tiger_types.Types;
import org.apache.commons.io.IOUtils;
......@@ -648,18 +649,24 @@ public abstract class Descriptor<T extends Describable<T>> implements Saveable {
}
public String getConfigPage() {
return getViewPage(clazz, "config.jelly");
return getViewPage(clazz, getPossibleViewNames("config"), "config.jelly");
}
public String getGlobalConfigPage() {
return getViewPage(clazz, "global.jelly",null);
return getViewPage(clazz, getPossibleViewNames("global"), null);
}
private String getViewPage(Class<?> clazz, String pageName, String defaultValue) {
return getViewPage(clazz,Collections.singleton(pageName),defaultValue);
}
private String getViewPage(Class<?> clazz, Collection<String> pageNames, String defaultValue) {
while(clazz!=Object.class) {
String name = clazz.getName().replace('.', '/').replace('$', '/') + "/" + pageName;
if(clazz.getClassLoader().getResource(name)!=null)
return '/'+name;
for (String pageName : pageNames) {
String name = clazz.getName().replace('.', '/').replace('$', '/') + "/" + pageName;
if(clazz.getClassLoader().getResource(name)!=null)
return '/'+name;
}
clazz = clazz.getSuperclass();
}
return defaultValue;
......@@ -674,6 +681,17 @@ public abstract class Descriptor<T extends Describable<T>> implements Saveable {
return getViewPage(clazz,pageName,pageName);
}
private List<String> getPossibleViewNames(String baseName) {
List<String> names = new ArrayList<String>();
for (Facet f : WebApp.get(Hudson.getInstance().servletContext).facets) {
if (f instanceof JellyCompatibleFacet) {
JellyCompatibleFacet jcf = (JellyCompatibleFacet) f;
names.add(baseName +jcf.getDefaultScriptExtension());
}
}
return names;
}
/**
* Saves the configuration info to the disk.
......
......@@ -42,7 +42,7 @@ import org.acegisecurity.ui.rememberme.RememberMeServices;
import org.acegisecurity.userdetails.UserDetailsService;
/**
* {@link Filter} that Hudson uses to implement security support.
* {@link Filter} that Jenkins uses to implement security support.
*
* <p>
* This is the instance the servlet container creates, but
......@@ -59,7 +59,7 @@ public class HudsonFilter implements Filter {
private volatile Filter filter;
/**
* The {@link #init(FilterConfig)} may be called before the Hudson instance is up (which is
* The {@link #init(FilterConfig)} may be called before the Jenkins instance is up (which is
* required for initialization of the filter). So we store the
* filterConfig for later lazy-initialization of the filter.
*/
......@@ -115,7 +115,7 @@ public class HudsonFilter implements Filter {
// the whole thing fail hard before a nicer error check
// in WebAppMain.contextInitialized. So for now,
// just report it here, and let the WebAppMain handle the failure gracefully.
LOGGER.log(SEVERE, "Failed to initialize Hudson",e);
LOGGER.log(SEVERE, "Failed to initialize Jenkins",e);
}
}
......
import com.intellij.openapi.module.*;
import com.intellij.openapi.roots.*;
def ctx = context(scope:scriptScope()) // TODO: make this more restrictive
// TODO: how to complete "it", "descriptor", "instance", and other interesting variables?
// TODO: do view pages need packages?
contributor(ctx) {
property name:"app", type:"hudson.model.Hudson"
def ct = classType
if (ct.getClass().name.endsWith(".GroovyScriptClass")) {
// if we are completing Groovy script
def roots = new HashSet/*<VirtualFile>*/()
ModuleManager.getInstance(ct.project).modules.each { m ->
roots.addAll(ModuleRootManager.getInstance(m).sourceRoots)
}
// figure out the path that this file is in
def contentPaths = []
for (def f=ct.containingFile.virtualFile; f!=null && !roots.contains(f); f=f.parent) {
contentPaths << f.name
}
def fqcn = contentPaths.reverse()[0..-2].join('.')
property name:"my", type:fqcn // but this is still shadowed by JellyBuilder.getMy
property name:"instance", type:fqcn
property name:"descriptor", type:fqcn+".DescriptorImpl"
}
// normally, built-in delegateTo function would do, except in this case
// we'd like to avoid binding getMy.
for ( String t : ["org.kohsuke.stapler.jelly.groovy.JellyBuilder","org.kohsuke.stapler.jelly.groovy.StaplerClosureScript"]) {
def c = findClass(t);
c.allMethods.findAll { !it.isConstructor() && it.name!="getMy" }.each { add it; }
c.allFields.each { add it; }
}
}
// Record of past experiments
/*
try to infer "it" from the class name of Groovy page
PsiElement.getProject()
ModuleManager.getInstance(project).getModules()
Module -> ModuleRootModel -> .getSourceRoots()
classType=Script Class:manag_ : class org.jetbrains.plugins.groovy.lang.psi.impl.synthetic.GroovyScriptClass
place=Reference expression : class org.jetbrains.plugins.groovy.lang.psi.impl.statements.expressions.GrReferenceExpressionImpl
psiType=PsiType:manag_ : class com.intellij.psi.impl.source.PsiImmediateClassType
System.out.println("classType=${classType} : ${classType.getClass()}")
System.out.println("qualifiedName="+ct.qualifiedName)
System.out.println("containingFile="+ct.containingFile)
System.out.println("containingFile.name="+ct.containingFile.name)
System.out.println("scope=${ct.scope}:${ct.scope.getClass()}")
System.out.println("scope.package=${ct.scope.getPackageName()}")
if (0) {
// file system reference goes all the way to '/' in the POSIX file system
def f = ct.containingFile
while (f!=null) {
System.out.println(" name="+f.name)
f=f.parent
}
}
*/
package hudson.taglibs;
import groovy.lang.Closure;
import org.kohsuke.stapler.jelly.groovy.TagLibraryUri;
import org.kohsuke.stapler.jelly.groovy.TypedTagLibrary;
import java.util.Map;
/**
* Experimenting. This is to be auto-generated.
*
* @author Kohsuke Kawaguchi
*/
@TagLibraryUri("/lib/layout")
public interface LayoutTagLib extends TypedTagLibrary {
void layout(Map args, Closure body);
void layout(Map args);
void layout(Closure body);
void layout();
void main_panel(Closure c);
}
// fileExtension(...) and fileName(...)
(isScript() /*& sourceFolderOfCurrentFile("src/main/resources")*/).accept {
provider "Jenkins Groovy View";
property name:"app", type:"hudson.model.Hudson";
for ( String t : ["org.kohsuke.stapler.jelly.groovy.JellyBuilder","org.kohsuke.stapler.jelly.groovy.StaplerClosureScript"]) {
delegatesTo t;
}
}
\ No newline at end of file
/*
* The MIT License
*
* Copyright (c) 2011, CloudBees, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
import hudson.taglibs.LayoutTagLib
l=namespace(LayoutTagLib)
l.header()
l.side_panel {
l.tasks {
l.task(icon:"images/24x24/up.png", href:rootURL+'/', title:_("Back to Dashboard"))
l.task(icon:"images/24x24/setting.png", href:"${rootURL}/manage", title:_("Manage Jenkins"), permission:app.ADMINISTER, it:app)
if (!app.updateCenter.jobs.isEmpty()) {
l.task(icon:"images/24x24/plugin.png", href:"${rootURL}/updateCenter/", title:_("Update Center"))
}
}
}
<!--
The MIT License
Copyright (c) 2004-2011, Sun Microsystems, Inc., Kohsuke Kawaguchi
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<!--
Side panel
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:s="/lib/form">
<l:header />
<l:side-panel>
<l:tasks>
<l:task icon="images/24x24/up.png" href="${rootURL}/" title="${%Back to Dashboard}" />
<l:task icon="images/24x24/setting.png" href="${rootURL}/manage" title="${%Manage Jenkins}" permission="${app.ADMINISTER}" it="${app}" />
<j:if test="${!empty(app.updateCenter.jobs)}">
<l:task icon="images/32x32/plugin.png" href="${rootURL}/updateCenter/" title="${%Update Center}" />
</j:if>
</l:tasks>
</l:side-panel>
</j:jelly>
import hudson.taglibs.LayoutTagLib
l=namespace(LayoutTagLib)
t=namespace("/lib/hudson")
st=namespace("jelly:stapler")
def feature(String icon, String href, String title, Closure body=null) {
t.summary(icon:icon, href:href, iconOnly:true) {
div(class:"link") {
a(href:href, title)
}
div(style:"color:gray; text-decoration:none;",body)
}
}
l.layout(title:_("Manage Jenkins"),permission:app.ADMINISTER) {
st.include(page:"sidepanel")
l.main_panel {
h1(_("Manage Jenkins"))
if (my.isCheckURIEncodingEnabled()) {
script """
var url='checkURIEncoding';
var params='value=\u57f7\u4e8b';
var checkAjax=new Ajax.Updater(
'message', url,
{
method: 'get', parameters: params
}
);
"""
span(id:"message")
}
app.administrativeMonitors.each { am ->
if (am.isActivated() && am.isEnabled())
st.include(it:am, page:"message")
}
st.include(page:"downgrade")
table(style:"padding-left: 2em;",id:"management-links") {
feature("setting.gif", "configure", _("Configure System")) {
raw(_("Configure global settings and paths."))
}
// TODO: more features
app.managementLinks.each { m ->
if (m.iconFileName==null) return;
feature(m.iconFileName, m.urlName, m.displayName) {
raw(m.description)
}
}
if (app.quietingDown) {
feature("system-log-out.gif","cancelQuietDown",_("Cancel Shutdown"))
} else {
feature("system-log-out.gif","quietDown",_("Prepare for Shutdown")) {
raw(_("Stops executing new builds, so that the system can be eventually shut down safely."))
}
}
}
}
}
\ No newline at end of file
/*
* The MIT License
*
* Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi
*
*
* Copyright (c) 2011, CloudBees, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
......@@ -21,65 +21,31 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package hudson.maven;
import hudson.model.AbstractBuild;
import hudson.model.BuildListener;
import hudson.model.Result;
import hudson.tasks.BuildStepDescriptor;
import hudson.tasks.Notifier;
import hudson.tasks.BuildStepMonitor;
import hudson.Launcher;
import hudson.maven.reporters.MavenArtifactRecord;
import hudson.tasks.Publisher;
import java.io.IOException;
/**
* {@link Publisher} for Maven projects to deploy artifacts to a Maven repository
* after the fact.
*
* <p>
* When a build breaks in the middle, this is a convenient way to prevent
* modules from being deployed partially. This can be combined with promoted builds
* plugin to deploy artifacts after testing, for example.
*
* @author Kohsuke Kawaguchi
*/
public class MavenRedeployer extends Notifier {
public boolean perform(AbstractBuild<?,?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException {
MavenArtifactRecord mar = build.getAction(MavenArtifactRecord.class);
if(mar==null) {
if(build.getResult().isBetterThan(Result.FAILURE)) {
listener.getLogger().println("There's no record of artifact information. Is this really a Maven build?");
build.setResult(Result.FAILURE);
f=namespace(lib.FormTagLib)
if (!descriptor.installations) {
f.entry(title:_("Ant Version")) {
select(class:"setting-input",name:"ant.antName") {
option(value:"(Default)", _("Default"))
descriptor.installations.each {
f.option(selected:it.name==instance?.ant?.name, value:it.name, it.name)
}
// failed
return true;
}
listener.getLogger().println("TODO");
return true;
}
}
public BuildStepMonitor getRequiredMonitorService() {
return BuildStepMonitor.NONE;
}
f.entry(title:_("Targets"),help:"/help/ant/ant-targets.html") {
f.expandableTextbox(name:"ant.targets",value:instance?.targets)
}
public BuildStepDescriptor getDescriptor() {
return DESCRIPTOR;
f.advanced {
f.entry(title:_("Build File"),help:"/help/ant/ant-buildfile.html") {
f.expandableTextbox(name:"ant.buildFile",value:instance?.buildFile)
}
public static final DescriptorImpl DESCRIPTOR = new DescriptorImpl();
public static final class DescriptorImpl extends BuildStepDescriptor {
public boolean isApplicable(Class jobType) {
return AbstractMavenProject.class.isAssignableFrom(jobType);
}
public String getDisplayName() {
return Messages.MavenRedeployer_DisplayName();
}
f.entry(title:_("Properties"),help:"/help/ant/ant-properties.html") {
f.expandableTextbox(name:"ant.properties",value:instance?.properties)
}
f.entry(title:_("Java Options"),help:"/help/ant/ant-opts.html") {
f.expandableTextbox(name:"ant.antOpts",value:instance?.antOpts)
}
}
\ No newline at end of file
}
<!--
The MIT License
Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
<j:if test="${!empty(descriptor.installations)}">
<f:entry title="${%Ant Version}">
<select class="setting-input" name="ant.antName">
<option value="(Default)">(${%Default})</option>
<j:forEach var="inst" items="${descriptor.installations}">
<f:option selected="${inst.name==instance.ant.name}" value="${inst.name}">${inst.name}</f:option>
</j:forEach>
</select>
</f:entry>
</j:if>
<f:entry title="${%Targets}" help="/help/ant/ant-targets.html">
<f:expandableTextbox name="ant.targets" value="${instance.targets}" />
</f:entry>
<f:advanced>
<f:entry title="${%Build File}" help="/help/ant/ant-buildfile.html">
<f:textbox name="ant.buildFile" value="${instance.buildFile}"/>
</f:entry>
<f:entry title="${%Properties}" help="/help/ant/ant-properties.html">
<f:textarea name="ant.properties" value="${instance.properties}"/>
</f:entry>
<f:entry title="${%Java Options}" help="/help/ant/ant-opts.html">
<f:expandableTextbox name="ant.antOpts" value="${instance.antOpts}"/>
</f:entry>
</f:advanced>
</j:jelly>
\ No newline at end of file
/*
* The MIT License
*
* Copyright (c) 2011, CloudBees, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
f=namespace("/lib/form")
f.entry(title:_("Command"),description:_("description",rootURL)) {
f.textarea(name:"command",value:instance?.command,class:"fixed-width")
}
<!--
The MIT License
Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
<f:entry title="${%Command}" description="${%description(rootURL)}">
<f:textarea name="command" value="${instance.command}" class="fixed-width" />
</f:entry>
</j:jelly>
/*
* The MIT License
*
* Copyright (c) 2011, CloudBees, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
f=namespace("/lib/form")
f.section(title:_("Shell")) {
f.entry(title:_("Shell executable"),help:"/help/shell/shellexe.html") {
f.textbox(name:"shell",value:descriptor.shell,checkUrl:"'${rootURL}/builder/Shell/check?value='+encodeURIComponent(this.value)")
}
}
<!--
The MIT License
Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Jene Jasper
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
<f:section title="${%Shell}">
<f:entry title="${%Shell executable}" help="/help/shell/shellexe.html">
<f:textbox name="shell" value="${descriptor.shell}" checkUrl="'${rootURL}/builder/Shell/check?value='+encodeURIComponent(this.value)"/>
</f:entry>
</f:section>
</j:jelly>
<!--
The MIT License
Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<?jelly escape-by-default='true'?>
<b>JELLY TAG FILE ${value}</b>
\ No newline at end of file
......@@ -110,7 +110,7 @@ THE SOFTWARE.
<j:forEach var="descriptor" items="${attrs.descriptors}" varStatus="loop">
<div name="${attrs.name}" title="${descriptor.displayName}" tooltip="${descriptor.tooltip}" descriptorId="${descriptor.id}">
<local:body deleteCaption="${attrs.deleteCaption}">
<l:renderOnDemand tag="tr" clazz="config-page" capture="descriptor,it">
<l:renderOnDemand tag="tr" clazz="config-page" capture="descriptor,it,instance">
<l:ajax>
<st:include from="${descriptor}" page="${descriptor.configPage}" optional="true" />
</l:ajax>
......
......@@ -141,6 +141,11 @@ THE SOFTWARE.
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
</plugin>
<plugin>
<groupId>org.jenkins-ci.tools</groupId>
<artifactId>maven-hpi-plugin</artifactId>
<version>1.70</version>
</plugin>
<plugin>
<!--
Both test harness and core uses stapler as an extension,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册