Skip to content

Commit

Permalink
Merge pull request #120 from jenkinsci/gm/spotless
Browse files Browse the repository at this point in the history
Formatting cleanup only, using spotless. No funtional code changes
  • Loading branch information
gmcdonald authored Nov 21, 2024
2 parents a17e7f2 + 988d798 commit b87587a
Show file tree
Hide file tree
Showing 36 changed files with 712 additions and 486 deletions.
Binary file added .DS_Store
Binary file not shown.
258 changes: 129 additions & 129 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,146 +22,146 @@
~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
~ THE SOFTWARE.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>4.70</version>
<relativePath />
</parent>
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>4.70</version>
<relativePath />
</parent>

<artifactId>publish-over-ftp</artifactId>
<packaging>hpi</packaging>
<name>Publish Over FTP</name>
<version>1.18-SNAPSHOT</version>
<description>Send build artifacts over FTP</description>
<url>https://github.com/jenkinsci/${project.artifactId}-plugin</url>
<artifactId>publish-over-ftp</artifactId>
<version>1.18-SNAPSHOT</version>
<packaging>hpi</packaging>
<name>Publish Over FTP</name>
<description>Send build artifacts over FTP</description>
<url>https://github.com/jenkinsci/${project.artifactId}-plugin</url>

<properties>
<spotbugs.skip>true</spotbugs.skip>
<revision>1.17</revision>
<changelist>-SNAPSHOT</changelist>
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>
<jenkins.version>2.361.4</jenkins.version>
</properties>
<licenses>
<license>
<name>The MIT license</name>
<url>https://opensource.org/license/mit/</url>
<comments>All source code is under the MIT license.</comments>
</license>
</licenses>

<licenses>
<license>
<name>The MIT license</name>
<comments>All source code is under the MIT license.</comments>
<url>https://opensource.org/license/mit/</url>
</license>
</licenses>
<developers>
<developer>
<id>slide_o_mix</id>
<name>Alex Earl</name>
<email>[email protected]</email>
</developer>
<developer>
<id>bap</id>
<name>Bap</name>
<email>[email protected]</email>
</developer>
</developers>

<developers>
<developer>
<id>slide_o_mix</id>
<name>Alex Earl</name>
<email>[email protected]</email>
</developer>
<developer>
<id>bap</id>
<name>Bap</name>
<email>[email protected]</email>
</developer>
</developers>
<scm>
<connection>scm:git:git://github.com/jenkinsci/publish-over-ftp-plugin.git</connection>
<developerConnection>scm:git:[email protected]:jenkinsci/publish-over-ftp-plugin.git</developerConnection>
<tag>HEAD</tag>
<url>https://github.com/jenkinsci/publish-over-ftp-plugin</url>
</scm>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.361.x</artifactId>
<version>2102.v854b_fec19c92</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
<issueManagement>
<system>JIRA</system>
<url>http://issues.jenkins-ci.org/</url>
</issueManagement>

<dependencies>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>publish-over</artifactId>
<version>0.22</version>
</dependency>
<dependency>
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId>
<version>3.9.0</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>structs</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>3.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymockclassextension</artifactId>
<version>3.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<distributionManagement>
<repository>
<id>maven.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/releases</url>
</repository>
</distributionManagement>

<scm>
<url>https://github.com/jenkinsci/publish-over-ftp-plugin</url>
<connection>scm:git:git://github.com/jenkinsci/publish-over-ftp-plugin.git</connection>
<developerConnection>scm:git:[email protected]:jenkinsci/publish-over-ftp-plugin.git</developerConnection>
<tag>HEAD</tag>
</scm>
<properties>
<spotbugs.skip>true</spotbugs.skip>
<revision>1.17</revision>
<changelist>-SNAPSHOT</changelist>
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>
<jenkins.version>2.361.4</jenkins.version>
<spotless.check.skip>false</spotless.check.skip>
</properties>

