Skip to content

Commit 92a888a

Browse files
committed
spaces => tabs
1 parent 3859a8a commit 92a888a

18 files changed

+200
-196
lines changed

build.gradle

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
plugins {
2-
id 'jacoco'
3-
id 'com.github.kt3k.coveralls' version '2.8.1'
4-
id 'java'
5-
id 'maven'
6-
id 'eclipse'
7-
id 'idea'
2+
id 'jacoco'
3+
id 'com.github.kt3k.coveralls' version '2.8.1'
4+
id 'java'
5+
id 'maven'
6+
id 'eclipse'
7+
id 'idea'
88
}
99

1010
repositories {
11-
maven { url "https://jitpack.io" }
12-
mavenCentral()
11+
maven { url "https://jitpack.io" }
12+
mavenCentral()
1313
}
1414

1515
configurations.compile {
16-
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
16+
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
1717
}
1818

1919
sourceCompatibility = JavaVersion.VERSION_1_8
@@ -23,26 +23,26 @@ group = 'org.scm4j'
2323
version = file('version').text.trim()
2424

2525
dependencies {
26-
compileOnly 'org.projectlombok:lombok:1.16.18'
26+
compileOnly 'org.projectlombok:lombok:1.16.18'
2727

28-
compile 'org.apache.commons:commons-lang3:3.5'
29-
compile 'org.apache.maven.resolver:maven-resolver-api:1.1.0'
28+
compile 'org.apache.commons:commons-lang3:3.5'
29+
compile 'org.apache.maven.resolver:maven-resolver-api:1.1.0'
3030

31-
testCompile 'junit:junit:4.12'
31+
testCompile 'junit:junit:4.12'
3232
}
3333

3434
jar {
35-
manifest.attributes (
36-
'Specification-Title': project.name,
37-
'Specification-Version': version.replaceAll(/-SNAPSHOT$/, ''),
38-
'Implementation-Title': project.name,
39-
'Implementation-Version': "$version (${new Date().format('yyyy-MM-dd')})",
40-
)
35+
manifest.attributes(
36+
'Specification-Title': project.name,
37+
'Specification-Version': version.replaceAll(/-SNAPSHOT$/, ''),
38+
'Implementation-Title': project.name,
39+
'Implementation-Version': "$version (${new Date().format('yyyy-MM-dd')})",
40+
)
4141
}
4242

4343
task sourcesJar(type: Jar, dependsOn: classes) {
44-
classifier = 'sources'
45-
from sourceSets.main.allSource
44+
classifier = 'sources'
45+
from sourceSets.main.allSource
4646
}
4747

