提交 41e3a130 编写于 作者: JenkinsInChina's avatar JenkinsInChina

modify git ignore

上级 67b555b2
**/*.iml **/*.iml
idea .idea
.DS_Store
# maven stuff
target target
# jenkins stuff
work
...@@ -12,6 +12,7 @@ public class I18nDispatcher extends Dispatcher { ...@@ -12,6 +12,7 @@ public class I18nDispatcher extends Dispatcher {
@Override @Override
public boolean dispatch(RequestImpl req, ResponseImpl rsp, Object node) throws IOException, ServletException, IllegalAccessException, InvocationTargetException { public boolean dispatch(RequestImpl req, ResponseImpl rsp, Object node) throws IOException, ServletException, IllegalAccessException, InvocationTargetException {
if(req.getOriginalRequestURI().endsWith("help")) { if(req.getOriginalRequestURI().endsWith("help")) {
// new I18nRequestDispatcher().forward(req.getRequest(), rsp.getResponse());
return true; return true;
} }
......
package hudson.plugins.localization; package hudson.plugins.localization;
import org.kohsuke.stapler.RequestImpl;
import org.kohsuke.stapler.lang.Klass;
import javax.servlet.RequestDispatcher; import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException; import javax.servlet.ServletException;
import javax.servlet.ServletRequest; import javax.servlet.ServletRequest;
...@@ -7,9 +10,26 @@ import javax.servlet.ServletResponse; ...@@ -7,9 +10,26 @@ import javax.servlet.ServletResponse;
import java.io.IOException; import java.io.IOException;
public class I18nRequestDispatcher implements RequestDispatcher { public class I18nRequestDispatcher implements RequestDispatcher {
private RequestImpl request;
private Klass<?> type;
private Object it;
private String viewName;
public I18nRequestDispatcher(RequestImpl request, Klass<?> type, Object it, String viewName) {
this.request = request;
this.type = type;
this.it = it;
this.viewName = viewName;
}
@Override @Override
public void forward(ServletRequest servletRequest, ServletResponse servletResponse) throws ServletException, IOException { public void forward(ServletRequest req, ServletResponse servletResponse) throws ServletException, IOException {
System.out.println("forward"); System.out.println("forward");
String path = this.request.getOriginalRestOfPath();
String uri = this.request.getOriginalRequestURI();
// this.getClass().getResource("/hudson/model/FreeStyleProject/help_zh_CN.html").openStream() == null
servletResponse.getWriter().println("sff");
// /jenkins/descriptor/hudson.model.FreeStyleProject/help/concurrentBuild
} }
@Override @Override
......
...@@ -17,7 +17,12 @@ public class LocalizationFacet extends Facet { ...@@ -17,7 +17,12 @@ public class LocalizationFacet extends Facet {
@Override @Override
public RequestDispatcher createRequestDispatcher(RequestImpl request, Klass<?> type, Object it, String viewName) throws IOException { public RequestDispatcher createRequestDispatcher(RequestImpl request, Klass<?> type, Object it, String viewName) throws IOException {
return super.createRequestDispatcher(request, type, it, viewName); RequestDispatcher dispatcher = super.createRequestDispatcher(request, type, it, viewName);
if(dispatcher == null) {
// dispatcher = new I18nRequestDispatcher(request, type, it, viewName);
}
return dispatcher;
} }
@Override @Override
......
//package hudson.plugins.localization;
//
//import org.apache.commons.jelly.Script;
//import org.kohsuke.stapler.jelly.JellyRequestDispatcher;
//
//public class abcDispatcher extends JellyRequestDispatcher {
// public abcDispatcher(Object it, Script script) {
// super(it, script);
// }
//}
111
<div>
When this option is checked, multiple builds of this project may be executed
in parallel.
<p>
By default, only a single build of a project is executed at a time &mdash; any
other requests to start building that project will remain in the build queue
until the first build is complete.<br>
This is a safe default, as projects can often require exclusive access to
certain resources, such as a database, or a piece of hardware.
<p>
But with this option enabled, if there are enough build executors available
that can handle this project, then multiple builds of this project will take
place in parallel. If there are not enough available executors at any point,
any further build requests will be held in the build queue as normal.
<p>
Enabling concurrent builds is useful for projects that execute lengthy test
suites, as it allows each build to contain a smaller number of changes, while
the total turnaround time decreases as subsequent builds do not need to wait
for previous test runs to complete.<br>
This feature is also useful for parameterized projects, whose individual build
executions &mdash; depending on the parameters used &mdash; can be
completely independent from one another.
<p>
Each concurrently executed build occurs in its own build workspace, isolated
from any other builds. By default, Jenkins appends "<tt>@&lt;num&gt;</tt>" to
the workspace directory name, e.g. "<tt>@2</tt>".<br>
The separator "<tt>@</tt>" can be changed by setting the
<tt>hudson.slaves.WorkspaceList</tt> Java system property when starting
Jenkins. For example, "<tt>hudson.slaves.WorkspaceList=-</tt>" would change
the separator to a hyphen.<br>
For more information on setting system properties, see the <a
href="https://jenkins.io/redirect/setting-system-properties"
target="_blank">wiki page</a>.
<p>
However, if you enable the <i>Use custom workspace</i> option, all builds will
be executed in the same workspace. Therefore caution is required, as multiple
builds may end up altering the same directory at the same time.
</div>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册