Skip to content

Commit

Permalink
[FIXED JENKINS-37388] Add @symbol("ant") to descriptors
Browse files Browse the repository at this point in the history
Originally intended to add to the ToolDescriptor, but while I was
here, might as well add it to the build step descriptor too!
  • Loading branch information
abayer committed Aug 13, 2016
1 parent 3944e15 commit 62c8c55
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions pom.xml
Expand Up @@ -32,6 +32,11 @@
</properties>

<dependencies>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>structs</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>matrix-project</artifactId>
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/hudson/tasks/Ant.java
Expand Up @@ -53,6 +53,7 @@
import hudson.util.FormValidation;
import hudson.util.XStream2;

import org.jenkinsci.Symbol;
import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.QueryParameter;

Expand Down Expand Up @@ -295,7 +296,7 @@ public DescriptorImpl getDescriptor() {
return (DescriptorImpl)super.getDescriptor();
}

@Extension
@Extension @Symbol("ant")
public static class DescriptorImpl extends BuildStepDescriptor<Builder> {
@CopyOnWrite
private volatile AntInstallation[] installations = new AntInstallation[0];
Expand Down Expand Up @@ -417,7 +418,7 @@ public AntInstallation forNode(Node node, TaskListener log) throws IOException,
return new AntInstallation(getName(), translateFor(node, log), getProperties().toList());
}

@Extension
@Extension @Symbol("ant")
@SuppressFBWarnings(value="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE", justification="https://github.com/jenkinsci/jenkins/pull/2094")
public static class DescriptorImpl extends ToolDescriptor<AntInstallation> {

Expand Down

0 comments on commit 62c8c55

Please sign in to comment.