4848
jacocoTestReport {
@@ -53,11 +53,11 @@ jacocoTestReport {
5353
}
5454

5555
task javadocJar(type: Jar, dependsOn: javadoc) {
56-
classifier = 'javadoc'
57-
from javadoc.destinationDir
56+
classifier = 'javadoc'
57+
from javadoc.destinationDir
5858
}
5959

6060
artifacts {
61-
archives sourcesJar
62-
archives javadocJar
61+
archives sourcesJar
62+
archives javadocJar
6363
}

src/main/java/org/scm4j/deployer/api/Component.java

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -8,45 +8,45 @@
88

99
public class Component implements IComponent {
1010

11-
@Getter
12-
private final Artifact artifactCoords;
13-
@Getter
14-
private IDeploymentProcedure deploymentProcedure;
15-
private final ProductStructure ps;
16-
17-
public Component(String coords, ProductStructure productStructure) {
18-
this.artifactCoords = new DefaultArtifact(coords);
19-
this.ps = productStructure;
20-
}
21-
22-
public Component addComponentDeployer(IComponentDeployer deployer) {
23-
if (this.deploymentProcedure == null)
24-
this.deploymentProcedure = new DeploymentProcedure(new ArrayList<>());
25-
this.deploymentProcedure.getComponentDeployers().add(deployer);
26-
return this;
27-
}
28-
29-
public ProductStructure parent() {
30-
return ps;
31-
}
32-
33-
@Override
34-
public String toString() {
35-
return "Component{artifactCoords=" + artifactCoords + '}';
36-
}
37-
38-
@Override
39-
public boolean equals(Object o) {
40-
if (this == o) return true;
41-
if (o == null || getClass() != o.getClass()) return false;
42-
43-
Component component = (Component) o;
44-
45-
return artifactCoords.equals(component.artifactCoords);
46-
}
47-
48-
@Override
49-
public int hashCode() {
50-
return artifactCoords.hashCode();
51-
}
11+
@Getter
12+
private final Artifact artifactCoords;
13+
private final ProductStructure ps;
14+
@Getter
15+
private IDeploymentProcedure deploymentProcedure;
16+
17+
public Component(String coords, ProductStructure productStructure) {
18+
this.artifactCoords = new DefaultArtifact(coords);
19+
this.ps = productStructure;
20+
}
21+
22+
public Component addComponentDeployer(IComponentDeployer deployer) {
23+
if (this.deploymentProcedure == null)
24+
this.deploymentProcedure = new DeploymentProcedure(new ArrayList<>());
25+
this.deploymentProcedure.getComponentDeployers().add(deployer);
26+
return this;
27+
}
28+
29+
public ProductStructure parent() {
30+
return ps;
31+
}
32+
33+
@Override
34+
public String toString() {
35+
return "Component{artifactCoords=" + artifactCoords + '}';
36+
}
37+
38+
@Override
39+
public boolean equals(Object o) {
40+
if (this == o) return true;
41+
if (o == null || getClass() != o.getClass()) return false;
42+
43+
Component component = (Component) o;
44+
45+
return artifactCoords.equals(component.artifactCoords);
46+
}
47+
48+
@Override
49+
public int hashCode() {
50+
return artifactCoords.hashCode();
51+
}
5252
}

src/main/java/org/scm4j/deployer/api/DeployedProduct.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
@Data
66
public class DeployedProduct implements IDeployedProduct {
77

8-
private String deploymentPath;
9-
private String productVersion;
10-
private IProductStructure productStructure;
8+
private String deploymentPath;
9+
private String productVersion;
10+
private IProductStructure productStructure;
1111

1212
}

src/main/java/org/scm4j/deployer/api/DeploymentContext.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@
88
@Data
99
public class DeploymentContext implements IDeploymentContext {
1010

11-
private final String mainArtifact;
12-
private Map<String, File> artifacts;
13-
private String deploymentPath;
11+
private final String mainArtifact;
12+
private Map<String, File> artifacts;
13+
private String deploymentPath;
1414

15-
public DeploymentContext(String mainArtifact) {
16-
this.mainArtifact = mainArtifact;
17-
}
15+
public DeploymentContext(String mainArtifact) {
16+
this.mainArtifact = mainArtifact;
17+
}
1818

19-
@Override
20-
public String toString() {
21-
return "DeploymentContext{" +
22-
"mainArtifact='" + mainArtifact + '\'' +
23-
'}';
24-
}
19+
@Override
20+
public String toString() {
21+
return "DeploymentContext{" +
22+
"mainArtifact='" + mainArtifact + '\'' +
23+
'}';
24+
}
2525
}

src/main/java/org/scm4j/deployer/api/DeploymentProcedure.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
@Data
88
public class DeploymentProcedure implements IDeploymentProcedure {
99

10-
private final List<IComponentDeployer> componentDeployers;
10+
private final List<IComponentDeployer> componentDeployers;
1111

1212
}

src/main/java/org/scm4j/deployer/api/DeploymentResult.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
import lombok.Setter;
55

66
public enum DeploymentResult {
7-
OK, NEWER_VERSION_EXISTS, NEED_REBOOT, INCOMPATIBLE_API_VERSION, ALREADY_INSTALLED, FAILED;
8-
@Getter
9-
@Setter
10-
private String productCoords;
7+
OK, NEWER_VERSION_EXISTS, NEED_REBOOT, INCOMPATIBLE_API_VERSION, ALREADY_INSTALLED, FAILED;
8+
@Getter
9+
@Setter
10+
private String productCoords;
1111
}

src/main/java/org/scm4j/deployer/api/IComponent.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import org.eclipse.aether.artifact.Artifact;
44

55
public interface IComponent {
6-
Artifact getArtifactCoords();
7-
IDeploymentProcedure getDeploymentProcedure();
6+
Artifact getArtifactCoords();
7+
8+
IDeploymentProcedure getDeploymentProcedure();
89
}

src/main/java/org/scm4j/deployer/api/IComponentDeployer.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@
22

33
public interface IComponentDeployer {
44

5-
DeploymentResult deploy();
5+
DeploymentResult deploy();
66

7-
DeploymentResult undeploy();
7+
DeploymentResult undeploy();
88

9-
/**
10-
* All running services should be stopped and removed, if not possible - disabled (this is a must)
11-
*
12-
* @return DeploymentResult.OK successful, DeploymentResult.NEED_REBOOT need restart
13-
*/
14-
DeploymentResult stop();
9+
/**
10+
* All running services should be stopped and removed, if not possible - disabled (this is a must)
11+
*
12+
* @return DeploymentResult.OK successful, DeploymentResult.NEED_REBOOT need restart
13+
*/
14+
DeploymentResult stop();
1515

16-
/**
17-
* Start component after upgrade and change startup type to automatic
18-
*
19-
* @return DeploymentResult.OK successful
20-
*/
21-
DeploymentResult start();
16+
/**
17+
* Start component after upgrade and change startup type to automatic
18+
*
19+
* @return DeploymentResult.OK successful
20+
*/
21+
DeploymentResult start();
2222

23-
void init(IDeploymentContext depCtx);
23+
void init(IDeploymentContext depCtx);
2424
}

src/main/java/org/scm4j/deployer/api/IDeployedProduct.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
public interface IDeployedProduct extends IProduct {
44

5-
String getDeploymentPath();
6-
String getProductVersion();
5+
String getDeploymentPath();
6+
7+
String getProductVersion();
78

89
}

src/main/java/org/scm4j/deployer/api/IDeploymentContext.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55

66
public interface IDeploymentContext {
77

8-
String getMainArtifact();
9-
Map<String, File> getArtifacts();
8+
String getMainArtifact();
109

11-
String getDeploymentPath();
10+
Map<String, File> getArtifacts();
11+
12+
String getDeploymentPath();
1213

1314
}

src/main/java/org/scm4j/deployer/api/IDeploymentProcedure.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
import java.util.List;
44

55
public interface IDeploymentProcedure {
6-
List<IComponentDeployer> getComponentDeployers();
6+
List<IComponentDeployer> getComponentDeployers();
77
}

src/main/java/org/scm4j/deployer/api/IDownloader.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
public interface IDownloader {
66

7-
<T extends IDeploymentContext> T getContextByArtifactId(String artifactId);
7+
<T extends IDeploymentContext> T getContextByArtifactId(String artifactId);
88

9-
File getProductFile(String coords) throws Exception;
9+
File getProductFile(String coords) throws Exception;
1010

11-
File getProductWithDependency(String coords) throws Exception;
11+
File getProductWithDependency(String coords) throws Exception;
1212

13-
void loadProductDependency(File repository);
13+
void loadProductDependency(File repository);
1414

15-
IProduct getProduct();
15+
IProduct getProduct();
1616

1717
}

src/main/java/org/scm4j/deployer/api/ILegacyProduct.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
public interface ILegacyProduct {
77

88

9-
/**
10-
* Query legacy deployed product.
11-
*
12-
* @return the deployed product or null if not found
13-
*/
14-
<T extends IDeployedProduct> T queryLegacyDeployedProduct();
9+
/**
10+
* Query legacy deployed product.
11+
*
12+
* @return the deployed product or null if not found
13+
*/
14+
<T extends IDeployedProduct> T queryLegacyDeployedProduct();
1515

1616
}

src/main/java/org/scm4j/deployer/api/IProduct.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55

66
public interface IProduct {
77

8-
IProductStructure getProductStructure();
8+
IProductStructure getProductStructure();
99

10-
default List<String> getDependentProducts() {
11-
return Collections.emptyList();
12-
}
10+
default List<String> getDependentProducts() {
11+
return Collections.emptyList();
12+
}
1313

1414
}

src/main/java/org/scm4j/deployer/api/IProductDeployer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
public interface IProductDeployer {
88

9-
DeploymentResult deploy(String artifactId, String version);
9+
DeploymentResult deploy(String artifactId, String version);
1010

1111
File download(String artifactId, String version);
1212

src/main/java/org/scm4j/deployer/api/IProductStructure.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import java.util.List;
44

55
public interface IProductStructure {
6-
String getDefaultDeploymentPath();
7-
List<IComponent> getComponents();
6+
String getDefaultDeploymentPath();
7+
8+
List<IComponent> getComponents();
89
}

0 commit comments

Comments
 (0)