<issueManagement>
<system>JIRA</system>
<url>http://issues.jenkins-ci.org/</url>
</issueManagement>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.361.x</artifactId>
<version>2102.v854b_fec19c92</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<distributionManagement>
<repository>
<id>maven.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/releases</url>
</repository>
</distributionManagement>
<dependencies>
<dependency>
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId>
<version>3.9.0</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>publish-over</artifactId>
<version>0.22</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>structs</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>3.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymockclassextension</artifactId>
<version>3.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

<repositories>
<repository>
<id>repo.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/public/</url>
</repository>
</repositories>
<repositories>
<repository>
<id>repo.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/public/</url>
</repository>
</repositories>

<pluginRepositories>
<pluginRepository>
<id>repo.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/public/</url>
</pluginRepository>
</pluginRepositories>
<pluginRepositories>
<pluginRepository>
<id>repo.jenkins-ci.org</id>
<url>https://repo.jenkins-ci.org/public/</url>
</pluginRepository>
</pluginRepositories>
</project>
26 changes: 16 additions & 10 deletions src/main/java/jenkins/plugins/publish_over_ftp/BapFtpBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
import hudson.model.BuildListener;
import hudson.tasks.BuildStepDescriptor;
import hudson.tasks.Builder;
import java.io.IOException;
import java.util.ArrayList;
import jenkins.model.Jenkins;
import jenkins.plugins.publish_over.BPPlugin;
import org.apache.commons.lang.builder.EqualsBuilder;
Expand All @@ -39,19 +41,21 @@
import org.apache.commons.lang.builder.ToStringStyle;
import org.kohsuke.stapler.DataBoundConstructor;

import java.io.IOException;
import java.util.ArrayList;

@SuppressWarnings("PMD.LooseCoupling") // serializable
public class BapFtpBuilder extends Builder {

private final BapFtpPublisherPlugin delegate;

@DataBoundConstructor
public BapFtpBuilder(final ArrayList<BapFtpPublisher> publishers, final boolean continueOnError, final boolean failOnError,
final boolean alwaysPublishFromMaster, final String masterNodeName, final BapFtpParamPublish paramPublish) {
this.delegate = new BapFtpPublisherPlugin(publishers, continueOnError, failOnError, alwaysPublishFromMaster, masterNodeName,
paramPublish);
public BapFtpBuilder(
final ArrayList<BapFtpPublisher> publishers,
final boolean continueOnError,
final boolean failOnError,
final boolean alwaysPublishFromMaster,
final String masterNodeName,
final BapFtpParamPublish paramPublish) {
this.delegate = new BapFtpPublisherPlugin(
publishers, continueOnError, failOnError, alwaysPublishFromMaster, masterNodeName, paramPublish);
}

public BapFtpPublisherPlugin getDelegate() {
Expand All @@ -60,7 +64,7 @@ public BapFtpPublisherPlugin getDelegate() {

@Override
public boolean perform(final AbstractBuild<?, ?> build, final Launcher launcher, final BuildListener listener)
throws InterruptedException, IOException {
throws InterruptedException, IOException {
return delegate.perform(build, launcher, listener);
}

Expand Down Expand Up @@ -88,20 +92,22 @@ public int hashCode() {
}

public String toString() {
return addToToString(new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)).toString();
return addToToString(new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE))
.toString();

Check warning on line 96 in src/main/java/jenkins/plugins/publish_over_ftp/BapFtpBuilder.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Not covered lines

Lines 56-96 are not covered by tests
}

@Extension
public static class Descriptor extends BuildStepDescriptor<Builder> {
public boolean isApplicable(final Class<? extends AbstractProject> aClass) {
return !BPPlugin.PROMOTION_JOB_TYPE.equals(aClass.getCanonicalName());
}

public String getDisplayName() {
return Messages.builder_descriptor_displayName();
}

public BapFtpPublisherPlugin.Descriptor getPublisherDescriptor() {
return Jenkins.getInstance().getDescriptorByType(BapFtpPublisherPlugin.Descriptor.class);
}
}

}
Loading

0 comments on commit b87587a

Please sign in to comment.