Skip to content

Commit 2cc4773

Browse files
committed
Merge branch 'gradle-deploy'
2 parents d428cc7 + b0e339b commit 2cc4773

File tree

3 files changed

+32
-1
lines changed

3 files changed

+32
-1
lines changed

git-as-svn/build.gradle

+30
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,33 @@ tasks.withType(JavaCompile) {
4141
test {
4242
useTestNG()
4343
}
44+
45+
jar {
46+
manifest {
47+
attributes(
48+
"Main-Class": "svnserver.server.Main",
49+
"Class-Path": "${-> createLauncherClassPath()}"
50+
)
51+
}
52+
}
53+
54+
task deployJars(dependsOn: jar) << {
55+
def projectArtifacts = configurations.archives.artifacts*.file
56+
def fullArtifacts = configurations.archives.artifacts*.file + configurations.runtime.files
57+
copy {
58+
from fullArtifacts.intersect(projectArtifacts)
59+
from "config.example"
60+
into "${project.buildDir}/deploy"
61+
}
62+
copy {
63+
from fullArtifacts.minus(projectArtifacts)
64+
into "${project.buildDir}/deploy/vendors"
65+
}
66+
}
67+
68+
def createLauncherClassPath() {
69+
def projectArtifacts = configurations.archives.artifacts*.file
70+
def fullArtifacts = configurations.archives.artifacts*.file + configurations.runtime.files
71+
def vendorJars = fullArtifacts.minus(projectArtifacts).collect { "vendors/${it.name}" }
72+
return vendorJars.join(" ")
73+
}

git-as-svn/src/main/java/svnserver/repository/git/GitRepository.java

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public class GitRepository implements VcsRepository {
6161

6262
public GitRepository(@NotNull RepositoryConfig config) throws IOException, SVNException {
6363
this.repository = new FileRepository(new File(config.getPath()).getAbsolutePath());
64+
log.info("Repository path: {}", repository.getDirectory());
6465
final Ref branchRef = repository.getRef(config.getBranch());
6566
if (branchRef == null) {
6667
throw new IOException("Branch not found: " + config.getBranch());

git-as-svn/src/main/java/svnserver/server/Main.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public static class CmdArgs {
4949
@NotNull
5050
private File configuration;
5151

52-
@Parameter(names = {"--show-config"}, description = "Show actual configuration on start")
52+
@Parameter(names = {"-s", "--show-config"}, description = "Show actual configuration on start")
5353
private boolean showConfig = false;
5454

5555
@Parameter(names = {"-h", "--help"}, description = "Show help", help = true)

0 commit comments

Comments
 (0)