Skip to content

Commit

Permalink
Enable Spotless for code formatting (#720)
Browse files Browse the repository at this point in the history
  • Loading branch information
basil authored Apr 9, 2023
1 parent 1db3d49 commit d681731
Show file tree
Hide file tree
Showing 179 changed files with 1,541 additions and 1,521 deletions.
Empty file added .mvn_exec_spotless
Empty file.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
buildPlugin(timeout: 90, useContainerAgent: true, configurations: [
buildPlugin(timeout: 120, useContainerAgent: true, configurations: [
[platform: 'linux', jdk: 17],
])
Empty file.
315 changes: 154 additions & 161 deletions build-monitor-acceptance/pom.xml
Original file line number Diff line number Diff line change
@@ -1,169 +1,162 @@
<?xml version="1.0" encoding="UTF-8"?>
<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>
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>build-monitor</artifactId>
<version>${revision}-${changelist}</version>
</parent>
<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>
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>build-monitor</artifactId>
<version>${revision}-${changelist}</version>
</parent>

<artifactId>build-monitor-acceptance</artifactId>
<packaging>jar</packaging>
<artifactId>build-monitor-acceptance</artifactId>
<packaging>jar</packaging>
<name>Build Monitor Acceptance Tests</name>

<name>Build Monitor Acceptance Tests</name>

<properties>
<serenity.version>3.6.22</serenity.version>
<slf4j.version>2.0.7</slf4j.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-bom</artifactId>
<version>11.0.14</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.10.1</version>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>5.1.0</version>
</dependency>
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.4.20</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.14</version>
</dependency>
<dependency>
<groupId>org.objenesis</groupId>
<artifactId>objenesis</artifactId>
<version>3.3</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<properties>
<serenity.version>3.6.22</serenity.version>
<slf4j.version>2.0.7</slf4j.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>cli</artifactId>
<version>${jenkins.version}</version>
</dependency>

<!-- serenity -->
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-core</artifactId>
<version>${serenity.version}</version>
<exclusions>
<exclusion>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-screenplay</artifactId>
<version>${serenity.version}</version>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-screenplay-webdriver</artifactId>
<version>${serenity.version}</version>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-junit</artifactId>
<version>${serenity.version}</version>
<scope>test</scope>
</dependency>
<!-- / serenity -->

<dependency>
<groupId>org.jdeferred</groupId>
<artifactId>jdeferred-core</artifactId>
<version>1.2.6</version>
</dependency>

<dependency>
<groupId>com.github.zafarkhaja</groupId>
<artifactId>java-semver</artifactId>
<version>0.9.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-bom</artifactId>
<version>11.0.14</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.10.1</version>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>5.1.0</version>
</dependency>
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.4.20</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.14</version>
</dependency>
<dependency>
<groupId>org.objenesis</groupId>
<artifactId>objenesis</artifactId>
<version>3.3</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>com.github.zafarkhaja</groupId>
<artifactId>java-semver</artifactId>
<version>0.9.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-core</artifactId>
<version>${serenity.version}</version>
<exclusions>
<exclusion>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-screenplay</artifactId>
<version>${serenity.version}</version>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-screenplay-webdriver</artifactId>
<version>${serenity.version}</version>
</dependency>
<dependency>
<groupId>org.jdeferred</groupId>
<artifactId>jdeferred-core</artifactId>
<version>1.2.6</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>cli</artifactId>
<version>${jenkins.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-junit</artifactId>
<version>${serenity.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>**/*UnitTest.java</include>
<include>**/features/*Test.java</include>
<include>**/features/*Should*.java</include>
</includes>
<systemPropertyVariables>
<jenkins.version>${jenkins.version}</jenkins.version>
<project.root>../</project.root>
<settings.localRepository>${settings.localRepository}</settings.localRepository>
<wdm.chromeDriverVersion>110</wdm.chromeDriverVersion>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<groupId>net.serenity-bdd.maven.plugins</groupId>
<artifactId>serenity-maven-plugin</artifactId>
<version>${serenity.version}</version>
<executions>
<execution>
<id>serenity-reports</id>
<phase>post-integration-test</phase>
<goals>
<goal>aggregate</goal>
</goals>
<configuration>
<generateOutcomes>true</generateOutcomes>
<outputDirectory>target/site/serenity</outputDirectory>
<sourceDirectory>target/site/serenity</sourceDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>**/*UnitTest.java</include>
<include>**/features/*Test.java</include>
<include>**/features/*Should*.java</include>
</includes>
<systemPropertyVariables>
<jenkins.version>${jenkins.version}</jenkins.version>
<project.root>../</project.root>
<settings.localRepository>${settings.localRepository}</settings.localRepository>
<wdm.chromeDriverVersion>110</wdm.chromeDriverVersion>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<groupId>net.serenity-bdd.maven.plugins</groupId>
<artifactId>serenity-maven-plugin</artifactId>
<version>${serenity.version}</version>
<executions>
<execution>
<id>serenity-reports</id>
<goals>
<goal>aggregate</goal>
</goals>
<phase>post-integration-test</phase>
<configuration>
<generateOutcomes>true</generateOutcomes>
<outputDirectory>target/site/serenity</outputDirectory>
<sourceDirectory>target/site/serenity</sourceDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ public Task andInsideIt(Task... createProjects) {
@Step("{0} creates and configures the '#name' folder")
@Override
public <T extends Actor> void performAs(T actor) {
actor.attemptsTo(
CreateAFolder.called(name),
configurationTasks
);
actor.attemptsTo(CreateAFolder.called(name), configurationTasks);
}

public HaveAFolderCreated(String name) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ public static Task called(String name) {
@Step("{0} creates the '#projectName' project")
@Override
public <T extends Actor> void performAs(T actor) {
actor.attemptsTo(
CreateAFreestyleProject.called(projectName),
Click.on(FolderDetailsPage.Up_Link)
);
actor.attemptsTo(CreateAFreestyleProject.called(projectName), Click.on(FolderDetailsPage.Up_Link));
}

public HaveANestedProjectCreated(String projectName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,12 @@ public <T extends Actor> void performAs(T actor) {
Click.on(SidePanel.New_Item_Link),
Choose.the(NewJobPage.Folder),
Enter.theValue(name).into(NewJobPage.Item_Name_Field).thenHit(Keys.ENTER),
Click.on(Buttons.Save)
);
Click.on(Buttons.Save));
}

public CreateAFolder(String jobName) {
this.name = jobName;
}

private final String name;
}
private final String name;
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ public List<ProjectStatus> status() {

@Override
public String toString() {
return String.format("ProjectInformation{name=%s, status={%s}}", name, status.stream().map(Object::toString).collect(Collectors.joining(", ")));
return String.format(
"ProjectInformation{name=%s, status={%s}}",
name, status.stream().map(Object::toString).collect(Collectors.joining(", ")));
}
}
Loading

0 comments on commit d681731

Please sign in to comment.