mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-16 21:42:27 +00:00
Merge branch 'master' of github.com:jenkinsci/jenkins
This commit is contained in:
commit
514b5fdf51
102 files changed
+1622
-446
No files matched your search
@@ -14,6 +14,9 @@ out
|
||||
.project
|
||||
build
|
||||
|
||||
# vim
|
||||
*~
|
||||
|
||||
war/images/16x16
|
||||
war/images/24x24
|
||||
war/images/32x32
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
If you want simply to have the jenkins.war as fast as possible (without test execution), just use :
|
||||
mvn clean install -pl war -am -DskipTests
|
||||
the war will be in war/target/jenkins.war (you can play with it)
|
||||
You can desactivate test-harness execution with -Dskip-test-harness
|
||||
Have Fun !!
|
||||
|
||||
+76
-6
@@ -54,6 +54,75 @@ Upcoming changes</a>
|
||||
|
||||
<!-- Record your changes in the trunk here. -->
|
||||
<div id="trunk" style="display:none"><!--=TRUNK-BEGIN=-->
|
||||
<ul class=image>
|
||||
<li class=bug>
|
||||
Output correct version from java -jar jenkins.war --version (broken since 1.410)
|
||||
<li class=bug>
|
||||
Correct usage text from java -jar jenkins.war --help
|
||||
<li class=bug>
|
||||
Incremental maven jobs: if POM parsing failed, do a full build next time.
|
||||
(<a href="http://issues.jenkins-ci.org/browse/JENKINS-9848">issue 9848</a>)
|
||||
<li class=rfe>
|
||||
CLI command page now lists all the available commands
|
||||
(<a href="http://issues.jenkins-ci.org/browse/JENKINS-9789">issue 9789</a>)
|
||||
<li class=rfe>
|
||||
Improve the post deployment job to make a clear error if you disabled artifacts archives
|
||||
(<a href="http://issues.jenkins-ci.org/browse/JENKINS-9791">issue 9791</a>)
|
||||
<li class=rfe>
|
||||
Post-build deploy task for Maven jobs : Repositories definitions can now be read from the POMs.
|
||||
(<a href="http://issues.jenkins-ci.org/browse/JENKINS-9786">issue 9786</a>)
|
||||
<li class=rfe>
|
||||
Run maven jobs as headless process. on OSX this avoid jumping Dock icon to take focus.
|
||||
(<a href="http://issues.jenkins-ci.org/browse/JENKINS-9785">issue 9785</a>)
|
||||
<li class=rfe>
|
||||
Reduce memory consumption of dependency calculation in maven jobs.
|
||||
(<a href="http://issues.jenkins-ci.org/browse/JENKINS-9845">issue 9845</a>)
|
||||
<li class=rfe>
|
||||
Strongly encrypt proxy credentials
|
||||
(<a href="http://issues.jenkins-ci.org/browse/JENKINS-4002">issue 4002</a>)
|
||||
<li class=rfe>
|
||||
Added an extension point to allow prodding the NodeProvisioner into taking action faster than it might usually.
|
||||
<li class=bug>
|
||||
When there are absolutely no executors for a specific label, there was an unnecessary delay in provisioning the
|
||||
first node for that label.
|
||||
</ul>
|
||||
</div><!--=TRUNK-END=-->
|
||||
|
||||
<!-- these changes are controlled by the release process. DO NOT MODIFY -->
|
||||
<div id="rc" style="display:none;"><!--=BEGIN=-->
|
||||
<h3><a name=v1.414>What's new in 1.414</a> <!--=DATE=--></h3>
|
||||
<ul class=image>
|
||||
<li class=bug>
|
||||
Fixed the concurrent modification exception in classloading during startup
|
||||
<li class=bug>
|
||||
Show an error message if no name is provided when creating a job (CLI)
|
||||
(<a href="http://issues.jenkins-ci.org/browse/JENKINS-6958">issue 6958</a>)
|
||||
<li class=bug>
|
||||
Fix unescaped apostrophe in French translation.
|
||||
(<a href="http://issues.jenkins-ci.org/browse/JENKINS-9699">issue 9699</a>)
|
||||
<li class=bug>
|
||||
Allow building multiple downstream dependencies on a single job via DependencyGraph and BuildTrigger.
|
||||
(<a href="http://issues.jenkins-ci.org/browse/JENKINS-8985">issue 8985</a>)
|
||||
<li class=bug>
|
||||
Catch FileNotFoundException in Maven builds if Mojos are executed from a classes directory.
|
||||
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-5044">issue 5044</a>)
|
||||
<li class=bug>
|
||||
Fix NPE if node of last build isn't available anymore while polling for SCM changes.
|
||||
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-9003">issue 9003 </a>)
|
||||
<li class=rfe>
|
||||
Set NODE_NAME for master node to "master"
|
||||
(<a href="http://issues.jenkins-ci.org/browse/JENKINS-9671">issue 9671</a>)
|
||||
<li class=rfe>
|
||||
Jenkins Maven build does not recognize Tycho surfire reports with new groupId org.eclipse.tycho
|
||||
(<a href="http://issues.jenkins-ci.org/browse/JENKINS-9326">issue 9326</a>)
|
||||
<li class=rfe>
|
||||
Add a default attribute to repeatableProperty and repeatable jelly tags
|
||||
<li class=rfe>
|
||||
Log which build steps have changed the build result to build console.
|
||||
(<a href="http://issues.jenkins-ci.org/browse/JENKINS-9687">issue 9687</a>)
|
||||
</ul>
|
||||
</div><!--=END=-->
|
||||
<h3><a name=v1.413>What's new in 1.413</a> (2011/05/22)</h3>
|
||||
<ul class=image>
|
||||
<li class=bug>
|
||||
Fixed extra ' character in french translation.
|
||||
@@ -67,6 +136,9 @@ Upcoming changes</a>
|
||||
<li class=bug>
|
||||
Fixed a <tt>ClassCastException</tt> caused by multiple loading of the same class in different classloaders.
|
||||
(<a href="http://issues.jenkins-ci.org/browse/JENKINS-9017">issue 9017</a>)
|
||||
<li class=rfe>
|
||||
Support rebuilding a subset of matrix configurations
|
||||
(<a href="http://issues.jenkins-ci.org/browse/JENKINS-1613">issue 1613</a>)
|
||||
<li class=rfe>
|
||||
Gracefully handle old slave.jar to avoid <tt>AbstractMethodError</tt>
|
||||
(<a href="https://groups.google.com/d/topic/jenkinsci-dev/KqFw4nfiQdE/discussion">thread</a>)
|
||||
@@ -79,18 +151,16 @@ Upcoming changes</a>
|
||||
<li class=rfe>
|
||||
Replaced all gif images with png images (transparency support).
|
||||
(<a href="http://issues.jenkins-ci.org/browse/JENKINS-3969">issue 3969</a>)
|
||||
<li class=rfe>
|
||||
Boldify names of executed mojos for Freestyle and Maven2/3 jobs using Maven3 in console output.
|
||||
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-9691">issue 9691</a>)
|
||||
</ul>
|
||||
</div><!--=TRUNK-END=-->
|
||||
|
||||
<!-- these changes are controlled by the release process. DO NOT MODIFY -->
|
||||
<div id="rc" style="display:none;"><!--=BEGIN=-->
|
||||
<h3><a name=v1.412>What's new in 1.412</a> <!--=DATE=--></h3>
|
||||
<h3><a name=v1.412>What's new in 1.412</a> (2011/05/16)</h3>
|
||||
<ul class=image>
|
||||
<li class=rfe>
|
||||
Wait until updates are successfully installed before restarting Jenkins
|
||||
(<a href="http://issues.jenkins-ci.org/browse/JENKINS-5047">issue 5047</a>)
|
||||
</ul>
|
||||
</div><!--=END=-->
|
||||
<h3><a name=v1.411>What's new in 1.411</a> (2011/05/09)</h3>
|
||||
<ul class=image>
|
||||
<li class=bug>
|
||||
|
||||
+3
-2
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<artifactId>pom</artifactId>
|
||||
<groupId>org.jenkins-ci.main</groupId>
|
||||
<version>1.413-SNAPSHOT</version>
|
||||
<version>1.415-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>cli</artifactId>
|
||||
<name>Jenkins CLI</name>
|
||||
@@ -13,6 +13,7 @@
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
@@ -33,7 +34,7 @@
|
||||
<plugin>
|
||||
<groupId>org.jvnet.localizer</groupId>
|
||||
<artifactId>maven-localizer-plugin</artifactId>
|
||||
<version>1.10</version>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
|
||||
+16
-10
@@ -28,7 +28,7 @@ THE SOFTWARE.
|
||||
<parent>
|
||||
<groupId>org.jenkins-ci.main</groupId>
|
||||
<artifactId>pom</artifactId>
|
||||
<version>1.413-SNAPSHOT</version>
|
||||
<version>1.415-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -48,7 +48,7 @@ THE SOFTWARE.
|
||||
<plugin>
|
||||
<groupId>org.jvnet.hudson.tools</groupId>
|
||||
<artifactId>maven-encoding-plugin</artifactId>
|
||||
<version>1.1</version>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
@@ -61,7 +61,7 @@ THE SOFTWARE.
|
||||
<plugin>
|
||||
<groupId>com.infradna.tool</groupId>
|
||||
<artifactId>bridge-method-injector</artifactId>
|
||||
<version>1.4</version>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
@@ -73,6 +73,7 @@ THE SOFTWARE.
|
||||
<plugin>
|
||||
<groupId>org.kohsuke.stapler</groupId>
|
||||
<artifactId>maven-stapler-plugin</artifactId>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<extensions>true</extensions>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
@@ -89,7 +90,7 @@ THE SOFTWARE.
|
||||
<plugin>
|
||||
<groupId>org.jvnet.localizer</groupId>
|
||||
<artifactId>maven-localizer-plugin</artifactId>
|
||||
<version>1.10</version>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
@@ -105,7 +106,7 @@ THE SOFTWARE.
|
||||
<plugin>
|
||||
<groupId>org.kohsuke</groupId>
|
||||
<artifactId>access-modifier-checker</artifactId>
|
||||
<version>1.0</version>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
@@ -117,7 +118,7 @@ THE SOFTWARE.
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>antlr-maven-plugin</artifactId>
|
||||
<version>2.1</version>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<executions>
|
||||
<execution>
|
||||
<id>cron</id>
|
||||
@@ -144,6 +145,7 @@ THE SOFTWARE.
|
||||
<plugin>
|
||||
<groupId>org.jvnet.maven-antrun-extended-plugin</groupId>
|
||||
<artifactId>maven-antrun-extended-plugin</artifactId>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>generate-resources</phase>
|
||||
@@ -181,6 +183,7 @@ THE SOFTWARE.
|
||||
</plugin>
|
||||
<plugin><!-- set main class -->
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
@@ -198,7 +201,7 @@ THE SOFTWARE.
|
||||
-->
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>apt-maven-plugin</artifactId>
|
||||
<version>1.0-alpha-4</version>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<configuration>
|
||||
<force>true</force><!-- disable staleness check -->
|
||||
<factory>org.jvnet.hudson.tools.ExtensionPointListerFactory</factory>
|
||||
@@ -246,7 +249,7 @@ THE SOFTWARE.
|
||||
<plugin><!-- execute apt:process for "Extension points" Wiki page generation -->
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>apt-maven-plugin</artifactId>
|
||||
<version>1.0-alpha-2</version>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
@@ -263,6 +266,7 @@ THE SOFTWARE.
|
||||
-->
|
||||
<groupId>org.kohsuke.stapler</groupId>
|
||||
<artifactId>maven-stapler-plugin</artifactId>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
@@ -287,7 +291,7 @@ THE SOFTWARE.
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>findbugs-maven-plugin</artifactId>
|
||||
<version>1.2</version>
|
||||
<version>2.3.2</version>
|
||||
<configuration>
|
||||
<effort>Max</effort>
|
||||
<threshold>Normal</threshold>
|
||||
@@ -308,6 +312,7 @@ THE SOFTWARE.
|
||||
<plugin>
|
||||
<groupId>org.kohsuke.gmaven</groupId>
|
||||
<artifactId>gmaven-plugin</artifactId>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<executions>
|
||||
<!-- run unit test -->
|
||||
<execution>
|
||||
@@ -327,6 +332,7 @@ THE SOFTWARE.
|
||||
<plugin>
|
||||
<!-- unit tests are run by GMaven through Ant. -->
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<configuration>
|
||||
<skipTests>true</skipTests>
|
||||
</configuration>
|
||||
@@ -835,7 +841,7 @@ THE SOFTWARE.
|
||||
</plugin>
|
||||
<plugin><!-- skip slow dependency analysis -->
|
||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||
<version>2.1</version>
|
||||
<version>2.4</version>
|
||||
<configuration>
|
||||
<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
|
||||
</configuration>
|
||||
|
||||
@@ -1211,6 +1211,7 @@ public final class FilePath implements Serializable {
|
||||
* See {@link FileSet} for the syntax. String like "foo/*.zip" or "foo/**/*.xml"
|
||||
* @return
|
||||
* can be empty but always non-null.
|
||||
* @since 1.407
|
||||
*/
|
||||
public FilePath[] list(final String includes, final String excludes) throws IOException, InterruptedException {
|
||||
return act(new FileCallable<FilePath[]>() {
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
*/
|
||||
package hudson;
|
||||
|
||||
import hudson.cli.CLICommand;
|
||||
import hudson.console.ConsoleAnnotationDescriptor;
|
||||
import hudson.console.ConsoleAnnotatorFactory;
|
||||
import hudson.model.AbstractProject;
|
||||
@@ -1377,4 +1378,15 @@ public class Functions {
|
||||
public static Object rawHtml(Object o) {
|
||||
return o==null ? null : new RawHtmlArgument(o);
|
||||
}
|
||||
|
||||
public static ArrayList<CLICommand> getCLICommands() {
|
||||
ArrayList<CLICommand> all = new ArrayList<CLICommand>(CLICommand.all());
|
||||
Collections.sort(all, new Comparator<CLICommand>() {
|
||||
public int compare(CLICommand cliCommand, CLICommand cliCommand1) {
|
||||
return cliCommand.getName().compareTo(cliCommand1.getName());
|
||||
}
|
||||
});
|
||||
return all;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -74,6 +74,7 @@ import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
@@ -91,7 +92,7 @@ public abstract class PluginManager extends AbstractModelObject {
|
||||
/**
|
||||
* All active plugins.
|
||||
*/
|
||||
protected final List<PluginWrapper> activePlugins = new ArrayList<PluginWrapper>();
|
||||
protected final List<PluginWrapper> activePlugins = new CopyOnWriteArrayList<PluginWrapper>();
|
||||
|
||||
protected final List<FailedPlugin> failedPlugins = new ArrayList<FailedPlugin>();
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ import hudson.model.Hudson;
|
||||
import hudson.model.Saveable;
|
||||
import hudson.model.listeners.SaveableListener;
|
||||
import hudson.util.Scrambler;
|
||||
import hudson.util.Secret;
|
||||
import hudson.util.XStream2;
|
||||
|
||||
import java.io.File;
|
||||
@@ -59,10 +60,20 @@ public final class ProxyConfiguration implements Saveable {
|
||||
public final int port;
|
||||
|
||||
/**
|
||||
* Possibly null proxy user name and password.
|
||||
* Password is base64 scrambled since this is persisted to disk.
|
||||
* Possibly null proxy user name.
|
||||
*/
|
||||
private final String userName,password;
|
||||
private final String userName;
|
||||
|
||||
/**
|
||||
* null
|
||||
*/
|
||||
@Deprecated
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* encrypted password
|
||||
*/
|
||||
private Secret secretPassword;
|
||||
|
||||
public ProxyConfiguration(String name, int port) {
|
||||
this(name,port,null,null);
|
||||
@@ -72,15 +83,24 @@ public final class ProxyConfiguration implements Saveable {
|
||||
this.name = name;
|
||||
this.port = port;
|
||||
this.userName = userName;
|
||||
this.password = Scrambler.scramble(password);
|
||||
this.secretPassword = Secret.fromString(password);
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
// This method is public, if it was public only for jelly, then should make it private (or inline contents)
|
||||
// Have left public, as can't tell if anyone else is using from plugins
|
||||
/**
|
||||
* @return the password in plain text
|
||||
*/
|
||||
public String getPassword() {
|
||||
return Scrambler.descramble(password);
|
||||
return Secret.toString(secretPassword);
|
||||
}
|
||||
|
||||
public String getEncryptedPassword() {
|
||||
return (secretPassword == null) ? null : secretPassword.getEncryptedValue();
|
||||
}
|
||||
|
||||
public Proxy createProxy() {
|
||||
@@ -94,6 +114,14 @@ public final class ProxyConfiguration implements Saveable {
|
||||
SaveableListener.fireOnChange(this, config);
|
||||
}
|
||||
|
||||
public Object readResolve() {
|
||||
if (secretPassword == null)
|
||||
// backward compatibility : get crambled password and store it encrypted
|
||||
secretPassword = Secret.fromString(Scrambler.descramble(password));
|
||||
password = null;
|
||||
return this;
|
||||
}
|
||||
|
||||
public static XmlFile getXmlFile() {
|
||||
return new XmlFile(XSTREAM, new File(Hudson.getInstance().getRootDir(), "proxy.xml"));
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public class CreateJobCommand extends CLICommand {
|
||||
return "Creates a new job by reading stdin as a configuration XML file";
|
||||
}
|
||||
|
||||
@Argument(metaVar="NAME",usage="Name of the job to create")
|
||||
@Argument(metaVar="NAME",usage="Name of the job to create",required=true)
|
||||
public String name;
|
||||
|
||||
protected int run() throws Exception {
|
||||
|
||||
@@ -138,6 +138,21 @@ public class MatrixBuild extends AbstractBuild<MatrixProject,MatrixBuild> {
|
||||
return r;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all {@link MatrixRun}s for this {@link MatrixBuild}.
|
||||
* <p>
|
||||
* Unlike {@link #getExactRuns()}, this method excludes those runs
|
||||
* that didn't run and got inherited.
|
||||
*/
|
||||
public List<MatrixRun> getExactRuns() {
|
||||
List<MatrixRun> r = new ArrayList<MatrixRun>();
|
||||
for(MatrixConfiguration c : getParent().getItems()) {
|
||||
MatrixRun b = c.getBuildByNumber(getNumber());
|
||||
if (b != null) r.add(b);
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getWhyKeepLog() {
|
||||
MatrixBuild b = getNextBuild();
|
||||
@@ -218,7 +233,8 @@ public class MatrixBuild extends AbstractBuild<MatrixProject,MatrixBuild> {
|
||||
Collection<MatrixConfiguration> touchStoneConfigurations = new HashSet<MatrixConfiguration>();
|
||||
Collection<MatrixConfiguration> delayedConfigurations = new HashSet<MatrixConfiguration>();
|
||||
for (MatrixConfiguration c: activeConfigurations) {
|
||||
if (!MatrixBuildListener.buildConfiguration(MatrixBuild.this, c)) continue;
|
||||
if (!MatrixBuildListener.buildConfiguration(MatrixBuild.this, c))
|
||||
continue; // skip rebuild
|
||||
if (touchStoneFilter != null && c.getCombination().evalGroovyExpression(p.getAxes(), p.getTouchStoneCombinationFilter())) {
|
||||
touchStoneConfigurations.add(c);
|
||||
} else {
|
||||
|
||||
@@ -1,36 +1,84 @@
|
||||
package hudson.matrix.listeners;
|
||||
|
||||
import hudson.ExtensionList;
|
||||
import hudson.ExtensionPoint;
|
||||
import hudson.matrix.MatrixConfiguration;
|
||||
import hudson.matrix.MatrixBuild;
|
||||
import hudson.model.Hudson;
|
||||
|
||||
public abstract class MatrixBuildListener implements ExtensionPoint {
|
||||
|
||||
/**
|
||||
* Determine whether to build a given configuration or not
|
||||
* @param b
|
||||
* @param c
|
||||
* @return
|
||||
*/
|
||||
public boolean doBuildConfiguration(MatrixBuild b, MatrixConfiguration c){return true;}
|
||||
|
||||
public static boolean buildConfiguration(MatrixBuild b, MatrixConfiguration c) {
|
||||
for (MatrixBuildListener l : all()) {
|
||||
if(!l.doBuildConfiguration(b, c)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all the registered {@link MatrixBuildListener} descriptors.
|
||||
*/
|
||||
public static ExtensionList<MatrixBuildListener> all() {
|
||||
return Hudson.getInstance().getExtensionList(MatrixBuildListener.class);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* The MIT License
|
||||
*
|
||||
* Copyright (c) 2011, Christian Wolfgang
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
package hudson.matrix.listeners;
|
||||
|
||||
import hudson.ExtensionList;
|
||||
import hudson.ExtensionPoint;
|
||||
import hudson.matrix.MatrixConfiguration;
|
||||
import hudson.matrix.MatrixBuild;
|
||||
import hudson.matrix.MatrixRun;
|
||||
import hudson.model.Action;
|
||||
import hudson.model.Hudson;
|
||||
import hudson.model.Queue;
|
||||
import hudson.model.Queue.Task;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Controls which subset of {@link MatrixRun}s to rebuild.
|
||||
*
|
||||
* <p>
|
||||
* Plugins can implement this extension point to filter out the subset of matrix project to build.
|
||||
* Most typically, such a plugin would add a custom {@link Action} to a build when it goes to the queue
|
||||
* ({@link Queue#schedule(Task, int, List)}, then access this from {@link MatrixBuild} to drive
|
||||
* the filtering logic.
|
||||
*
|
||||
* <p>
|
||||
* See the matrix reloaded plugin for an example.
|
||||
*
|
||||
* @author Christian Wolfgang
|
||||
* @since 1.413
|
||||
*/
|
||||
public abstract class MatrixBuildListener implements ExtensionPoint {
|
||||
/**
|
||||
* Determine whether to build a given configuration or not
|
||||
*
|
||||
* @param b
|
||||
* Never null. The umbrella build.
|
||||
* @param c
|
||||
* The configuration whose build is being considered. If any of the {@link MatrixBuildListener}
|
||||
* returns false, then the build for this configuration is skipped, and the previous build
|
||||
* of this configuration will be taken as the default result.
|
||||
* @return
|
||||
* True to let the build happen, false to skip it.
|
||||
*/
|
||||
public abstract boolean doBuildConfiguration(MatrixBuild b, MatrixConfiguration c);
|
||||
|
||||
public static boolean buildConfiguration(MatrixBuild b, MatrixConfiguration c) {
|
||||
for (MatrixBuildListener l : all()) {
|
||||
if(!l.doBuildConfiguration(b, c)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all the registered {@link MatrixBuildListener} descriptors.
|
||||
*/
|
||||
public static ExtensionList<MatrixBuildListener> all() {
|
||||
return Hudson.getInstance().getExtensionList(MatrixBuildListener.class);
|
||||
}
|
||||
}
|
||||
@@ -659,7 +659,26 @@ public abstract class AbstractBuild<P extends AbstractProject<P,R>,R extends Abs
|
||||
} catch (AbstractMethodError e) {
|
||||
mon = BuildStepMonitor.BUILD;
|
||||
}
|
||||
return mon.perform(bs, AbstractBuild.this, launcher, listener);
|
||||
Result oldResult = AbstractBuild.this.getResult();
|
||||
boolean canContinue = mon.perform(bs, AbstractBuild.this, launcher, listener);
|
||||
Result newResult = AbstractBuild.this.getResult();
|
||||
if (newResult != oldResult) {
|
||||
String buildStepName = getBuildStepName(bs);
|
||||
listener.getLogger().format("Build step '%s' changed build result to %s%n", buildStepName, newResult);
|
||||
}
|
||||
if (!canContinue) {
|
||||
String buildStepName = getBuildStepName(bs);
|
||||
listener.getLogger().format("Build step '%s' marked build as failure%n", buildStepName);
|
||||
}
|
||||
return canContinue;
|
||||
}
|
||||
|
||||
private String getBuildStepName(BuildStep bs) {
|
||||
if (bs instanceof Describable<?>) {
|
||||
return ((Describable<?>) bs).getDescriptor().getDisplayName();
|
||||
} else {
|
||||
return bs.getClass().getSimpleName();
|
||||
}
|
||||
}
|
||||
|
||||
protected final boolean preBuild(BuildListener listener,Map<?,? extends BuildStep> steps) {
|
||||
|
||||
@@ -1263,7 +1263,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
|
||||
// lock the workspace of the last build
|
||||
FilePath ws=lb.getWorkspace();
|
||||
|
||||
if (ws==null || !ws.exists()) {
|
||||
if (workspaceOffline(lb)) {
|
||||
// workspace offline. build now, or nothing will ever be built
|
||||
Label label = getAssignedLabel();
|
||||
if (label != null && label.isSelfLabel()) {
|
||||
@@ -1326,6 +1326,24 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
|
||||
return NO_CHANGES;
|
||||
}
|
||||
}
|
||||
|
||||
private boolean workspaceOffline(R build) throws IOException, InterruptedException {
|
||||
FilePath ws = build.getWorkspace();
|
||||
if (ws==null || !ws.exists()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Node builtOn = build.getBuiltOn();
|
||||
if (builtOn == null) { // node built-on doesn't exist anymore
|
||||
return true;
|
||||
}
|
||||
|
||||
if (builtOn.toComputer() == null) { // node still exists, but has 0 executors - o.s.l.t.
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if this user has made a commit to this project.
|
||||
|
||||
@@ -44,9 +44,9 @@ import static javax.servlet.http.HttpServletResponse.SC_BAD_REQUEST;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.AbstractList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
@@ -478,7 +478,7 @@ public final class DependencyGraph implements Comparator<AbstractProject> {
|
||||
/**
|
||||
* Collect multiple dependencies between the same two projects.
|
||||
*/
|
||||
private static class DependencyGroup extends Dependency {
|
||||
public static class DependencyGroup extends Dependency {
|
||||
private Set<Dependency> group = new LinkedHashSet<Dependency>();
|
||||
|
||||
DependencyGroup(Dependency first) {
|
||||
@@ -486,10 +486,14 @@ public final class DependencyGraph implements Comparator<AbstractProject> {
|
||||
group.add(first);
|
||||
}
|
||||
|
||||
void add(Dependency next) {
|
||||
private void add(Dependency next) {
|
||||
group.add(next);
|
||||
}
|
||||
|
||||
public Set<Dependency> getGroup() {
|
||||
return group;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldTriggerBuild(AbstractBuild build, TaskListener listener,
|
||||
List<Action> actions) {
|
||||
|
||||
@@ -25,14 +25,6 @@ package hudson.model;
|
||||
|
||||
import hudson.Extension;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.kohsuke.stapler.StaplerRequest;
|
||||
import org.kohsuke.stapler.StaplerResponse;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
|
||||
/**
|
||||
* Free-style software project.
|
||||
*
|
||||
|
||||
@@ -27,7 +27,6 @@ package hudson.model;
|
||||
import hudson.EnvVars;
|
||||
import hudson.Util;
|
||||
import hudson.scm.SCM;
|
||||
import hudson.slaves.OfflineCause;
|
||||
import hudson.tasks.BuildWrapper;
|
||||
import hudson.tasks.Builder;
|
||||
import hudson.util.VariableResolver;
|
||||
@@ -250,7 +249,7 @@ public abstract class ParameterValue implements Serializable {
|
||||
* provided by this object should be masked in output.
|
||||
*
|
||||
* <p>
|
||||
* Subclasses can override this to control the returne value.
|
||||
* Subclasses can override this to control the return value.
|
||||
*
|
||||
* @since 1.378
|
||||
*/
|
||||
|
||||
@@ -78,7 +78,6 @@ import java.util.GregorianCalendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.NoSuchElementException;
|
||||
|
||||
@@ -43,6 +43,7 @@ import hudson.matrix.MatrixRun;
|
||||
import hudson.model.Descriptor.FormException;
|
||||
import hudson.model.listeners.RunListener;
|
||||
import hudson.model.listeners.SaveableListener;
|
||||
import hudson.model.Hudson.MasterComputer;
|
||||
import hudson.search.SearchIndexBuilder;
|
||||
import hudson.security.ACL;
|
||||
import hudson.security.AccessControlled;
|
||||
@@ -1791,7 +1792,11 @@ public abstract class Run <JobT extends Job<JobT,RunT>,RunT extends Run<JobT,Run
|
||||
if (t instanceof Executor) {
|
||||
Executor e = (Executor) t;
|
||||
env.put("EXECUTOR_NUMBER",String.valueOf(e.getNumber()));
|
||||
env.put("NODE_NAME",e.getOwner().getName());
|
||||
if(e.getOwner() instanceof MasterComputer) {
|
||||
env.put("NODE_NAME", "master");
|
||||
} else {
|
||||
env.put("NODE_NAME",e.getOwner().getName());
|
||||
}
|
||||
Node n = e.getOwner().getNode();
|
||||
if (n!=null)
|
||||
env.put("NODE_LABELS",Util.join(n.getAssignedLabels()," "));
|
||||
|
||||
@@ -267,6 +267,8 @@ public class ManagedWindowsServiceLauncher extends ComputerLauncher {
|
||||
afterDisconnect(computer,listener);
|
||||
}
|
||||
});
|
||||
//destroy session to free the socket
|
||||
JISession.destroySession(session);
|
||||
} catch (SmbException e) {
|
||||
e.printStackTrace(listener.error(e.getMessage()));
|
||||
} catch (JIException e) {
|
||||
@@ -315,6 +317,8 @@ public class ManagedWindowsServiceLauncher extends ComputerLauncher {
|
||||
listener.getLogger().println(Messages.ManagedWindowsServiceLauncher_StoppingService());
|
||||
slaveService.StopService();
|
||||
}
|
||||
//destroy session to free the socket
|
||||
JISession.destroySession(session);
|
||||
} catch (UnknownHostException e) {
|
||||
e.printStackTrace(listener.error(e.getMessage()));
|
||||
} catch (JIException e) {
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
*/
|
||||
package hudson.slaves;
|
||||
|
||||
import hudson.model.Computer;
|
||||
import hudson.model.LoadStatistics;
|
||||
import hudson.model.Node;
|
||||
import hudson.model.Hudson;
|
||||
@@ -41,6 +42,7 @@ import java.util.List;
|
||||
import java.util.Collection;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.logging.Level;
|
||||
import java.io.IOException;
|
||||
@@ -87,6 +89,8 @@ public class NodeProvisioner {
|
||||
|
||||
private List<PlannedNode> pendingLaunches = new ArrayList<PlannedNode>();
|
||||
|
||||
private transient volatile long lastSuggestedReview;
|
||||
|
||||
/**
|
||||
* Exponential moving average of the "planned capacity" over time, which is the number of
|
||||
* additional executors being brought up.
|
||||
@@ -113,15 +117,33 @@ public class NodeProvisioner {
|
||||
return new ArrayList<PlannedNode>(pendingLaunches);
|
||||
}
|
||||
|
||||
/**
|
||||
* Give the {@link NodeProvisioner} a hint that now would be a good time to think about provisioning some nodes.
|
||||
* The hint will be ignored if subjected to excessive pestering by callers.
|
||||
*
|
||||
* @since 1.415
|
||||
*/
|
||||
public void suggestReviewNow() {
|
||||
if (System.currentTimeMillis() > lastSuggestedReview + TimeUnit.SECONDS.toMillis(1)) {
|
||||
lastSuggestedReview = System.currentTimeMillis();
|
||||
Computer.threadPoolForRemoting.submit(new Runnable() {
|
||||
public void run() {
|
||||
update();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Periodically invoked to keep track of the load.
|
||||
* Launches additional nodes if necessary.
|
||||
*/
|
||||
private synchronized void update() {
|
||||
lastSuggestedReview = System.currentTimeMillis();
|
||||
Hudson hudson = Hudson.getInstance();
|
||||
|
||||
// clean up the cancelled launch activity, then count the # of executors that we are about to bring up.
|
||||
float plannedCapacity = 0;
|
||||
int plannedCapacitySnapshot = 0;
|
||||
for (Iterator<PlannedNode> itr = pendingLaunches.iterator(); itr.hasNext();) {
|
||||
PlannedNode f = itr.next();
|
||||
if(f.future.isDone()) {
|
||||
@@ -137,8 +159,9 @@ public class NodeProvisioner {
|
||||
}
|
||||
itr.remove();
|
||||
} else
|
||||
plannedCapacity += f.numExecutors;
|
||||
plannedCapacitySnapshot += f.numExecutors;
|
||||
}
|
||||
float plannedCapacity = plannedCapacitySnapshot;
|
||||
plannedCapacitiesEMA.update(plannedCapacity);
|
||||
|
||||
/*
|
||||
@@ -175,8 +198,9 @@ public class NodeProvisioner {
|
||||
|
||||
int idleSnapshot = stat.computeIdleExecutors();
|
||||
int totalSnapshot = stat.computeTotalExecutors();
|
||||
boolean needSomeWhenNoneAtAll = ((totalSnapshot + plannedCapacity) == 0) && (stat.computeQueueLength() > 0);
|
||||
float idle = Math.max(stat.getLatestIdleExecutors(TIME_SCALE), idleSnapshot);
|
||||
if(idle<MARGIN) {
|
||||
if(idle<MARGIN || needSomeWhenNoneAtAll) {
|
||||
// make sure the system is fully utilized before attempting any new launch.
|
||||
|
||||
// this is the amount of work left to be done
|
||||
@@ -186,6 +210,11 @@ public class NodeProvisioner {
|
||||
plannedCapacity = Math.max(plannedCapacitiesEMA.getLatest(TIME_SCALE),plannedCapacity);
|
||||
|
||||
float excessWorkload = qlen - plannedCapacity;
|
||||
if (needSomeWhenNoneAtAll && excessWorkload < 1) {
|
||||
// in this specific exceptional case we should just provision right now
|
||||
// the exponential smoothing will delay the build unnecessarily
|
||||
excessWorkload = 1;
|
||||
}
|
||||
float m = calcThresholdMargin(totalSnapshot);
|
||||
if(excessWorkload>1-m) {// and there's more work to do...
|
||||
LOGGER.fine("Excess workload "+excessWorkload+" detected. (planned capacity="+plannedCapacity+",Qlen="+qlen+",idle="+idle+"&"+idleSnapshot+",total="+totalSnapshot+"m,="+m+")");
|
||||
|
||||
@@ -201,7 +201,19 @@ public class BuildTrigger extends Recorder implements DependecyDeclarer {
|
||||
}
|
||||
});
|
||||
|
||||
List<Dependency> depsToBuild = new ArrayList<Dependency>();
|
||||
for (Dependency dep : downstreamProjects) {
|
||||
if (dep instanceof DependencyGraph.DependencyGroup) {
|
||||
for (Dependency d : ((DependencyGraph.DependencyGroup)dep).getGroup()) {
|
||||
depsToBuild.add(d);
|
||||
}
|
||||
}
|
||||
else {
|
||||
depsToBuild.add(dep);
|
||||
}
|
||||
}
|
||||
|
||||
for (Dependency dep : depsToBuild) {
|
||||
AbstractProject p = dep.getDownstreamProject();
|
||||
if (p.isDisabled()) {
|
||||
logger.println(Messages.BuildTrigger_Disabled(p.getName()));
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* The MIT License
|
||||
*
|
||||
* Copyright (c) 2010, InfraDNA, 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.
|
||||
*/
|
||||
package hudson.tasks._maven;
|
||||
|
||||
import hudson.Extension;
|
||||
import hudson.MarkupText;
|
||||
import hudson.console.ConsoleAnnotationDescriptor;
|
||||
import hudson.console.ConsoleAnnotator;
|
||||
import hudson.console.ConsoleNote;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* Marks the log line that reports that Maven3 is executing a mojo.
|
||||
* It'll look something like this:
|
||||
*
|
||||
* <pre>[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ jobConfigHistory ---</pre>
|
||||
*
|
||||
* or
|
||||
*
|
||||
* <pre>[INFO] --- gmaven-plugin:1.0-rc-5:generateTestStubs (test-in-groovy) @ jobConfigHistory ---</pre>
|
||||
*
|
||||
* or
|
||||
*
|
||||
* <pre>[INFO] --- cobertura-maven-plugin:2.4:instrument (report:cobertura) @ sardine ---</pre>
|
||||
*
|
||||
* @author Mirko Friedenhagen
|
||||
*/
|
||||
public class Maven3MojoNote extends ConsoleNote {
|
||||
public Maven3MojoNote() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConsoleAnnotator annotate(Object context, MarkupText text, int charPos) {
|
||||
text.addMarkup(7,text.length(),"<b class=maven-mojo>","</b>");
|
||||
return null;
|
||||
}
|
||||
|
||||
@Extension
|
||||
public static final class DescriptorImpl extends ConsoleAnnotationDescriptor {
|
||||
public String getDisplayName() {
|
||||
return "Maven 3 Mojos";
|
||||
}
|
||||
}
|
||||
|
||||
public static Pattern PATTERN = Pattern.compile("\\[INFO\\] --- .+-plugin:[^:]+:[^ ]+ \\(.+\\) @ .+ ---");
|
||||
}
|
||||
@@ -60,6 +60,10 @@ public class MavenConsoleAnnotator extends LineTransformationOutputStream {
|
||||
if (m.matches())
|
||||
new MavenMojoNote().encodeTo(out);
|
||||
|
||||
m = Maven3MojoNote.PATTERN.matcher(line);
|
||||
if (m.matches())
|
||||
new Maven3MojoNote().encodeTo(out);
|
||||
|
||||
m = MavenWarningNote.PATTERN.matcher(line);
|
||||
if (m.find())
|
||||
new MavenWarningNote().encodeTo(out);
|
||||
|
||||
@@ -48,7 +48,7 @@ THE SOFTWARE.
|
||||
<f:textbox name="proxy.userName" value="${app.proxy.userName}" />
|
||||
</f:entry>
|
||||
<f:entry title="${%Password}">
|
||||
<f:password name="proxy.password" value="${app.proxy.password}" />
|
||||
<f:password name="proxy.password" value="${app.proxy.encryptedPassword}" />
|
||||
</f:entry>
|
||||
<f:block>
|
||||
<f:submit value="${%Submit}" />
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# The MIT License
|
||||
#
|
||||
# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, id:cactusman
|
||||
# Copyright (c) 2004-2011, Sun Microsystems, Inc., Kohsuke Kawaguchi, id:cactusman
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -20,4 +20,4 @@
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
|
||||
Changes=\u5909\u66f4
|
||||
Changes=\u5909\u66f4\u5c65\u6b74
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
Back\ to\ Project=\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3078\u623b\u308b
|
||||
Status=\u72b6\u614b
|
||||
Changes=\u5909\u66f4
|
||||
Changes=\u5909\u66f4\u5c65\u6b74
|
||||
Console\ Output=\u30b3\u30f3\u30bd\u30fc\u30eb\u51fa\u529b
|
||||
raw=\u672a\u52a0\u5de5
|
||||
Configure=\u8a2d\u5b9a
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# The MIT License
|
||||
#
|
||||
# Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi, id:cactusman. Seiji Sogabe
|
||||
# Copyright (c) 2004-2011, Sun Microsystems, Inc., Kohsuke Kawaguchi, id:cactusman. Seiji Sogabe
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -20,7 +20,7 @@
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
|
||||
changes.title={0}\u306E\u5909\u66F4
|
||||
Changes=\u5909\u66F4
|
||||
from.label=#{0} \u304B\u3089
|
||||
to.label=#{0} \u307E\u3067
|
||||
changes.title={0}\u306e\u5909\u66f4
|
||||
Changes=\u5909\u66f4\u5c65\u6b74
|
||||
from.label=#{0} \u304b\u3089
|
||||
to.label=#{0} \u307e\u3067
|
||||
@@ -21,7 +21,7 @@
|
||||
# THE SOFTWARE.
|
||||
|
||||
Workspace=\u30ef\u30fc\u30af\u30b9\u30da\u30fc\u30b9
|
||||
Recent\ Changes=\u6700\u65b0\u306e\u5909\u66f4
|
||||
Recent\ Changes=\u5909\u66f4\u5c65\u6b74
|
||||
Last\ Successful\ Artifacts=\u6700\u65b0\u6210\u529f\u30d3\u30eb\u30c9\u306e\u6210\u679c\u7269
|
||||
Latest\ Test\ Result=\u6700\u65b0\u306e\u30c6\u30b9\u30c8\u7d50\u679c
|
||||
Latest\ Aggregated\ Test\ Result=\u6700\u65b0\u306e\u96c6\u7d04\u3055\u308c\u305f\u30c6\u30b9\u30c8\u7d50\u679c
|
||||
@@ -1,6 +1,6 @@
|
||||
# The MIT License
|
||||
#
|
||||
# Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi, Seiji Sogabe, id:cactusman
|
||||
# Copyright (c) 2004-2011, Sun Microsystems, Inc., Kohsuke Kawaguchi, Seiji Sogabe, id:cactusman
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
Back\ to\ Dashboard=\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u3078\u623b\u308b
|
||||
Status=\u72b6\u614b
|
||||
Changes=\u5909\u66f4
|
||||
Changes=\u5909\u66f4\u5c65\u6b74
|
||||
Workspace=\u30ef\u30fc\u30af\u30b9\u30da\u30fc\u30b9
|
||||
Wipe\ Out\ Workspace=\u30ef\u30fc\u30af\u30b9\u30da\u30fc\u30b9\u306e\u30af\u30ea\u30a2
|
||||
delete={0}\u306e\u524a\u9664
|
||||
|
||||
@@ -37,6 +37,12 @@ THE SOFTWARE.
|
||||
<pre style="color: white; background-color:black; padding:1em; font-weight: bold">java -jar <a
|
||||
style="color: white"
|
||||
href="jnlpJars/jenkins-cli.jar">jenkins-cli.jar</a> -s ${h.inferHudsonURL(request)} help</pre>
|
||||
<h2>${%Available Commands}</h2>
|
||||
<ul>
|
||||
<j:forEach items="${h.getCLICommands()}" var="command">
|
||||
<li><b>${command.getName()}</b>: ${command.getShortDescription()}</li>
|
||||
</j:forEach>
|
||||
</ul>
|
||||
</l:main-panel>
|
||||
</l:layout>
|
||||
</j:jelly>
|
||||
@@ -1,4 +1,4 @@
|
||||
Jenkins\ CLI=Jenkins CLI
|
||||
blurb=You can access various features in Jenkins through a command-line tool. See \
|
||||
<a href="http://wiki.jenkins-ci.org/display/JENKINS/Jenkins+CLI">the Wiki</a> for more details of this feature.\
|
||||
To get started, download <a href="{0}/jnlpJars/jenkins-cli.jar">jenkins-cli.jar</a>, and run it as follows:
|
||||
|
||||
@@ -31,7 +31,7 @@ health-81plus=La sant\u00E9 du projet est au dessus de 80%. Vous pouvez passer v
|
||||
red=Le dernier build est en échec.
|
||||
red_anime=Le dernier build est en échec. Un nouveau build est en cours.
|
||||
health-61to80=La sant\u00E9 du projet est entre 60% et 80%. Vous pouvez passer votre souris au dessus de l''ic\u00F4ne du projet pour plus d''informations.
|
||||
health-80plus=La stabilité du projet est d'au moins 80%. Placez la souris au-dessus de l''icône du projet pour plus de détails.
|
||||
health-80plus=La stabilité du projet est d''au moins 80%. Placez la souris au-dessus de l''icône du projet pour plus de détails.
|
||||
health-41to60=La sant\u00E9 du projet est entre 40% et 60%. Vous pouvez passer votre souris au dessus de l''ic\u00F4ne du projet pour plus d''informations.
|
||||
health-60to79=La stabilité du projet se situe entre 60% et 80%. Placez la souris au-dessus de l''icône du projet pour plus de détails.
|
||||
health-21to40=La sant\u00E9 du projet est entre 20% et 40%. Vous pouvez passer votre souris au dessus de l''ic\u00F4ne du projet pour plus d''informations.
|
||||
|
||||
@@ -41,7 +41,7 @@ AbstractProject.WorkspacePermission.Description=\
|
||||
Si vous ne voulez pas qu''un utilisateur ait acc\u00e8s au code source, vous pouvez retirer ce droit.
|
||||
|
||||
Api.MultipleMatch=Le XPath "{0}" correspond \u00e0 {1} noeud(s). \
|
||||
Merci de fournir un XPath qui ne correspond qu'\u00e0 un seul noeud, ou utilisez le param\u00e8tre de requ\u00e8te "wrapper" pour les encapsuler tous dans un \u00e9l\u00e9ment racine.
|
||||
Merci de fournir un XPath qui ne correspond qu''\u00e0 un seul noeud, ou utilisez le param\u00e8tre de requ\u00e8te "wrapper" pour les encapsuler tous dans un \u00e9l\u00e9ment racine.
|
||||
Api.NoXPathMatch=Pas de correspondance avec le XPath {0}
|
||||
|
||||
BallColor.Aborted=Annul\u00e9
|
||||
@@ -134,7 +134,7 @@ Slave.InvalidConfig.Executors=Configuration esclave invalide pour {0}. Nombre d'
|
||||
Slave.InvalidConfig.NoName=Configuration esclave invalide. Le nom est vide.
|
||||
Slave.InvalidConfig.NoRemoteDir=Configuration esclave invalide pour {0}. Pas de r\u00e9pertoire distant fourni
|
||||
Slave.Launching={0} Lancement de l''agent esclave
|
||||
Slave.Terminated={0} l'agent esclave a \u00e9t\u00e9 termin\u00e9
|
||||
Slave.Terminated={0} l''agent esclave a \u00e9t\u00e9 termin\u00e9
|
||||
Slave.UnableToLaunch=Impossible de lancer l''agent esclave pour {0} {1}
|
||||
Slave.UnixSlave=Ceci est un esclave Unix
|
||||
Slave.WindowsSlave=Ceci est un esclave Windows
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# The MIT License
|
||||
#
|
||||
# Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi, Seiji Sogabe, id:cactusman
|
||||
# Copyright (c) 2004-2011, Sun Microsystems, Inc., Kohsuke Kawaguchi, Seiji Sogabe, id:cactusman
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -201,6 +201,7 @@ UpdateCenter.PluginCategory.buildwrapper=\u30d3\u30eb\u30c9\u30e9\u30c3\u30d1\u3
|
||||
UpdateCenter.PluginCategory.cli=\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9
|
||||
UpdateCenter.PluginCategory.cluster=\u30af\u30e9\u30b9\u30bf\u30fc\u7ba1\u7406/\u5206\u6563\u30d3\u30eb\u30c9
|
||||
UpdateCenter.PluginCategory.external=\u5916\u90e8\u30b5\u30a4\u30c8/\u30c4\u30fc\u30eb\u3068\u306e\u9023\u643a
|
||||
UpdateCenter.PluginCategory.listview-column=\u30ea\u30b9\u30c8\u30d3\u30e5\u30fc\u30ab\u30e9\u30e0
|
||||
UpdateCenter.PluginCategory.maven=Maven
|
||||
UpdateCenter.PluginCategory.misc=\u305d\u306e\u4ed6
|
||||
UpdateCenter.PluginCategory.notifier=\u30d3\u30eb\u30c9\u901a\u77e5
|
||||
|
||||
@@ -21,6 +21,6 @@
|
||||
# THE SOFTWARE.
|
||||
|
||||
Warning=Avertissement
|
||||
cannotMsg=Impossible de supprimer ce build, parce qu'il est {0}
|
||||
cannotMsg=Impossible de supprimer ce build, parce qu''il est {0}
|
||||
Are\ you\ sure\ about\ deleting\ the\ build?=Etes-vous sûr de vouloir supprimer le build?
|
||||
Yes=Oui
|
||||
+1
-1
@@ -22,5 +22,5 @@
|
||||
|
||||
NewVersionAvailable=New version of Jenkins ({0}) is available for <a href="{1}">download</a> \
|
||||
(<a href="http://jenkins-ci.org/changelog.html">changelog</a>).
|
||||
UpgradeComplete=Upgrade to Jenkins {0} is complete, awaiting restart.
|
||||
UpgradeComplete=Upgrade to Jenkins {0} is complete, awaiting <a href="${rootURL}/safeRestart">restart</a>.
|
||||
UpgradeProgress=Upgrade to Jenkins {0} is <a href="{1}">in progress or failed</a>.
|
||||
+1
-1
@@ -20,7 +20,7 @@
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
|
||||
UpgradeComplete=Aktualisierung auf Jenkins {0} abgeschlossen. Neustart von Jenkins erforderlich.
|
||||
UpgradeComplete=Aktualisierung auf Jenkins {0} abgeschlossen. <a href="${rootURL}/safeRestart">Neustart von Jenkins</a> erforderlich.
|
||||
UpgradeProgress=Aktualisierung auf Jenkins {0} <a href="{1}">in Arbeit oder fehlgeschlagen</a>.
|
||||
NewVersionAvailable=\
|
||||
Eine neue Version von Jenkins ({0}) kann <a href="{1}">heruntergeladen</a> werden \
|
||||
|
||||
+1
-1
@@ -20,4 +20,4 @@
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
|
||||
Failure=
|
||||
Failure=\u00C9chec
|
||||
@@ -20,9 +20,8 @@
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
|
||||
Update\ Center=Centre de mise ŕ jour
|
||||
warning=Une fois l''installation terminée, Jenkins doit être redémarré \
|
||||
pour prendre en compte les nouveaux plugins.
|
||||
Restart\ When\ No\ Jobs\ Are\ Running=Red\u00E9marrer quand aucun job n''est en cours
|
||||
Update\ Center=Centre de mise à jour
|
||||
Installing\ Plugins/Upgrades=Installation/Mise \u00E0 jour des Plugins
|
||||
Restart\ Now=Redémarrer maintenant
|
||||
Schedule\ Restart=Programmer un red\u00E9marrage
|
||||
@@ -24,4 +24,4 @@ SCMTrigger.DisplayName=Scruter l''outil de gestion de version
|
||||
SCMTrigger.getDisplayName=Log du dernier accès à {0}
|
||||
SCMTrigger.SCMTriggerCause.ShortDescription=Un changement dans la base de code a provoqué le lancement de ce job
|
||||
TimerTrigger.DisplayName=Construire périodiquement
|
||||
TimerTrigger.TimerTriggerCause.ShortDescription=L''échéance d'une alarme périodique a provoqué le lancement de ce job
|
||||
TimerTrigger.TimerTriggerCause.ShortDescription=L''\u00e9\u00e9ch\u00e9ance d''une alarme p\u00e9riodique a provoqu\u00e9 le lancement de ce job
|
||||
@@ -28,4 +28,4 @@ message=\
|
||||
incorrects. \
|
||||
Merci de corriger le problème.
|
||||
This\ Jenkins=Cette instance de Jenkins
|
||||
Other\ Jenkins=L'autre instance de Jenkins
|
||||
Other\ Jenkins=L''autre instance de Jenkins
|
||||
@@ -20,11 +20,11 @@
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
|
||||
BuildButtonColumn.DisplayName=\u30D3\u30EB\u30C9\u30DC\u30BF\u30F3
|
||||
JobColumn.DisplayName=\u540D\u524D
|
||||
LastDurationColumn.DisplayName=\u30D3\u30EB\u30C9\u6240\u8981\u6642\u9593
|
||||
LastFailureColumn.DisplayName=\u6700\u65B0\u306E\u5931\u6557\u30D3\u30EB\u30C9
|
||||
LastStableColumn.DisplayName=\u6700\u65B0\u306E\u5B89\u5B9A\u30D3\u30EB\u30C9
|
||||
LastSuccessColumn.DisplayName=\u6700\u65B0\u306E\u6210\u529F\u30D3\u30EB\u30C9
|
||||
StatusColumn.DisplayName=\u30B9\u30C6\u30FC\u30BF\u30B9
|
||||
WeatherColumn.DisplayName=\u5929\u6C17\u4E88\u5831
|
||||
BuildButtonColumn.DisplayName=\u30d3\u30eb\u30c9\u30dc\u30bf\u30f3
|
||||
JobColumn.DisplayName=\u540d\u524d
|
||||
LastDurationColumn.DisplayName=\u30d3\u30eb\u30c9\u6240\u8981\u6642\u9593
|
||||
LastFailureColumn.DisplayName=\u6700\u65b0\u306e\u5931\u6557\u30d3\u30eb\u30c9
|
||||
LastStableColumn.DisplayName=\u6700\u65b0\u306e\u5b89\u5b9a\u30d3\u30eb\u30c9
|
||||
LastSuccessColumn.DisplayName=\u6700\u65b0\u306e\u6210\u529f\u30d3\u30eb\u30c9
|
||||
StatusColumn.DisplayName=\u30b9\u30c6\u30fc\u30bf\u30b9
|
||||
WeatherColumn.DisplayName=\u7a7a\u6a21\u69d8
|
||||
@@ -1,6 +1,6 @@
|
||||
# The MIT License
|
||||
#
|
||||
# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Seiji Sogabe, id:cactusman, Martin Eigenbrodt
|
||||
# Copyright (c) 2004-2011, Sun Microsystems, Inc., Kohsuke Kawaguchi, Seiji Sogabe, id:cactusman, Martin Eigenbrodt
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -21,4 +21,4 @@
|
||||
# THE SOFTWARE.
|
||||
|
||||
Weather\ report\ showing\ aggregated\ status\ of\ recent\ builds=\
|
||||
\u6700\u8FD1\u306E\u30D3\u30EB\u30C9\u306E\u30B9\u30C6\u30FC\u30BF\u30B9\u3092\u96C6\u7D04\u3057\u305F\u5929\u6C17\u4E88\u5831
|
||||
\u6700\u8fd1\u306e\u30d3\u30eb\u30c9\u306e\u30b9\u30c6\u30fc\u30bf\u30b9\u3092\u96c6\u7d04\u3057\u305f\u7a7a\u6a21\u69d8
|
||||
@@ -1,6 +1,6 @@
|
||||
# The MIT License
|
||||
#
|
||||
# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Seiji Sogabe, id:cactusman
|
||||
# Copyright (c) 2004-2011, Sun Microsystems, Inc., Kohsuke Kawaguchi, Seiji Sogabe, id:cactusman
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -20,7 +20,7 @@
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
|
||||
trend=\u50BE\u5411
|
||||
for\ all=\u5168\u30D3\u30EB\u30C9
|
||||
for\ failures=\u5931\u6557\u30D3\u30EB\u30C9
|
||||
trend=\u63a8\u79fb
|
||||
for\ all=\u5168\u30d3\u30eb\u30c9
|
||||
for\ failures=\u5931\u6557\u30d3\u30eb\u30c9
|
||||
More\ ...=\u3082\u3063\u3068 ...
|
||||
@@ -81,6 +81,9 @@ THE SOFTWARE.
|
||||
<st:attribute name="items">
|
||||
The item collection to loop over. Required unless @field is given.
|
||||
</st:attribute>
|
||||
<st:attribute name="default">
|
||||
Use this collection for items if items or @field is null
|
||||
</st:attribute>
|
||||
<st:attribute name="noAddButton">
|
||||
true if the default 'add' button (that adds a new copy) shouldn't be displayed.
|
||||
When you use this attribute,
|
||||
@@ -107,14 +110,14 @@ THE SOFTWARE.
|
||||
<j:when test="${attrs.field!=null}">
|
||||
<j:set var="name" value="${field}"/>
|
||||
<j:set var="var" value="instance"/>
|
||||
<j:set var="items" value="${instance[name]}"/>
|
||||
<j:set var="items" value="${instance[name] ?: attrs.default}"/>
|
||||
|
||||
<!-- and expose update descriptor to the body of this tag -->
|
||||
<j:set var="descriptor" value="${descriptor.getPropertyType(instance,field).itemTypeDescriptor}" />
|
||||
</j:when>
|
||||
<j:otherwise>
|
||||
<j:set var="name" value="${attrs.name?:attrs.var}"/>
|
||||
<j:set var="items" value="${attrs.items}"/>
|
||||
<j:set var="items" value="${attrs.items ?: attrs.default}"/>
|
||||
</j:otherwise>
|
||||
</j:choose>
|
||||
|
||||
|
||||
@@ -31,6 +31,9 @@ THE SOFTWARE.
|
||||
<st:attribute name="field">
|
||||
Used for the data binding.
|
||||
</st:attribute>
|
||||
<st:attribute name="default">
|
||||
The default value to use for this collection when 'instance[field]' is null.
|
||||
</st:attribute>
|
||||
<st:attribute name="noAddButton">
|
||||
true if the default 'add' button (that adds a new copy) shouldn't be displayed.
|
||||
When you use this attribute,
|
||||
@@ -49,7 +52,7 @@ THE SOFTWARE.
|
||||
</st:documentation>
|
||||
|
||||
|
||||
<f:repeatable field="${attrs.field}" noAddButton="${attrs.noAddButton}" header="${attrs.header}">
|
||||
<f:repeatable field="${attrs.field}" default="${attrs.default}" noAddButton="${attrs.noAddButton}" header="${attrs.header}">
|
||||
<table style="width:100%">
|
||||
<st:include page="config.jelly" class="${descriptor.clazz}" />
|
||||
</table>
|
||||
|
||||
@@ -22,5 +22,5 @@
|
||||
|
||||
|
||||
Retry\ Count=Nombre de r\u00E9-essais
|
||||
Number\ of\ Retrys\ needed\ if\ checkout\ fails=Nombre de Réessayer n'est pas nécessaire si la caisse
|
||||
Number\ of\ Retrys\ needed\ if\ checkout\ fails=
|
||||
SCM\ checkout\ retry\ count=Nombre de retentatives de checkout du SCM
|
||||
@@ -0,0 +1,38 @@
|
||||
package hudson.tasks._maven;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import hudson.MarkupText;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class Maven3MojoNoteTest {
|
||||
|
||||
@Test
|
||||
public void testAnnotateMavenPlugin() {
|
||||
check("[INFO] <b class=maven-mojo>--- maven-clean-plugin:2.4.1:clean (default-clean) @ jobConfigHistory ---</b>", "[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ jobConfigHistory ---");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAnnotateCodehausPlugin() {
|
||||
check("[INFO] <b class=maven-mojo>--- cobertura-maven-plugin:2.4:instrument (report:cobertura) @ sardine ---</b>", "[INFO] --- cobertura-maven-plugin:2.4:instrument (report:cobertura) @ sardine ---");
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAnnotateOtherPlugin() {
|
||||
check("[INFO] <b class=maven-mojo>--- gmaven-plugin:1.0-rc-5:generateTestStubs (test-in-groovy) @ jobConfigHistory ---</b>", "[INFO] --- gmaven-plugin:1.0-rc-5:generateTestStubs (test-in-groovy) @ jobConfigHistory ---");
|
||||
}
|
||||
|
||||
private void check(final String decorated, final String input) {
|
||||
assertTrue(input + " does not match" + Maven3MojoNote.PATTERN, Maven3MojoNote.PATTERN.matcher(input).matches());
|
||||
assertEquals(decorated, annotate(input));
|
||||
}
|
||||
|
||||
private String annotate(String text) {
|
||||
final MarkupText markupText = new MarkupText(text);
|
||||
new Maven3MojoNote().annotate(new Object(), markupText, 0);
|
||||
return markupText.toString(true);
|
||||
}
|
||||
|
||||
}
|
||||
Vendored
+12
@@ -1,3 +1,15 @@
|
||||
jenkins (1.413) unstable; urgency=low
|
||||
|
||||
* See http://jenkins-ci.org/changelog for more details.
|
||||
|
||||
-- Kohsuke Kawaguchi <kk@kohsuke.org> Sun, 22 May 2011 22:03:39 -0700
|
||||
|
||||
jenkins (1.412) unstable; urgency=low
|
||||
|
||||
* See http://jenkins-ci.org/changelog for more details.
|
||||
|
||||
-- Kohsuke Kawaguchi <kk@kohsuke.org> Mon, 16 May 2011 09:54:33 -0700
|
||||
|
||||
jenkins (1.411) unstable; urgency=low
|
||||
|
||||
* See http://jenkins-ci.org/changelog for more details.
|
||||
|
||||
+13
-3
@@ -28,7 +28,7 @@ THE SOFTWARE.
|
||||
<parent>
|
||||
<groupId>org.jenkins-ci.main</groupId>
|
||||
<artifactId>pom</artifactId>
|
||||
<version>1.413-SNAPSHOT</version>
|
||||
<version>1.415-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>maven-plugin</artifactId>
|
||||
@@ -308,6 +308,13 @@ THE SOFTWARE.
|
||||
<version>1.1</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.8.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -332,12 +339,13 @@ THE SOFTWARE.
|
||||
<plugin>
|
||||
<groupId>org.kohsuke.stapler</groupId>
|
||||
<artifactId>maven-stapler-plugin</artifactId>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<extensions>true</extensions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.jvnet.localizer</groupId>
|
||||
<artifactId>maven-localizer-plugin</artifactId>
|
||||
<version>1.8</version>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
@@ -353,6 +361,7 @@ THE SOFTWARE.
|
||||
<plugin><!-- generate licenses.xml -->
|
||||
<groupId>com.cloudbees</groupId>
|
||||
<artifactId>maven-license-plugin</artifactId>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<configuration>
|
||||
<generateLicenseXml>target/${project.artifactId}/WEB-INF/licenses.xml</generateLicenseXml>
|
||||
</configuration>
|
||||
@@ -360,6 +369,7 @@ THE SOFTWARE.
|
||||
<plugin>
|
||||
<groupId>org.jvnet.maven-antrun-extended-plugin</groupId>
|
||||
<artifactId>maven-antrun-extended-plugin</artifactId>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<executions>
|
||||
<execution>
|
||||
<id>resgen</id>
|
||||
@@ -390,7 +400,7 @@ THE SOFTWARE.
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<version>2.4-apb-SNAPSHOT</version>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<inherited>true</inherited>
|
||||
<configuration>
|
||||
<formats>
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package hudson.maven;
|
||||
|
||||
import static hudson.Util.fixNull;
|
||||
|
||||
import hudson.AbortException;
|
||||
import hudson.EnvVars;
|
||||
import hudson.FilePath;
|
||||
import hudson.Launcher;
|
||||
import hudson.Platform;
|
||||
import hudson.Proc;
|
||||
import hudson.maven.ProcessCache.NewProcess;
|
||||
import hudson.model.BuildListener;
|
||||
@@ -24,7 +26,6 @@ import hudson.slaves.Channels;
|
||||
import hudson.tasks.Maven.MavenInstallation;
|
||||
import hudson.tasks._maven.MavenConsoleAnnotator;
|
||||
import hudson.util.ArgumentListBuilder;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.IOException;
|
||||
@@ -37,8 +38,6 @@ import java.net.SocketTimeoutException;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.UnsupportedCharsetException;
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.jenkinsci.plugins.tokenmacro.TokenMacro;
|
||||
import org.kohsuke.stapler.framework.io.IOException2;
|
||||
|
||||
/*
|
||||
@@ -274,7 +273,19 @@ public abstract class AbstractMavenProcessFactory
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (mms.runHeadless()) {
|
||||
// Configure headless process
|
||||
mavenOpts += " -Djava.awt.headless=true";
|
||||
} else {
|
||||
if (Platform.isDarwin()) {
|
||||
// Would be cool to replace the generic Java icon with jenkins logo, but requires
|
||||
// the file absolute path to be available on slave *before* the process run on it :-/
|
||||
// Maybe we could enforce this from the DMG installer on OSX
|
||||
// TODO mavenOpts += " -Xdock:name=Jenkins -Xdock:icon=jenkins.png";
|
||||
}
|
||||
}
|
||||
|
||||
return envVars.expand(mavenOpts);
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ import hudson.remoting.Which;
|
||||
import hudson.util.ReflectionUtils;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.Serializable;
|
||||
import java.lang.reflect.Method;
|
||||
@@ -94,12 +95,15 @@ public final class ExecutedMojo implements Serializable {
|
||||
MojoDescriptor md = mojo.mojoExecution.getMojoDescriptor();
|
||||
PluginDescriptor pd = md.getPluginDescriptor();
|
||||
try {
|
||||
Class clazz = getMojoClass( md, pd );// pd.getClassRealm().loadClass(md.getImplementation());
|
||||
Class<?> clazz = getMojoClass( md, pd );
|
||||
digest = Util.getDigestOf(new FileInputStream(Which.jarFile(clazz)));
|
||||
} catch (IllegalArgumentException e) {
|
||||
LOGGER.log(Level.WARNING, "Failed to locate jar for "+md.getImplementation(),e);
|
||||
} catch (ClassNotFoundException e) {
|
||||
// perhaps the plugin has failed to load.
|
||||
} catch (FileNotFoundException e) {
|
||||
// Maybe mojo was loaded from a classes dir instead of from a jar (JENKINS-5044)
|
||||
LOGGER.log(Level.WARNING, "Failed to caculate digest for "+md.getImplementation(),e);
|
||||
}
|
||||
this.digest = digest;
|
||||
}
|
||||
|
||||
@@ -79,11 +79,13 @@ public final class MavenModule extends AbstractMavenProject<MavenModule,MavenBui
|
||||
private String displayName;
|
||||
|
||||
/**
|
||||
* Version number of this module as of fhe last build, taken from {@link MavenProject#getVersion()}.
|
||||
* Version number of this module as of the last build, taken from {@link MavenProject#getVersion()}.
|
||||
*
|
||||
* This field can be null if Hudson loaded old data
|
||||
* This field can be null if Jenkins loaded old data
|
||||
* that didn't record this information, so that situation
|
||||
* needs to be handled gracefully.
|
||||
*
|
||||
* @since 1.199
|
||||
*/
|
||||
private String version;
|
||||
|
||||
@@ -110,7 +112,9 @@ public final class MavenModule extends AbstractMavenProject<MavenModule,MavenBui
|
||||
* List of child modules as defined by <module> POM element.
|
||||
* Used to determine parent/child relationship of modules.
|
||||
* <p>
|
||||
* For compatibility reason, this field may be null when loading data from old hudson.
|
||||
* For compatibility reason, this field may be null when loading data from old hudson.
|
||||
*
|
||||
* @since 1.133
|
||||
*/
|
||||
@CopyOnWrite
|
||||
private volatile List<ModuleName> children;
|
||||
@@ -216,7 +220,7 @@ public final class MavenModule extends AbstractMavenProject<MavenModule,MavenBui
|
||||
else {
|
||||
// Until 1.207, we used to have ModuleName in dependencies. So convert.
|
||||
Set<ModuleDependency> deps = new HashSet<ModuleDependency>(dependencies.size());
|
||||
for (Object d : (Set)dependencies) {
|
||||
for (Object d : (Set<?>)dependencies) {
|
||||
if (d instanceof ModuleDependency) {
|
||||
deps.add((ModuleDependency) d);
|
||||
} else {
|
||||
@@ -241,9 +245,10 @@ public final class MavenModule extends AbstractMavenProject<MavenModule,MavenBui
|
||||
* Gets the version number in Maven POM as of the last build.
|
||||
*
|
||||
* @return
|
||||
* This method can return null if Hudson loaded old data
|
||||
* This method can return null if Jenkins loaded old data
|
||||
* that didn't record this information, so that situation
|
||||
* needs to be handled gracefully.
|
||||
* @since 1.199
|
||||
*/
|
||||
public String getVersion() {
|
||||
return version;
|
||||
@@ -333,6 +338,8 @@ public final class MavenModule extends AbstractMavenProject<MavenModule,MavenBui
|
||||
* <p>
|
||||
* This method returns null if this information is not recorded. This happens
|
||||
* for compatibility reason.
|
||||
*
|
||||
* @since 1.133
|
||||
*/
|
||||
public List<MavenModule> getChildren() {
|
||||
List<ModuleName> l = children; // take a snapshot
|
||||
@@ -385,22 +392,38 @@ public final class MavenModule extends AbstractMavenProject<MavenModule,MavenBui
|
||||
if(isDisabled() || getParent().ignoreUpstremChanges()) return;
|
||||
|
||||
MavenDependencyComputationData data = graph.getComputationalData(MavenDependencyComputationData.class);
|
||||
|
||||
|
||||
// Build a map of all Maven modules in this Jenkins instance as dependencies.
|
||||
|
||||
// When we load old data that doesn't record version in dependency, we'd like
|
||||
// to emulate the old behavior that tries to identify the upstream by ignoring the version.
|
||||
// Do this by putting groupId:artifactId:UNKNOWN to the modules list, but
|
||||
// ONLY if we find a such an old MavenModule in this Jenkins instance.
|
||||
boolean hasDependenciesWithUnknownVersion = hasDependenciesWithUnknownVersion();
|
||||
if (data == null) {
|
||||
Map<ModuleDependency,MavenModule> modules = new HashMap<ModuleDependency,MavenModule>();
|
||||
|
||||
// when we load old data that doesn't record version in dependency, we'd like
|
||||
// to emulate the old behavior that it tries to identify the upstream by ignoring the version.
|
||||
// do this by always putting groupId:artifactId:UNKNOWN to the modules list.
|
||||
|
||||
for (MavenModule m : Hudson.getInstance().getAllItems(MavenModule.class)) {
|
||||
if(m.isDisabled()) continue;
|
||||
ModuleDependency moduleDependency = m.asDependency();
|
||||
modules.put(moduleDependency,m);
|
||||
modules.put(moduleDependency.withUnknownVersion(),m);
|
||||
if (hasDependenciesWithUnknownVersion) {
|
||||
modules.put(moduleDependency.withUnknownVersion(),m);
|
||||
}
|
||||
}
|
||||
data = new MavenDependencyComputationData(modules);
|
||||
data.withUnknownVersions = hasDependenciesWithUnknownVersion;
|
||||
graph.putComputationalData(MavenDependencyComputationData.class, data);
|
||||
} else {
|
||||
if (hasDependenciesWithUnknownVersion && !data.withUnknownVersions) {
|
||||
// found 'old' MavenModule: add dependencies with unknown versions now
|
||||
for (MavenModule m : Hudson.getInstance().getAllItems(MavenModule.class)) {
|
||||
if(m.isDisabled()) continue;
|
||||
ModuleDependency moduleDependency = m.asDependency().withUnknownVersion();
|
||||
data.allModules.put(moduleDependency,m);
|
||||
}
|
||||
data.withUnknownVersions = true;
|
||||
}
|
||||
}
|
||||
|
||||
// In case two modules with the same name are defined, modules in the same MavenModuleSet
|
||||
@@ -417,7 +440,9 @@ public final class MavenModule extends AbstractMavenProject<MavenModule,MavenBui
|
||||
if(m.isDisabled()) continue;
|
||||
ModuleDependency moduleDependency = m.asDependency();
|
||||
myParentsModules.put(moduleDependency,m);
|
||||
myParentsModules.put(moduleDependency.withUnknownVersion(),m);
|
||||
if (hasDependenciesWithUnknownVersion) {
|
||||
myParentsModules.put(moduleDependency.withUnknownVersion(),m);
|
||||
}
|
||||
}
|
||||
|
||||
//data.modulesPerParent.put(getParent(), myParentsModules);
|
||||
@@ -442,7 +467,21 @@ public final class MavenModule extends AbstractMavenProject<MavenModule,MavenBui
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if this module has dependencies recorded without a concrete version -
|
||||
* which shouldn't happen for any module which was at least build once with Jenkins >= 1.207.
|
||||
*/
|
||||
private boolean hasDependenciesWithUnknownVersion() {
|
||||
for (ModuleDependency dep : dependencies) {
|
||||
if (ModuleDependency.UNKNOWN.equals(dep.version)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static class MavenDependencyComputationData {
|
||||
boolean withUnknownVersions = false;
|
||||
Map<ModuleDependency,MavenModule> allModules;
|
||||
|
||||
//Map<MavenModuleSet, Map<ModuleDependency,MavenModule>> modulesPerParent = new HashMap<MavenModuleSet, Map<ModuleDependency,MavenModule>>();
|
||||
|
||||
@@ -204,6 +204,12 @@ public final class MavenModuleSet extends AbstractMavenProject<MavenModuleSet,Ma
|
||||
*/
|
||||
private int mavenValidationLevel = -1;
|
||||
|
||||
/**
|
||||
* Inform jenkins this build don't use UI code and can run without access to graphical environment. Could be used
|
||||
* later to select a headless-slave from a pool, but first introduced for JENKINS-9785
|
||||
*/
|
||||
private boolean runHeadless = false;
|
||||
|
||||
/**
|
||||
* Reporters configured at {@link MavenModuleSet} level. Applies to all {@link MavenModule} builds.
|
||||
*/
|
||||
@@ -357,6 +363,10 @@ public final class MavenModuleSet extends AbstractMavenProject<MavenModuleSet,Ma
|
||||
return ignoreUpstremChanges;
|
||||
}
|
||||
|
||||
public boolean runHeadless() {
|
||||
return runHeadless;
|
||||
}
|
||||
|
||||
public boolean isArchivingDisabled() {
|
||||
return archivingDisabled;
|
||||
}
|
||||
@@ -377,6 +387,10 @@ public final class MavenModuleSet extends AbstractMavenProject<MavenModuleSet,Ma
|
||||
this.ignoreUpstremChanges = ignoreUpstremChanges;
|
||||
}
|
||||
|
||||
public void setRunHeadless(boolean runHeadless) {
|
||||
this.runHeadless = runHeadless;
|
||||
}
|
||||
|
||||
public void setIsArchivingDisabled(boolean archivingDisabled) {
|
||||
this.archivingDisabled = archivingDisabled;
|
||||
}
|
||||
@@ -811,6 +825,7 @@ public final class MavenModuleSet extends AbstractMavenProject<MavenModuleSet,Ma
|
||||
aggregatorStyleBuild = !req.hasParameter("maven.perModuleBuild");
|
||||
usePrivateRepository = req.hasParameter("maven.usePrivateRepository");
|
||||
ignoreUpstremChanges = !json.has("triggerByDependency");
|
||||
runHeadless = req.hasParameter("maven.runHeadless");
|
||||
incrementalBuild = req.hasParameter("maven.incrementalBuild");
|
||||
archivingDisabled = req.hasParameter("maven.archivingDisabled");
|
||||
resolveDependencies = req.hasParameter( "maven.resolveDependencies" );
|
||||
|
||||
@@ -374,7 +374,7 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
|
||||
* Gets the version of Maven used for build.
|
||||
*
|
||||
* @return
|
||||
* null if this build is done by earlier version of Hudson that didn't record this information
|
||||
* null if this build is done by earlier version of Jenkins that didn't record this information
|
||||
* (this means the build was done by Maven2.x)
|
||||
*/
|
||||
public String getMavenVersionUsed() {
|
||||
@@ -407,7 +407,7 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
|
||||
|
||||
/**
|
||||
* Computes the latest module builds that correspond to this build.
|
||||
* (when indivudual modules are built, a new ModuleSetBuild is not created,
|
||||
* (when individual modules are built, a new ModuleSetBuild is not created,
|
||||
* but rather the new module build falls under the previous ModuleSetBuild)
|
||||
*/
|
||||
public Map<MavenModule,MavenBuild> getModuleLastBuilds() {
|
||||
@@ -672,6 +672,7 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
|
||||
}
|
||||
else
|
||||
{
|
||||
LOGGER.info( "using maven 2 " + mavenVersion );
|
||||
process =
|
||||
MavenBuild.mavenProcessCache.get( launcher.getChannel(), slistener,
|
||||
new MavenProcessFactory( project, launcher, envVars,getMavenOpts(listener),
|
||||
@@ -680,11 +681,17 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
|
||||
ArgumentListBuilder margs = new ArgumentListBuilder().add("-B").add("-f", pom.getRemote());
|
||||
if(project.usesPrivateRepository())
|
||||
margs.add("-Dmaven.repo.local="+getWorkspace().child(".repository"));
|
||||
// If incrementalBuild is set, and we're on Maven 2.1 or later, *and* there's at least one module
|
||||
// listed in changedModules, do the Maven incremental build commands - if there are no changed modules,
|
||||
// We're building everything anyway.
|
||||
|
||||
// If incrementalBuild is set
|
||||
// and the previous build didn't specify that we need a full build
|
||||
// and we're on Maven 2.1 or later
|
||||
// and there's at least one module listed in changedModules,
|
||||
// then do the Maven incremental build commands.
|
||||
// If there are no changed modules, we're building everything anyway.
|
||||
boolean maven2_1orLater = new ComparableVersion (mavenVersion).compareTo( new ComparableVersion ("2.1") ) >= 0;
|
||||
if (project.isIncrementalBuild() && maven2_1orLater && !changedModules.isEmpty()) {
|
||||
boolean needsFullBuild = getPreviousCompletedBuild() != null &&
|
||||
getPreviousCompletedBuild().getAction(NeedsFullBuildAction.class) != null;
|
||||
if (project.isIncrementalBuild() && !needsFullBuild && maven2_1orLater && !changedModules.isEmpty()) {
|
||||
margs.add("-amd");
|
||||
margs.add("-pl", Util.join(changedModules, ","));
|
||||
}
|
||||
@@ -816,12 +823,22 @@ public class MavenModuleSetBuild extends AbstractMavenBuild<MavenModuleSet,Maven
|
||||
try {
|
||||
poms = getModuleRoot().act(new PomParser(listener, mvn, project, mavenVersion, envVars));
|
||||
} catch (IOException e) {
|
||||
if (project.isIncrementalBuild()) {
|
||||
// If POM parsing failed we should do a full build next time.
|
||||
// Otherwise only the modules which have a SCM change for the next build might
|
||||
// be build next time.
|
||||
getActions().add(new NeedsFullBuildAction());
|
||||
}
|
||||
|
||||
if (e.getCause() instanceof AbortException)
|
||||
throw (AbortException) e.getCause();
|
||||
throw e;
|
||||
} catch (MavenExecutionException e) {
|
||||
// Maven failed to parse POM
|
||||
e.getCause().printStackTrace(listener.error(Messages.MavenModuleSetBuild_FailedToParsePom()));
|
||||
if (project.isIncrementalBuild()) {
|
||||
getActions().add(new NeedsFullBuildAction());
|
||||
}
|
||||
throw new AbortException();
|
||||
}
|
||||
|
||||
|
||||
@@ -25,14 +25,9 @@ package hudson.maven;
|
||||
|
||||
import hudson.FilePath;
|
||||
import hudson.Launcher;
|
||||
import hudson.Proc;
|
||||
import hudson.AbortException;
|
||||
import hudson.EnvVars;
|
||||
import hudson.slaves.Channels;
|
||||
import static hudson.Util.fixNull;
|
||||
import hudson.maven.agent.Main;
|
||||
import hudson.maven.agent.Maven21Interceptor;
|
||||
import hudson.maven.ProcessCache.NewProcess;
|
||||
import hudson.model.BuildListener;
|
||||
import hudson.model.Computer;
|
||||
import hudson.model.Executor;
|
||||
@@ -42,31 +37,13 @@ import hudson.model.Node;
|
||||
import hudson.model.Run.RunnerAbortedException;
|
||||
import hudson.model.TaskListener;
|
||||
import hudson.remoting.Callable;
|
||||
import hudson.remoting.Channel;
|
||||
import hudson.remoting.RemoteInputStream;
|
||||
import hudson.remoting.RemoteOutputStream;
|
||||
import hudson.remoting.SocketInputStream;
|
||||
import hudson.remoting.SocketOutputStream;
|
||||
import hudson.remoting.Which;
|
||||
import hudson.tasks.Maven.MavenInstallation;
|
||||
import hudson.tasks._maven.MavenConsoleAnnotator;
|
||||
import hudson.util.ArgumentListBuilder;
|
||||
import hudson.util.IOException2;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FilenameFilter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.Serializable;
|
||||
import java.net.ServerSocket;
|
||||
import java.net.Socket;
|
||||
import java.net.SocketTimeoutException;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.UnsupportedCharsetException;
|
||||
import java.util.Arrays;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package hudson.maven;
|
||||
|
||||
import hudson.model.Action;
|
||||
|
||||
/**
|
||||
* Action signalling that this {@link MavenModuleSet} needs a full build
|
||||
* on the next run even if it's marked as an incremental build.
|
||||
*
|
||||
* @author kutzi
|
||||
*/
|
||||
public class NeedsFullBuildAction implements Action {
|
||||
|
||||
public String getIconFileName() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getUrlName() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -28,31 +28,15 @@ import hudson.FilePath;
|
||||
import hudson.Launcher;
|
||||
import hudson.Util;
|
||||
import hudson.maven.reporters.MavenAbstractArtifactRecord;
|
||||
import hudson.model.AbstractBuild;
|
||||
import hudson.model.AbstractProject;
|
||||
import hudson.model.BuildListener;
|
||||
import hudson.model.Hudson;
|
||||
import hudson.model.Node;
|
||||
import hudson.model.Result;
|
||||
import hudson.model.TaskListener;
|
||||
import hudson.maven.reporters.MavenArtifactRecord;
|
||||
import hudson.model.*;
|
||||
import hudson.remoting.Callable;
|
||||
import hudson.tasks.BuildStepDescriptor;
|
||||
import hudson.tasks.BuildStepMonitor;
|
||||
import hudson.tasks.Maven.MavenInstallation;
|
||||
import hudson.tasks.Publisher;
|
||||
import hudson.tasks.Recorder;
|
||||
import hudson.util.FormValidation;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Properties;
|
||||
|
||||
import net.sf.json.JSONObject;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.maven.artifact.Artifact;
|
||||
import org.apache.maven.artifact.deployer.ArtifactDeploymentException;
|
||||
@@ -65,9 +49,13 @@ import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
|
||||
import org.apache.maven.repository.Proxy;
|
||||
import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
|
||||
import org.kohsuke.stapler.DataBoundConstructor;
|
||||
import org.kohsuke.stapler.QueryParameter;
|
||||
import org.kohsuke.stapler.StaplerRequest;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
/**
|
||||
* {@link Publisher} for {@link MavenModuleSetBuild} to deploy artifacts
|
||||
* after a build is fully succeeded.
|
||||
@@ -90,6 +78,7 @@ public class RedeployPublisher extends Recorder {
|
||||
/**
|
||||
* For backward compatibility
|
||||
*/
|
||||
@Deprecated
|
||||
public RedeployPublisher(String id, String url, boolean uniqueVersion) {
|
||||
this(id, url, uniqueVersion, false);
|
||||
}
|
||||
@@ -105,39 +94,52 @@ public class RedeployPublisher extends Recorder {
|
||||
this.evenIfUnstable = evenIfUnstable;
|
||||
}
|
||||
|
||||
public boolean perform(AbstractBuild<?,?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException {
|
||||
if(build.getResult().isWorseThan(getTreshold()))
|
||||
public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException {
|
||||
if (build.getResult().isWorseThan(getTreshold()))
|
||||
return true; // build failed. Don't publish
|
||||
|
||||
if (url==null) {
|
||||
listener.getLogger().println("No Repository URL is specified.");
|
||||
List<MavenAbstractArtifactRecord> mavenAbstractArtifactRecords = getActions(build, listener);
|
||||
if (mavenAbstractArtifactRecords == null || mavenAbstractArtifactRecords.isEmpty()) {
|
||||
listener.getLogger().println("[ERROR] No artifacts are recorded. Is this a Maven project?");
|
||||
build.setResult(Result.FAILURE);
|
||||
return true;
|
||||
}
|
||||
|
||||
List<MavenAbstractArtifactRecord> mars = getActions( build, listener );
|
||||
if(mars==null || mars.isEmpty()) {
|
||||
listener.getLogger().println("No artifacts are recorded. Is this a Maven project?");
|
||||
build.setResult(Result.FAILURE);
|
||||
return true;
|
||||
|
||||
if(build instanceof MavenModuleSetBuild && ((MavenModuleSetBuild)build).getParent().isArchivingDisabled()){
|
||||
listener.getLogger().println("[ERROR] You cannot use the \"Deploy artifacts to Maven repository\" feature if you " +
|
||||
"disabled automatic artifact archiving");
|
||||
build.setResult(Result.FAILURE);
|
||||
return true;
|
||||
}
|
||||
|
||||
listener.getLogger().println("Deploying artifacts to "+url);
|
||||
long startupTime = Calendar.getInstance().getTimeInMillis();
|
||||
|
||||
try {
|
||||
|
||||
//MavenEmbedder embedder = MavenUtil.createEmbedder(listener,build);
|
||||
MavenEmbedder embedder = createEmbedder(listener,build);
|
||||
MavenEmbedder embedder = createEmbedder(listener, build);
|
||||
ArtifactRepositoryLayout layout =
|
||||
(ArtifactRepositoryLayout) embedder.lookup( ArtifactRepositoryLayout.ROLE,"default");
|
||||
(ArtifactRepositoryLayout) embedder.lookup(ArtifactRepositoryLayout.ROLE, "default");
|
||||
ArtifactRepositoryFactory factory =
|
||||
(ArtifactRepositoryFactory) embedder.lookup(ArtifactRepositoryFactory.ROLE);
|
||||
|
||||
final ArtifactRepository repository = factory.createDeploymentArtifactRepository(
|
||||
id, url, layout, uniqueVersion);
|
||||
WrappedArtifactRepository repo = new WrappedArtifactRepository(repository,uniqueVersion);
|
||||
for (MavenAbstractArtifactRecord mar : mars)
|
||||
mar.deploy(embedder,repo,listener);
|
||||
|
||||
(ArtifactRepositoryFactory) embedder.lookup(ArtifactRepositoryFactory.ROLE);
|
||||
ArtifactRepository artifactRepository = null;
|
||||
if (url != null) {
|
||||
// By default we try to get the repository definition from the job configuration
|
||||
artifactRepository = getDeploymentRepository(factory, layout, id, url);
|
||||
}
|
||||
for (MavenAbstractArtifactRecord mavenAbstractArtifactRecord : mavenAbstractArtifactRecords) {
|
||||
if (artifactRepository == null && mavenAbstractArtifactRecord instanceof MavenArtifactRecord) {
|
||||
// If no repository definition is set on the job level we try to take it from the POM
|
||||
MavenArtifactRecord mavenArtifactRecord = (MavenArtifactRecord) mavenAbstractArtifactRecord;
|
||||
artifactRepository = getDeploymentRepository(factory, layout, mavenArtifactRecord.repositoryId, mavenArtifactRecord.repositoryUrl);
|
||||
}
|
||||
if (artifactRepository == null) {
|
||||
listener.getLogger().println("[ERROR] No Repository settings defined in the job configuration or distributionManagement of the module.");
|
||||
build.setResult(Result.FAILURE);
|
||||
return true;
|
||||
}
|
||||
mavenAbstractArtifactRecord.deploy(embedder, artifactRepository, listener);
|
||||
}
|
||||
listener.getLogger().println("[INFO] Deployment done in " + Util.getTimeSpanString(Calendar.getInstance().getTimeInMillis() - startupTime));
|
||||
return true;
|
||||
} catch (MavenEmbedderException e) {
|
||||
e.printStackTrace(listener.error(e.getMessage()));
|
||||
@@ -148,9 +150,17 @@ public class RedeployPublisher extends Recorder {
|
||||
}
|
||||
// failed
|
||||
build.setResult(Result.FAILURE);
|
||||
listener.getLogger().println("[INFO] Deployment failed after " + Util.getTimeSpanString(Calendar.getInstance().getTimeInMillis() - startupTime));
|
||||
return true;
|
||||
}
|
||||
|
||||
private ArtifactRepository getDeploymentRepository(ArtifactRepositoryFactory factory, ArtifactRepositoryLayout layout, String repositoryId, String repositoryUrl) throws ComponentLookupException {
|
||||
if (repositoryUrl == null) return null;
|
||||
final ArtifactRepository repository = factory.createDeploymentArtifactRepository(
|
||||
repositoryId, repositoryUrl, layout, uniqueVersion);
|
||||
return new WrappedArtifactRepository(repository, uniqueVersion);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* copy from MavenUtil but here we have to ignore localRepo path and setting as thoses paths comes
|
||||
@@ -304,13 +314,6 @@ public class RedeployPublisher extends Recorder {
|
||||
return true;
|
||||
}
|
||||
|
||||
public FormValidation doCheckUrl(@QueryParameter String url) {
|
||||
String fixedUrl = hudson.Util.fixEmptyAndTrim(url);
|
||||
if (fixedUrl==null)
|
||||
return FormValidation.error(Messages.RedeployPublisher_RepositoryURL_Mandatory());
|
||||
|
||||
return FormValidation.ok();
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------
|
||||
|
||||
@@ -23,29 +23,24 @@
|
||||
*/
|
||||
package hudson.maven.reporters;
|
||||
|
||||
import hudson.maven.MavenBuildProxy;
|
||||
import hudson.maven.MavenModule;
|
||||
import hudson.maven.MavenReporter;
|
||||
import hudson.maven.MavenReporterDescriptor;
|
||||
import hudson.maven.MojoInfo;
|
||||
import hudson.maven.MavenBuild;
|
||||
import hudson.Extension;
|
||||
import hudson.FilePath;
|
||||
import hudson.Util;
|
||||
import hudson.maven.*;
|
||||
import hudson.model.BuildListener;
|
||||
import hudson.util.InvocationInterceptor;
|
||||
import hudson.FilePath;
|
||||
import hudson.Extension;
|
||||
import hudson.Util;
|
||||
import org.apache.maven.artifact.Artifact;
|
||||
import org.apache.maven.project.MavenProject;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationHandler;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.HashSet;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.InvocationHandler;
|
||||
|
||||
/**
|
||||
* Archives artifacts of the build.
|
||||
@@ -99,41 +94,47 @@ public class MavenArtifactArchiver extends MavenReporter {
|
||||
// artifacts that are known to Maven.
|
||||
Set<File> mavenArtifacts = new HashSet<File>();
|
||||
|
||||
if(pom.getFile()!=null) {// goals like 'clean' runs without loading POM, apparently.
|
||||
if (pom.getFile() != null) {// goals like 'clean' runs without loading POM, apparently.
|
||||
// record POM
|
||||
final MavenArtifact pomArtifact = new MavenArtifact(
|
||||
pom.getGroupId(), pom.getArtifactId(), pom.getVersion(), null, "pom", pom.getFile().getName(), Util.getDigestOf(new FileInputStream(pom.getFile())));
|
||||
pom.getGroupId(), pom.getArtifactId(), pom.getVersion(), null, "pom", pom.getFile().getName(), Util.getDigestOf(new FileInputStream(pom.getFile())));
|
||||
|
||||
final String repositoryUrl = pom.getDistributionManagementArtifactRepository() == null ? null : Util.fixEmptyAndTrim(pom.getDistributionManagementArtifactRepository().getUrl());
|
||||
final String repositoryId = pom.getDistributionManagementArtifactRepository() == null ? null : Util.fixEmptyAndTrim(pom.getDistributionManagementArtifactRepository().getId());
|
||||
|
||||
mavenArtifacts.add(pom.getFile());
|
||||
pomArtifact.archive(build,pom.getFile(),listener);
|
||||
pomArtifact.archive(build, pom.getFile(), listener);
|
||||
|
||||
// record main artifact (if packaging is POM, this doesn't exist)
|
||||
final MavenArtifact mainArtifact = MavenArtifact.create(pom.getArtifact());
|
||||
if(mainArtifact!=null) {
|
||||
if (mainArtifact != null) {
|
||||
File f = pom.getArtifact().getFile();
|
||||
mavenArtifacts.add(f);
|
||||
mainArtifact.archive(build, f,listener);
|
||||
mainArtifact.archive(build, f, listener);
|
||||
}
|
||||
|
||||
// record attached artifacts
|
||||
final List<MavenArtifact> attachedArtifacts = new ArrayList<MavenArtifact>();
|
||||
for( Artifact a : (List<Artifact>)pom.getAttachedArtifacts() ) {
|
||||
for (Artifact a : (List<Artifact>) pom.getAttachedArtifacts()) {
|
||||
MavenArtifact ma = MavenArtifact.create(a);
|
||||
if(ma!=null) {
|
||||
if (ma != null) {
|
||||
mavenArtifacts.add(a.getFile());
|
||||
ma.archive(build,a.getFile(),listener);
|
||||
ma.archive(build, a.getFile(), listener);
|
||||
attachedArtifacts.add(ma);
|
||||
}
|
||||
}
|
||||
|
||||
// record the action
|
||||
build.executeAsync(new MavenBuildProxy.BuildCallable<Void,IOException>() {
|
||||
build.executeAsync(new MavenBuildProxy.BuildCallable<Void, IOException>() {
|
||||
public Void call(MavenBuild build) throws IOException, InterruptedException {
|
||||
// if a build forks lifecycles, this method can be called multiple times
|
||||
List<MavenArtifactRecord> old = Util.filter(build.getActions(), MavenArtifactRecord.class);
|
||||
if (!old.isEmpty())
|
||||
build.getActions().removeAll(old);
|
||||
|
||||
MavenArtifactRecord mar = new MavenArtifactRecord(build,pomArtifact,mainArtifact,attachedArtifacts);
|
||||
MavenArtifactRecord mar = new MavenArtifactRecord(build, pomArtifact, mainArtifact, attachedArtifacts,
|
||||
repositoryUrl,
|
||||
repositoryId);
|
||||
build.addAction(mar);
|
||||
|
||||
mar.recordFingerprints();
|
||||
|
||||
@@ -23,23 +23,10 @@
|
||||
*/
|
||||
package hudson.maven.reporters;
|
||||
|
||||
import hudson.maven.AggregatableAction;
|
||||
import hudson.maven.MavenAggregatedReport;
|
||||
import hudson.maven.MavenBuild;
|
||||
import hudson.maven.MavenEmbedder;
|
||||
import hudson.maven.MavenEmbedderException;
|
||||
import hudson.maven.MavenModule;
|
||||
import hudson.maven.MavenModuleSetBuild;
|
||||
import hudson.maven.MavenUtil;
|
||||
import hudson.maven.*;
|
||||
import hudson.maven.RedeployPublisher.WrappedArtifactRepository;
|
||||
import hudson.model.Action;
|
||||
import hudson.model.TaskListener;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.PrintStream;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.maven.artifact.Artifact;
|
||||
import org.apache.maven.artifact.deployer.ArtifactDeployer;
|
||||
import org.apache.maven.artifact.deployer.ArtifactDeploymentException;
|
||||
@@ -51,6 +38,11 @@ import org.apache.maven.artifact.repository.ArtifactRepository;
|
||||
import org.apache.maven.project.artifact.ProjectArtifactMetadata;
|
||||
import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.PrintStream;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* {@link Action} that remembers {@link MavenArtifact artifact}s that are built.
|
||||
*
|
||||
@@ -82,16 +74,34 @@ public class MavenArtifactRecord extends MavenAbstractArtifactRecord<MavenBuild>
|
||||
*/
|
||||
public final List<MavenArtifact> attachedArtifacts;
|
||||
|
||||
/**
|
||||
* The repository identifier (matching maven settings) used for credentials to deploy artifacts
|
||||
*/
|
||||
public final String repositoryId;
|
||||
|
||||
/**
|
||||
* The repository URL used for credentials to deploy artifacts
|
||||
*/
|
||||
public final String repositoryUrl;
|
||||
|
||||
@Deprecated
|
||||
public MavenArtifactRecord(MavenBuild parent, MavenArtifact pomArtifact, MavenArtifact mainArtifact, List<MavenArtifact> attachedArtifacts) {
|
||||
assert parent!=null;
|
||||
assert pomArtifact!=null;
|
||||
assert attachedArtifacts!=null;
|
||||
if(mainArtifact==null) mainArtifact=pomArtifact;
|
||||
this(parent, pomArtifact, mainArtifact, attachedArtifacts, null, null);
|
||||
}
|
||||
|
||||
public MavenArtifactRecord(MavenBuild parent, MavenArtifact pomArtifact, MavenArtifact mainArtifact,
|
||||
List<MavenArtifact> attachedArtifacts, String repositoryUrl, String repositoryId) {
|
||||
assert parent != null;
|
||||
assert pomArtifact != null;
|
||||
assert attachedArtifacts != null;
|
||||
if (mainArtifact == null) mainArtifact = pomArtifact;
|
||||
|
||||
this.parent = parent;
|
||||
this.pomArtifact = pomArtifact;
|
||||
this.mainArtifact = mainArtifact;
|
||||
this.attachedArtifacts = attachedArtifacts;
|
||||
this.repositoryUrl = repositoryUrl;
|
||||
this.repositoryId = repositoryId;
|
||||
}
|
||||
|
||||
public MavenBuild getBuild() {
|
||||
@@ -109,38 +119,38 @@ public class MavenArtifactRecord extends MavenAbstractArtifactRecord<MavenBuild>
|
||||
@Override
|
||||
public void deploy(MavenEmbedder embedder, ArtifactRepository deploymentRepository, TaskListener listener) throws MavenEmbedderException, IOException, ComponentLookupException, ArtifactDeploymentException {
|
||||
ArtifactHandlerManager handlerManager = embedder.lookup(ArtifactHandlerManager.class);
|
||||
|
||||
ArtifactFactory factory = embedder.lookup(ArtifactFactory.class);
|
||||
|
||||
ArtifactFactory artifactFactory = embedder.lookup(ArtifactFactory.class);
|
||||
PrintStream logger = listener.getLogger();
|
||||
boolean maven3orLater = MavenUtil.maven3orLater(parent.getModuleSetBuild().getMavenVersionUsed());
|
||||
boolean uniqueVersion = true;
|
||||
if (!deploymentRepository.isUniqueVersion()) {
|
||||
if (maven3orLater) {
|
||||
logger.println("uniqueVersion == false is not anymore supported in maven 3");
|
||||
logger.println("[ERROR] uniqueVersion == false is not anymore supported in maven 3");
|
||||
} else {
|
||||
((WrappedArtifactRepository) deploymentRepository).setUniqueVersion( false );
|
||||
((WrappedArtifactRepository) deploymentRepository).setUniqueVersion(false);
|
||||
uniqueVersion = false;
|
||||
}
|
||||
} else {
|
||||
((WrappedArtifactRepository) deploymentRepository).setUniqueVersion( true );
|
||||
((WrappedArtifactRepository) deploymentRepository).setUniqueVersion(true);
|
||||
}
|
||||
Artifact main = mainArtifact.toArtifact(handlerManager,factory,parent);
|
||||
if(!isPOM())
|
||||
main.addMetadata(new ProjectArtifactMetadata(main,pomArtifact.getFile(parent)));
|
||||
Artifact main = mainArtifact.toArtifact(handlerManager, artifactFactory, parent);
|
||||
if (!isPOM())
|
||||
main.addMetadata(new ProjectArtifactMetadata(main, pomArtifact.getFile(parent)));
|
||||
|
||||
|
||||
ArtifactDeployer deployer = embedder.lookup(ArtifactDeployer.class, uniqueVersion ? "default" : "maven2");
|
||||
logger.println(
|
||||
"[INFO] Deployment in " + deploymentRepository.getUrl() + " (id=" + deploymentRepository.getId() + ",uniqueVersion=" + deploymentRepository.isUniqueVersion()+")");
|
||||
|
||||
// deploy the main artifact. This also deploys the POM
|
||||
logger.println(Messages.MavenArtifact_DeployingMainArtifact(main.getFile().getName()));
|
||||
|
||||
ArtifactDeployer deployer = embedder.lookup(ArtifactDeployer.class,uniqueVersion ? "default":"maven2");
|
||||
|
||||
deployer.deploy( main.getFile(), main, deploymentRepository, embedder.getLocalRepository() );
|
||||
|
||||
//deployMavenArtifact( main, deploymentRepository, embedder, uniqueVersion );
|
||||
deployer.deploy(main.getFile(), main, deploymentRepository, embedder.getLocalRepository());
|
||||
|
||||
for (MavenArtifact aa : attachedArtifacts) {
|
||||
Artifact a = aa.toArtifact(handlerManager,factory, parent);
|
||||
logger.println(Messages.MavenArtifact_DeployingAttachedArtifact(a.getFile().getName()));
|
||||
deployer.deploy( a.getFile(), a, deploymentRepository, embedder.getLocalRepository() );
|
||||
Artifact a = aa.toArtifact(handlerManager, artifactFactory, parent);
|
||||
logger.println(Messages.MavenArtifact_DeployingMainArtifact(a.getFile().getName()));
|
||||
deployer.deploy(a.getFile(), a, deploymentRepository, embedder.getLocalRepository());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,27 +24,15 @@
|
||||
*/
|
||||
package hudson.maven.reporters;
|
||||
|
||||
import hudson.FilePath;
|
||||
import hudson.Util;
|
||||
import hudson.Extension;
|
||||
import hudson.maven.MavenBuildProxy;
|
||||
import hudson.maven.MavenModule;
|
||||
import hudson.maven.MavenReporter;
|
||||
import hudson.maven.MavenReporterDescriptor;
|
||||
import hudson.maven.MojoInfo;
|
||||
import hudson.maven.MavenModuleSet;
|
||||
import hudson.maven.MavenReportInfo;
|
||||
import hudson.model.*;
|
||||
import hudson.tasks.JavadocArchiver.JavadocAction;
|
||||
import org.apache.maven.project.MavenProject;
|
||||
import org.codehaus.plexus.component.configurator.ComponentConfigurationException;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Records the javadoc and archives it.
|
||||
|
||||
@@ -245,6 +245,7 @@ public class SurefireArchiver extends MavenReporter {
|
||||
private boolean isSurefireTest(MojoInfo mojo) {
|
||||
if ((!mojo.is("com.sun.maven", "maven-junit-plugin", "test"))
|
||||
&& (!mojo.is("org.sonatype.flexmojos", "flexmojos-maven-plugin", "test-run"))
|
||||
&& (!mojo.is("org.eclipse.tycho", "tycho-surefire-plugin", "test"))
|
||||
&& (!mojo.is("org.sonatype.tycho", "maven-osgi-test-plugin", "test"))
|
||||
&& (!mojo.is("org.apache.maven.plugins", "maven-surefire-plugin", "test"))
|
||||
&& (!mojo.is("org.apache.maven.plugins", "maven-failsafe-plugin", "integration-test")))
|
||||
@@ -290,6 +291,11 @@ public class SurefireArchiver extends MavenReporter {
|
||||
if (((skipTests != null) && (skipTests))) {
|
||||
return false;
|
||||
}
|
||||
} else if (mojo.is("org.eclipse.tycho", "tycho-surefire-plugin", "test")) {
|
||||
Boolean skipTests = mojo.getConfigurationValue("skipTest", Boolean.class);
|
||||
if (((skipTests != null) && (skipTests))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
} catch (ComponentConfigurationException e) {
|
||||
|
||||
@@ -19,6 +19,9 @@ package hudson.maven.util;
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import hudson.tasks._maven.Maven3MojoNote;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
@@ -261,13 +264,18 @@ public class ExecutionEventLogger
|
||||
{
|
||||
if ( logger.isInfoEnabled() )
|
||||
{
|
||||
StringBuilder buffer = new StringBuilder( 128 );
|
||||
|
||||
final Maven3MojoNote note = new Maven3MojoNote();
|
||||
final StringBuilder buffer = new StringBuilder( 128 );
|
||||
try {
|
||||
buffer.append( note.encode() );
|
||||
} catch ( IOException e ) {
|
||||
// As we use only memory buffers this should not happen, ever.
|
||||
throw new RuntimeException( "Could not encode note?", e );
|
||||
}
|
||||
buffer.append( "--- " );
|
||||
append( buffer, event.getMojoExecution() );
|
||||
append( buffer, event.getProject() );
|
||||
buffer.append( " ---" );
|
||||
|
||||
logger.info( "" );
|
||||
logger.info( buffer.toString() );
|
||||
}
|
||||
|
||||
@@ -91,7 +91,9 @@ THE SOFTWARE.
|
||||
checked="${it.usesPrivateRepository()}" />
|
||||
<f:optionalBlock name="maven.resolveDependencies" title="${%Resolve Dependencies during Pom parsing}"
|
||||
checked="${it.isResolveDependencies()}" />
|
||||
<f:optionalBlock name="maven.processPlugins" title="${%Process Plugins during Pom parsing}"
|
||||
<f:optionalBlock name="maven.runHeadless" title="${%Run Headless}" help="/plugin/maven-plugin/run-headless.html"
|
||||
checked="${it.runHeadless()}" />
|
||||
<f:optionalBlock name="maven.processPlugins" title="${%Process Plugins during Pom parsing}"
|
||||
checked="${it.isProcessPlugins()}" />
|
||||
<p:config-customWorkspace />
|
||||
|
||||
|
||||
+14
-8
@@ -21,16 +21,22 @@
|
||||
# THE SOFTWARE.
|
||||
|
||||
Alternate\ settings\ file=Fichier settings alternatif
|
||||
Block\ build\ when\ dependency\ building=Bloquer le build pendant la construction des d\u00E9pendances
|
||||
Block\ build\ when\ dependency\ building=Bloquer le build pendant la construction des d\u00e9pendances
|
||||
Build=Build
|
||||
Incremental\ build\ -\ only\ build\ changed\ modules=Construction incr\u00E9mentale - ne faire la construction (build) que pour les modules chang\u00E9s
|
||||
Incremental\ build\ -\ only\ build\ changed\ modules=Construction incr\u00e9mentale - ne faire la construction (build) que pour les modules chang\u00e9s
|
||||
Maven\ Version=Version de Maven
|
||||
Root\ POM=POM Racine
|
||||
Build\ modules\ in\ parallel=Construire les modules en parallèle
|
||||
Build\ modules\ in\ parallel=Construire les modules en parall\u00eale
|
||||
Build\ Settings=Configuration du build
|
||||
Use\ private\ Maven\ repository=Utilise un repository Maven priv\u00E9
|
||||
Use\ private\ maven\ repository=Utiliser un repository Maven privé
|
||||
Use\ private\ Maven\ repository=Utilise un repository Maven priv\u00e9
|
||||
Use\ private\ maven\ repository=Utiliser un repository Maven priv\u00e9
|
||||
Goals\ and\ options=Goals et options
|
||||
Maven\ Version.error.1=Jenkins a besoin de savoir où Maven2/3 est installé.
|
||||
Maven\ Version.error.2=Veuillez le faire dans <a href="{0}/configure" target="_new">la configuration système</a>.
|
||||
Build\ whenever\ a\ SNAPSHOT\ dependency\ is\ built=Lance un build à chaque fois qu''une dépendance SNAPSHOT est construite
|
||||
Maven\ Version.error.1=Jenkins a besoin de savoir o\u00f9 Maven2/3 est install\u00c8.
|
||||
Maven\ Version.error.2=Veuillez le faire dans <a href="{0}/configure" target="_new">la configuration syst\u00cbme</a>.
|
||||
Build\ whenever\ a\ SNAPSHOT\ dependency\ is\ built=Lance un build \u00e0 chaque fois qu''une d\u00e9pendance SNAPSHOT est construite
|
||||
Run\ Headless=Ex\u00e9cuter sans environnement graphique
|
||||
Disable\ automatic\ artifact\ archiving=D\u00e9sactive l'achivage automatique des artefacts
|
||||
Resolve\ Dependencies\ during\ Pom\ parsing=Effectue la r\u00e9solution de d\u00e9pendances pendant la lecture du POM
|
||||
Process\ Plugins\ during\ Pom\ parsing=Analyse les plugins pendant la lecture du POM
|
||||
Maven\ Validation\ Level=Niveau de validation du POM Maven
|
||||
Goals=Goals
|
||||
@@ -1,6 +1,6 @@
|
||||
# The MIT License
|
||||
#
|
||||
# Copyright (c) 2004-2010, Sun Microsystems, Inc., Kohsuke Kawaguchi, Seiji Sogabe, id:cactusman
|
||||
# Copyright (c) 2004-2011, Sun Microsystems, Inc., Kohsuke Kawaguchi, Seiji Sogabe, id:cactusman
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -21,7 +21,7 @@
|
||||
# THE SOFTWARE.
|
||||
|
||||
Workspace=\u30ef\u30fc\u30af\u30b9\u30da\u30fc\u30b9
|
||||
Recent\ Changes=\u6700\u65b0\u306e\u5909\u66f4
|
||||
Recent\ Changes=\u5909\u66f4\u5c65\u6b74
|
||||
Latest\ Test\ Result=\u6700\u65b0\u306e\u30c6\u30b9\u30c8\u7d50\u679c
|
||||
Last\ Successful\ Artifacts=\u6700\u65b0\u6210\u529f\u30d3\u30eb\u30c9\u306e\u6210\u679c\u7269
|
||||
This\ project\ is\ currently\ disabled=\u73fe\u5728\u3001\u3053\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306f\u7121\u52b9\u3067\u3059\u3002
|
||||
|
||||
@@ -20,4 +20,4 @@
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
|
||||
Environment\ Variables=Variables d'Environnement
|
||||
Environment\ Variables=Variables d''Environnement
|
||||
@@ -24,10 +24,10 @@ 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="${%Repository URL}" field="url">
|
||||
<f:textbox />
|
||||
</f:entry>
|
||||
<f:advanced>
|
||||
<f:entry title="${%Repository URL}" field="url">
|
||||
<f:textbox />
|
||||
</f:entry>
|
||||
<f:entry title="${%Repository ID}" field="id">
|
||||
<f:textbox />
|
||||
</f:entry>
|
||||
|
||||
@@ -21,5 +21,6 @@
|
||||
# THE SOFTWARE.
|
||||
|
||||
Repository\ URL=URL du repository
|
||||
Repository\ ID=ID du repository
|
||||
Assign\ unique\ versions\ to\ snapshots=Affecter des numéros de version uniques aux snapshots
|
||||
Repository\ ID=Identifiant du repository
|
||||
Assign\ unique\ versions\ to\ snapshots=Affecter des num\u00e9ros de version uniques aux snapshots
|
||||
Deploy\ even\ if\ the\ build\ is\ unstable=D\u00e9ploiment\\ m\u00eame si\\ le\\ build est\\ instable.
|
||||
@@ -13,4 +13,8 @@
|
||||
Note that regardless of this configuration, you can always manually come back
|
||||
to Jenkins and deploy any of the past artifacts to any repository of your choice,
|
||||
after the fact.
|
||||
|
||||
<p>
|
||||
<b>To use this feature you shouldn't deactivate the automatic artifact archiving.</b>
|
||||
</p>
|
||||
</div>
|
||||
@@ -11,4 +11,9 @@
|
||||
<p>
|
||||
Hinweis: Unabhängig von dieser Einstellung können Sie aber auch jederzeit manuell
|
||||
Artefakte aus durchgeführten Builds in beliebige Repositories ausbringen.
|
||||
|
||||
<p>
|
||||
<b>To use this feature you shouldn't deactivate the automatic artifact archiving.</b>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
@@ -13,4 +13,8 @@
|
||||
Note that regardless of this configuration, you can always manually come back
|
||||
to Jenkins and deploy any of the past artifacts to any repository of your choice,
|
||||
after the fact.
|
||||
|
||||
<p>
|
||||
<b>To use this feature you shouldn't deactivate the automatic artifact archiving.</b>
|
||||
</p>
|
||||
</div>
|
||||
@@ -9,4 +9,8 @@
|
||||
|
||||
<p>
|
||||
この設定を行っているかによらず、Jenkinsの画面からいつでも過去の成果物を任意のリポジトリにデプロイできます。
|
||||
|
||||
<p>
|
||||
<b>To use this feature you shouldn't deactivate the automatic artifact archiving.</b>
|
||||
</p>
|
||||
</div>
|
||||
@@ -0,0 +1,7 @@
|
||||
<div>
|
||||
<p>
|
||||
If build doesn't requires access to desktop (only using command line tools and tests) this option can be checked.
|
||||
<p>
|
||||
This option allow Jenkins to configure the build process in headless mode. Usefull on OSX to avoid boring Dock icon
|
||||
to take focus, this option may also in future release be used to select slave adequate instance.
|
||||
</div>
|
||||
@@ -0,0 +1,9 @@
|
||||
<div>
|
||||
<p>
|
||||
Si le build ne né,cessite pas un accè à l'environnement graphique (s'il n'utilise que des outils
|
||||
en ligne de commande) cette option peut être activŽe.
|
||||
<p>
|
||||
Cette option permet à Jenkins de lancer le processus de build en mode <em>'headless'</em>. Ceci est
|
||||
particulièrement intéressant sur OSX pour éviter qu'une icône Java prenne le focus en sautillant
|
||||
dans le Dock. Cette option pourrait à l'avenir servir à sélectionner un esclave adapté.
|
||||
</div>
|
||||
@@ -0,0 +1,62 @@
|
||||
package hudson.maven;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.apache.maven.plugin.MojoExecution;
|
||||
import org.apache.maven.plugin.descriptor.MojoDescriptor;
|
||||
import org.apache.maven.plugin.descriptor.PluginDescriptor;
|
||||
import org.codehaus.plexus.classworlds.realm.ClassRealm;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.jvnet.hudson.test.Bug;
|
||||
|
||||
/**
|
||||
* Unit test for {@link ExecutedMojo}.
|
||||
*
|
||||
* @author kutzi
|
||||
*/
|
||||
public class ExecutedMojoTest {
|
||||
|
||||
private MojoDescriptor mojoDescriptor;
|
||||
|
||||
@Before
|
||||
public void before() {
|
||||
PluginDescriptor pluginDescriptor = new PluginDescriptor();
|
||||
pluginDescriptor.setGroupId("com.test");
|
||||
pluginDescriptor.setArtifactId("testPlugin");
|
||||
pluginDescriptor.setVersion("1.0");
|
||||
|
||||
ClassRealm classRealm = new ClassRealm(null, "test", getClass().getClassLoader());
|
||||
pluginDescriptor.setClassRealm(classRealm);
|
||||
|
||||
MojoDescriptor descriptor = new MojoDescriptor();
|
||||
descriptor.setPluginDescriptor(pluginDescriptor);
|
||||
this.mojoDescriptor = descriptor;
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMojoFromJarFile() throws IOException, InterruptedException {
|
||||
// Faking JUnit's Assert to be the plugin class
|
||||
this.mojoDescriptor.setImplementation(Assert.class.getName());
|
||||
MojoExecution execution = new MojoExecution(this.mojoDescriptor);
|
||||
MojoInfo info = new MojoInfo(execution, null, null, null);
|
||||
|
||||
ExecutedMojo executedMojo = new ExecutedMojo(info, 1L);
|
||||
|
||||
Assert.assertNotNull(executedMojo.digest);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Bug(5044)
|
||||
public void testMojoFromClassesDirectory() throws IOException, InterruptedException {
|
||||
// Faking this class as the mojo impl:
|
||||
this.mojoDescriptor.setImplementation(getClass().getName());
|
||||
MojoExecution execution = new MojoExecution(this.mojoDescriptor);
|
||||
MojoInfo info = new MojoInfo(execution, null, null, null);
|
||||
|
||||
ExecutedMojo executedMojo = new ExecutedMojo(info, 1L);
|
||||
|
||||
Assert.assertEquals("com.test", executedMojo.groupId);
|
||||
}
|
||||
}
|
||||
+9
-8
@@ -10,7 +10,7 @@
|
||||
<groupId>org.jenkins-ci.plugins</groupId>
|
||||
<artifactId>plugin</artifactId>
|
||||
<name>Jenkins plugin POM</name>
|
||||
<version>1.413-SNAPSHOT</version>
|
||||
<version>1.415-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<!--
|
||||
@@ -33,7 +33,7 @@
|
||||
<dependency><!-- if a plugin wants to depend on the maven plugin, choose the right version automatically -->
|
||||
<groupId>org.jenkins-ci.main</groupId>
|
||||
<artifactId>maven-plugin</artifactId>
|
||||
<version>1.413-SNAPSHOT</version>
|
||||
<version>1.415-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
@@ -43,25 +43,25 @@
|
||||
<groupId>org.jenkins-ci.main</groupId>
|
||||
<artifactId>jenkins-war</artifactId>
|
||||
<type>war</type>
|
||||
<version>1.413-SNAPSHOT</version>
|
||||
<version>1.415-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.main</groupId>
|
||||
<artifactId>jenkins-core</artifactId>
|
||||
<version>1.413-SNAPSHOT</version>
|
||||
<version>1.415-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.main</groupId>
|
||||
<artifactId>jenkins-test-harness</artifactId>
|
||||
<version>1.413-SNAPSHOT</version>
|
||||
<version>1.415-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.main</groupId>
|
||||
<artifactId>ui-samples-plugin</artifactId>
|
||||
<version>1.413-SNAPSHOT</version>
|
||||
<version>1.415-SNAPSHOT</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -157,7 +157,7 @@
|
||||
<plugin>
|
||||
<groupId>org.codehaus.groovy.maven</groupId>
|
||||
<artifactId>gmaven-plugin</artifactId>
|
||||
<version>1.0-rc-5</version>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<executions>
|
||||
<execution>
|
||||
<id>test-in-groovy</id>
|
||||
@@ -178,6 +178,7 @@
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<configuration>
|
||||
<systemProperties>
|
||||
<property>
|
||||
@@ -190,7 +191,7 @@
|
||||
<plugin>
|
||||
<groupId>com.cloudbees</groupId>
|
||||
<artifactId>maven-license-plugin</artifactId>
|
||||
<version>1.3</version>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
|
||||
@@ -32,7 +32,7 @@ THE SOFTWARE.
|
||||
|
||||
<groupId>org.jenkins-ci.main</groupId>
|
||||
<artifactId>pom</artifactId>
|
||||
<version>1.413-SNAPSHOT</version>
|
||||
<version>1.415-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>Jenkins main module</name>
|
||||
@@ -84,13 +84,17 @@ THE SOFTWARE.
|
||||
<plugin>
|
||||
<groupId>org.jvnet.maven-antrun-extended-plugin</groupId>
|
||||
<artifactId>maven-antrun-extended-plugin</artifactId>
|
||||
<version>1.39</version>
|
||||
<version>1.42</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<version>2.5</version>
|
||||
</plugin>
|
||||
<version>2.6</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
<version>1.2</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-install-plugin</artifactId>
|
||||
@@ -99,17 +103,22 @@ THE SOFTWARE.
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>2.6.1</version>
|
||||
<version>2.8</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>2.3.1</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>2.1.1</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.8</version>
|
||||
<version>2.8.1</version>
|
||||
<configuration>
|
||||
<systemPropertyVariables>
|
||||
<java.io.tmpdir>${project.build.directory}</java.io.tmpdir>
|
||||
@@ -120,17 +129,17 @@ THE SOFTWARE.
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>2.1</version>
|
||||
<version>2.2</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>2.2-beta-5</version>
|
||||
<version>2.2.1</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>2.4.3</version>
|
||||
<version>2.5</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<!--
|
||||
@@ -179,6 +188,73 @@ THE SOFTWARE.
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<!-- see http://maven-junit-plugin.kenai.com/ for more info -->
|
||||
<groupId>org.kohsuke</groupId>
|
||||
<artifactId>maven-junit-plugin</artifactId>
|
||||
<version>1.9</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.jvnet.localizer</groupId>
|
||||
<artifactId>maven-localizer-plugin</artifactId>
|
||||
<version>1.12</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.jvnet.hudson.tools</groupId>
|
||||
<artifactId>maven-encoding-plugin</artifactId>
|
||||
<version>1.1</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.infradna.tool</groupId>
|
||||
<artifactId>bridge-method-injector</artifactId>
|
||||
<version>1.4</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>antlr-maven-plugin</artifactId>
|
||||
<version>2.1</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>apt-maven-plugin</artifactId>
|
||||
<version>1.0-alpha-4</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<version>2.5</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>findbugs-maven-plugin</artifactId>
|
||||
<version>2.3.2</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-pmd-plugin</artifactId>
|
||||
<version>2.5</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<!-- this is really just a patched version of maven-jetty-plugin to workaround issue #932 -->
|
||||
<groupId>org.jenkins-ci.tools</groupId>
|
||||
<artifactId>maven-jenkins-dev-plugin</artifactId>
|
||||
<version>6.1.26-jenkins-2</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.jvnet.updatecenter2</groupId>
|
||||
<artifactId>maven-makepkgs-plugin</artifactId>
|
||||
<version>0.5.1</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<version>1.6</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.jenkins-ci.tools</groupId>
|
||||
<artifactId>maven-hpi-plugin</artifactId>
|
||||
<version>1.69</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
|
||||
@@ -196,7 +272,7 @@ THE SOFTWARE.
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-remote-resources-plugin</artifactId>
|
||||
<version>1.0</version>
|
||||
<version>1.2</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
@@ -261,7 +337,7 @@ THE SOFTWARE.
|
||||
-->
|
||||
<groupId>org.jenkins-ci.tools</groupId>
|
||||
<artifactId>maven-jenkins-dev-plugin</artifactId>
|
||||
<version>6.1.26-jenkins-1</version>
|
||||
<version>6.1.26-jenkins-2</version>
|
||||
</plugin>
|
||||
|
||||
<!--<plugin>
|
||||
@@ -277,13 +353,6 @@ THE SOFTWARE.
|
||||
</plugin>-->
|
||||
</plugins>
|
||||
|
||||
<extensions>
|
||||
<extension>
|
||||
<groupId>org.apache.maven.wagon</groupId>
|
||||
<artifactId>wagon-http</artifactId>
|
||||
<version>1.0-beta-5</version>
|
||||
</extension>
|
||||
</extensions>
|
||||
</build>
|
||||
|
||||
<dependencies>
|
||||
@@ -339,7 +408,7 @@ THE SOFTWARE.
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>findbugs-maven-plugin</artifactId>
|
||||
<version>2.4</version>
|
||||
<version>2.3.2</version>
|
||||
<configuration>
|
||||
<threshold>High</threshold>
|
||||
</configuration>
|
||||
@@ -358,9 +427,7 @@ THE SOFTWARE.
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<version>2.5</version>
|
||||
<configuration>
|
||||
</configuration>
|
||||
<version>2.6</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</reporting>
|
||||
|
||||
+5
-3
@@ -27,7 +27,7 @@ THE SOFTWARE.
|
||||
<parent>
|
||||
<groupId>org.jenkins-ci.main</groupId>
|
||||
<artifactId>pom</artifactId>
|
||||
<version>1.413-SNAPSHOT</version>
|
||||
<version>1.415-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -44,7 +44,7 @@ THE SOFTWARE.
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>findbugs-maven-plugin</artifactId>
|
||||
<version>2.1</version>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<configuration>
|
||||
<threshold>High</threshold>
|
||||
</configuration>
|
||||
@@ -52,7 +52,7 @@ THE SOFTWARE.
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-pmd-plugin</artifactId>
|
||||
<version>2.5</version>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<configuration>
|
||||
<!--rulesets>
|
||||
<ruleset>ruleset.xml</ruleset>
|
||||
@@ -62,6 +62,7 @@ THE SOFTWARE.
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
@@ -91,6 +92,7 @@ THE SOFTWARE.
|
||||
<plugin>
|
||||
<groupId>org.jvnet.maven-antrun-extended-plugin</groupId>
|
||||
<artifactId>maven-antrun-extended-plugin</artifactId>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<executions>
|
||||
<execution>
|
||||
<id>generate-resources</id>
|
||||
|
||||
@@ -172,6 +172,7 @@ public class Channel implements VirtualChannel, IChannel {
|
||||
*/
|
||||
private final Vector<Listener> listeners = new Vector<Listener>();
|
||||
private int gcCounter;
|
||||
private int commandsSent;
|
||||
|
||||
/**
|
||||
* Total number of nanoseconds spent for remote class loading.
|
||||
@@ -237,6 +238,11 @@ public class Channel implements VirtualChannel, IChannel {
|
||||
|
||||
/*package*/ final ExecutorService pipeWriter;
|
||||
|
||||
/**
|
||||
* ClassLaoder that remote classloaders should use as the basis.
|
||||
*/
|
||||
/*package*/ final ClassLoader baseClassLoader;
|
||||
|
||||
/**
|
||||
* Communication mode.
|
||||
* @since 1.161
|
||||
@@ -355,6 +361,7 @@ public class Channel implements VirtualChannel, IChannel {
|
||||
|
||||
if (base==null)
|
||||
base = getClass().getClassLoader();
|
||||
this.baseClassLoader = base;
|
||||
|
||||
if(export(this,false)!=1)
|
||||
throw new AssertionError(); // export number 1 is reserved for the channel itself
|
||||
@@ -485,6 +492,7 @@ public class Channel implements VirtualChannel, IChannel {
|
||||
oos.flush(); // make sure the command reaches the other end.
|
||||
} finally {
|
||||
Channel.setCurrent(old);
|
||||
commandsSent++;
|
||||
}
|
||||
// unless this is the last command, have OOS and remote OIS forget all the objects we sent
|
||||
// in this command. Otherwise it'll keep objects in memory unnecessarily.
|
||||
@@ -993,15 +1001,18 @@ public class Channel implements VirtualChannel, IChannel {
|
||||
}
|
||||
|
||||
private final class ReaderThread extends Thread {
|
||||
private int commandsReceived = 0;
|
||||
private int commandsExecuted = 0;
|
||||
|
||||
public ReaderThread(String name) {
|
||||
super("Channel reader thread: "+name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
Command cmd = null;
|
||||
try {
|
||||
while(inClosed==null) {
|
||||
Command cmd = null;
|
||||
try {
|
||||
Channel old = Channel.setCurrent(Channel.this);
|
||||
try {
|
||||
@@ -1016,7 +1027,10 @@ public class Channel implements VirtualChannel, IChannel {
|
||||
throw ioe;
|
||||
} catch (ClassNotFoundException e) {
|
||||
logger.log(Level.SEVERE, "Unable to read a command (channel " + name + ")",e);
|
||||
} finally {
|
||||
commandsReceived++;
|
||||
}
|
||||
|
||||
if(logger.isLoggable(Level.FINE))
|
||||
logger.fine("Received "+cmd);
|
||||
try {
|
||||
@@ -1024,6 +1038,8 @@ public class Channel implements VirtualChannel, IChannel {
|
||||
} catch (Throwable t) {
|
||||
logger.log(Level.SEVERE, "Failed to execute command "+cmd+ " (channel " + name + ")",t);
|
||||
logger.log(Level.SEVERE, "This command is created here",cmd.createdAt);
|
||||
} finally {
|
||||
commandsExecuted++;
|
||||
}
|
||||
}
|
||||
ois.close();
|
||||
|
||||
@@ -54,7 +54,7 @@ final class ImportedClassLoaderTable {
|
||||
if(r==null) {
|
||||
// we need to be able to use the same hudson.remoting classes, hence delegate
|
||||
// to this class loader.
|
||||
r = RemoteClassLoader.create(getClass().getClassLoader(),classLoaderProxy);
|
||||
r = RemoteClassLoader.create(channel.baseClassLoader,classLoaderProxy);
|
||||
classLoaders.put(classLoaderProxy,r);
|
||||
}
|
||||
return r;
|
||||
|
||||
+74
-62
@@ -27,7 +27,7 @@ THE SOFTWARE.
|
||||
<parent>
|
||||
<artifactId>pom</artifactId>
|
||||
<groupId>org.jenkins-ci.main</groupId>
|
||||
<version>1.413-SNAPSHOT</version>
|
||||
<version>1.415-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.jenkins-ci.main</groupId>
|
||||
@@ -46,52 +46,23 @@ THE SOFTWARE.
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip><!-- tests now run by maven-junit-plugin -->
|
||||
</configuration>
|
||||
<groupId>org.kohsuke.stapler</groupId>
|
||||
<artifactId>maven-stapler-plugin</artifactId>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<extensions>true</extensions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<!-- see http://maven-junit-plugin.kenai.com/ for more info -->
|
||||
<groupId>com.sun.maven</groupId>
|
||||
<artifactId>maven-junit-plugin</artifactId>
|
||||
<version>1.8</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>test</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<fork>true</fork>
|
||||
<concurrency>${concurrency}</concurrency>
|
||||
<argLine>-Dfile.encoding=UTF-8</argLine>
|
||||
<systemProperties>
|
||||
<property>
|
||||
<!-- use AntClassLoader that supports predictable file handle release -->
|
||||
<name>hudson.ClassicPluginStrategy.useAntClassLoader</name>
|
||||
<value>true</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>hudson.maven.debug</name>
|
||||
<value>${mavenDebug}</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>java.io.tmpdir</name>
|
||||
<value>${project.build.directory}</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>buildDirectory</name>
|
||||
<value>${project.build.directory}</value>
|
||||
</property>
|
||||
</systemProperties>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
<!-- tests now run by maven-junit-plugin -->
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.kohsuke.gmaven</groupId>
|
||||
<artifactId>gmaven-plugin</artifactId>
|
||||
<version>1.0-rc-5-patch-2</version>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<executions>
|
||||
<execution>
|
||||
<id>preset-packager</id>
|
||||
@@ -119,15 +90,9 @@ THE SOFTWARE.
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.kohsuke.stapler</groupId>
|
||||
<artifactId>maven-stapler-plugin</artifactId>
|
||||
<version>1.15</version>
|
||||
<extensions>true</extensions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<!--
|
||||
@@ -158,7 +123,8 @@ THE SOFTWARE.
|
||||
<groupId>org.jvnet.hudson</groupId>
|
||||
<artifactId>test-annotations</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>compile</scope><!-- in this module we need this as a compile scope, whereas in the parent it's test -->
|
||||
<scope>compile</scope>
|
||||
<!-- in this module we need this as a compile scope, whereas in the parent it's test -->
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jvnet.mock-javamail</groupId>
|
||||
@@ -180,11 +146,11 @@ THE SOFTWARE.
|
||||
<artifactId>htmlunit</artifactId>
|
||||
<version>2.6-jenkins-4</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<!-- hides JDK DOM classes in Eclipse -->
|
||||
<groupId>xml-apis</groupId>
|
||||
<artifactId>xml-apis</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<!-- hides JDK DOM classes in Eclipse -->
|
||||
<groupId>xml-apis</groupId>
|
||||
<artifactId>xml-apis</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
@@ -213,6 +179,59 @@ THE SOFTWARE.
|
||||
</dependencies>
|
||||
|
||||
<profiles>
|
||||
|
||||
<profile>
|
||||
<id>run-test-harness</id>
|
||||
<activation>
|
||||
<property>
|
||||
<name>!skip-test-harness</name>
|
||||
</property>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<!-- see http://maven-junit-plugin.kenai.com/ for more info -->
|
||||
<groupId>org.kohsuke</groupId>
|
||||
<artifactId>maven-junit-plugin</artifactId>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>test</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<fork>true</fork>
|
||||
<concurrency>${concurrency}</concurrency>
|
||||
<argLine>-Dfile.encoding=UTF-8</argLine>
|
||||
<timeout>300</timeout>
|
||||
<systemProperties>
|
||||
<property>
|
||||
<!-- use AntClassLoader that supports predictable file handle release -->
|
||||
<name>hudson.ClassicPluginStrategy.useAntClassLoader</name>
|
||||
<value>true</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>hudson.maven.debug</name>
|
||||
<value>${mavenDebug}</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>java.io.tmpdir</name>
|
||||
<value>${project.build.directory}</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>buildDirectory</name>
|
||||
<value>${project.build.directory}</value>
|
||||
</property>
|
||||
</systemProperties>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>light-test</id>
|
||||
<properties>
|
||||
@@ -229,6 +248,7 @@ THE SOFTWARE.
|
||||
<plugin>
|
||||
<groupId>org.kohsuke.gmaven</groupId>
|
||||
<artifactId>gmaven-plugin</artifactId>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<executions>
|
||||
<!-- run unit test -->
|
||||
<execution>
|
||||
@@ -246,14 +266,6 @@ THE SOFTWARE.
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<!-- unit tests are run by GMaven through Ant. -->
|
||||
<groupId>com.sun.maven</groupId>
|
||||
<artifactId>maven-junit-plugin</artifactId>
|
||||
<configuration>
|
||||
<skipTests>true</skipTests>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
@@ -111,7 +111,6 @@ import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.lang.management.ThreadInfo;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.lang.reflect.Array;
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.Field;
|
||||
@@ -123,14 +122,11 @@ import java.net.URLClassLoader;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.*;
|
||||
import java.util.jar.Manifest;
|
||||
@@ -1851,6 +1847,15 @@ public abstract class HudsonTestCase extends TestCase implements RootAction {
|
||||
// DNS multicast support takes up a lot of time during tests, so just disable it altogether
|
||||
// this also prevents tests from falsely advertising Hudson
|
||||
DNSMultiCast.disabled = true;
|
||||
|
||||
if (!Functions.isWindows()) {
|
||||
try {
|
||||
GNUCLibrary.LIBC.unsetenv("MAVEN_OPTS");
|
||||
GNUCLibrary.LIBC.unsetenv("MAVEN_DEBUG_OPTS");
|
||||
} catch (Exception e) {
|
||||
LOGGER.log(Level.WARNING,"Failed to cancel out MAVEN_OPTS",e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static class TestBuildWrapper extends BuildWrapper {
|
||||
|
||||
@@ -30,6 +30,11 @@ public class MockBuilder extends Builder {
|
||||
build.setResult(result);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Descriptor<Builder> getDescriptor() {
|
||||
return new DescriptorImpl();
|
||||
}
|
||||
|
||||
@Extension
|
||||
public static final class DescriptorImpl extends Descriptor<Builder> {
|
||||
|
||||
@@ -122,7 +122,7 @@ public class MatrixProjectTest extends HudsonTestCase {
|
||||
|
||||
p.getBuildersList().add(new UnstableBuilder());
|
||||
build = p.scheduleBuild2(0).get();
|
||||
assertEquals(2, build.getRuns().size());
|
||||
assertEquals(2, build.exactRuns.size());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
/*
|
||||
* The MIT License
|
||||
*
|
||||
* Copyright (C) 2010-2011 by Anthony Robinson
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package lib.form;
|
||||
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlElement;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlForm;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlPage;
|
||||
import com.gargoylesoftware.htmlunit.html.HtmlTextInput;
|
||||
import hudson.Extension;
|
||||
import hudson.model.Describable;
|
||||
import hudson.model.Descriptor;
|
||||
import hudson.model.Hudson;
|
||||
import org.jvnet.hudson.test.HudsonTestCase;
|
||||
import org.kohsuke.stapler.DataBoundConstructor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class RepeatablePropertyTest extends HudsonTestCase implements Describable<RepeatablePropertyTest> {
|
||||
|
||||
private static final String VIEW_WITHOUT_DEFAULT = "noDefault";
|
||||
private static final String VIEW_WITH_DEFAULT = "withDefault";
|
||||
|
||||
public ArrayList<ExcitingObject> testRepeatable;
|
||||
public ArrayList<ExcitingObject> defaults;
|
||||
|
||||
public void testSimple() throws Exception {
|
||||
testRepeatable = createRepeatable();
|
||||
assertFormContents(VIEW_WITHOUT_DEFAULT, testRepeatable);
|
||||
}
|
||||
|
||||
public void testNullFieldNoDefault() throws Exception {
|
||||
assertFormContents(VIEW_WITHOUT_DEFAULT, new ArrayList<ExcitingObject>());
|
||||
}
|
||||
|
||||
public void testNullFieldWithDefault() throws Exception {
|
||||
defaults = createRepeatable();
|
||||
assertFormContents(VIEW_WITH_DEFAULT, defaults);
|
||||
}
|
||||
|
||||
public void testFieldNotNullWithDefaultIgnoresDefaults() throws Exception {
|
||||
testRepeatable = createRepeatable();
|
||||
defaults = new ArrayList<ExcitingObject>(Arrays.asList(
|
||||
new ExcitingObject("This default should be ignored"),
|
||||
new ExcitingObject("Ignore me too")
|
||||
));
|
||||
assertFormContents(VIEW_WITH_DEFAULT, testRepeatable);
|
||||
}
|
||||
|
||||
private void assertFormContents(final String viewName, final ArrayList<ExcitingObject> expected) throws Exception {
|
||||
final HtmlForm form = getForm(viewName);
|
||||
final List<HtmlTextInput> inputs = toTextInputList(form.getElementsByAttribute("input", "type", "text"));
|
||||
assertEquals("size", expected.size(), inputs.size());
|
||||
for (int i = 0; i < expected.size(); i++)
|
||||
assertEquals(expected.get(i).greatProperty, inputs.get(i).getValueAttribute());
|
||||
}
|
||||
|
||||
private List<HtmlTextInput> toTextInputList(final List<HtmlElement> inputs) {
|
||||
assertNotNull(inputs);
|
||||
final List<HtmlTextInput> textInputList = new ArrayList<HtmlTextInput>();
|
||||
for (HtmlElement input : inputs) {
|
||||
assertTrue(input instanceof HtmlTextInput);
|
||||
textInputList.add((HtmlTextInput) input);
|
||||
}
|
||||
return textInputList;
|
||||
}
|
||||
|
||||
private ArrayList<ExcitingObject> createRepeatable() {
|
||||
return new ArrayList<ExcitingObject>(Arrays.asList(
|
||||
new ExcitingObject("A nice thing"),
|
||||
new ExcitingObject("I'm even better"),
|
||||
new ExcitingObject("Don't bother, I'm not exciting at all")
|
||||
));
|
||||
}
|
||||
|
||||
private HtmlForm getForm(final String viewName) throws Exception {
|
||||
final HtmlPage page = createWebClient().goTo("self/" + viewName);
|
||||
final HtmlForm form = page.getFormByName("config");
|
||||
return form;
|
||||
}
|
||||
|
||||
public DescriptorImpl getDescriptor() {
|
||||
return hudson.getDescriptorByType(DescriptorImpl.class);
|
||||
}
|
||||
|
||||
@Extension
|
||||
public static final class DescriptorImpl extends Descriptor<RepeatablePropertyTest> {
|
||||
@Override
|
||||
public String getDisplayName() {
|
||||
return "RepeatablePropertyTest";
|
||||
}
|
||||
}
|
||||
|
||||
public static final class ExcitingObject implements Describable<ExcitingObject> {
|
||||
private final String greatProperty;
|
||||
@DataBoundConstructor
|
||||
public ExcitingObject(final String greatProperty) {
|
||||
this.greatProperty = greatProperty;
|
||||
}
|
||||
public String getGreatProperty() {
|
||||
return greatProperty;
|
||||
}
|
||||
public Descriptor<ExcitingObject> getDescriptor() {
|
||||
return Hudson.getInstance().getDescriptor(ExcitingObject.class);
|
||||
}
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
ExcitingObject that = (ExcitingObject) o;
|
||||
if (greatProperty != null ? !greatProperty.equals(that.greatProperty) : that.greatProperty != null)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return greatProperty != null ? greatProperty.hashCode() : 0;
|
||||
}
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ExcitingObject[" + greatProperty + ']';
|
||||
}
|
||||
|
||||
@Extension
|
||||
public static final class ExcitingDescriptor extends Descriptor<ExcitingObject> {
|
||||
public ExcitingDescriptor() {
|
||||
super(ExcitingObject.class);
|
||||
}
|
||||
@Override
|
||||
public String getDisplayName() {
|
||||
return "This is an awesome thing!";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -53,6 +53,7 @@ public class RepeatableTest extends HudsonTestCase {
|
||||
private Class<?> bindClass;
|
||||
private List<?> bindResult;
|
||||
public List<Object> list = new ArrayList<Object>();
|
||||
public List<Object> defaults = null;
|
||||
public Integer minimum = null;
|
||||
|
||||
public void doSubmitTest(StaplerRequest req) throws Exception {
|
||||
@@ -135,6 +136,62 @@ public class RepeatableTest extends HudsonTestCase {
|
||||
+ "{\"bool\":true,\"txt\":\"existing two\"},{\"bool\":false,\"txt\":\"new one\"}]",
|
||||
formData.get("foos").toString());
|
||||
}
|
||||
|
||||
public void testNoData() throws Exception {
|
||||
list = null;
|
||||
defaults = null;
|
||||
gotoAndSubmitConfig("defaultForField");
|
||||
assertNull(formData.get("list"));
|
||||
|
||||
gotoAndSubmitConfig("defaultForItems");
|
||||
assertNull(formData.get("list"));
|
||||
}
|
||||
|
||||
public void testItemsWithDefaults() throws Exception {
|
||||
assertWithDefaults("defaultForItems");
|
||||
}
|
||||
|
||||
public void testItemsDefaultsIgnoredIfFieldHasData() throws Exception {
|
||||
assertDefaultsIgnoredIfHaveData("defaultForItems");
|
||||
}
|
||||
|
||||
public void testFieldWithDefaults() throws Exception {
|
||||
assertWithDefaults("defaultForField");
|
||||
}
|
||||
|
||||
public void testFieldDefaultsIgnoredIfFieldHasData() throws Exception {
|
||||
assertDefaultsIgnoredIfHaveData("defaultForField");
|
||||
}
|
||||
|
||||
private void addDefaults() {
|
||||
defaults = new ArrayList<Object>();
|
||||
defaults.add(new Foo("default one", true));
|
||||
defaults.add(new Foo("default two", false));
|
||||
}
|
||||
|
||||
private void assertWithDefaults(final String viewName) throws Exception {
|
||||
list = null;
|
||||
addDefaults();
|
||||
gotoAndSubmitConfig(viewName);
|
||||
assertNotNull(formData.get("list"));
|
||||
assertEquals("[{\"bool\":true,\"txt\":\"default one\"},{\"bool\":false,\"txt\":\"default two\"}]",
|
||||
formData.get("list").toString());
|
||||
}
|
||||
|
||||
private void assertDefaultsIgnoredIfHaveData(final String viewName) throws Exception {
|
||||
addData();
|
||||
addDefaults();
|
||||
gotoAndSubmitConfig(viewName);
|
||||
assertNotNull(formData.get("list"));
|
||||
assertEquals("[{\"bool\":true,\"txt\":\"existing one\"},{\"bool\":false,\"txt\":\"existing two\"}]",
|
||||
formData.get("list").toString());
|
||||
}
|
||||
|
||||
private void gotoAndSubmitConfig(final String viewName) throws Exception {
|
||||
HtmlPage p = createWebClient().goTo("self/" + viewName);
|
||||
HtmlForm f = p.getFormByName("config");
|
||||
submit(f);
|
||||
}
|
||||
|
||||
// ========================================================================
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
<?jelly escape-by-default='true'?>
|
||||
|
||||
<!--
|
||||
~ The MIT License
|
||||
~
|
||||
~ Copyright (C) 2010-2011 by Anthony Robinson
|
||||
~
|
||||
~ 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.
|
||||
-->
|
||||
|
||||
<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 field="greatProperty">
|
||||
<f:textbox/>
|
||||
</f:entry>
|
||||
</j:jelly>
|
||||
@@ -0,0 +1,41 @@
|
||||
<?jelly escape-by-default='true'?>
|
||||
|
||||
<!--
|
||||
~ The MIT License
|
||||
~
|
||||
~ Copyright (C) 2010-2011 by Anthony Robinson
|
||||
~
|
||||
~ 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.
|
||||
-->
|
||||
|
||||
<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">
|
||||
<l:layout title="Testing repeatableProperty without default attribute">
|
||||
<l:main-panel>
|
||||
<f:form method="post" name="config" action="thisFormIsOnlyInspectedInTheTests">
|
||||
<j:set var="instance" value="${it}"/>
|
||||
<j:set var="descriptor" value="${it.descriptor}"/>
|
||||
<f:entry title="Exciting Objects">
|
||||
<f:repeatableProperty field="testRepeatable"/>
|
||||
</f:entry>
|
||||
</f:form>
|
||||
</l:main-panel>
|
||||
</l:layout>
|
||||
</j:jelly>
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<?jelly escape-by-default='true'?>
|
||||
|
||||
<!--
|
||||
~ The MIT License
|
||||
~
|
||||
~ Copyright (C) 2010-2011 by Anthony Robinson
|
||||
~
|
||||
~ 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.
|
||||
-->
|
||||
|
||||
<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">
|
||||
<l:layout title="Testing repeatableProperty with default attribute">
|
||||
<l:main-panel>
|
||||
<f:form method="post" name="config" action="thisFormIsOnlyInspectedInTheTests">
|
||||
<j:set var="instance" value="${it}"/>
|
||||
<j:set var="descriptor" value="${it.descriptor}"/>
|
||||
<f:entry title="Exciting Objects">
|
||||
<f:repeatableProperty field="testRepeatable" default="${it.defaults}"/>
|
||||
</f:entry>
|
||||
</f:form>
|
||||
</l:main-panel>
|
||||
</l:layout>
|
||||
</j:jelly>
|
||||
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
<!--
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2004-2010, Sun Microsystems, Inc., Alan Harder
|
||||
|
||||
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">
|
||||
<l:layout title="Testing radio block in repeatable">
|
||||
<l:main-panel>
|
||||
<f:form method="post" name="config" action="submitTest">
|
||||
<j:set var="instance" value="${it}"/>
|
||||
<j:set var="descriptor" value="${it.descriptor}"/>
|
||||
<f:repeatable field="list" default="${it.defaults}">
|
||||
<table>
|
||||
<f:entry>
|
||||
<f:textbox name="txt" value="${instance.txt}"/>
|
||||
</f:entry>
|
||||
<f:entry>
|
||||
<f:checkbox name="bool" checked="${instance.bool}"/>
|
||||
</f:entry>
|
||||
</table>
|
||||
</f:repeatable>
|
||||
<f:entry>
|
||||
<f:submit value="submit"/>
|
||||
</f:entry>
|
||||
</f:form>
|
||||
</l:main-panel>
|
||||
</l:layout>
|
||||
</j:jelly>
|
||||
@@ -0,0 +1,46 @@
|
||||
<!--
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2004-2010, Sun Microsystems, Inc., Alan Harder
|
||||
|
||||
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">
|
||||
<l:layout title="Testing radio block in repeatable">
|
||||
<l:main-panel>
|
||||
<f:form method="post" name="config" action="submitTest">
|
||||
<f:repeatable var="foo" items="${it.list}" default="${it.defaults}" name="list" minimum="${it.minimum}">
|
||||
<table>
|
||||
<f:entry>
|
||||
<f:textbox name="txt" value="${foo.txt}"/>
|
||||
</f:entry>
|
||||
<f:entry>
|
||||
<f:checkbox name="bool" checked="${foo.bool}"/>
|
||||
</f:entry>
|
||||
</table>
|
||||
</f:repeatable>
|
||||
<f:entry>
|
||||
<f:submit value="submit"/>
|
||||
</f:entry>
|
||||
</f:form>
|
||||
</l:main-panel>
|
||||
</l:layout>
|
||||
</j:jelly>
|
||||
@@ -28,7 +28,7 @@ THE SOFTWARE.
|
||||
<parent>
|
||||
<groupId>org.jenkins-ci.main</groupId>
|
||||
<artifactId>pom</artifactId>
|
||||
<version>1.413-SNAPSHOT</version>
|
||||
<version>1.415-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>ui-samples-plugin</artifactId>
|
||||
@@ -92,13 +92,13 @@ THE SOFTWARE.
|
||||
<plugin>
|
||||
<groupId>org.kohsuke.stapler</groupId>
|
||||
<artifactId>maven-stapler-plugin</artifactId>
|
||||
<version>1.15</version>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<extensions>true</extensions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.jvnet.localizer</groupId>
|
||||
<artifactId>maven-localizer-plugin</artifactId>
|
||||
<version>1.8</version>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
|
||||
+9
-5
@@ -27,7 +27,7 @@ THE SOFTWARE.
|
||||
<parent>
|
||||
<groupId>org.jenkins-ci.main</groupId>
|
||||
<artifactId>pom</artifactId>
|
||||
<version>1.413-SNAPSHOT</version>
|
||||
<version>1.415-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -44,7 +44,7 @@ THE SOFTWARE.
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>2.1-beta-1</version>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<configuration>
|
||||
<filteringDeploymentDescriptors>true</filteringDeploymentDescriptors>
|
||||
<webResources>
|
||||
@@ -68,6 +68,7 @@ THE SOFTWARE.
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>generate-resources</phase>
|
||||
@@ -83,6 +84,7 @@ THE SOFTWARE.
|
||||
<plugin>
|
||||
<groupId>org.jvnet.maven-antrun-extended-plugin</groupId>
|
||||
<artifactId>maven-antrun-extended-plugin</artifactId>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<executions>
|
||||
<execution>
|
||||
<id>package</id>
|
||||
@@ -109,7 +111,7 @@ THE SOFTWARE.
|
||||
<mkdir dir="target/generated-resources" />
|
||||
|
||||
<!-- put executable war header -->
|
||||
<resolveArtifact groupId="org.jenkins-ci" artifactId="executable-war" version="1.19" type="jar" property="executable-war.jar" />
|
||||
<resolveArtifact groupId="org.jenkins-ci" artifactId="executable-war" version="1.20" type="jar" property="executable-war.jar" />
|
||||
<unjar src="${executable-war.jar}" dest="target/generated-resources">
|
||||
<patternset>
|
||||
<include name="**/*.class" />
|
||||
@@ -135,6 +137,7 @@ THE SOFTWARE.
|
||||
<plugin><!-- generate licenses.xml -->
|
||||
<groupId>com.cloudbees</groupId>
|
||||
<artifactId>maven-license-plugin</artifactId>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<configuration>
|
||||
<generateLicenseXml>target/classes/META-INF/licenses.xml</generateLicenseXml>
|
||||
<inlineScript>
|
||||
@@ -152,7 +155,7 @@ THE SOFTWARE.
|
||||
<!-- this is really just a patched version of maven-jetty-plugin to workaround issue #932 -->
|
||||
<groupId>org.jenkins-ci.tools</groupId>
|
||||
<artifactId>maven-jenkins-dev-plugin</artifactId>
|
||||
<version>6.1.26-jenkins-1</version>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<configuration>
|
||||
<contextPath>${contextPath}</contextPath>
|
||||
<!--
|
||||
@@ -316,7 +319,7 @@ THE SOFTWARE.
|
||||
<plugin>
|
||||
<groupId>org.jvnet.updatecenter2</groupId>
|
||||
<artifactId>maven-makepkgs-plugin</artifactId>
|
||||
<version>0.3</version>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
@@ -341,6 +344,7 @@ THE SOFTWARE.
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<!-- version specified in grandparent pom -->
|
||||
<executions>
|
||||
<!-- sign the war -->
|
||||
<execution>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<dd>Name of the project of this build, such as "foo"</dd>
|
||||
|
||||
<dt>BUILD_TAG</dt>
|
||||
<dd>String of "hudson-<i>${JOB_NAME}</i>-<i>${BUILD_NUMBER}</i>". Convenient to put into
|
||||
<dd>String of "jenkins-<i>${JOB_NAME}</i>-<i>${BUILD_NUMBER}</i>". Convenient to put into
|
||||
a resource file, a jar file, etc for easier identification.</dd>
|
||||
|
||||
<dt>EXECUTOR_NUMBER</dt>
|
||||
@@ -45,11 +45,14 @@
|
||||
<dt>HUDSON_URL</dt>
|
||||
<dd>Full URL of Hudson, like <tt>http://server:port/hudson/</tt></dd>
|
||||
|
||||
<dt>JENKINS_URL</dt>
|
||||
<dd>Full URL of Jenkins, like <tt>http://server:port/jenkins/</tt></dd>
|
||||
|
||||
<dt>BUILD_URL</dt>
|
||||
<dd>Full URL of this build, like <tt>http://server:port/hudson/job/foo/15/</tt></dd>
|
||||
<dd>Full URL of this build, like <tt>http://server:port/jenkins/job/foo/15/</tt></dd>
|
||||
|
||||
<dt>JOB_URL</dt>
|
||||
<dd>Full URL of this job, like <tt>http://server:port/hudson/job/foo/</tt></dd>
|
||||
<dd>Full URL of this job, like <tt>http://server:port/jenkins/job/foo/</tt></dd>
|
||||
|
||||
<dt>SVN_REVISION</dt>
|
||||
<dd>For Subversion-based projects, this variable contains the revision number of the module.</dd>
|
||||
@@ -61,7 +64,7 @@
|
||||
|
||||
|
||||
<p>
|
||||
To understand how environmental variables provided by Hudson can be utilized by
|
||||
To understand how environmental variables provided by Jenkins can be utilized by
|
||||
Ant, study the following target:
|
||||
|
||||
<pre><xmp
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<dd>Projektname des Builds, z.B. "foo".</dd>
|
||||
|
||||
<dt>BUILD_TAG</dt>
|
||||
<dd>Eine Zeichenkette in der Form "hudson-<i>${JOB_NAME}</i>-<i>${BUILD_NUMBER}</i>".
|
||||
<dd>Eine Zeichenkette in der Form "jenkins-<i>${JOB_NAME}</i>-<i>${BUILD_NUMBER}</i>".
|
||||
Diese Variable läßt sich sehr bequem zur späteren Identifikation in eine
|
||||
Resource-Datei, JAR-Datei usw. ablegen.
|
||||
|
||||
@@ -43,11 +43,14 @@
|
||||
<dt>HUDSON_URL</dt>
|
||||
<dd>Die absolute URL der Hudson-Instanz, z.B. <tt>http://server:port/hudson/</tt>.</dd>
|
||||
|
||||
<dt>JENKINS_URL</dt>
|
||||
<dd>Die absolute URL der Jenkins-Instanz, z.B. <tt>http://server:port/jenkins/</tt>.</dd>
|
||||
|
||||
<dt>BUILD_URL</dt>
|
||||
<dd>Die absolute URL dieses Builds, z.B. <tt>http://server:port/hudson/job/foo/15/</tt>.</dd>
|
||||
<dd>Die absolute URL dieses Builds, z.B. <tt>http://server:port/jenkins/job/foo/15/</tt>.</dd>
|
||||
|
||||
<dt>JOB_URL</dt>
|
||||
<dd>Die absolute URL dieses Jobs, z.B. <tt>http://server:port/hudson/job/foo/</tt>.</dd>
|
||||
<dd>Die absolute URL dieses Jobs, z.B. <tt>http://server:port/jenkins/job/foo/</tt>.</dd>
|
||||
|
||||
<dt>SVN_REVISION</dt>
|
||||
<dd>Bei Subversion-basierten Projekten enthält diese Variable die Revisionsnummer
|
||||
@@ -61,7 +64,7 @@
|
||||
|
||||
|
||||
<p>
|
||||
Das folgende Beispiel zeigt, wie von Hudson bereitgestellte Umgebungsvariablen
|
||||
Das folgende Beispiel zeigt, wie von Jenkins bereitgestellte Umgebungsvariablen
|
||||
in Ant-Skripten verwendet werden können:
|
||||
|
||||
<pre><xmp
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<dd>Nom du projet de ce build, par exemple "foo"</dd>
|
||||
|
||||
<dt>BUILD_TAG</dt>
|
||||
<dd>Le texte "hudson-<i>${JOB_NAME}</i>-<i>${BUILD_NUMBER}</i>", facile à placer dans
|
||||
<dd>Le texte "jenkins-<i>${JOB_NAME}</i>-<i>${BUILD_NUMBER}</i>", facile à placer dans
|
||||
un fichier de ressource, ou un jar, pour identification future.</dd>
|
||||
|
||||
<dt>EXECUTOR_NUMBER</dt>
|
||||
@@ -40,6 +40,9 @@
|
||||
<dt>HUDSON_URL</dt>
|
||||
<dd>L'URL complète de Hudson, au format <tt>http://server:port/hudson/</tt></dd>
|
||||
|
||||
<dt>JENKINS_URL</dt>
|
||||
<dd>L'URL complète de Jenkins, au format <tt>http://server:port/jenkins/</tt></dd>
|
||||
|
||||
<dt>SVN_REVISION</dt>
|
||||
<dd>Pour les projets utilisant Subversion, cette variable contient le numéro de révision du module.</dd>
|
||||
|
||||
@@ -51,7 +54,7 @@
|
||||
|
||||
|
||||
<p>
|
||||
Pour comprendre comment les variables d'environnement fournies par Hudson peuvent être utilisées
|
||||
Pour comprendre comment les variables d'environnement fournies par Jenkins peuvent être utilisées
|
||||
par Ant, consultez le résultat de la target Ant suivante:
|
||||
|
||||
<pre><xmp
|
||||
|
||||
@@ -19,13 +19,12 @@
|
||||
<dd>ビルドのプロジェクト名。例 "foo"</dd>
|
||||
|
||||
<dt>BUILD_TAG</dt>
|
||||
<dd>文字列 "hudson-<i>${JOB_NAME}</i>-<i>${BUILD_NUMBER}</i>"。
|
||||
<dd>文字列 "jenkins-<i>${JOB_NAME}</i>-<i>${BUILD_NUMBER}</i>"。
|
||||
簡易な識別子として、リソースファイルやjarファイルなどに付与するのに便利です。</dd>
|
||||
|
||||
<dt>EXECUTOR_NUMBER</dt>
|
||||
<dd>
|
||||
このビルドを実行している現在のエグゼキューターを識別する(同一マシンの中で)ユニークな番号。
|
||||
"ビルド実行状態"に表示されている数字ですが、1ではなく0から始まる数字です。
|
||||
<dd>このビルドを実行している現在のエグゼキューターを識別する(同一マシンの中で)ユニークな番号。
|
||||
"ビルド実行状態"に表示されている数字ですが、1ではなく0から始まる数字です。
|
||||
|
||||
<dt>JAVA_HOME</dt>
|
||||
<dd>特定のJDKを使用するようにジョブを設定する場合、そのJDKのJAVA_HOMEをこの変数に設定します。
|
||||
@@ -37,11 +36,14 @@
|
||||
<dt>HUDSON_URL</dt>
|
||||
<dd>HudsonのURL。例 <tt>http://server:port/hudson/</tt></dd>
|
||||
|
||||
<dt>BUILD_URL</dt>
|
||||
<dd>このビルドのURL。 例 <tt>http://server:port/hudson/job/foo/15/</tt></dd>
|
||||
<dt>JENKINS_URL</dt>
|
||||
<dd>JenkinsのURL。例 <tt>http://server:port/jenkins/</tt></dd>
|
||||
|
||||
<dt>BUILD_URL</dt>
|
||||
<dd>このビルドのURL。 例 <tt>http://server:port/jenkins/job/foo/15/</tt></dd>
|
||||
|
||||
<dt>JOB_URL</dt>
|
||||
<dd>このジョブのURL。 例 <tt>http://server:port/hudson/job/foo/</tt></dd>
|
||||
<dd>このジョブのURL。 例 <tt>http://server:port/jenkins/job/foo/</tt></dd>
|
||||
|
||||
<dt>SVN_REVISION</dt>
|
||||
<dd>Subversionを使用するプロジェクトにおける、モジュールのリビジョン番号。</dd>
|
||||
@@ -53,7 +55,7 @@
|
||||
|
||||
|
||||
<p>
|
||||
Hudsonが提供する環境変数のAntでの利用方法については、
|
||||
Jenkinsが提供する環境変数のAntでの利用方法については、
|
||||
次のtargetを参考にしてください。
|
||||
|
||||
<pre><xmp
|
||||
|
||||
Loaded 100 of 102 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user