repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
cverges/expect4j | src/main/java/expect4j/Expect4j.java | Expect4j.expect | public int expect(String pattern) throws MalformedPatternException, Exception {
logger.trace("Searching for '" + pattern + "' in the reader stream");
return expect(pattern, null);
} | java | public int expect(String pattern) throws MalformedPatternException, Exception {
logger.trace("Searching for '" + pattern + "' in the reader stream");
return expect(pattern, null);
} | [
"public",
"int",
"expect",
"(",
"String",
"pattern",
")",
"throws",
"MalformedPatternException",
",",
"Exception",
"{",
"logger",
".",
"trace",
"(",
"\"Searching for '\"",
"+",
"pattern",
"+",
"\"' in the reader stream\"",
")",
";",
"return",
"expect",
"(",
"patte... | Attempts to detect the provided pattern as an exact match.
@param pattern the pattern to find in the reader stream
@return the number of times the pattern is found,
or an error code
@throws MalformedPatternException if the pattern is invalid
@throws Exception if a generic error is encountered | [
"Attempts",
"to",
"detect",
"the",
"provided",
"pattern",
"as",
"an",
"exact",
"match",
"."
] | 97b1da9b7bd231344cd7b7ce26d14caf8bb16cd6 | https://github.com/cverges/expect4j/blob/97b1da9b7bd231344cd7b7ce26d14caf8bb16cd6/src/main/java/expect4j/Expect4j.java#L261-L264 | train |
cverges/expect4j | src/main/java/expect4j/Expect4j.java | Expect4j.prepareClosure | protected ExpectState prepareClosure(int pairIndex, MatchResult result) {
/* TODO: potentially remove this?
{
System.out.println( "Begin: " + result.beginOffset(0) );
System.out.println( "Length: " + result.length() );
System.out.println( "Current: " + input.getCurren... | java | protected ExpectState prepareClosure(int pairIndex, MatchResult result) {
/* TODO: potentially remove this?
{
System.out.println( "Begin: " + result.beginOffset(0) );
System.out.println( "Length: " + result.length() );
System.out.println( "Current: " + input.getCurren... | [
"protected",
"ExpectState",
"prepareClosure",
"(",
"int",
"pairIndex",
",",
"MatchResult",
"result",
")",
"{",
"/* TODO: potentially remove this?\n {\n System.out.println( \"Begin: \" + result.beginOffset(0) );\n System.out.println( \"Length: \" + result.length() )... | Don't use input, it's match values might have been reset in the
loop that looks for the first possible match.
@param pairIndex TODO
@param result TODO
@return TODO | [
"Don",
"t",
"use",
"input",
"it",
"s",
"match",
"values",
"might",
"have",
"been",
"reset",
"in",
"the",
"loop",
"that",
"looks",
"for",
"the",
"first",
"possible",
"match",
"."
] | 97b1da9b7bd231344cd7b7ce26d14caf8bb16cd6 | https://github.com/cverges/expect4j/blob/97b1da9b7bd231344cd7b7ce26d14caf8bb16cd6/src/main/java/expect4j/Expect4j.java#L541-L578 | train |
cverges/expect4j | src/main/java/tcl/lang/SubstCrCommand.java | SubstCrCommand.cmdProc | public void cmdProc(Interp interp, TclObject argv[])
throws TclException {
int currentObjIndex, len, i;
int objc = argv.length - 1;
boolean doBackslashes = true;
boolean doCmds = true;
boolean doVars = true;
StringBuffer result = new StringBuffer();
String s;
... | java | public void cmdProc(Interp interp, TclObject argv[])
throws TclException {
int currentObjIndex, len, i;
int objc = argv.length - 1;
boolean doBackslashes = true;
boolean doCmds = true;
boolean doVars = true;
StringBuffer result = new StringBuffer();
String s;
... | [
"public",
"void",
"cmdProc",
"(",
"Interp",
"interp",
",",
"TclObject",
"argv",
"[",
"]",
")",
"throws",
"TclException",
"{",
"int",
"currentObjIndex",
",",
"len",
",",
"i",
";",
"int",
"objc",
"=",
"argv",
".",
"length",
"-",
"1",
";",
"boolean",
"doB... | This procedure is invoked to process the "subst" Tcl command.
See the user documentation for details on what it does.
@param interp the current interpreter.
@param argv command arguments.
@exception TclException if wrong # of args or invalid argument(s). | [
"This",
"procedure",
"is",
"invoked",
"to",
"process",
"the",
"subst",
"Tcl",
"command",
".",
"See",
"the",
"user",
"documentation",
"for",
"details",
"on",
"what",
"it",
"does",
"."
] | 97b1da9b7bd231344cd7b7ce26d14caf8bb16cd6 | https://github.com/cverges/expect4j/blob/97b1da9b7bd231344cd7b7ce26d14caf8bb16cd6/src/main/java/tcl/lang/SubstCrCommand.java#L41-L133 | train |
pmayweg/sonar-groovy | sonar-groovy-plugin/src/main/java/org/sonar/plugins/groovy/jacoco/JaCoCoReportMerger.java | JaCoCoReportMerger.mergeReports | public static void mergeReports(File reportOverall, File... reports) {
SessionInfoStore infoStore = new SessionInfoStore();
ExecutionDataStore dataStore = new ExecutionDataStore();
boolean isCurrentVersionFormat = loadSourceFiles(infoStore, dataStore, reports);
try (BufferedOutputStream outputStream = ... | java | public static void mergeReports(File reportOverall, File... reports) {
SessionInfoStore infoStore = new SessionInfoStore();
ExecutionDataStore dataStore = new ExecutionDataStore();
boolean isCurrentVersionFormat = loadSourceFiles(infoStore, dataStore, reports);
try (BufferedOutputStream outputStream = ... | [
"public",
"static",
"void",
"mergeReports",
"(",
"File",
"reportOverall",
",",
"File",
"...",
"reports",
")",
"{",
"SessionInfoStore",
"infoStore",
"=",
"new",
"SessionInfoStore",
"(",
")",
";",
"ExecutionDataStore",
"dataStore",
"=",
"new",
"ExecutionDataStore",
... | Merge all reports in reportOverall.
@param reportOverall destination file of merge.
@param reports files to be merged. | [
"Merge",
"all",
"reports",
"in",
"reportOverall",
"."
] | 2d78d6578304601613db928795d81de340e6fa34 | https://github.com/pmayweg/sonar-groovy/blob/2d78d6578304601613db928795d81de340e6fa34/sonar-groovy-plugin/src/main/java/org/sonar/plugins/groovy/jacoco/JaCoCoReportMerger.java#L49-L66 | train |
pmayweg/sonar-groovy | sonar-groovy-plugin/src/main/java/org/sonar/plugins/groovy/jacoco/JaCoCoReportReader.java | JaCoCoReportReader.readJacocoReport | public JaCoCoReportReader readJacocoReport(IExecutionDataVisitor executionDataVisitor, ISessionInfoVisitor sessionInfoStore) {
if (jacocoExecutionData == null) {
return this;
}
JaCoCoExtensions.logger().info("Analysing {}", jacocoExecutionData);
try (InputStream inputStream = new BufferedInputStr... | java | public JaCoCoReportReader readJacocoReport(IExecutionDataVisitor executionDataVisitor, ISessionInfoVisitor sessionInfoStore) {
if (jacocoExecutionData == null) {
return this;
}
JaCoCoExtensions.logger().info("Analysing {}", jacocoExecutionData);
try (InputStream inputStream = new BufferedInputStr... | [
"public",
"JaCoCoReportReader",
"readJacocoReport",
"(",
"IExecutionDataVisitor",
"executionDataVisitor",
",",
"ISessionInfoVisitor",
"sessionInfoStore",
")",
"{",
"if",
"(",
"jacocoExecutionData",
"==",
"null",
")",
"{",
"return",
"this",
";",
"}",
"JaCoCoExtensions",
... | Read JaCoCo report determining the format to be used.
@param executionDataVisitor visitor to store execution data.
@param sessionInfoStore visitor to store info session.
@return true if binary format is the latest one.
@throws IOException in case of error or binary format not supported. | [
"Read",
"JaCoCo",
"report",
"determining",
"the",
"format",
"to",
"be",
"used",
"."
] | 2d78d6578304601613db928795d81de340e6fa34 | https://github.com/pmayweg/sonar-groovy/blob/2d78d6578304601613db928795d81de340e6fa34/sonar-groovy-plugin/src/main/java/org/sonar/plugins/groovy/jacoco/JaCoCoReportReader.java#L56-L78 | train |
wildfly/wildfly-maven-plugin | plugin/src/main/java/org/wildfly/plugin/repository/ArtifactNameBuilder.java | ArtifactNameBuilder.build | public ArtifactName build() {
String groupId = this.groupId;
String artifactId = this.artifactId;
String classifier = this.classifier;
String packaging = this.packaging;
String version = this.version;
if (artifact != null && !artifact.isEmpty()) {
final String... | java | public ArtifactName build() {
String groupId = this.groupId;
String artifactId = this.artifactId;
String classifier = this.classifier;
String packaging = this.packaging;
String version = this.version;
if (artifact != null && !artifact.isEmpty()) {
final String... | [
"public",
"ArtifactName",
"build",
"(",
")",
"{",
"String",
"groupId",
"=",
"this",
".",
"groupId",
";",
"String",
"artifactId",
"=",
"this",
".",
"artifactId",
";",
"String",
"classifier",
"=",
"this",
".",
"classifier",
";",
"String",
"packaging",
"=",
"... | Creates the final artifact name.
@return the artifact name | [
"Creates",
"the",
"final",
"artifact",
"name",
"."
] | c0e2d7ee28e511092561801959eae253b2b56def | https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/plugin/src/main/java/org/wildfly/plugin/repository/ArtifactNameBuilder.java#L172-L211 | train |
wildfly/wildfly-maven-plugin | core/src/main/java/org/wildfly/plugin/core/Deployment.java | Deployment.of | public static Deployment of(final File content) {
final DeploymentContent deploymentContent = DeploymentContent.of(Assert.checkNotNullParam("content", content).toPath());
return new Deployment(deploymentContent, null);
} | java | public static Deployment of(final File content) {
final DeploymentContent deploymentContent = DeploymentContent.of(Assert.checkNotNullParam("content", content).toPath());
return new Deployment(deploymentContent, null);
} | [
"public",
"static",
"Deployment",
"of",
"(",
"final",
"File",
"content",
")",
"{",
"final",
"DeploymentContent",
"deploymentContent",
"=",
"DeploymentContent",
".",
"of",
"(",
"Assert",
".",
"checkNotNullParam",
"(",
"\"content\"",
",",
"content",
")",
".",
"toP... | Creates a new deployment for the file. If the file is a directory the content will be deployed exploded using
the file system location.
@param content the file containing the content
@return the deployment | [
"Creates",
"a",
"new",
"deployment",
"for",
"the",
"file",
".",
"If",
"the",
"file",
"is",
"a",
"directory",
"the",
"content",
"will",
"be",
"deployed",
"exploded",
"using",
"the",
"file",
"system",
"location",
"."
] | c0e2d7ee28e511092561801959eae253b2b56def | https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/core/src/main/java/org/wildfly/plugin/core/Deployment.java#L66-L69 | train |
wildfly/wildfly-maven-plugin | core/src/main/java/org/wildfly/plugin/core/Deployment.java | Deployment.of | public static Deployment of(final Path content) {
final DeploymentContent deploymentContent = DeploymentContent.of(Assert.checkNotNullParam("content", content));
return new Deployment(deploymentContent, null);
} | java | public static Deployment of(final Path content) {
final DeploymentContent deploymentContent = DeploymentContent.of(Assert.checkNotNullParam("content", content));
return new Deployment(deploymentContent, null);
} | [
"public",
"static",
"Deployment",
"of",
"(",
"final",
"Path",
"content",
")",
"{",
"final",
"DeploymentContent",
"deploymentContent",
"=",
"DeploymentContent",
".",
"of",
"(",
"Assert",
".",
"checkNotNullParam",
"(",
"\"content\"",
",",
"content",
")",
")",
";",... | Creates a new deployment for the path. If the path is a directory the content will be deployed exploded using
the file system location.
@param content the path containing the content
@return the deployment | [
"Creates",
"a",
"new",
"deployment",
"for",
"the",
"path",
".",
"If",
"the",
"path",
"is",
"a",
"directory",
"the",
"content",
"will",
"be",
"deployed",
"exploded",
"using",
"the",
"file",
"system",
"location",
"."
] | c0e2d7ee28e511092561801959eae253b2b56def | https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/core/src/main/java/org/wildfly/plugin/core/Deployment.java#L79-L82 | train |
wildfly/wildfly-maven-plugin | core/src/main/java/org/wildfly/plugin/core/Deployment.java | Deployment.of | public static Deployment of(final URL url) {
final DeploymentContent deploymentContent = DeploymentContent.of(Assert.checkNotNullParam("url", url));
return new Deployment(deploymentContent, null);
} | java | public static Deployment of(final URL url) {
final DeploymentContent deploymentContent = DeploymentContent.of(Assert.checkNotNullParam("url", url));
return new Deployment(deploymentContent, null);
} | [
"public",
"static",
"Deployment",
"of",
"(",
"final",
"URL",
"url",
")",
"{",
"final",
"DeploymentContent",
"deploymentContent",
"=",
"DeploymentContent",
".",
"of",
"(",
"Assert",
".",
"checkNotNullParam",
"(",
"\"url\"",
",",
"url",
")",
")",
";",
"return",
... | Creates a new deployment for the URL. The target server will require access to the URL.
@param url the URL representing the content
@return the deployment | [
"Creates",
"a",
"new",
"deployment",
"for",
"the",
"URL",
".",
"The",
"target",
"server",
"will",
"require",
"access",
"to",
"the",
"URL",
"."
] | c0e2d7ee28e511092561801959eae253b2b56def | https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/core/src/main/java/org/wildfly/plugin/core/Deployment.java#L110-L113 | train |
wildfly/wildfly-maven-plugin | core/src/main/java/org/wildfly/plugin/core/Deployment.java | Deployment.setServerGroups | public Deployment setServerGroups(final Collection<String> serverGroups) {
this.serverGroups.clear();
this.serverGroups.addAll(serverGroups);
return this;
} | java | public Deployment setServerGroups(final Collection<String> serverGroups) {
this.serverGroups.clear();
this.serverGroups.addAll(serverGroups);
return this;
} | [
"public",
"Deployment",
"setServerGroups",
"(",
"final",
"Collection",
"<",
"String",
">",
"serverGroups",
")",
"{",
"this",
".",
"serverGroups",
".",
"clear",
"(",
")",
";",
"this",
".",
"serverGroups",
".",
"addAll",
"(",
"serverGroups",
")",
";",
"return"... | Sets the server groups for the deployment.
@param serverGroups the server groups to set
@return this deployment | [
"Sets",
"the",
"server",
"groups",
"for",
"the",
"deployment",
"."
] | c0e2d7ee28e511092561801959eae253b2b56def | https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/core/src/main/java/org/wildfly/plugin/core/Deployment.java#L182-L186 | train |
wildfly/wildfly-maven-plugin | plugin/src/main/java/org/wildfly/plugin/deployment/AbstractDeployment.java | AbstractDeployment.validate | protected void validate(final boolean isDomain) throws MojoDeploymentException {
final boolean hasServerGroups = hasServerGroups();
if (isDomain) {
if (!hasServerGroups) {
throw new MojoDeploymentException(
"Server is running in domain mode, but no ser... | java | protected void validate(final boolean isDomain) throws MojoDeploymentException {
final boolean hasServerGroups = hasServerGroups();
if (isDomain) {
if (!hasServerGroups) {
throw new MojoDeploymentException(
"Server is running in domain mode, but no ser... | [
"protected",
"void",
"validate",
"(",
"final",
"boolean",
"isDomain",
")",
"throws",
"MojoDeploymentException",
"{",
"final",
"boolean",
"hasServerGroups",
"=",
"hasServerGroups",
"(",
")",
";",
"if",
"(",
"isDomain",
")",
"{",
"if",
"(",
"!",
"hasServerGroups",... | Validates the deployment.
@param isDomain {@code true} if this is a domain server, otherwise {@code false}
@throws MojoDeploymentException if the deployment is invalid | [
"Validates",
"the",
"deployment",
"."
] | c0e2d7ee28e511092561801959eae253b2b56def | https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/plugin/src/main/java/org/wildfly/plugin/deployment/AbstractDeployment.java#L141-L151 | train |
wildfly/wildfly-maven-plugin | plugin/src/main/java/org/wildfly/plugin/deployment/resource/AddResourceMojo.java | AddResourceMojo.buildAddOperation | private ModelNode buildAddOperation(final ModelNode address, final Map<String, String> properties) {
final ModelNode op = ServerOperations.createAddOperation(address);
for (Map.Entry<String, String> prop : properties.entrySet()) {
final String[] props = prop.getKey().split(",");
... | java | private ModelNode buildAddOperation(final ModelNode address, final Map<String, String> properties) {
final ModelNode op = ServerOperations.createAddOperation(address);
for (Map.Entry<String, String> prop : properties.entrySet()) {
final String[] props = prop.getKey().split(",");
... | [
"private",
"ModelNode",
"buildAddOperation",
"(",
"final",
"ModelNode",
"address",
",",
"final",
"Map",
"<",
"String",
",",
"String",
">",
"properties",
")",
"{",
"final",
"ModelNode",
"op",
"=",
"ServerOperations",
".",
"createAddOperation",
"(",
"address",
")"... | Creates the operation to add a resource.
@param address the address of the operation to add.
@param properties the properties to set for the resource.
@return the operation. | [
"Creates",
"the",
"operation",
"to",
"add",
"a",
"resource",
"."
] | c0e2d7ee28e511092561801959eae253b2b56def | https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/plugin/src/main/java/org/wildfly/plugin/deployment/resource/AddResourceMojo.java#L215-L234 | train |
wildfly/wildfly-maven-plugin | plugin/src/main/java/org/wildfly/plugin/deployment/resource/AddResourceMojo.java | AddResourceMojo.handleDmrString | private void handleDmrString(final ModelNode node, final String name, final String value) {
final String realValue = value.substring(2);
node.get(name).set(ModelNode.fromString(realValue));
} | java | private void handleDmrString(final ModelNode node, final String name, final String value) {
final String realValue = value.substring(2);
node.get(name).set(ModelNode.fromString(realValue));
} | [
"private",
"void",
"handleDmrString",
"(",
"final",
"ModelNode",
"node",
",",
"final",
"String",
"name",
",",
"final",
"String",
"value",
")",
"{",
"final",
"String",
"realValue",
"=",
"value",
".",
"substring",
"(",
"2",
")",
";",
"node",
".",
"get",
"(... | Handles DMR strings in the configuration
@param node the node to create.
@param name the name for the node.
@param value the value for the node. | [
"Handles",
"DMR",
"strings",
"in",
"the",
"configuration"
] | c0e2d7ee28e511092561801959eae253b2b56def | https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/plugin/src/main/java/org/wildfly/plugin/deployment/resource/AddResourceMojo.java#L274-L277 | train |
wildfly/wildfly-maven-plugin | plugin/src/main/java/org/wildfly/plugin/deployment/resource/AddResourceMojo.java | AddResourceMojo.parseAddress | private ModelNode parseAddress(final String profileName, final String inputAddress) {
final ModelNode result = new ModelNode();
if (profileName != null) {
result.add(ServerOperations.PROFILE, profileName);
}
String[] parts = inputAddress.split(",");
for (String part :... | java | private ModelNode parseAddress(final String profileName, final String inputAddress) {
final ModelNode result = new ModelNode();
if (profileName != null) {
result.add(ServerOperations.PROFILE, profileName);
}
String[] parts = inputAddress.split(",");
for (String part :... | [
"private",
"ModelNode",
"parseAddress",
"(",
"final",
"String",
"profileName",
",",
"final",
"String",
"inputAddress",
")",
"{",
"final",
"ModelNode",
"result",
"=",
"new",
"ModelNode",
"(",
")",
";",
"if",
"(",
"profileName",
"!=",
"null",
")",
"{",
"result... | Parses the comma delimited address into model nodes.
@param profileName the profile name for the domain or {@code null} if not a domain
@param inputAddress the address.
@return a collection of the address nodes. | [
"Parses",
"the",
"comma",
"delimited",
"address",
"into",
"model",
"nodes",
"."
] | c0e2d7ee28e511092561801959eae253b2b56def | https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/plugin/src/main/java/org/wildfly/plugin/deployment/resource/AddResourceMojo.java#L287-L301 | train |
wildfly/wildfly-maven-plugin | core/src/main/java/org/wildfly/plugin/core/ServerHelper.java | ServerHelper.getContainerDescription | public static ContainerDescription getContainerDescription(final ModelControllerClient client) throws IOException, OperationExecutionException {
return DefaultContainerDescription.lookup(Assert.checkNotNullParam("client", client));
} | java | public static ContainerDescription getContainerDescription(final ModelControllerClient client) throws IOException, OperationExecutionException {
return DefaultContainerDescription.lookup(Assert.checkNotNullParam("client", client));
} | [
"public",
"static",
"ContainerDescription",
"getContainerDescription",
"(",
"final",
"ModelControllerClient",
"client",
")",
"throws",
"IOException",
",",
"OperationExecutionException",
"{",
"return",
"DefaultContainerDescription",
".",
"lookup",
"(",
"Assert",
".",
"checkN... | Returns the description of the running container.
@param client the client used to query the server
@return the description of the running container
@throws IOException if an error occurs communicating with the server
@throws OperationExecutionException if the operation used to query the container fa... | [
"Returns",
"the",
"description",
"of",
"the",
"running",
"container",
"."
] | c0e2d7ee28e511092561801959eae253b2b56def | https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/core/src/main/java/org/wildfly/plugin/core/ServerHelper.java#L97-L99 | train |
wildfly/wildfly-maven-plugin | core/src/main/java/org/wildfly/plugin/core/ServerHelper.java | ServerHelper.waitForDomain | public static void waitForDomain(final ModelControllerClient client, final long startupTimeout)
throws InterruptedException, RuntimeException, TimeoutException {
waitForDomain(null, client, startupTimeout);
} | java | public static void waitForDomain(final ModelControllerClient client, final long startupTimeout)
throws InterruptedException, RuntimeException, TimeoutException {
waitForDomain(null, client, startupTimeout);
} | [
"public",
"static",
"void",
"waitForDomain",
"(",
"final",
"ModelControllerClient",
"client",
",",
"final",
"long",
"startupTimeout",
")",
"throws",
"InterruptedException",
",",
"RuntimeException",
",",
"TimeoutException",
"{",
"waitForDomain",
"(",
"null",
",",
"clie... | Waits the given amount of time in seconds for a managed domain to start. A domain is considered started when each
of the servers in the domain are started unless the server is disabled.
@param client the client used to communicate with the server
@param startupTimeout the time, in seconds, to wait for the serv... | [
"Waits",
"the",
"given",
"amount",
"of",
"time",
"in",
"seconds",
"for",
"a",
"managed",
"domain",
"to",
"start",
".",
"A",
"domain",
"is",
"considered",
"started",
"when",
"each",
"of",
"the",
"servers",
"in",
"the",
"domain",
"are",
"started",
"unless",
... | c0e2d7ee28e511092561801959eae253b2b56def | https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/core/src/main/java/org/wildfly/plugin/core/ServerHelper.java#L141-L144 | train |
wildfly/wildfly-maven-plugin | core/src/main/java/org/wildfly/plugin/core/ServerHelper.java | ServerHelper.shutdownDomain | public static void shutdownDomain(final ModelControllerClient client, final int timeout) throws IOException, OperationExecutionException {
// Note the following two operations used to shutdown a domain don't seem to work well in a composite operation.
// The operation occasionally sees a java.util.concu... | java | public static void shutdownDomain(final ModelControllerClient client, final int timeout) throws IOException, OperationExecutionException {
// Note the following two operations used to shutdown a domain don't seem to work well in a composite operation.
// The operation occasionally sees a java.util.concu... | [
"public",
"static",
"void",
"shutdownDomain",
"(",
"final",
"ModelControllerClient",
"client",
",",
"final",
"int",
"timeout",
")",
"throws",
"IOException",
",",
"OperationExecutionException",
"{",
"// Note the following two operations used to shutdown a domain don't seem to work... | Shuts down a managed domain container. The servers are first stopped, then the host controller is shutdown.
@param client the client used to communicate with the server
@param timeout the graceful shutdown timeout, a value of {@code -1} will wait indefinitely and a value of
{@code 0} will not attempt a graceful shutd... | [
"Shuts",
"down",
"a",
"managed",
"domain",
"container",
".",
"The",
"servers",
"are",
"first",
"stopped",
"then",
"the",
"host",
"controller",
"is",
"shutdown",
"."
] | c0e2d7ee28e511092561801959eae253b2b56def | https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/core/src/main/java/org/wildfly/plugin/core/ServerHelper.java#L221-L256 | train |
wildfly/wildfly-maven-plugin | core/src/main/java/org/wildfly/plugin/core/ServerHelper.java | ServerHelper.determineHostAddress | public static ModelNode determineHostAddress(final ModelControllerClient client) throws IOException, OperationExecutionException {
final ModelNode op = Operations.createReadAttributeOperation(EMPTY_ADDRESS, "local-host-name");
ModelNode response = client.execute(op);
if (Operations.isSuccessfulO... | java | public static ModelNode determineHostAddress(final ModelControllerClient client) throws IOException, OperationExecutionException {
final ModelNode op = Operations.createReadAttributeOperation(EMPTY_ADDRESS, "local-host-name");
ModelNode response = client.execute(op);
if (Operations.isSuccessfulO... | [
"public",
"static",
"ModelNode",
"determineHostAddress",
"(",
"final",
"ModelControllerClient",
"client",
")",
"throws",
"IOException",
",",
"OperationExecutionException",
"{",
"final",
"ModelNode",
"op",
"=",
"Operations",
".",
"createReadAttributeOperation",
"(",
"EMPTY... | Determines the address for the host being used.
@param client the client used to communicate with the server
@return the address of the host
@throws IOException if an error occurs communicating with the server
@throws OperationExecutionException if the operation used to determine the host name fails | [
"Determines",
"the",
"address",
"for",
"the",
"host",
"being",
"used",
"."
] | c0e2d7ee28e511092561801959eae253b2b56def | https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/core/src/main/java/org/wildfly/plugin/core/ServerHelper.java#L268-L275 | train |
wildfly/wildfly-maven-plugin | core/src/main/java/org/wildfly/plugin/core/ServerHelper.java | ServerHelper.waitForStandalone | public static void waitForStandalone(final ModelControllerClient client, final long startupTimeout)
throws InterruptedException, RuntimeException, TimeoutException {
waitForStandalone(null, client, startupTimeout);
} | java | public static void waitForStandalone(final ModelControllerClient client, final long startupTimeout)
throws InterruptedException, RuntimeException, TimeoutException {
waitForStandalone(null, client, startupTimeout);
} | [
"public",
"static",
"void",
"waitForStandalone",
"(",
"final",
"ModelControllerClient",
"client",
",",
"final",
"long",
"startupTimeout",
")",
"throws",
"InterruptedException",
",",
"RuntimeException",
",",
"TimeoutException",
"{",
"waitForStandalone",
"(",
"null",
",",... | Waits the given amount of time in seconds for a standalone server to start.
@param client the client used to communicate with the server
@param startupTimeout the time, in seconds, to wait for the server start
@throws InterruptedException if interrupted while waiting for the server to start
@throws RuntimeExc... | [
"Waits",
"the",
"given",
"amount",
"of",
"time",
"in",
"seconds",
"for",
"a",
"standalone",
"server",
"to",
"start",
"."
] | c0e2d7ee28e511092561801959eae253b2b56def | https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/core/src/main/java/org/wildfly/plugin/core/ServerHelper.java#L287-L290 | train |
wildfly/wildfly-maven-plugin | core/src/main/java/org/wildfly/plugin/core/ServerHelper.java | ServerHelper.isStandaloneRunning | public static boolean isStandaloneRunning(final ModelControllerClient client) {
try {
final ModelNode response = client.execute(Operations.createReadAttributeOperation(EMPTY_ADDRESS, "server-state"));
if (Operations.isSuccessfulOutcome(response)) {
final String state = Op... | java | public static boolean isStandaloneRunning(final ModelControllerClient client) {
try {
final ModelNode response = client.execute(Operations.createReadAttributeOperation(EMPTY_ADDRESS, "server-state"));
if (Operations.isSuccessfulOutcome(response)) {
final String state = Op... | [
"public",
"static",
"boolean",
"isStandaloneRunning",
"(",
"final",
"ModelControllerClient",
"client",
")",
"{",
"try",
"{",
"final",
"ModelNode",
"response",
"=",
"client",
".",
"execute",
"(",
"Operations",
".",
"createReadAttributeOperation",
"(",
"EMPTY_ADDRESS",
... | Checks to see if a standalone server is running.
@param client the client used to communicate with the server
@return {@code true} if the server is running, otherwise {@code false} | [
"Checks",
"to",
"see",
"if",
"a",
"standalone",
"server",
"is",
"running",
"."
] | c0e2d7ee28e511092561801959eae253b2b56def | https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/core/src/main/java/org/wildfly/plugin/core/ServerHelper.java#L338-L350 | train |
wildfly/wildfly-maven-plugin | core/src/main/java/org/wildfly/plugin/core/ServerHelper.java | ServerHelper.shutdownStandalone | public static void shutdownStandalone(final ModelControllerClient client, final int timeout) throws IOException {
final ModelNode op = Operations.createOperation("shutdown");
op.get("timeout").set(timeout);
final ModelNode response = client.execute(op);
if (Operations.isSuccessfulOutcome... | java | public static void shutdownStandalone(final ModelControllerClient client, final int timeout) throws IOException {
final ModelNode op = Operations.createOperation("shutdown");
op.get("timeout").set(timeout);
final ModelNode response = client.execute(op);
if (Operations.isSuccessfulOutcome... | [
"public",
"static",
"void",
"shutdownStandalone",
"(",
"final",
"ModelControllerClient",
"client",
",",
"final",
"int",
"timeout",
")",
"throws",
"IOException",
"{",
"final",
"ModelNode",
"op",
"=",
"Operations",
".",
"createOperation",
"(",
"\"shutdown\"",
")",
"... | Shuts down a standalone server.
@param client the client used to communicate with the server
@param timeout the graceful shutdown timeout, a value of {@code -1} will wait indefinitely and a value of
{@code 0} will not attempt a graceful shutdown
@throws IOException if an error occurs communicating with the server | [
"Shuts",
"down",
"a",
"standalone",
"server",
"."
] | c0e2d7ee28e511092561801959eae253b2b56def | https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/core/src/main/java/org/wildfly/plugin/core/ServerHelper.java#L372-L391 | train |
wildfly/wildfly-maven-plugin | plugin/src/main/java/org/wildfly/plugin/deployment/PackageType.java | PackageType.resolve | public static PackageType resolve(final MavenProject project) {
final String packaging = project.getPackaging().toLowerCase(Locale.ROOT);
if (DEFAULT_TYPES.containsKey(packaging)) {
return DEFAULT_TYPES.get(packaging);
}
return new PackageType(packaging);
} | java | public static PackageType resolve(final MavenProject project) {
final String packaging = project.getPackaging().toLowerCase(Locale.ROOT);
if (DEFAULT_TYPES.containsKey(packaging)) {
return DEFAULT_TYPES.get(packaging);
}
return new PackageType(packaging);
} | [
"public",
"static",
"PackageType",
"resolve",
"(",
"final",
"MavenProject",
"project",
")",
"{",
"final",
"String",
"packaging",
"=",
"project",
".",
"getPackaging",
"(",
")",
".",
"toLowerCase",
"(",
"Locale",
".",
"ROOT",
")",
";",
"if",
"(",
"DEFAULT_TYPE... | Resolves the package type from the maven project.
@param project the maven project
@return the package type | [
"Resolves",
"the",
"package",
"type",
"from",
"the",
"maven",
"project",
"."
] | c0e2d7ee28e511092561801959eae253b2b56def | https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/plugin/src/main/java/org/wildfly/plugin/deployment/PackageType.java#L81-L87 | train |
wildfly/wildfly-maven-plugin | plugin/src/main/java/org/wildfly/plugin/common/Environment.java | Environment.getJavaCommand | public static String getJavaCommand(final Path javaHome) {
final Path resolvedJavaHome = javaHome == null ? findJavaHome() : javaHome;
final String exe;
if (resolvedJavaHome == null) {
exe = "java";
} else {
exe = resolvedJavaHome.resolve("bin").resolve("java").to... | java | public static String getJavaCommand(final Path javaHome) {
final Path resolvedJavaHome = javaHome == null ? findJavaHome() : javaHome;
final String exe;
if (resolvedJavaHome == null) {
exe = "java";
} else {
exe = resolvedJavaHome.resolve("bin").resolve("java").to... | [
"public",
"static",
"String",
"getJavaCommand",
"(",
"final",
"Path",
"javaHome",
")",
"{",
"final",
"Path",
"resolvedJavaHome",
"=",
"javaHome",
"==",
"null",
"?",
"findJavaHome",
"(",
")",
":",
"javaHome",
";",
"final",
"String",
"exe",
";",
"if",
"(",
"... | Returns the Java command to use.
@param javaHome the Java Home, if {@code null} an attempt to determine the command will be done
@return the Java executable command | [
"Returns",
"the",
"Java",
"command",
"to",
"use",
"."
] | c0e2d7ee28e511092561801959eae253b2b56def | https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/plugin/src/main/java/org/wildfly/plugin/common/Environment.java#L124-L139 | train |
wildfly/wildfly-maven-plugin | core/src/main/java/org/wildfly/plugin/core/UndeployDescription.java | UndeployDescription.of | public static UndeployDescription of(final DeploymentDescription deploymentDescription) {
Assert.checkNotNullParam("deploymentDescription", deploymentDescription);
return of(deploymentDescription.getName()).addServerGroups(deploymentDescription.getServerGroups());
} | java | public static UndeployDescription of(final DeploymentDescription deploymentDescription) {
Assert.checkNotNullParam("deploymentDescription", deploymentDescription);
return of(deploymentDescription.getName()).addServerGroups(deploymentDescription.getServerGroups());
} | [
"public",
"static",
"UndeployDescription",
"of",
"(",
"final",
"DeploymentDescription",
"deploymentDescription",
")",
"{",
"Assert",
".",
"checkNotNullParam",
"(",
"\"deploymentDescription\"",
",",
"deploymentDescription",
")",
";",
"return",
"of",
"(",
"deploymentDescrip... | Creates a new undeploy description.
@param deploymentDescription the deployment description to copy
@return the description | [
"Creates",
"a",
"new",
"undeploy",
"description",
"."
] | c0e2d7ee28e511092561801959eae253b2b56def | https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/core/src/main/java/org/wildfly/plugin/core/UndeployDescription.java#L77-L80 | train |
wildfly/wildfly-maven-plugin | core/src/main/java/org/wildfly/plugin/core/DeploymentOperations.java | DeploymentOperations.createDeployOperation | public static Operation createDeployOperation(final DeploymentDescription deployment) {
Assert.checkNotNullParam("deployment", deployment);
final CompositeOperationBuilder builder = CompositeOperationBuilder.create(true);
addDeployOperationStep(builder, deployment);
return builder.build(... | java | public static Operation createDeployOperation(final DeploymentDescription deployment) {
Assert.checkNotNullParam("deployment", deployment);
final CompositeOperationBuilder builder = CompositeOperationBuilder.create(true);
addDeployOperationStep(builder, deployment);
return builder.build(... | [
"public",
"static",
"Operation",
"createDeployOperation",
"(",
"final",
"DeploymentDescription",
"deployment",
")",
"{",
"Assert",
".",
"checkNotNullParam",
"(",
"\"deployment\"",
",",
"deployment",
")",
";",
"final",
"CompositeOperationBuilder",
"builder",
"=",
"Compos... | Creates an operation to deploy existing deployment content to the runtime.
@param deployment the deployment to deploy
@return the deploy operation | [
"Creates",
"an",
"operation",
"to",
"deploy",
"existing",
"deployment",
"content",
"to",
"the",
"runtime",
"."
] | c0e2d7ee28e511092561801959eae253b2b56def | https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/core/src/main/java/org/wildfly/plugin/core/DeploymentOperations.java#L150-L155 | train |
wildfly/wildfly-maven-plugin | core/src/main/java/org/wildfly/plugin/core/DeploymentOperations.java | DeploymentOperations.createDeployOperation | public static Operation createDeployOperation(final Set<DeploymentDescription> deployments) {
Assertions.requiresNotNullOrNotEmptyParameter("deployments", deployments);
final CompositeOperationBuilder builder = CompositeOperationBuilder.create(true);
for (DeploymentDescription deployment : deplo... | java | public static Operation createDeployOperation(final Set<DeploymentDescription> deployments) {
Assertions.requiresNotNullOrNotEmptyParameter("deployments", deployments);
final CompositeOperationBuilder builder = CompositeOperationBuilder.create(true);
for (DeploymentDescription deployment : deplo... | [
"public",
"static",
"Operation",
"createDeployOperation",
"(",
"final",
"Set",
"<",
"DeploymentDescription",
">",
"deployments",
")",
"{",
"Assertions",
".",
"requiresNotNullOrNotEmptyParameter",
"(",
"\"deployments\"",
",",
"deployments",
")",
";",
"final",
"CompositeO... | Creates an option to deploy existing content to the runtime for each deployment
@param deployments a set of deployments to deploy
@return the deploy operation | [
"Creates",
"an",
"option",
"to",
"deploy",
"existing",
"content",
"to",
"the",
"runtime",
"for",
"each",
"deployment"
] | c0e2d7ee28e511092561801959eae253b2b56def | https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/core/src/main/java/org/wildfly/plugin/core/DeploymentOperations.java#L164-L171 | train |
wildfly/wildfly-maven-plugin | core/src/main/java/org/wildfly/plugin/core/DeploymentOperations.java | DeploymentOperations.addDeployOperationStep | static void addDeployOperationStep(final CompositeOperationBuilder builder, final DeploymentDescription deployment) {
final String name = deployment.getName();
final Set<String> serverGroups = deployment.getServerGroups();
// If the server groups are empty this is a standalone deployment
... | java | static void addDeployOperationStep(final CompositeOperationBuilder builder, final DeploymentDescription deployment) {
final String name = deployment.getName();
final Set<String> serverGroups = deployment.getServerGroups();
// If the server groups are empty this is a standalone deployment
... | [
"static",
"void",
"addDeployOperationStep",
"(",
"final",
"CompositeOperationBuilder",
"builder",
",",
"final",
"DeploymentDescription",
"deployment",
")",
"{",
"final",
"String",
"name",
"=",
"deployment",
".",
"getName",
"(",
")",
";",
"final",
"Set",
"<",
"Stri... | Adds the deploy operation as a step to the composite operation.
@param builder the builder to add the step to
@param deployment the deployment to deploy | [
"Adds",
"the",
"deploy",
"operation",
"as",
"a",
"step",
"to",
"the",
"composite",
"operation",
"."
] | c0e2d7ee28e511092561801959eae253b2b56def | https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/core/src/main/java/org/wildfly/plugin/core/DeploymentOperations.java#L336-L350 | train |
wildfly/wildfly-maven-plugin | core/src/main/java/org/wildfly/plugin/core/DeploymentOperations.java | DeploymentOperations.addRedeployOperationStep | private static void addRedeployOperationStep(final CompositeOperationBuilder builder, final DeploymentDescription deployment) {
final String deploymentName = deployment.getName();
final Set<String> serverGroups = deployment.getServerGroups();
if (serverGroups.isEmpty()) {
builder.add... | java | private static void addRedeployOperationStep(final CompositeOperationBuilder builder, final DeploymentDescription deployment) {
final String deploymentName = deployment.getName();
final Set<String> serverGroups = deployment.getServerGroups();
if (serverGroups.isEmpty()) {
builder.add... | [
"private",
"static",
"void",
"addRedeployOperationStep",
"(",
"final",
"CompositeOperationBuilder",
"builder",
",",
"final",
"DeploymentDescription",
"deployment",
")",
"{",
"final",
"String",
"deploymentName",
"=",
"deployment",
".",
"getName",
"(",
")",
";",
"final"... | Adds a redeploy step to the composite operation.
@param builder the builder to add the step to
@param deployment the deployment being redeployed | [
"Adds",
"a",
"redeploy",
"step",
"to",
"the",
"composite",
"operation",
"."
] | c0e2d7ee28e511092561801959eae253b2b56def | https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/core/src/main/java/org/wildfly/plugin/core/DeploymentOperations.java#L422-L432 | train |
wildfly/wildfly-maven-plugin | plugin/src/main/java/org/wildfly/plugin/common/ServerOperations.java | ServerOperations.getFailureDescriptionAsString | public static String getFailureDescriptionAsString(final ModelNode result) {
if (isSuccessfulOutcome(result)) {
return "";
}
final String msg;
if (result.hasDefined(ClientConstants.FAILURE_DESCRIPTION)) {
if (result.hasDefined(ClientConstants.OP)) {
... | java | public static String getFailureDescriptionAsString(final ModelNode result) {
if (isSuccessfulOutcome(result)) {
return "";
}
final String msg;
if (result.hasDefined(ClientConstants.FAILURE_DESCRIPTION)) {
if (result.hasDefined(ClientConstants.OP)) {
... | [
"public",
"static",
"String",
"getFailureDescriptionAsString",
"(",
"final",
"ModelNode",
"result",
")",
"{",
"if",
"(",
"isSuccessfulOutcome",
"(",
"result",
")",
")",
"{",
"return",
"\"\"",
";",
"}",
"final",
"String",
"msg",
";",
"if",
"(",
"result",
".",... | Parses the result and returns the failure description. If the result was successful, an empty string is
returned.
@param result the result of executing an operation
@return the failure message or an empty string | [
"Parses",
"the",
"result",
"and",
"returns",
"the",
"failure",
"description",
".",
"If",
"the",
"result",
"was",
"successful",
"an",
"empty",
"string",
"is",
"returned",
"."
] | c0e2d7ee28e511092561801959eae253b2b56def | https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/plugin/src/main/java/org/wildfly/plugin/common/ServerOperations.java#L64-L80 | train |
wildfly/wildfly-maven-plugin | plugin/src/main/java/org/wildfly/plugin/common/ServerOperations.java | ServerOperations.createListDeploymentsOperation | public static ModelNode createListDeploymentsOperation() {
final ModelNode op = createOperation(READ_CHILDREN_NAMES);
op.get(CHILD_TYPE).set(DEPLOYMENT);
return op;
} | java | public static ModelNode createListDeploymentsOperation() {
final ModelNode op = createOperation(READ_CHILDREN_NAMES);
op.get(CHILD_TYPE).set(DEPLOYMENT);
return op;
} | [
"public",
"static",
"ModelNode",
"createListDeploymentsOperation",
"(",
")",
"{",
"final",
"ModelNode",
"op",
"=",
"createOperation",
"(",
"READ_CHILDREN_NAMES",
")",
";",
"op",
".",
"get",
"(",
"CHILD_TYPE",
")",
".",
"set",
"(",
"DEPLOYMENT",
")",
";",
"retu... | Creates an operation to list the deployments.
@return the operation | [
"Creates",
"an",
"operation",
"to",
"list",
"the",
"deployments",
"."
] | c0e2d7ee28e511092561801959eae253b2b56def | https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/plugin/src/main/java/org/wildfly/plugin/common/ServerOperations.java#L87-L91 | train |
wildfly/wildfly-maven-plugin | plugin/src/main/java/org/wildfly/plugin/common/ServerOperations.java | ServerOperations.createRemoveOperation | public static ModelNode createRemoveOperation(final ModelNode address, final boolean recursive) {
final ModelNode op = createRemoveOperation(address);
op.get(RECURSIVE).set(recursive);
return op;
} | java | public static ModelNode createRemoveOperation(final ModelNode address, final boolean recursive) {
final ModelNode op = createRemoveOperation(address);
op.get(RECURSIVE).set(recursive);
return op;
} | [
"public",
"static",
"ModelNode",
"createRemoveOperation",
"(",
"final",
"ModelNode",
"address",
",",
"final",
"boolean",
"recursive",
")",
"{",
"final",
"ModelNode",
"op",
"=",
"createRemoveOperation",
"(",
"address",
")",
";",
"op",
".",
"get",
"(",
"RECURSIVE"... | Creates a remove operation.
@param address the address for the operation
@param recursive {@code true} if the remove should be recursive, otherwise {@code false}
@return the operation | [
"Creates",
"a",
"remove",
"operation",
"."
] | c0e2d7ee28e511092561801959eae253b2b56def | https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/plugin/src/main/java/org/wildfly/plugin/common/ServerOperations.java#L101-L105 | train |
wildfly/wildfly-maven-plugin | plugin/src/main/java/org/wildfly/plugin/common/ServerOperations.java | ServerOperations.getChildAddress | public static Property getChildAddress(final ModelNode address) {
if (address.getType() != ModelType.LIST) {
throw new IllegalArgumentException("The address type must be a list.");
}
final List<Property> addressParts = address.asPropertyList();
if (addressParts.isEmpty()) {
... | java | public static Property getChildAddress(final ModelNode address) {
if (address.getType() != ModelType.LIST) {
throw new IllegalArgumentException("The address type must be a list.");
}
final List<Property> addressParts = address.asPropertyList();
if (addressParts.isEmpty()) {
... | [
"public",
"static",
"Property",
"getChildAddress",
"(",
"final",
"ModelNode",
"address",
")",
"{",
"if",
"(",
"address",
".",
"getType",
"(",
")",
"!=",
"ModelType",
".",
"LIST",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"The address type must... | Finds the last entry of the address list and returns it as a property.
@param address the address to get the last part of
@return the last part of the address
@throws IllegalArgumentException if the address is not of type {@link ModelType#LIST} or is empty | [
"Finds",
"the",
"last",
"entry",
"of",
"the",
"address",
"list",
"and",
"returns",
"it",
"as",
"a",
"property",
"."
] | c0e2d7ee28e511092561801959eae253b2b56def | https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/plugin/src/main/java/org/wildfly/plugin/common/ServerOperations.java#L169-L178 | train |
wildfly/wildfly-maven-plugin | plugin/src/main/java/org/wildfly/plugin/common/ServerOperations.java | ServerOperations.getParentAddress | public static ModelNode getParentAddress(final ModelNode address) {
if (address.getType() != ModelType.LIST) {
throw new IllegalArgumentException("The address type must be a list.");
}
final ModelNode result = new ModelNode();
final List<Property> addressParts = address.asPro... | java | public static ModelNode getParentAddress(final ModelNode address) {
if (address.getType() != ModelType.LIST) {
throw new IllegalArgumentException("The address type must be a list.");
}
final ModelNode result = new ModelNode();
final List<Property> addressParts = address.asPro... | [
"public",
"static",
"ModelNode",
"getParentAddress",
"(",
"final",
"ModelNode",
"address",
")",
"{",
"if",
"(",
"address",
".",
"getType",
"(",
")",
"!=",
"ModelType",
".",
"LIST",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"The address type mu... | Finds the parent address, everything before the last address part.
@param address the address to get the parent
@return the parent address
@throws IllegalArgumentException if the address is not of type {@link ModelType#LIST} or is empty | [
"Finds",
"the",
"parent",
"address",
"everything",
"before",
"the",
"last",
"address",
"part",
"."
] | c0e2d7ee28e511092561801959eae253b2b56def | https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/plugin/src/main/java/org/wildfly/plugin/common/ServerOperations.java#L189-L203 | train |
wildfly/wildfly-maven-plugin | plugin/src/main/java/org/wildfly/plugin/common/MavenModelControllerClientConfiguration.java | MavenModelControllerClientConfiguration.getController | public String getController() {
final StringBuilder controller = new StringBuilder();
if (getProtocol() != null) {
controller.append(getProtocol()).append("://");
}
if (getHost() != null) {
controller.append(getHost());
} else {
controller.appe... | java | public String getController() {
final StringBuilder controller = new StringBuilder();
if (getProtocol() != null) {
controller.append(getProtocol()).append("://");
}
if (getHost() != null) {
controller.append(getHost());
} else {
controller.appe... | [
"public",
"String",
"getController",
"(",
")",
"{",
"final",
"StringBuilder",
"controller",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"if",
"(",
"getProtocol",
"(",
")",
"!=",
"null",
")",
"{",
"controller",
".",
"append",
"(",
"getProtocol",
"(",
")",
... | Formats a connection string for CLI to use as it's controller connection.
@return the controller string to connect CLI | [
"Formats",
"a",
"connection",
"string",
"for",
"CLI",
"to",
"use",
"as",
"it",
"s",
"controller",
"connection",
"."
] | c0e2d7ee28e511092561801959eae253b2b56def | https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/plugin/src/main/java/org/wildfly/plugin/common/MavenModelControllerClientConfiguration.java#L143-L157 | train |
wildfly/wildfly-maven-plugin | core/src/main/java/org/wildfly/plugin/core/DefaultContainerDescription.java | DefaultContainerDescription.lookup | static DefaultContainerDescription lookup(final ModelControllerClient client) throws IOException, OperationExecutionException {
final ModelNode op = Operations.createReadResourceOperation(new ModelNode().setEmptyList());
op.get(ClientConstants.INCLUDE_RUNTIME).set(true);
final ModelNode result =... | java | static DefaultContainerDescription lookup(final ModelControllerClient client) throws IOException, OperationExecutionException {
final ModelNode op = Operations.createReadResourceOperation(new ModelNode().setEmptyList());
op.get(ClientConstants.INCLUDE_RUNTIME).set(true);
final ModelNode result =... | [
"static",
"DefaultContainerDescription",
"lookup",
"(",
"final",
"ModelControllerClient",
"client",
")",
"throws",
"IOException",
",",
"OperationExecutionException",
"{",
"final",
"ModelNode",
"op",
"=",
"Operations",
".",
"createReadResourceOperation",
"(",
"new",
"Model... | Queries the running container and attempts to lookup the information from the running container.
@param client the client used to execute the management operation
@return the container description
@throws IOException if an error occurs while executing the management operation
@throws OperationExecuti... | [
"Queries",
"the",
"running",
"container",
"and",
"attempts",
"to",
"lookup",
"the",
"information",
"from",
"the",
"running",
"container",
"."
] | c0e2d7ee28e511092561801959eae253b2b56def | https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/core/src/main/java/org/wildfly/plugin/core/DefaultContainerDescription.java#L106-L119 | train |
wildfly/wildfly-maven-plugin | core/src/main/java/org/wildfly/plugin/core/SimpleDeploymentDescription.java | SimpleDeploymentDescription.of | public static SimpleDeploymentDescription of(final String name, @SuppressWarnings("TypeMayBeWeakened") final Set<String> serverGroups) {
final SimpleDeploymentDescription result = of(name);
if (serverGroups != null) {
result.addServerGroups(serverGroups);
}
return result;
... | java | public static SimpleDeploymentDescription of(final String name, @SuppressWarnings("TypeMayBeWeakened") final Set<String> serverGroups) {
final SimpleDeploymentDescription result = of(name);
if (serverGroups != null) {
result.addServerGroups(serverGroups);
}
return result;
... | [
"public",
"static",
"SimpleDeploymentDescription",
"of",
"(",
"final",
"String",
"name",
",",
"@",
"SuppressWarnings",
"(",
"\"TypeMayBeWeakened\"",
")",
"final",
"Set",
"<",
"String",
">",
"serverGroups",
")",
"{",
"final",
"SimpleDeploymentDescription",
"result",
... | Creates a simple deployment description.
@param name the name for the deployment
@param serverGroups the server groups
@return the deployment description | [
"Creates",
"a",
"simple",
"deployment",
"description",
"."
] | c0e2d7ee28e511092561801959eae253b2b56def | https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/core/src/main/java/org/wildfly/plugin/core/SimpleDeploymentDescription.java#L64-L70 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/pipeline/common/BuildInfoDeployer.java | BuildInfoDeployer.addBuildInfoProperties | @Override
protected void addBuildInfoProperties(BuildInfoBuilder builder) {
if (envVars != null) {
for (Map.Entry<String, String> entry : envVars.entrySet()) {
builder.addProperty(BuildInfoProperties.BUILD_INFO_ENVIRONMENT_PREFIX + entry.getKey(), entry.getValue());
}... | java | @Override
protected void addBuildInfoProperties(BuildInfoBuilder builder) {
if (envVars != null) {
for (Map.Entry<String, String> entry : envVars.entrySet()) {
builder.addProperty(BuildInfoProperties.BUILD_INFO_ENVIRONMENT_PREFIX + entry.getKey(), entry.getValue());
}... | [
"@",
"Override",
"protected",
"void",
"addBuildInfoProperties",
"(",
"BuildInfoBuilder",
"builder",
")",
"{",
"if",
"(",
"envVars",
"!=",
"null",
")",
"{",
"for",
"(",
"Map",
".",
"Entry",
"<",
"String",
",",
"String",
">",
"entry",
":",
"envVars",
".",
... | Adding environment and system variables to build info.
@param builder | [
"Adding",
"environment",
"and",
"system",
"variables",
"to",
"build",
"info",
"."
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/pipeline/common/BuildInfoDeployer.java#L100-L113 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/release/promotion/UnifiedPromoteBuildAction.java | UnifiedPromoteBuildAction.loadBuild | @JavaScriptMethod
@SuppressWarnings({"UnusedDeclaration"})
public LoadBuildsResponse loadBuild(String buildId) {
LoadBuildsResponse response = new LoadBuildsResponse();
// When we load a new build we need also to reset the promotion plugin.
// The null plugin is related to 'None' plugin.... | java | @JavaScriptMethod
@SuppressWarnings({"UnusedDeclaration"})
public LoadBuildsResponse loadBuild(String buildId) {
LoadBuildsResponse response = new LoadBuildsResponse();
// When we load a new build we need also to reset the promotion plugin.
// The null plugin is related to 'None' plugin.... | [
"@",
"JavaScriptMethod",
"@",
"SuppressWarnings",
"(",
"{",
"\"UnusedDeclaration\"",
"}",
")",
"public",
"LoadBuildsResponse",
"loadBuild",
"(",
"String",
"buildId",
")",
"{",
"LoadBuildsResponse",
"response",
"=",
"new",
"LoadBuildsResponse",
"(",
")",
";",
"// Whe... | Load the related repositories, plugins and a promotion config associated to the buildId.
Called from the UI.
@param buildId - The unique build id.
@return LoadBuildsResponse e.g. list of repositories, plugins and a promotion config. | [
"Load",
"the",
"related",
"repositories",
"plugins",
"and",
"a",
"promotion",
"config",
"associated",
"to",
"the",
"buildId",
".",
"Called",
"from",
"the",
"UI",
"."
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/release/promotion/UnifiedPromoteBuildAction.java#L118-L145 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/release/promotion/UnifiedPromoteBuildAction.java | UnifiedPromoteBuildAction.doIndex | @SuppressWarnings({"UnusedDeclaration"})
public void doIndex(StaplerRequest req, StaplerResponse resp) throws IOException, ServletException {
req.getView(this, chooseAction()).forward(req, resp);
} | java | @SuppressWarnings({"UnusedDeclaration"})
public void doIndex(StaplerRequest req, StaplerResponse resp) throws IOException, ServletException {
req.getView(this, chooseAction()).forward(req, resp);
} | [
"@",
"SuppressWarnings",
"(",
"{",
"\"UnusedDeclaration\"",
"}",
")",
"public",
"void",
"doIndex",
"(",
"StaplerRequest",
"req",
",",
"StaplerResponse",
"resp",
")",
"throws",
"IOException",
",",
"ServletException",
"{",
"req",
".",
"getView",
"(",
"this",
",",
... | Select which view to display based on the state of the promotion. Will return the form if user selects to perform
promotion. Progress will be returned if the promotion is currently in progress. | [
"Select",
"which",
"view",
"to",
"display",
"based",
"on",
"the",
"state",
"of",
"the",
"promotion",
".",
"Will",
"return",
"the",
"form",
"if",
"user",
"selects",
"to",
"perform",
"promotion",
".",
"Progress",
"will",
"be",
"returned",
"if",
"the",
"promo... | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/release/promotion/UnifiedPromoteBuildAction.java#L270-L273 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/pipeline/common/Utils.java | Utils.prepareArtifactoryServer | public static org.jfrog.hudson.ArtifactoryServer prepareArtifactoryServer(String artifactoryServerID,
ArtifactoryServer pipelineServer) {
if (artifactoryServerID == null && pipelineServer == null) {
return null;
}... | java | public static org.jfrog.hudson.ArtifactoryServer prepareArtifactoryServer(String artifactoryServerID,
ArtifactoryServer pipelineServer) {
if (artifactoryServerID == null && pipelineServer == null) {
return null;
}... | [
"public",
"static",
"org",
".",
"jfrog",
".",
"hudson",
".",
"ArtifactoryServer",
"prepareArtifactoryServer",
"(",
"String",
"artifactoryServerID",
",",
"ArtifactoryServer",
"pipelineServer",
")",
"{",
"if",
"(",
"artifactoryServerID",
"==",
"null",
"&&",
"pipelineSer... | Prepares Artifactory server either from serverID or from ArtifactoryServer.
@param artifactoryServerID
@param pipelineServer
@return | [
"Prepares",
"Artifactory",
"server",
"either",
"from",
"serverID",
"or",
"from",
"ArtifactoryServer",
"."
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/pipeline/common/Utils.java#L64-L84 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/pipeline/common/Utils.java | Utils.appendBuildInfo | public static BuildInfo appendBuildInfo(CpsScript cpsScript, Map<String, Object> stepVariables) {
BuildInfo buildInfo = (BuildInfo) stepVariables.get(BUILD_INFO);
if (buildInfo == null) {
buildInfo = (BuildInfo) cpsScript.invokeMethod("newBuildInfo", Maps.newLinkedHashMap());
ste... | java | public static BuildInfo appendBuildInfo(CpsScript cpsScript, Map<String, Object> stepVariables) {
BuildInfo buildInfo = (BuildInfo) stepVariables.get(BUILD_INFO);
if (buildInfo == null) {
buildInfo = (BuildInfo) cpsScript.invokeMethod("newBuildInfo", Maps.newLinkedHashMap());
ste... | [
"public",
"static",
"BuildInfo",
"appendBuildInfo",
"(",
"CpsScript",
"cpsScript",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"stepVariables",
")",
"{",
"BuildInfo",
"buildInfo",
"=",
"(",
"BuildInfo",
")",
"stepVariables",
".",
"get",
"(",
"BUILD_INFO",
"... | Add the buildInfo to step variables if missing and set its cps script.
@param cpsScript the cps script
@param stepVariables step variables map
@return the build info | [
"Add",
"the",
"buildInfo",
"to",
"step",
"variables",
"if",
"missing",
"and",
"set",
"its",
"cps",
"script",
"."
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/pipeline/common/Utils.java#L346-L354 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/release/PromotionUtils.java | PromotionUtils.promoteAndCheckResponse | public static boolean promoteAndCheckResponse(Promotion promotion, ArtifactoryBuildInfoClient client, TaskListener listener,
String buildName, String buildNumber) throws IOException {
// If failFast is true, perform dry run first
if (promotion.isFailFast... | java | public static boolean promoteAndCheckResponse(Promotion promotion, ArtifactoryBuildInfoClient client, TaskListener listener,
String buildName, String buildNumber) throws IOException {
// If failFast is true, perform dry run first
if (promotion.isFailFast... | [
"public",
"static",
"boolean",
"promoteAndCheckResponse",
"(",
"Promotion",
"promotion",
",",
"ArtifactoryBuildInfoClient",
"client",
",",
"TaskListener",
"listener",
",",
"String",
"buildName",
",",
"String",
"buildNumber",
")",
"throws",
"IOException",
"{",
"// If fai... | Two stage promotion, dry run and actual promotion to verify correctness.
@param promotion
@param client
@param listener
@param buildName
@param buildNumber
@throws IOException | [
"Two",
"stage",
"promotion",
"dry",
"run",
"and",
"actual",
"promotion",
"to",
"verify",
"correctness",
"."
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/release/PromotionUtils.java#L27-L55 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/util/FormValidations.java | FormValidations.validateEmails | public static FormValidation validateEmails(String emails) {
if (!Strings.isNullOrEmpty(emails)) {
String[] recipients = StringUtils.split(emails, " ");
for (String email : recipients) {
FormValidation validation = validateInternetAddress(email);
if (valid... | java | public static FormValidation validateEmails(String emails) {
if (!Strings.isNullOrEmpty(emails)) {
String[] recipients = StringUtils.split(emails, " ");
for (String email : recipients) {
FormValidation validation = validateInternetAddress(email);
if (valid... | [
"public",
"static",
"FormValidation",
"validateEmails",
"(",
"String",
"emails",
")",
"{",
"if",
"(",
"!",
"Strings",
".",
"isNullOrEmpty",
"(",
"emails",
")",
")",
"{",
"String",
"[",
"]",
"recipients",
"=",
"StringUtils",
".",
"split",
"(",
"emails",
","... | Validates a space separated list of emails.
@param emails Space separated list of emails
@return {@link hudson.util.FormValidation.ok()} if valid or empty, error otherwise | [
"Validates",
"a",
"space",
"separated",
"list",
"of",
"emails",
"."
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/util/FormValidations.java#L29-L40 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/util/FormValidations.java | FormValidations.validateArtifactoryCombinationFilter | public static FormValidation validateArtifactoryCombinationFilter(String value)
throws IOException, InterruptedException {
String url = Util.fixEmptyAndTrim(value);
if (url == null)
return FormValidation.error("Mandatory field - You don`t have any deploy matches");
retur... | java | public static FormValidation validateArtifactoryCombinationFilter(String value)
throws IOException, InterruptedException {
String url = Util.fixEmptyAndTrim(value);
if (url == null)
return FormValidation.error("Mandatory field - You don`t have any deploy matches");
retur... | [
"public",
"static",
"FormValidation",
"validateArtifactoryCombinationFilter",
"(",
"String",
"value",
")",
"throws",
"IOException",
",",
"InterruptedException",
"{",
"String",
"url",
"=",
"Util",
".",
"fixEmptyAndTrim",
"(",
"value",
")",
";",
"if",
"(",
"url",
"=... | Validate the Combination filter field in Multi configuration jobs | [
"Validate",
"the",
"Combination",
"filter",
"field",
"in",
"Multi",
"configuration",
"jobs"
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/util/FormValidations.java#L63-L70 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/release/DistributionUtils.java | DistributionUtils.distributeAndCheckResponse | public static boolean distributeAndCheckResponse(DistributionBuilder distributionBuilder, ArtifactoryBuildInfoClient client, TaskListener listener,
String buildName, String buildNumber, boolean dryRun) throws IOException {
// do a dry run first
listen... | java | public static boolean distributeAndCheckResponse(DistributionBuilder distributionBuilder, ArtifactoryBuildInfoClient client, TaskListener listener,
String buildName, String buildNumber, boolean dryRun) throws IOException {
// do a dry run first
listen... | [
"public",
"static",
"boolean",
"distributeAndCheckResponse",
"(",
"DistributionBuilder",
"distributionBuilder",
",",
"ArtifactoryBuildInfoClient",
"client",
",",
"TaskListener",
"listener",
",",
"String",
"buildName",
",",
"String",
"buildNumber",
",",
"boolean",
"dryRun",
... | Two stage distribution, dry run and actual promotion to verify correctness.
@param distributionBuilder
@param client
@param listener
@param buildName
@param buildNumber
@throws IOException | [
"Two",
"stage",
"distribution",
"dry",
"run",
"and",
"actual",
"promotion",
"to",
"verify",
"correctness",
"."
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/release/DistributionUtils.java#L29-L45 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/util/publisher/PublisherFlexible.java | PublisherFlexible.getWrappedPublisher | private T getWrappedPublisher(Publisher flexiblePublisher, Class<T> type) {
if (!(flexiblePublisher instanceof FlexiblePublisher)) {
throw new IllegalArgumentException(String.format("Publisher should be of type: '%s'. Found type: '%s'",
FlexiblePublisher.class, flexiblePublisher.getC... | java | private T getWrappedPublisher(Publisher flexiblePublisher, Class<T> type) {
if (!(flexiblePublisher instanceof FlexiblePublisher)) {
throw new IllegalArgumentException(String.format("Publisher should be of type: '%s'. Found type: '%s'",
FlexiblePublisher.class, flexiblePublisher.getC... | [
"private",
"T",
"getWrappedPublisher",
"(",
"Publisher",
"flexiblePublisher",
",",
"Class",
"<",
"T",
">",
"type",
")",
"{",
"if",
"(",
"!",
"(",
"flexiblePublisher",
"instanceof",
"FlexiblePublisher",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"... | Gets the publisher wrapped by the specofoed FlexiblePublisher.
@param publisher The FlexiblePublisher wrapping the publisher.
@param type The type of the publisher wrapped by the FlexiblePublisher.
@return The publisher object wrapped by the Flex... | [
"Gets",
"the",
"publisher",
"wrapped",
"by",
"the",
"specofoed",
"FlexiblePublisher",
"."
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/util/publisher/PublisherFlexible.java#L29-L43 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/util/publisher/PublisherFlexible.java | PublisherFlexible.find | public T find(AbstractProject<?, ?> project, Class<T> type) {
// First check that the Flexible Publish plugin is installed:
if (Jenkins.getInstance().getPlugin(FLEXIBLE_PUBLISH_PLUGIN) != null) {
// Iterate all the project's publishers and find the flexible publisher:
for (Publis... | java | public T find(AbstractProject<?, ?> project, Class<T> type) {
// First check that the Flexible Publish plugin is installed:
if (Jenkins.getInstance().getPlugin(FLEXIBLE_PUBLISH_PLUGIN) != null) {
// Iterate all the project's publishers and find the flexible publisher:
for (Publis... | [
"public",
"T",
"find",
"(",
"AbstractProject",
"<",
"?",
",",
"?",
">",
"project",
",",
"Class",
"<",
"T",
">",
"type",
")",
"{",
"// First check that the Flexible Publish plugin is installed:",
"if",
"(",
"Jenkins",
".",
"getInstance",
"(",
")",
".",
"getPlug... | Gets the publisher of the specified type, if it is wrapped by the "Flexible Publish" publisher in a project.
Null is returned if no such publisher is found.
@param project The project
@param type The type of the publisher | [
"Gets",
"the",
"publisher",
"of",
"the",
"specified",
"type",
"if",
"it",
"is",
"wrapped",
"by",
"the",
"Flexible",
"Publish",
"publisher",
"in",
"a",
"project",
".",
"Null",
"is",
"returned",
"if",
"no",
"such",
"publisher",
"is",
"found",
"."
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/util/publisher/PublisherFlexible.java#L51-L68 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/util/publisher/PublisherFlexible.java | PublisherFlexible.isPublisherWrapped | public boolean isPublisherWrapped(AbstractProject<?, ?> project, Class<T> type) {
return find(project, type) != null;
} | java | public boolean isPublisherWrapped(AbstractProject<?, ?> project, Class<T> type) {
return find(project, type) != null;
} | [
"public",
"boolean",
"isPublisherWrapped",
"(",
"AbstractProject",
"<",
"?",
",",
"?",
">",
"project",
",",
"Class",
"<",
"T",
">",
"type",
")",
"{",
"return",
"find",
"(",
"project",
",",
"type",
")",
"!=",
"null",
";",
"}"
] | Determines whether a project has the specified publisher type, wrapped by the "Flexible Publish" publisher.
@param project The project
@param type The type of the publisher
@return true if the project contains a publisher of the specified type wrapped by the "Flexible Publish" publisher. | [
"Determines",
"whether",
"a",
"project",
"has",
"the",
"specified",
"publisher",
"type",
"wrapped",
"by",
"the",
"Flexible",
"Publish",
"publisher",
"."
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/util/publisher/PublisherFlexible.java#L76-L78 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/release/scm/svn/SubversionManager.java | SubversionManager.commitWorkingCopy | public void commitWorkingCopy(final String commitMessage) throws IOException, InterruptedException {
build.getWorkspace().act(new SVNCommitWorkingCopyCallable(commitMessage, getLocation(),
getSvnAuthenticationProvider(build), buildListener));
} | java | public void commitWorkingCopy(final String commitMessage) throws IOException, InterruptedException {
build.getWorkspace().act(new SVNCommitWorkingCopyCallable(commitMessage, getLocation(),
getSvnAuthenticationProvider(build), buildListener));
} | [
"public",
"void",
"commitWorkingCopy",
"(",
"final",
"String",
"commitMessage",
")",
"throws",
"IOException",
",",
"InterruptedException",
"{",
"build",
".",
"getWorkspace",
"(",
")",
".",
"act",
"(",
"new",
"SVNCommitWorkingCopyCallable",
"(",
"commitMessage",
",",... | Commits the working copy.
@param commitMessage@return The commit info upon successful operation.
@throws IOException On IO of SVN failure | [
"Commits",
"the",
"working",
"copy",
"."
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/release/scm/svn/SubversionManager.java#L58-L61 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/release/scm/svn/SubversionManager.java | SubversionManager.createTag | public void createTag(final String tagUrl, final String commitMessage)
throws IOException, InterruptedException {
build.getWorkspace()
.act(new SVNCreateTagCallable(tagUrl, commitMessage, getLocation(), getSvnAuthenticationProvider(build),
buildListener));
... | java | public void createTag(final String tagUrl, final String commitMessage)
throws IOException, InterruptedException {
build.getWorkspace()
.act(new SVNCreateTagCallable(tagUrl, commitMessage, getLocation(), getSvnAuthenticationProvider(build),
buildListener));
... | [
"public",
"void",
"createTag",
"(",
"final",
"String",
"tagUrl",
",",
"final",
"String",
"commitMessage",
")",
"throws",
"IOException",
",",
"InterruptedException",
"{",
"build",
".",
"getWorkspace",
"(",
")",
".",
"act",
"(",
"new",
"SVNCreateTagCallable",
"(",... | Creates a tag directly from the working copy.
@param tagUrl The URL of the tag to create.
@param commitMessage Commit message
@return The commit info upon successful operation.
@throws IOException On IO of SVN failure | [
"Creates",
"a",
"tag",
"directly",
"from",
"the",
"working",
"copy",
"."
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/release/scm/svn/SubversionManager.java#L71-L76 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/release/scm/svn/SubversionManager.java | SubversionManager.revertWorkingCopy | public void revertWorkingCopy() throws IOException, InterruptedException {
build.getWorkspace()
.act(new RevertWorkingCopyCallable(getLocation(), getSvnAuthenticationProvider(build), buildListener));
} | java | public void revertWorkingCopy() throws IOException, InterruptedException {
build.getWorkspace()
.act(new RevertWorkingCopyCallable(getLocation(), getSvnAuthenticationProvider(build), buildListener));
} | [
"public",
"void",
"revertWorkingCopy",
"(",
")",
"throws",
"IOException",
",",
"InterruptedException",
"{",
"build",
".",
"getWorkspace",
"(",
")",
".",
"act",
"(",
"new",
"RevertWorkingCopyCallable",
"(",
"getLocation",
"(",
")",
",",
"getSvnAuthenticationProvider"... | Revert all the working copy changes. | [
"Revert",
"all",
"the",
"working",
"copy",
"changes",
"."
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/release/scm/svn/SubversionManager.java#L81-L84 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/release/scm/svn/SubversionManager.java | SubversionManager.safeRevertWorkingCopy | public void safeRevertWorkingCopy() {
try {
revertWorkingCopy();
} catch (Exception e) {
debuggingLogger.log(Level.FINE, "Failed to revert working copy", e);
log("Failed to revert working copy: " + e.getLocalizedMessage());
Throwable cause = e.getCause();
... | java | public void safeRevertWorkingCopy() {
try {
revertWorkingCopy();
} catch (Exception e) {
debuggingLogger.log(Level.FINE, "Failed to revert working copy", e);
log("Failed to revert working copy: " + e.getLocalizedMessage());
Throwable cause = e.getCause();
... | [
"public",
"void",
"safeRevertWorkingCopy",
"(",
")",
"{",
"try",
"{",
"revertWorkingCopy",
"(",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
"{",
"debuggingLogger",
".",
"log",
"(",
"Level",
".",
"FINE",
",",
"\"Failed to revert working copy\"",
",",
... | Attempts to revert the working copy. In case of failure it just logs the error. | [
"Attempts",
"to",
"revert",
"the",
"working",
"copy",
".",
"In",
"case",
"of",
"failure",
"it",
"just",
"logs",
"the",
"error",
"."
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/release/scm/svn/SubversionManager.java#L89-L117 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/util/IssuesTrackerHelper.java | IssuesTrackerHelper.setIssueTrackerInfo | public void setIssueTrackerInfo(BuildInfoBuilder builder) {
Issues issues = new Issues();
issues.setAggregateBuildIssues(aggregateBuildIssues);
issues.setAggregationBuildStatus(aggregationBuildStatus);
issues.setTracker(new IssueTracker("JIRA", issueTrackerVersion));
Set<Issue> a... | java | public void setIssueTrackerInfo(BuildInfoBuilder builder) {
Issues issues = new Issues();
issues.setAggregateBuildIssues(aggregateBuildIssues);
issues.setAggregationBuildStatus(aggregationBuildStatus);
issues.setTracker(new IssueTracker("JIRA", issueTrackerVersion));
Set<Issue> a... | [
"public",
"void",
"setIssueTrackerInfo",
"(",
"BuildInfoBuilder",
"builder",
")",
"{",
"Issues",
"issues",
"=",
"new",
"Issues",
"(",
")",
";",
"issues",
".",
"setAggregateBuildIssues",
"(",
"aggregateBuildIssues",
")",
";",
"issues",
".",
"setAggregationBuildStatus... | Apply issues tracker info to a build info builder (used by generic tasks and maven2 which doesn't use the extractor | [
"Apply",
"issues",
"tracker",
"info",
"to",
"a",
"build",
"info",
"builder",
"(",
"used",
"by",
"generic",
"tasks",
"and",
"maven2",
"which",
"doesn",
"t",
"use",
"the",
"extractor"
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/util/IssuesTrackerHelper.java#L103-L113 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/util/BuildRetentionFactory.java | BuildRetentionFactory.createBuildRetention | public static BuildRetention createBuildRetention(Run build, boolean discardOldArtifacts) {
BuildRetention buildRetention = new BuildRetention(discardOldArtifacts);
LogRotator rotator = null;
BuildDiscarder buildDiscarder = build.getParent().getBuildDiscarder();
if (buildDiscarder != nul... | java | public static BuildRetention createBuildRetention(Run build, boolean discardOldArtifacts) {
BuildRetention buildRetention = new BuildRetention(discardOldArtifacts);
LogRotator rotator = null;
BuildDiscarder buildDiscarder = build.getParent().getBuildDiscarder();
if (buildDiscarder != nul... | [
"public",
"static",
"BuildRetention",
"createBuildRetention",
"(",
"Run",
"build",
",",
"boolean",
"discardOldArtifacts",
")",
"{",
"BuildRetention",
"buildRetention",
"=",
"new",
"BuildRetention",
"(",
"discardOldArtifacts",
")",
";",
"LogRotator",
"rotator",
"=",
"n... | Create a Build retention object out of the build
@param build The build to create the build retention out of
@param discardOldArtifacts Flag whether to discard artifacts of those builds that are to be discarded.
@return a new Build retention | [
"Create",
"a",
"Build",
"retention",
"object",
"out",
"of",
"the",
"build"
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/util/BuildRetentionFactory.java#L24-L45 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/pipeline/common/docker/utils/DockerUtils.java | DockerUtils.getImageIdFromTag | public static String getImageIdFromTag(String imageTag, String host) throws IOException {
DockerClient dockerClient = null;
try {
dockerClient = getDockerClient(host);
return dockerClient.inspectImageCmd(imageTag).exec().getId();
} finally {
closeQuietly(docke... | java | public static String getImageIdFromTag(String imageTag, String host) throws IOException {
DockerClient dockerClient = null;
try {
dockerClient = getDockerClient(host);
return dockerClient.inspectImageCmd(imageTag).exec().getId();
} finally {
closeQuietly(docke... | [
"public",
"static",
"String",
"getImageIdFromTag",
"(",
"String",
"imageTag",
",",
"String",
"host",
")",
"throws",
"IOException",
"{",
"DockerClient",
"dockerClient",
"=",
"null",
";",
"try",
"{",
"dockerClient",
"=",
"getDockerClient",
"(",
"host",
")",
";",
... | Get image Id from imageTag using DockerBuildInfoHelper client.
@param imageTag
@param host
@return | [
"Get",
"image",
"Id",
"from",
"imageTag",
"using",
"DockerBuildInfoHelper",
"client",
"."
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/pipeline/common/docker/utils/DockerUtils.java#L34-L42 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/pipeline/common/docker/utils/DockerUtils.java | DockerUtils.pushImage | public static void pushImage(String imageTag, String username, String password, String host) throws IOException {
final AuthConfig authConfig = new AuthConfig();
authConfig.withUsername(username);
authConfig.withPassword(password);
DockerClient dockerClient = null;
try {
... | java | public static void pushImage(String imageTag, String username, String password, String host) throws IOException {
final AuthConfig authConfig = new AuthConfig();
authConfig.withUsername(username);
authConfig.withPassword(password);
DockerClient dockerClient = null;
try {
... | [
"public",
"static",
"void",
"pushImage",
"(",
"String",
"imageTag",
",",
"String",
"username",
",",
"String",
"password",
",",
"String",
"host",
")",
"throws",
"IOException",
"{",
"final",
"AuthConfig",
"authConfig",
"=",
"new",
"AuthConfig",
"(",
")",
";",
... | Push docker image using the docker java client.
@param imageTag
@param username
@param password
@param host | [
"Push",
"docker",
"image",
"using",
"the",
"docker",
"java",
"client",
"."
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/pipeline/common/docker/utils/DockerUtils.java#L52-L64 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/pipeline/common/docker/utils/DockerUtils.java | DockerUtils.pullImage | public static void pullImage(String imageTag, String username, String password, String host) throws IOException {
final AuthConfig authConfig = new AuthConfig();
authConfig.withUsername(username);
authConfig.withPassword(password);
DockerClient dockerClient = null;
try {
... | java | public static void pullImage(String imageTag, String username, String password, String host) throws IOException {
final AuthConfig authConfig = new AuthConfig();
authConfig.withUsername(username);
authConfig.withPassword(password);
DockerClient dockerClient = null;
try {
... | [
"public",
"static",
"void",
"pullImage",
"(",
"String",
"imageTag",
",",
"String",
"username",
",",
"String",
"password",
",",
"String",
"host",
")",
"throws",
"IOException",
"{",
"final",
"AuthConfig",
"authConfig",
"=",
"new",
"AuthConfig",
"(",
")",
";",
... | Pull docker image using the docker java client.
@param imageTag
@param username
@param password
@param host | [
"Pull",
"docker",
"image",
"using",
"the",
"docker",
"java",
"client",
"."
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/pipeline/common/docker/utils/DockerUtils.java#L74-L86 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/pipeline/common/docker/utils/DockerUtils.java | DockerUtils.getParentId | public static String getParentId(String digest, String host) throws IOException {
DockerClient dockerClient = null;
try {
dockerClient = getDockerClient(host);
return dockerClient.inspectImageCmd(digest).exec().getParent();
} finally {
closeQuietly(dockerClien... | java | public static String getParentId(String digest, String host) throws IOException {
DockerClient dockerClient = null;
try {
dockerClient = getDockerClient(host);
return dockerClient.inspectImageCmd(digest).exec().getParent();
} finally {
closeQuietly(dockerClien... | [
"public",
"static",
"String",
"getParentId",
"(",
"String",
"digest",
",",
"String",
"host",
")",
"throws",
"IOException",
"{",
"DockerClient",
"dockerClient",
"=",
"null",
";",
"try",
"{",
"dockerClient",
"=",
"getDockerClient",
"(",
"host",
")",
";",
"return... | Get parent digest of an image.
@param digest
@param host
@return | [
"Get",
"parent",
"digest",
"of",
"an",
"image",
"."
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/pipeline/common/docker/utils/DockerUtils.java#L95-L103 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/pipeline/common/docker/utils/DockerUtils.java | DockerUtils.getLayersDigests | public static List<String> getLayersDigests(String manifestContent) throws IOException {
List<String> dockerLayersDependencies = new ArrayList<String>();
JsonNode manifest = Utils.mapper().readTree(manifestContent);
JsonNode schemaVersion = manifest.get("schemaVersion");
if (schemaVersi... | java | public static List<String> getLayersDigests(String manifestContent) throws IOException {
List<String> dockerLayersDependencies = new ArrayList<String>();
JsonNode manifest = Utils.mapper().readTree(manifestContent);
JsonNode schemaVersion = manifest.get("schemaVersion");
if (schemaVersi... | [
"public",
"static",
"List",
"<",
"String",
">",
"getLayersDigests",
"(",
"String",
"manifestContent",
")",
"throws",
"IOException",
"{",
"List",
"<",
"String",
">",
"dockerLayersDependencies",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"JsonNo... | Get a list of layer digests from docker manifest.
@param manifestContent
@return
@throws IOException | [
"Get",
"a",
"list",
"of",
"layer",
"digests",
"from",
"docker",
"manifest",
"."
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/pipeline/common/docker/utils/DockerUtils.java#L142-L164 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/pipeline/common/docker/utils/DockerUtils.java | DockerUtils.digestToFileName | public static String digestToFileName(String digest) {
if (StringUtils.startsWith(digest, "sha1")) {
return "manifest.json";
}
return getShaVersion(digest) + "__" + getShaValue(digest);
} | java | public static String digestToFileName(String digest) {
if (StringUtils.startsWith(digest, "sha1")) {
return "manifest.json";
}
return getShaVersion(digest) + "__" + getShaValue(digest);
} | [
"public",
"static",
"String",
"digestToFileName",
"(",
"String",
"digest",
")",
"{",
"if",
"(",
"StringUtils",
".",
"startsWith",
"(",
"digest",
",",
"\"sha1\"",
")",
")",
"{",
"return",
"\"manifest.json\"",
";",
"}",
"return",
"getShaVersion",
"(",
"digest",
... | Digest format to layer file name.
@param digest
@return | [
"Digest",
"format",
"to",
"layer",
"file",
"name",
"."
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/pipeline/common/docker/utils/DockerUtils.java#L276-L281 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/pipeline/common/docker/utils/DockerUtils.java | DockerUtils.getNumberOfDependentLayers | public static int getNumberOfDependentLayers(String imageContent) throws IOException {
JsonNode history = Utils.mapper().readTree(imageContent).get("history");
if (history == null) {
throw new IllegalStateException("Could not find 'history' tag");
}
int layersNum = history.s... | java | public static int getNumberOfDependentLayers(String imageContent) throws IOException {
JsonNode history = Utils.mapper().readTree(imageContent).get("history");
if (history == null) {
throw new IllegalStateException("Could not find 'history' tag");
}
int layersNum = history.s... | [
"public",
"static",
"int",
"getNumberOfDependentLayers",
"(",
"String",
"imageContent",
")",
"throws",
"IOException",
"{",
"JsonNode",
"history",
"=",
"Utils",
".",
"mapper",
"(",
")",
".",
"readTree",
"(",
"imageContent",
")",
".",
"get",
"(",
"\"history\"",
... | Returns number of dependencies layers in the image.
@param imageContent
@return
@throws IOException | [
"Returns",
"number",
"of",
"dependencies",
"layers",
"in",
"the",
"image",
"."
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/pipeline/common/docker/utils/DockerUtils.java#L290-L319 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/release/maven/MavenReleaseWrapper.java | MavenReleaseWrapper.getMavenModules | private List<String> getMavenModules(MavenModuleSetBuild mavenBuild) throws IOException, InterruptedException {
FilePath pathToModuleRoot = mavenBuild.getModuleRoot();
FilePath pathToPom = new FilePath(pathToModuleRoot, mavenBuild.getProject().getRootPOM(null));
return pathToPom.act(new MavenMod... | java | private List<String> getMavenModules(MavenModuleSetBuild mavenBuild) throws IOException, InterruptedException {
FilePath pathToModuleRoot = mavenBuild.getModuleRoot();
FilePath pathToPom = new FilePath(pathToModuleRoot, mavenBuild.getProject().getRootPOM(null));
return pathToPom.act(new MavenMod... | [
"private",
"List",
"<",
"String",
">",
"getMavenModules",
"(",
"MavenModuleSetBuild",
"mavenBuild",
")",
"throws",
"IOException",
",",
"InterruptedException",
"{",
"FilePath",
"pathToModuleRoot",
"=",
"mavenBuild",
".",
"getModuleRoot",
"(",
")",
";",
"FilePath",
"p... | Retrieve from the parent pom the path to the modules of the project | [
"Retrieve",
"from",
"the",
"parent",
"pom",
"the",
"path",
"to",
"the",
"modules",
"of",
"the",
"project"
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/release/maven/MavenReleaseWrapper.java#L238-L242 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/release/maven/MavenReleaseWrapper.java | MavenReleaseWrapper.getRelativePomPath | private String getRelativePomPath(MavenModule mavenModule, MavenModuleSetBuild mavenBuild) {
String relativePath = mavenModule.getRelativePath();
if (StringUtils.isBlank(relativePath)) {
return POM_NAME;
}
// If this is the root module, return the root pom path.
if (... | java | private String getRelativePomPath(MavenModule mavenModule, MavenModuleSetBuild mavenBuild) {
String relativePath = mavenModule.getRelativePath();
if (StringUtils.isBlank(relativePath)) {
return POM_NAME;
}
// If this is the root module, return the root pom path.
if (... | [
"private",
"String",
"getRelativePomPath",
"(",
"MavenModule",
"mavenModule",
",",
"MavenModuleSetBuild",
"mavenBuild",
")",
"{",
"String",
"relativePath",
"=",
"mavenModule",
".",
"getRelativePath",
"(",
")",
";",
"if",
"(",
"StringUtils",
".",
"isBlank",
"(",
"r... | Retrieve the relative path to the pom of the module | [
"Retrieve",
"the",
"relative",
"path",
"to",
"the",
"pom",
"of",
"the",
"module"
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/release/maven/MavenReleaseWrapper.java#L271-L294 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/release/maven/MavenReleaseWrapper.java | MavenReleaseWrapper.createPomPath | private String createPomPath(String relativePath, String moduleName) {
if (!moduleName.contains(".xml")) {
// Inside the parent pom, the reference is to the pom.xml file
return relativePath + "/" + POM_NAME;
}
// There is a reference to another xml file, which is not the ... | java | private String createPomPath(String relativePath, String moduleName) {
if (!moduleName.contains(".xml")) {
// Inside the parent pom, the reference is to the pom.xml file
return relativePath + "/" + POM_NAME;
}
// There is a reference to another xml file, which is not the ... | [
"private",
"String",
"createPomPath",
"(",
"String",
"relativePath",
",",
"String",
"moduleName",
")",
"{",
"if",
"(",
"!",
"moduleName",
".",
"contains",
"(",
"\".xml\"",
")",
")",
"{",
"// Inside the parent pom, the reference is to the pom.xml file",
"return",
"rela... | Creates the actual path to the xml file of the module. | [
"Creates",
"the",
"actual",
"path",
"to",
"the",
"xml",
"file",
"of",
"the",
"module",
"."
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/release/maven/MavenReleaseWrapper.java#L299-L307 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/release/maven/MavenModulesExtractor.java | MavenModulesExtractor.invoke | public List<String> invoke(File f, VirtualChannel channel) throws IOException, InterruptedException {
MavenProject mavenProject = getMavenProject(f.getAbsolutePath());
return mavenProject.getModel().getModules();
} | java | public List<String> invoke(File f, VirtualChannel channel) throws IOException, InterruptedException {
MavenProject mavenProject = getMavenProject(f.getAbsolutePath());
return mavenProject.getModel().getModules();
} | [
"public",
"List",
"<",
"String",
">",
"invoke",
"(",
"File",
"f",
",",
"VirtualChannel",
"channel",
")",
"throws",
"IOException",
",",
"InterruptedException",
"{",
"MavenProject",
"mavenProject",
"=",
"getMavenProject",
"(",
"f",
".",
"getAbsolutePath",
"(",
")"... | This is needed when running on slaves. | [
"This",
"is",
"needed",
"when",
"running",
"on",
"slaves",
"."
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/release/maven/MavenModulesExtractor.java#L21-L24 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/util/ExtractorUtils.java | ExtractorUtils.getVcsRevision | public static String getVcsRevision(Map<String, String> env) {
String revision = env.get("SVN_REVISION");
if (StringUtils.isBlank(revision)) {
revision = env.get(GIT_COMMIT);
}
if (StringUtils.isBlank(revision)) {
revision = env.get("P4_CHANGELIST");
}
... | java | public static String getVcsRevision(Map<String, String> env) {
String revision = env.get("SVN_REVISION");
if (StringUtils.isBlank(revision)) {
revision = env.get(GIT_COMMIT);
}
if (StringUtils.isBlank(revision)) {
revision = env.get("P4_CHANGELIST");
}
... | [
"public",
"static",
"String",
"getVcsRevision",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"env",
")",
"{",
"String",
"revision",
"=",
"env",
".",
"get",
"(",
"\"SVN_REVISION\"",
")",
";",
"if",
"(",
"StringUtils",
".",
"isBlank",
"(",
"revision",
")... | Get the VCS revision from the Jenkins build environment. The search will one of "SVN_REVISION", "GIT_COMMIT",
"P4_CHANGELIST" in the environment.
@param env Th Jenkins build environment.
@return The vcs revision for supported VCS | [
"Get",
"the",
"VCS",
"revision",
"from",
"the",
"Jenkins",
"build",
"environment",
".",
"The",
"search",
"will",
"one",
"of",
"SVN_REVISION",
"GIT_COMMIT",
"P4_CHANGELIST",
"in",
"the",
"environment",
"."
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/util/ExtractorUtils.java#L81-L90 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/util/ExtractorUtils.java | ExtractorUtils.getVcsUrl | public static String getVcsUrl(Map<String, String> env) {
String url = env.get("SVN_URL");
if (StringUtils.isBlank(url)) {
url = publicGitUrl(env.get("GIT_URL"));
}
if (StringUtils.isBlank(url)) {
url = env.get("P4PORT");
}
return url;
} | java | public static String getVcsUrl(Map<String, String> env) {
String url = env.get("SVN_URL");
if (StringUtils.isBlank(url)) {
url = publicGitUrl(env.get("GIT_URL"));
}
if (StringUtils.isBlank(url)) {
url = env.get("P4PORT");
}
return url;
} | [
"public",
"static",
"String",
"getVcsUrl",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"env",
")",
"{",
"String",
"url",
"=",
"env",
".",
"get",
"(",
"\"SVN_URL\"",
")",
";",
"if",
"(",
"StringUtils",
".",
"isBlank",
"(",
"url",
")",
")",
"{",
"... | Get the VCS url from the Jenkins build environment. The search will one of "SVN_REVISION", "GIT_COMMIT",
"P4_CHANGELIST" in the environment.
@param env Th Jenkins build environment.
@return The vcs url for supported VCS | [
"Get",
"the",
"VCS",
"url",
"from",
"the",
"Jenkins",
"build",
"environment",
".",
"The",
"search",
"will",
"one",
"of",
"SVN_REVISION",
"GIT_COMMIT",
"P4_CHANGELIST",
"in",
"the",
"environment",
"."
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/util/ExtractorUtils.java#L99-L108 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/util/ExtractorUtils.java | ExtractorUtils.daysBetween | private static long daysBetween(Date date1, Date date2) {
long diff;
if (date2.after(date1)) {
diff = date2.getTime() - date1.getTime();
} else {
diff = date1.getTime() - date2.getTime();
}
return diff / (24 * 60 * 60 * 1000);
} | java | private static long daysBetween(Date date1, Date date2) {
long diff;
if (date2.after(date1)) {
diff = date2.getTime() - date1.getTime();
} else {
diff = date1.getTime() - date2.getTime();
}
return diff / (24 * 60 * 60 * 1000);
} | [
"private",
"static",
"long",
"daysBetween",
"(",
"Date",
"date1",
",",
"Date",
"date2",
")",
"{",
"long",
"diff",
";",
"if",
"(",
"date2",
".",
"after",
"(",
"date1",
")",
")",
"{",
"diff",
"=",
"date2",
".",
"getTime",
"(",
")",
"-",
"date1",
".",... | Naive implementation of the difference in days between two dates | [
"Naive",
"implementation",
"of",
"the",
"difference",
"in",
"days",
"between",
"two",
"dates"
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/util/ExtractorUtils.java#L394-L402 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/util/ExtractorUtils.java | ExtractorUtils.getBuildNumbersNotToBeDeleted | public static List<String> getBuildNumbersNotToBeDeleted(Run build) {
List<String> notToDelete = Lists.newArrayList();
List<? extends Run<?, ?>> builds = build.getParent().getBuilds();
for (Run<?, ?> run : builds) {
if (run.isKeepLog()) {
notToDelete.add(String.valueO... | java | public static List<String> getBuildNumbersNotToBeDeleted(Run build) {
List<String> notToDelete = Lists.newArrayList();
List<? extends Run<?, ?>> builds = build.getParent().getBuilds();
for (Run<?, ?> run : builds) {
if (run.isKeepLog()) {
notToDelete.add(String.valueO... | [
"public",
"static",
"List",
"<",
"String",
">",
"getBuildNumbersNotToBeDeleted",
"(",
"Run",
"build",
")",
"{",
"List",
"<",
"String",
">",
"notToDelete",
"=",
"Lists",
".",
"newArrayList",
"(",
")",
";",
"List",
"<",
"?",
"extends",
"Run",
"<",
"?",
","... | Get the list of build numbers that are to be kept forever. | [
"Get",
"the",
"list",
"of",
"build",
"numbers",
"that",
"are",
"to",
"be",
"kept",
"forever",
"."
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/util/ExtractorUtils.java#L415-L424 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/util/ExtractorUtils.java | ExtractorUtils.entityToString | public static String entityToString(HttpEntity entity) throws IOException {
if (entity != null) {
InputStream is = entity.getContent();
return IOUtils.toString(is, "UTF-8");
}
return "";
} | java | public static String entityToString(HttpEntity entity) throws IOException {
if (entity != null) {
InputStream is = entity.getContent();
return IOUtils.toString(is, "UTF-8");
}
return "";
} | [
"public",
"static",
"String",
"entityToString",
"(",
"HttpEntity",
"entity",
")",
"throws",
"IOException",
"{",
"if",
"(",
"entity",
"!=",
"null",
")",
"{",
"InputStream",
"is",
"=",
"entity",
".",
"getContent",
"(",
")",
";",
"return",
"IOUtils",
".",
"to... | Converts the http entity to string. If entity is null, returns empty string.
@param entity
@return
@throws IOException | [
"Converts",
"the",
"http",
"entity",
"to",
"string",
".",
"If",
"entity",
"is",
"null",
"returns",
"empty",
"string",
"."
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/util/ExtractorUtils.java#L555-L561 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/util/ExtractorUtils.java | ExtractorUtils.createAndGetTempDir | public static FilePath createAndGetTempDir(final FilePath ws) throws IOException, InterruptedException {
// The token that combines the project name and unique number to create unique workspace directory.
String workspaceList = System.getProperty("hudson.slaves.WorkspaceList");
return ws.act(new... | java | public static FilePath createAndGetTempDir(final FilePath ws) throws IOException, InterruptedException {
// The token that combines the project name and unique number to create unique workspace directory.
String workspaceList = System.getProperty("hudson.slaves.WorkspaceList");
return ws.act(new... | [
"public",
"static",
"FilePath",
"createAndGetTempDir",
"(",
"final",
"FilePath",
"ws",
")",
"throws",
"IOException",
",",
"InterruptedException",
"{",
"// The token that combines the project name and unique number to create unique workspace directory.",
"String",
"workspaceList",
"... | Create a temporary directory under a given workspace | [
"Create",
"a",
"temporary",
"directory",
"under",
"a",
"given",
"workspace"
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/util/ExtractorUtils.java#L586-L599 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/maven2/MavenDependenciesRecorder.java | MavenDependenciesRecorder.postExecute | @Override
public boolean postExecute(MavenBuildProxy build, MavenProject pom, MojoInfo mojo, BuildListener listener,
Throwable error) {
//listener.getLogger().println("[MavenDependenciesRecorder] mojo: " + mojo.getClass() + ":" + mojo.getGoal());
//listener.getLogger().println("[MavenDep... | java | @Override
public boolean postExecute(MavenBuildProxy build, MavenProject pom, MojoInfo mojo, BuildListener listener,
Throwable error) {
//listener.getLogger().println("[MavenDependenciesRecorder] mojo: " + mojo.getClass() + ":" + mojo.getGoal());
//listener.getLogger().println("[MavenDep... | [
"@",
"Override",
"public",
"boolean",
"postExecute",
"(",
"MavenBuildProxy",
"build",
",",
"MavenProject",
"pom",
",",
"MojoInfo",
"mojo",
",",
"BuildListener",
"listener",
",",
"Throwable",
"error",
")",
"{",
"//listener.getLogger().println(\"[MavenDependenciesRecorder] ... | Mojos perform different dependency resolution, so we add dependencies for each mojo. | [
"Mojos",
"perform",
"different",
"dependency",
"resolution",
"so",
"we",
"add",
"dependencies",
"for",
"each",
"mojo",
"."
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/maven2/MavenDependenciesRecorder.java#L54-L61 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/maven2/MavenDependenciesRecorder.java | MavenDependenciesRecorder.postBuild | @Override
public boolean postBuild(MavenBuildProxy build, MavenProject pom, BuildListener listener)
throws InterruptedException, IOException {
build.executeAsync(new BuildCallable<Void, IOException>() {
// record is transient, so needs to make a copy first
private final S... | java | @Override
public boolean postBuild(MavenBuildProxy build, MavenProject pom, BuildListener listener)
throws InterruptedException, IOException {
build.executeAsync(new BuildCallable<Void, IOException>() {
// record is transient, so needs to make a copy first
private final S... | [
"@",
"Override",
"public",
"boolean",
"postBuild",
"(",
"MavenBuildProxy",
"build",
",",
"MavenProject",
"pom",
",",
"BuildListener",
"listener",
")",
"throws",
"InterruptedException",
",",
"IOException",
"{",
"build",
".",
"executeAsync",
"(",
"new",
"BuildCallable... | Sends the collected dependencies over to the master and record them. | [
"Sends",
"the",
"collected",
"dependencies",
"over",
"to",
"the",
"master",
"and",
"record",
"them",
"."
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/maven2/MavenDependenciesRecorder.java#L66-L82 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/util/CredentialManager.java | CredentialManager.getPreferredDeployer | public static CredentialsConfig getPreferredDeployer(DeployerOverrider deployerOverrider, ArtifactoryServer server) {
if (deployerOverrider.isOverridingDefaultDeployer()) {
CredentialsConfig deployerCredentialsConfig = deployerOverrider.getDeployerCredentialsConfig();
if (deployerCredent... | java | public static CredentialsConfig getPreferredDeployer(DeployerOverrider deployerOverrider, ArtifactoryServer server) {
if (deployerOverrider.isOverridingDefaultDeployer()) {
CredentialsConfig deployerCredentialsConfig = deployerOverrider.getDeployerCredentialsConfig();
if (deployerCredent... | [
"public",
"static",
"CredentialsConfig",
"getPreferredDeployer",
"(",
"DeployerOverrider",
"deployerOverrider",
",",
"ArtifactoryServer",
"server",
")",
"{",
"if",
"(",
"deployerOverrider",
".",
"isOverridingDefaultDeployer",
"(",
")",
")",
"{",
"CredentialsConfig",
"depl... | Decides and returns the preferred deployment credentials to use from this builder settings and selected server
@param deployerOverrider Deploy-overriding capable builder
@param server Selected Artifactory server
@return Preferred deployment credentials | [
"Decides",
"and",
"returns",
"the",
"preferred",
"deployment",
"credentials",
"to",
"use",
"from",
"this",
"builder",
"settings",
"and",
"selected",
"server"
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/util/CredentialManager.java#L41-L57 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/maven3/Maven3Builder.java | Maven3Builder.perform | @Override
public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener)
throws InterruptedException, IOException {
listener.getLogger().println("Jenkins Artifactory Plugin version: " + ActionableHelper.getArtifactoryPluginVersion());
EnvVars env = build.get... | java | @Override
public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener)
throws InterruptedException, IOException {
listener.getLogger().println("Jenkins Artifactory Plugin version: " + ActionableHelper.getArtifactoryPluginVersion());
EnvVars env = build.get... | [
"@",
"Override",
"public",
"boolean",
"perform",
"(",
"AbstractBuild",
"<",
"?",
",",
"?",
">",
"build",
",",
"Launcher",
"launcher",
",",
"BuildListener",
"listener",
")",
"throws",
"InterruptedException",
",",
"IOException",
"{",
"listener",
".",
"getLogger",
... | Used by FreeStyle Maven jobs only | [
"Used",
"by",
"FreeStyle",
"Maven",
"jobs",
"only"
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/maven3/Maven3Builder.java#L81-L97 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/maven3/Maven3Builder.java | Maven3Builder.perform | public boolean perform(Run<?, ?> build, Launcher launcher, TaskListener listener, EnvVars env, FilePath workDir, FilePath tempDir)
throws InterruptedException, IOException {
listener.getLogger().println("Jenkins Artifactory Plugin version: " + ActionableHelper.getArtifactoryPluginVersion());
... | java | public boolean perform(Run<?, ?> build, Launcher launcher, TaskListener listener, EnvVars env, FilePath workDir, FilePath tempDir)
throws InterruptedException, IOException {
listener.getLogger().println("Jenkins Artifactory Plugin version: " + ActionableHelper.getArtifactoryPluginVersion());
... | [
"public",
"boolean",
"perform",
"(",
"Run",
"<",
"?",
",",
"?",
">",
"build",
",",
"Launcher",
"launcher",
",",
"TaskListener",
"listener",
",",
"EnvVars",
"env",
",",
"FilePath",
"workDir",
",",
"FilePath",
"tempDir",
")",
"throws",
"InterruptedException",
... | Used by Pipeline jobs only | [
"Used",
"by",
"Pipeline",
"jobs",
"only"
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/maven3/Maven3Builder.java#L100-L112 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/maven3/Maven3Builder.java | Maven3Builder.copyClassWorldsFile | private FilePath copyClassWorldsFile(FilePath ws, URL resource) {
try {
FilePath remoteClassworlds =
ws.createTextTempFile("classworlds", "conf", "");
remoteClassworlds.copyFrom(resource);
return remoteClassworlds;
} catch (Exception e) {
... | java | private FilePath copyClassWorldsFile(FilePath ws, URL resource) {
try {
FilePath remoteClassworlds =
ws.createTextTempFile("classworlds", "conf", "");
remoteClassworlds.copyFrom(resource);
return remoteClassworlds;
} catch (Exception e) {
... | [
"private",
"FilePath",
"copyClassWorldsFile",
"(",
"FilePath",
"ws",
",",
"URL",
"resource",
")",
"{",
"try",
"{",
"FilePath",
"remoteClassworlds",
"=",
"ws",
".",
"createTextTempFile",
"(",
"\"classworlds\"",
",",
"\"conf\"",
",",
"\"\"",
")",
";",
"remoteClass... | Copies a classworlds file to a temporary location either on the local filesystem or on a slave depending on the
node type.
@return The path of the classworlds.conf file | [
"Copies",
"a",
"classworlds",
"file",
"to",
"a",
"temporary",
"location",
"either",
"on",
"the",
"local",
"filesystem",
"or",
"on",
"a",
"slave",
"depending",
"on",
"the",
"node",
"type",
"."
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/maven3/Maven3Builder.java#L284-L293 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/action/ActionableHelper.java | ActionableHelper.getPublisher | public static <T extends Publisher> T getPublisher(AbstractProject<?, ?> project, Class<T> type) {
// Search for a publisher of the given type in the project and return it if found:
T publisher = new PublisherFindImpl<T>().find(project, type);
if (publisher != null) {
return publishe... | java | public static <T extends Publisher> T getPublisher(AbstractProject<?, ?> project, Class<T> type) {
// Search for a publisher of the given type in the project and return it if found:
T publisher = new PublisherFindImpl<T>().find(project, type);
if (publisher != null) {
return publishe... | [
"public",
"static",
"<",
"T",
"extends",
"Publisher",
">",
"T",
"getPublisher",
"(",
"AbstractProject",
"<",
"?",
",",
"?",
">",
"project",
",",
"Class",
"<",
"T",
">",
"type",
")",
"{",
"// Search for a publisher of the given type in the project and return it if fo... | Search for a publisher of the given type in a project and return it, or null if it is not found.
@return The publisher | [
"Search",
"for",
"a",
"publisher",
"of",
"the",
"given",
"type",
"in",
"a",
"project",
"and",
"return",
"it",
"or",
"null",
"if",
"it",
"is",
"not",
"found",
"."
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/action/ActionableHelper.java#L80-L90 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/action/ActionableHelper.java | ActionableHelper.getArtifactoryPluginVersion | public static String getArtifactoryPluginVersion() {
String pluginsSortName = "artifactory";
//Validates Jenkins existence because in some jobs the Jenkins instance is unreachable
if (Jenkins.getInstance() != null
&& Jenkins.getInstance().getPlugin(pluginsSortName) != null
... | java | public static String getArtifactoryPluginVersion() {
String pluginsSortName = "artifactory";
//Validates Jenkins existence because in some jobs the Jenkins instance is unreachable
if (Jenkins.getInstance() != null
&& Jenkins.getInstance().getPlugin(pluginsSortName) != null
... | [
"public",
"static",
"String",
"getArtifactoryPluginVersion",
"(",
")",
"{",
"String",
"pluginsSortName",
"=",
"\"artifactory\"",
";",
"//Validates Jenkins existence because in some jobs the Jenkins instance is unreachable",
"if",
"(",
"Jenkins",
".",
"getInstance",
"(",
")",
... | Returns the version of Jenkins Artifactory Plugin or empty string if not found
@return the version of Jenkins Artifactory Plugin or empty string if not found | [
"Returns",
"the",
"version",
"of",
"Jenkins",
"Artifactory",
"Plugin",
"or",
"empty",
"string",
"if",
"not",
"found"
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/action/ActionableHelper.java#L250-L259 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/action/ActionableHelper.java | ActionableHelper.deleteFilePath | public static void deleteFilePath(FilePath workspace, String path) throws IOException {
if (StringUtils.isNotBlank(path)) {
try {
FilePath propertiesFile = new FilePath(workspace, path);
propertiesFile.delete();
} catch (Exception e) {
thro... | java | public static void deleteFilePath(FilePath workspace, String path) throws IOException {
if (StringUtils.isNotBlank(path)) {
try {
FilePath propertiesFile = new FilePath(workspace, path);
propertiesFile.delete();
} catch (Exception e) {
thro... | [
"public",
"static",
"void",
"deleteFilePath",
"(",
"FilePath",
"workspace",
",",
"String",
"path",
")",
"throws",
"IOException",
"{",
"if",
"(",
"StringUtils",
".",
"isNotBlank",
"(",
"path",
")",
")",
"{",
"try",
"{",
"FilePath",
"propertiesFile",
"=",
"new... | Deletes a FilePath file.
@param workspace The build workspace.
@param path The path in the workspace.
@throws IOException In case of missing file. | [
"Deletes",
"a",
"FilePath",
"file",
"."
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/action/ActionableHelper.java#L277-L286 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/release/scm/git/GitManager.java | GitManager.getRemoteUrl | public String getRemoteUrl(String defaultRemoteUrl) {
if (StringUtils.isBlank(defaultRemoteUrl)) {
RemoteConfig remoteConfig = getJenkinsScm().getRepositories().get(0);
URIish uri = remoteConfig.getURIs().get(0);
return uri.toPrivateString();
}
return default... | java | public String getRemoteUrl(String defaultRemoteUrl) {
if (StringUtils.isBlank(defaultRemoteUrl)) {
RemoteConfig remoteConfig = getJenkinsScm().getRepositories().get(0);
URIish uri = remoteConfig.getURIs().get(0);
return uri.toPrivateString();
}
return default... | [
"public",
"String",
"getRemoteUrl",
"(",
"String",
"defaultRemoteUrl",
")",
"{",
"if",
"(",
"StringUtils",
".",
"isBlank",
"(",
"defaultRemoteUrl",
")",
")",
"{",
"RemoteConfig",
"remoteConfig",
"=",
"getJenkinsScm",
"(",
")",
".",
"getRepositories",
"(",
")",
... | This method is currently in use only by the SvnCoordinator | [
"This",
"method",
"is",
"currently",
"in",
"use",
"only",
"by",
"the",
"SvnCoordinator"
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/release/scm/git/GitManager.java#L185-L193 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/RepositoryConf.java | RepositoryConf.getRepoKey | public String getRepoKey() {
String repoKey;
if (isDynamicMode()) {
repoKey = keyFromText;
} else {
repoKey = keyFromSelect;
}
return repoKey;
} | java | public String getRepoKey() {
String repoKey;
if (isDynamicMode()) {
repoKey = keyFromText;
} else {
repoKey = keyFromSelect;
}
return repoKey;
} | [
"public",
"String",
"getRepoKey",
"(",
")",
"{",
"String",
"repoKey",
";",
"if",
"(",
"isDynamicMode",
"(",
")",
")",
"{",
"repoKey",
"=",
"keyFromText",
";",
"}",
"else",
"{",
"repoKey",
"=",
"keyFromSelect",
";",
"}",
"return",
"repoKey",
";",
"}"
] | Used to get the current repository key
@return keyFromText or keyFromSelect reflected by the dynamicMode flag | [
"Used",
"to",
"get",
"the",
"current",
"repository",
"key"
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/RepositoryConf.java#L34-L42 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/pipeline/common/types/buildInfo/Env.java | Env.collectVariables | public void collectVariables(EnvVars env, Run build, TaskListener listener) {
EnvVars buildParameters = Utils.extractBuildParameters(build, listener);
if (buildParameters != null) {
env.putAll(buildParameters);
}
addAllWithFilter(envVars, env, filter.getPatternFilter());
... | java | public void collectVariables(EnvVars env, Run build, TaskListener listener) {
EnvVars buildParameters = Utils.extractBuildParameters(build, listener);
if (buildParameters != null) {
env.putAll(buildParameters);
}
addAllWithFilter(envVars, env, filter.getPatternFilter());
... | [
"public",
"void",
"collectVariables",
"(",
"EnvVars",
"env",
",",
"Run",
"build",
",",
"TaskListener",
"listener",
")",
"{",
"EnvVars",
"buildParameters",
"=",
"Utils",
".",
"extractBuildParameters",
"(",
"build",
",",
"listener",
")",
";",
"if",
"(",
"buildPa... | Collect environment variables and system properties under with filter constrains | [
"Collect",
"environment",
"variables",
"and",
"system",
"properties",
"under",
"with",
"filter",
"constrains"
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/pipeline/common/types/buildInfo/Env.java#L36-L50 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/pipeline/common/types/buildInfo/Env.java | Env.append | protected void append(Env env) {
addAllWithFilter(this.envVars, env.envVars, filter.getPatternFilter());
addAllWithFilter(this.sysVars, env.sysVars, filter.getPatternFilter());
} | java | protected void append(Env env) {
addAllWithFilter(this.envVars, env.envVars, filter.getPatternFilter());
addAllWithFilter(this.sysVars, env.sysVars, filter.getPatternFilter());
} | [
"protected",
"void",
"append",
"(",
"Env",
"env",
")",
"{",
"addAllWithFilter",
"(",
"this",
".",
"envVars",
",",
"env",
".",
"envVars",
",",
"filter",
".",
"getPatternFilter",
"(",
")",
")",
";",
"addAllWithFilter",
"(",
"this",
".",
"sysVars",
",",
"en... | Append environment variables and system properties from othre PipelineEvn object | [
"Append",
"environment",
"variables",
"and",
"system",
"properties",
"from",
"othre",
"PipelineEvn",
"object"
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/pipeline/common/types/buildInfo/Env.java#L55-L58 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/pipeline/common/types/buildInfo/Env.java | Env.addAllWithFilter | private void addAllWithFilter(Map<String, String> toMap, Map<String, String> fromMap, IncludeExcludePatterns pattern) {
for (Object o : fromMap.entrySet()) {
Map.Entry entry = (Map.Entry) o;
String key = (String) entry.getKey();
if (PatternMatcher.pathConflicts(key, pattern))... | java | private void addAllWithFilter(Map<String, String> toMap, Map<String, String> fromMap, IncludeExcludePatterns pattern) {
for (Object o : fromMap.entrySet()) {
Map.Entry entry = (Map.Entry) o;
String key = (String) entry.getKey();
if (PatternMatcher.pathConflicts(key, pattern))... | [
"private",
"void",
"addAllWithFilter",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"toMap",
",",
"Map",
"<",
"String",
",",
"String",
">",
"fromMap",
",",
"IncludeExcludePatterns",
"pattern",
")",
"{",
"for",
"(",
"Object",
"o",
":",
"fromMap",
".",
"... | Adds all pairs from 'fromMap' to 'toMap' excluding once that matching the pattern | [
"Adds",
"all",
"pairs",
"from",
"fromMap",
"to",
"toMap",
"excluding",
"once",
"that",
"matching",
"the",
"pattern"
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/pipeline/common/types/buildInfo/Env.java#L63-L72 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/util/converters/DeployerResolverOverriderConverter.java | DeployerResolverOverriderConverter.credentialsMigration | public void credentialsMigration(T overrider, Class overriderClass) {
try {
deployerMigration(overrider, overriderClass);
resolverMigration(overrider, overriderClass);
} catch (NoSuchFieldException | IllegalAccessException | IOException e) {
converterErrors.add(getCon... | java | public void credentialsMigration(T overrider, Class overriderClass) {
try {
deployerMigration(overrider, overriderClass);
resolverMigration(overrider, overriderClass);
} catch (NoSuchFieldException | IllegalAccessException | IOException e) {
converterErrors.add(getCon... | [
"public",
"void",
"credentialsMigration",
"(",
"T",
"overrider",
",",
"Class",
"overriderClass",
")",
"{",
"try",
"{",
"deployerMigration",
"(",
"overrider",
",",
"overriderClass",
")",
";",
"resolverMigration",
"(",
"overrider",
",",
"overriderClass",
")",
";",
... | Migrate to Jenkins "Credentials" plugin from the old credential implementation | [
"Migrate",
"to",
"Jenkins",
"Credentials",
"plugin",
"from",
"the",
"old",
"credential",
"implementation"
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/util/converters/DeployerResolverOverriderConverter.java#L72-L79 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/util/converters/DeployerResolverOverriderConverter.java | DeployerResolverOverriderConverter.createInitialResolveDetailsFromDeployDetails | private ServerDetails createInitialResolveDetailsFromDeployDetails(ServerDetails deployerDetails) {
RepositoryConf oldResolveRepositoryConfig = deployerDetails.getResolveReleaseRepository();
RepositoryConf oldSnapshotResolveRepositoryConfig = deployerDetails.getResolveSnapshotRepository();
Repos... | java | private ServerDetails createInitialResolveDetailsFromDeployDetails(ServerDetails deployerDetails) {
RepositoryConf oldResolveRepositoryConfig = deployerDetails.getResolveReleaseRepository();
RepositoryConf oldSnapshotResolveRepositoryConfig = deployerDetails.getResolveSnapshotRepository();
Repos... | [
"private",
"ServerDetails",
"createInitialResolveDetailsFromDeployDetails",
"(",
"ServerDetails",
"deployerDetails",
")",
"{",
"RepositoryConf",
"oldResolveRepositoryConfig",
"=",
"deployerDetails",
".",
"getResolveReleaseRepository",
"(",
")",
";",
"RepositoryConf",
"oldSnapshot... | Creates a new ServerDetails object for resolver, this will take URL and name from the deployer ServerDetails as a default behaviour | [
"Creates",
"a",
"new",
"ServerDetails",
"object",
"for",
"resolver",
"this",
"will",
"take",
"URL",
"and",
"name",
"from",
"the",
"deployer",
"ServerDetails",
"as",
"a",
"default",
"behaviour"
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/util/converters/DeployerResolverOverriderConverter.java#L181-L188 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/util/converters/DeployerResolverOverriderConverter.java | DeployerResolverOverriderConverter.createInitialDeployDetailsFromOldDeployDetails | private ServerDetails createInitialDeployDetailsFromOldDeployDetails(ServerDetails oldDeployerDetails) {
RepositoryConf oldDeployRepositoryConfig = oldDeployerDetails.getDeployReleaseRepository();
RepositoryConf oldSnapshotDeployRepositoryConfig = oldDeployerDetails.getDeploySnapshotRepository();
... | java | private ServerDetails createInitialDeployDetailsFromOldDeployDetails(ServerDetails oldDeployerDetails) {
RepositoryConf oldDeployRepositoryConfig = oldDeployerDetails.getDeployReleaseRepository();
RepositoryConf oldSnapshotDeployRepositoryConfig = oldDeployerDetails.getDeploySnapshotRepository();
... | [
"private",
"ServerDetails",
"createInitialDeployDetailsFromOldDeployDetails",
"(",
"ServerDetails",
"oldDeployerDetails",
")",
"{",
"RepositoryConf",
"oldDeployRepositoryConfig",
"=",
"oldDeployerDetails",
".",
"getDeployReleaseRepository",
"(",
")",
";",
"RepositoryConf",
"oldSn... | Creates a new ServerDetails object for deployer, this will take URL and name from the oldDeployer ServerDetails | [
"Creates",
"a",
"new",
"ServerDetails",
"object",
"for",
"deployer",
"this",
"will",
"take",
"URL",
"and",
"name",
"from",
"the",
"oldDeployer",
"ServerDetails"
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/util/converters/DeployerResolverOverriderConverter.java#L193-L200 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/util/PropertyUtils.java | PropertyUtils.loadGradleProperties | private static Properties loadGradleProperties(FilePath gradlePropertiesFilePath)
throws IOException, InterruptedException {
return gradlePropertiesFilePath.act(new MasterToSlaveFileCallable<Properties>() {
public Properties invoke(File gradlePropertiesFile, VirtualChannel channel) throw... | java | private static Properties loadGradleProperties(FilePath gradlePropertiesFilePath)
throws IOException, InterruptedException {
return gradlePropertiesFilePath.act(new MasterToSlaveFileCallable<Properties>() {
public Properties invoke(File gradlePropertiesFile, VirtualChannel channel) throw... | [
"private",
"static",
"Properties",
"loadGradleProperties",
"(",
"FilePath",
"gradlePropertiesFilePath",
")",
"throws",
"IOException",
",",
"InterruptedException",
"{",
"return",
"gradlePropertiesFilePath",
".",
"act",
"(",
"new",
"MasterToSlaveFileCallable",
"<",
"Propertie... | Load a properties file from a file path
@param gradlePropertiesFilePath The file path where the gradle.properties is located.
@return The loaded properties.
@throws IOException In case an error occurs while reading the properties file, this exception is thrown. | [
"Load",
"a",
"properties",
"file",
"from",
"a",
"file",
"path"
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/util/PropertyUtils.java#L81-L104 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/pipeline/common/docker/DockerImage.java | DockerImage.generateBuildInfoModule | public Module generateBuildInfoModule(Run build, TaskListener listener, ArtifactoryConfigurator config, String buildName, String buildNumber, String timestamp) throws IOException {
if (artifactsProps == null) {
artifactsProps = ArrayListMultimap.create();
}
artifactsProps.put("build.... | java | public Module generateBuildInfoModule(Run build, TaskListener listener, ArtifactoryConfigurator config, String buildName, String buildNumber, String timestamp) throws IOException {
if (artifactsProps == null) {
artifactsProps = ArrayListMultimap.create();
}
artifactsProps.put("build.... | [
"public",
"Module",
"generateBuildInfoModule",
"(",
"Run",
"build",
",",
"TaskListener",
"listener",
",",
"ArtifactoryConfigurator",
"config",
",",
"String",
"buildName",
",",
"String",
"buildNumber",
",",
"String",
"timestamp",
")",
"throws",
"IOException",
"{",
"i... | Generates the build-info module for this docker image.
Additionally. this method tags the deployed docker layers with properties,
such as build.name, build.number and custom properties defined in the Jenkins build.
@param build
@param listener
@param config
@param buildName
@param buildNumber
@param timestamp
@return
@... | [
"Generates",
"the",
"build",
"-",
"info",
"module",
"for",
"this",
"docker",
"image",
".",
"Additionally",
".",
"this",
"method",
"tags",
"the",
"deployed",
"docker",
"layers",
"with",
"properties",
"such",
"as",
"build",
".",
"name",
"build",
".",
"number",... | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/pipeline/common/docker/DockerImage.java#L115-L169 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/pipeline/common/docker/DockerImage.java | DockerImage.findAndSetManifestFromArtifactory | private boolean findAndSetManifestFromArtifactory(ArtifactoryServer server, ArtifactoryDependenciesClient dependenciesClient, TaskListener listener) throws IOException {
String candidateImagePath = DockerUtils.getImagePath(imageTag);
String manifestPath;
// Try to get manifest, assuming reverse... | java | private boolean findAndSetManifestFromArtifactory(ArtifactoryServer server, ArtifactoryDependenciesClient dependenciesClient, TaskListener listener) throws IOException {
String candidateImagePath = DockerUtils.getImagePath(imageTag);
String manifestPath;
// Try to get manifest, assuming reverse... | [
"private",
"boolean",
"findAndSetManifestFromArtifactory",
"(",
"ArtifactoryServer",
"server",
",",
"ArtifactoryDependenciesClient",
"dependenciesClient",
",",
"TaskListener",
"listener",
")",
"throws",
"IOException",
"{",
"String",
"candidateImagePath",
"=",
"DockerUtils",
"... | Find and validate manifest.json file in Artifactory for the current image.
Since provided imageTag differs between reverse-proxy and proxy-less configuration, try to build the correct manifest path.
@param server
@param dependenciesClient
@param listener
@return
@throws IOException | [
"Find",
"and",
"validate",
"manifest",
".",
"json",
"file",
"in",
"Artifactory",
"for",
"the",
"current",
"image",
".",
"Since",
"provided",
"imageTag",
"differs",
"between",
"reverse",
"-",
"proxy",
"and",
"proxy",
"-",
"less",
"configuration",
"try",
"to",
... | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/pipeline/common/docker/DockerImage.java#L180-L200 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/pipeline/common/docker/DockerImage.java | DockerImage.checkAndSetManifestAndImagePathCandidates | private boolean checkAndSetManifestAndImagePathCandidates(String manifestPath, String candidateImagePath, ArtifactoryDependenciesClient dependenciesClient, TaskListener listener) throws IOException {
String candidateManifest = getManifestFromArtifactory(dependenciesClient, manifestPath);
if (candidateMa... | java | private boolean checkAndSetManifestAndImagePathCandidates(String manifestPath, String candidateImagePath, ArtifactoryDependenciesClient dependenciesClient, TaskListener listener) throws IOException {
String candidateManifest = getManifestFromArtifactory(dependenciesClient, manifestPath);
if (candidateMa... | [
"private",
"boolean",
"checkAndSetManifestAndImagePathCandidates",
"(",
"String",
"manifestPath",
",",
"String",
"candidateImagePath",
",",
"ArtifactoryDependenciesClient",
"dependenciesClient",
",",
"TaskListener",
"listener",
")",
"throws",
"IOException",
"{",
"String",
"ca... | Check if the provided manifestPath is correct.
Set the manifest and imagePath in case of the correct manifest.
@param manifestPath
@param candidateImagePath
@param dependenciesClient
@param listener
@return true if found the correct manifest
@throws IOException | [
"Check",
"if",
"the",
"provided",
"manifestPath",
"is",
"correct",
".",
"Set",
"the",
"manifest",
"and",
"imagePath",
"in",
"case",
"of",
"the",
"correct",
"manifest",
"."
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/pipeline/common/docker/DockerImage.java#L212-L227 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/pipeline/common/types/buildInfo/BuildInfo.java | BuildInfo.getBuildFilesList | private List<org.jfrog.hudson.pipeline.types.File> getBuildFilesList(Stream<? extends BaseBuildFileBean> buildFilesStream) {
return buildFilesStream
.filter(buildFile -> StringUtils.isNotBlank(buildFile.getLocalPath()))
.filter(buildFile -> StringUtils.isNotBlank(buildFile.getRem... | java | private List<org.jfrog.hudson.pipeline.types.File> getBuildFilesList(Stream<? extends BaseBuildFileBean> buildFilesStream) {
return buildFilesStream
.filter(buildFile -> StringUtils.isNotBlank(buildFile.getLocalPath()))
.filter(buildFile -> StringUtils.isNotBlank(buildFile.getRem... | [
"private",
"List",
"<",
"org",
".",
"jfrog",
".",
"hudson",
".",
"pipeline",
".",
"types",
".",
"File",
">",
"getBuildFilesList",
"(",
"Stream",
"<",
"?",
"extends",
"BaseBuildFileBean",
">",
"buildFilesStream",
")",
"{",
"return",
"buildFilesStream",
".",
"... | Return a list of 'Files' of downloaded or uploaded files. Filters build files without local and remote paths.
@param buildFilesStream - Stream of build Artifacts or Dependencies.
@return - List of build files. | [
"Return",
"a",
"list",
"of",
"Files",
"of",
"downloaded",
"or",
"uploaded",
"files",
".",
"Filters",
"build",
"files",
"without",
"local",
"and",
"remote",
"paths",
"."
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/pipeline/common/types/buildInfo/BuildInfo.java#L126-L133 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/ArtifactoryServer.java | ArtifactoryServer.getConnectionRetries | public List<Integer> getConnectionRetries() {
List<Integer> items = new ArrayList<Integer>();
for (int i = 0; i < 10; i++) {
items.add(i);
}
return items;
} | java | public List<Integer> getConnectionRetries() {
List<Integer> items = new ArrayList<Integer>();
for (int i = 0; i < 10; i++) {
items.add(i);
}
return items;
} | [
"public",
"List",
"<",
"Integer",
">",
"getConnectionRetries",
"(",
")",
"{",
"List",
"<",
"Integer",
">",
"items",
"=",
"new",
"ArrayList",
"<",
"Integer",
">",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"10",
";",
"i",
"++"... | To populate the dropdown list from the jelly | [
"To",
"populate",
"the",
"dropdown",
"list",
"from",
"the",
"jelly"
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/ArtifactoryServer.java#L127-L133 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/ArtifactoryServer.java | ArtifactoryServer.getResolvingCredentialsConfig | public CredentialsConfig getResolvingCredentialsConfig() {
if (resolverCredentialsConfig != null && resolverCredentialsConfig.isCredentialsProvided()) {
return getResolverCredentialsConfig();
}
if (deployerCredentialsConfig != null) {
return getDeployerCredentialsConfig()... | java | public CredentialsConfig getResolvingCredentialsConfig() {
if (resolverCredentialsConfig != null && resolverCredentialsConfig.isCredentialsProvided()) {
return getResolverCredentialsConfig();
}
if (deployerCredentialsConfig != null) {
return getDeployerCredentialsConfig()... | [
"public",
"CredentialsConfig",
"getResolvingCredentialsConfig",
"(",
")",
"{",
"if",
"(",
"resolverCredentialsConfig",
"!=",
"null",
"&&",
"resolverCredentialsConfig",
".",
"isCredentialsProvided",
"(",
")",
")",
"{",
"return",
"getResolverCredentialsConfig",
"(",
")",
... | Decides what are the preferred credentials to use for resolving the repo keys of the server
@return Preferred credentials for repo resolving. Never null. | [
"Decides",
"what",
"are",
"the",
"preferred",
"credentials",
"to",
"use",
"for",
"resolving",
"the",
"repo",
"keys",
"of",
"the",
"server"
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/ArtifactoryServer.java#L351-L360 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/release/maven/PomTransformer.java | PomTransformer.invoke | public Boolean invoke(File pomFile, VirtualChannel channel) throws IOException, InterruptedException {
org.jfrog.build.extractor.maven.reader.ModuleName current = new org.jfrog.build.extractor.maven.reader.ModuleName(
currentModule.groupId, currentModule.artifactId);
Map<org.jfrog.buil... | java | public Boolean invoke(File pomFile, VirtualChannel channel) throws IOException, InterruptedException {
org.jfrog.build.extractor.maven.reader.ModuleName current = new org.jfrog.build.extractor.maven.reader.ModuleName(
currentModule.groupId, currentModule.artifactId);
Map<org.jfrog.buil... | [
"public",
"Boolean",
"invoke",
"(",
"File",
"pomFile",
",",
"VirtualChannel",
"channel",
")",
"throws",
"IOException",
",",
"InterruptedException",
"{",
"org",
".",
"jfrog",
".",
"build",
".",
"extractor",
".",
"maven",
".",
"reader",
".",
"ModuleName",
"curre... | Performs the transformation.
@return True if the file was modified. | [
"Performs",
"the",
"transformation",
"."
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/release/maven/PomTransformer.java#L61-L77 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/release/scm/perforce/AbstractPerforceManager.java | AbstractPerforceManager.edit | public void edit(int currentChangeListId, FilePath filePath) throws Exception {
establishConnection().editFile(currentChangeListId, new File(filePath.getRemote()));
} | java | public void edit(int currentChangeListId, FilePath filePath) throws Exception {
establishConnection().editFile(currentChangeListId, new File(filePath.getRemote()));
} | [
"public",
"void",
"edit",
"(",
"int",
"currentChangeListId",
",",
"FilePath",
"filePath",
")",
"throws",
"Exception",
"{",
"establishConnection",
"(",
")",
".",
"editFile",
"(",
"currentChangeListId",
",",
"new",
"File",
"(",
"filePath",
".",
"getRemote",
"(",
... | Opens file for editing.
@param currentChangeListId The current change list id to open the file for editing at
@param filePath The filePath which contains the file we need to edit
@throws IOException Thrown in case of perforce communication errors
@throws InterruptedException | [
"Opens",
"file",
"for",
"editing",
"."
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/release/scm/perforce/AbstractPerforceManager.java#L98-L100 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/pipeline/common/executors/MavenExecutor.java | MavenExecutor.convertJdkPath | private void convertJdkPath(Launcher launcher, EnvVars extendedEnv) {
String separator = launcher.isUnix() ? "/" : "\\";
String java_home = extendedEnv.get("JAVA_HOME");
if (StringUtils.isNotEmpty(java_home)) {
if (!StringUtils.endsWith(java_home, separator)) {
java_h... | java | private void convertJdkPath(Launcher launcher, EnvVars extendedEnv) {
String separator = launcher.isUnix() ? "/" : "\\";
String java_home = extendedEnv.get("JAVA_HOME");
if (StringUtils.isNotEmpty(java_home)) {
if (!StringUtils.endsWith(java_home, separator)) {
java_h... | [
"private",
"void",
"convertJdkPath",
"(",
"Launcher",
"launcher",
",",
"EnvVars",
"extendedEnv",
")",
"{",
"String",
"separator",
"=",
"launcher",
".",
"isUnix",
"(",
")",
"?",
"\"/\"",
":",
"\"\\\\\"",
";",
"String",
"java_home",
"=",
"extendedEnv",
".",
"g... | The Maven3Builder class is looking for the PATH+JDK environment variable due to legacy code.
In The pipeline flow we need to convert the JAVA_HOME to PATH+JDK in order to reuse the code. | [
"The",
"Maven3Builder",
"class",
"is",
"looking",
"for",
"the",
"PATH",
"+",
"JDK",
"environment",
"variable",
"due",
"to",
"legacy",
"code",
".",
"In",
"The",
"pipeline",
"flow",
"we",
"need",
"to",
"convert",
"the",
"JAVA_HOME",
"to",
"PATH",
"+",
"JDK",... | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/pipeline/common/executors/MavenExecutor.java#L84-L93 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/util/BuildUniqueIdentifierHelper.java | BuildUniqueIdentifierHelper.getRootBuild | public static AbstractBuild<?, ?> getRootBuild(AbstractBuild<?, ?> currentBuild) {
AbstractBuild<?, ?> rootBuild = null;
AbstractBuild<?, ?> parentBuild = getUpstreamBuild(currentBuild);
while (parentBuild != null) {
if (isPassIdentifiedDownstream(parentBuild)) {
root... | java | public static AbstractBuild<?, ?> getRootBuild(AbstractBuild<?, ?> currentBuild) {
AbstractBuild<?, ?> rootBuild = null;
AbstractBuild<?, ?> parentBuild = getUpstreamBuild(currentBuild);
while (parentBuild != null) {
if (isPassIdentifiedDownstream(parentBuild)) {
root... | [
"public",
"static",
"AbstractBuild",
"<",
"?",
",",
"?",
">",
"getRootBuild",
"(",
"AbstractBuild",
"<",
"?",
",",
"?",
">",
"currentBuild",
")",
"{",
"AbstractBuild",
"<",
"?",
",",
"?",
">",
"rootBuild",
"=",
"null",
";",
"AbstractBuild",
"<",
"?",
"... | Get the root build which triggered the current build. The build root is considered to be the one furthest one
away from the current build which has the isPassIdentifiedDownstream active, if no parent build exists, check
that the current build needs an upstream identifier, if it does return it.
@param currentBuild The ... | [
"Get",
"the",
"root",
"build",
"which",
"triggered",
"the",
"current",
"build",
".",
"The",
"build",
"root",
"is",
"considered",
"to",
"be",
"the",
"one",
"furthest",
"one",
"away",
"from",
"the",
"current",
"build",
"which",
"has",
"the",
"isPassIdentifiedD... | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/util/BuildUniqueIdentifierHelper.java#L35-L48 | train |
jenkinsci/artifactory-plugin | src/main/java/org/jfrog/hudson/util/BuildUniqueIdentifierHelper.java | BuildUniqueIdentifierHelper.getProject | private static AbstractProject<?, ?> getProject(String fullName) {
Item item = Hudson.getInstance().getItemByFullName(fullName);
if (item != null && item instanceof AbstractProject) {
return (AbstractProject<?, ?>) item;
}
return null;
} | java | private static AbstractProject<?, ?> getProject(String fullName) {
Item item = Hudson.getInstance().getItemByFullName(fullName);
if (item != null && item instanceof AbstractProject) {
return (AbstractProject<?, ?>) item;
}
return null;
} | [
"private",
"static",
"AbstractProject",
"<",
"?",
",",
"?",
">",
"getProject",
"(",
"String",
"fullName",
")",
"{",
"Item",
"item",
"=",
"Hudson",
".",
"getInstance",
"(",
")",
".",
"getItemByFullName",
"(",
"fullName",
")",
";",
"if",
"(",
"item",
"!=",... | Get a project according to its full name.
@param fullName The full name of the project.
@return The project which answers the full name. | [
"Get",
"a",
"project",
"according",
"to",
"its",
"full",
"name",
"."
] | f5fcfff6a5a50be5374813e49d1fe3aaf6422333 | https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/util/BuildUniqueIdentifierHelper.java#L75-L81 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.