tested working as a daemon. you must place config.json near .jar file

pull/2/head
Vyacheslav N. Boyko 2018-01-25 14:05:37 +03:00
parent 8ccb93511c
commit cb685de46b
3 changed files with 20 additions and 20 deletions

29
pom.xml
View File

@ -7,6 +7,7 @@
<groupId>ru.bvn13</groupId>
<artifactId>jircbot</artifactId>
<version>1.0.1</version>
<packaging>jar</packaging>
<properties>
@ -137,34 +138,24 @@
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<!-- get all project dependencies -->
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<!-- MainClass in mainfest make a executable jar -->
<archive>
<manifest>
<mainClass>ru.bvn13.jircbot.MainApp</mainClass>
</manifest>
</archive>
<!-- Package as an executable jar/war -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>1.5.6.RELEASE</version>
<configuration>
<mainClass>ru.bvn13.jircbot.MainApp</mainClass>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<!-- bind to the packaging phase -->
<phase>package</phase>
<goals>
<goal>single</goal>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

View File

@ -1,14 +1,17 @@
package ru.bvn13.jircbot;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import ru.bvn13.jircbot.bot.JircBot;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
@EnableAutoConfiguration
@ComponentScan("ru.bvn13.jircbot")
public class MainApp {
public class MainApp implements CommandLineRunner {
@Autowired
private JircBot bot;
@ -18,4 +21,8 @@ public class MainApp {
System.out.println("==============> STARTING <==============");
}
@Override
public void run(String... strings) throws Exception {
}
}

View File

@ -1,2 +1,4 @@
name: jircbot
config: config.json