Skip to content

Commit

Permalink
Print welcome message
Browse files Browse the repository at this point in the history
Change-Id: I1e8df95cb471b3da31af862f40513249ac2e0cf6
  • Loading branch information
SpOOnman committed Jan 13, 2015
1 parent e673387 commit b6a155a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
11 changes: 10 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ group = 'pl.touk'
version = '1.4.0'
mainClassName = 'pl.touk.sputnik.Main'

run {
run {
// You can launch Sputnik having only build.gradle file in your repo and executing:
// gradle run -Dexec.args="--conf example.properties --changeId 1234 --revisionId 4321"
def arguments = System.getProperty("exec.args")
Expand Down Expand Up @@ -149,6 +149,15 @@ artifacts {
archives sourcesJar
}

jar {
manifest {
attributes("Specification-Title": "Sputnik",
"Specification-Version": version,
"Implementation-Title": "Sputnik",
"Implementation-Version": scmVersion.rawVersion.version)
}
}

signing {
required { gradle.taskGraph.hasTask("uploadArchives") }
sign configurations.archives
Expand Down
13 changes: 6 additions & 7 deletions src/main/java/pl/touk/sputnik/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.ParseException;
import org.jetbrains.annotations.NotNull;

import pl.touk.sputnik.configuration.CliOption;
import pl.touk.sputnik.configuration.CliWrapper;
import pl.touk.sputnik.configuration.Configuration;
import pl.touk.sputnik.configuration.ConfigurationHolder;
import pl.touk.sputnik.configuration.GeneralOption;
import pl.touk.sputnik.configuration.GeneralOptionNotSupportedException;
import pl.touk.sputnik.configuration.*;
import pl.touk.sputnik.connector.ConnectorFacade;
import pl.touk.sputnik.connector.ConnectorFacadeFactory;
import pl.touk.sputnik.connector.ConnectorType;
Expand All @@ -24,6 +18,7 @@ public final class Main {
private Main() {}

public static void main(String[] args) {
printWelcomeMessage();
CliWrapper cliWrapper = new CliWrapper();
CommandLine commandLine = null;
try {
Expand Down Expand Up @@ -62,4 +57,8 @@ private static void printUsage(@NotNull CliWrapper cliOptions) {
helpFormatter.setWidth(WIDTH);
helpFormatter.printHelp(SPUTNIK, cliOptions.getOptions(), true);
}

private static void printWelcomeMessage() {
System.out.println("Sputnik version " + Main.class.getPackage().getImplementationVersion());
}
}

0 comments on commit b6a155a

Please sign in to comment.