File tree Expand file tree Collapse file tree
src/main/java/ir/moke/module/timer Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222 <groupId >org.slf4j</groupId >
2323 <artifactId >slf4j-api</artifactId >
2424 <version >2.0.13</version >
25- <scope >provided</scope >
2625 </dependency >
2726 </dependencies >
2827
3837 </configuration >
3938 </plugin >
4039
41- <!-- copy compiled jar file to target/lib , only needed for test jpms -->
42- <plugin >
43- <groupId >org.apache.maven.plugins</groupId >
44- <artifactId >maven-jar-plugin</artifactId >
45- <version >3.2.2</version >
46- <configuration >
47- <outputDirectory >${project.build.directory} /lib/</outputDirectory >
48- </configuration >
49- </plugin >
50-
51- <!-- Copy dependencies , only needed for test jpms -->
52- <plugin >
53- <groupId >org.apache.maven.plugins</groupId >
54- <artifactId >maven-dependency-plugin</artifactId >
55- <executions >
56- <execution >
57- <id >copy-dependencies</id >
58- <phase >package</phase >
59- <goals >
60- <goal >copy-dependencies</goal >
61- </goals >
62- <configuration >
63- <outputDirectory >${project.build.directory} /lib</outputDirectory >
64- </configuration >
65- </execution >
66- </executions >
67- </plugin >
68-
6940 <!-- jpkg -->
7041 <plugin >
7142 <groupId >ir.moke.jpkg</groupId >
Original file line number Diff line number Diff line change 3838 </configuration >
3939 </plugin >
4040
41- <!-- copy compiled jar file to target/lib , only needed for test jpms -->
42- <plugin >
43- <groupId >org.apache.maven.plugins</groupId >
44- <artifactId >maven-jar-plugin</artifactId >
45- <version >3.2.2</version >
46- <configuration >
47- <outputDirectory >${project.build.directory} /lib/</outputDirectory >
48- </configuration >
49- </plugin >
50-
51- <!-- Copy dependencies , only needed for test jpms -->
41+ <!-- jpkg -->
5242 <plugin >
53- <groupId >org.apache.maven.plugins</groupId >
54- <artifactId >maven-dependency-plugin</artifactId >
43+ <groupId >ir.moke.jpkg</groupId >
44+ <artifactId >maven-jpkg</artifactId >
45+ <version >1.0</version >
5546 <executions >
5647 <execution >
57- <id >copy-dependencies</id >
58- <phase >package</phase >
5948 <goals >
60- <goal >copy-dependencies </goal >
49+ <goal >archive </goal >
6150 </goals >
62- <configuration >
63- <outputDirectory >${project.build.directory} /lib</outputDirectory >
64- </configuration >
6551 </execution >
6652 </executions >
67- </plugin >
68-
69- <!-- jpkg -->
70- <plugin >
71- <groupId >ir.moke.jpkg</groupId >
72- <artifactId >maven-jpkg</artifactId >
73- <version >1.0</version >
7453 <configuration >
7554 <name >02-timer-task</name >
7655 <version >0.1</version >
Original file line number Diff line number Diff line change 55import java .util .Timer ;
66
77public class ModuleRunner implements IModule {
8- private static final TaskService taskService = new TaskService ();
98 private static Timer timer ;
109
1110 @ Override
1211 public void start () {
12+ TaskService taskService = new TaskService ();
1313 timer = new Timer ("jos time module" );
14- timer .scheduleAtFixedRate (taskService , 1000 , 3000 );
14+ timer .scheduleAtFixedRate (taskService , 1000 , 1000 );
1515 }
1616
1717 @ Override
Original file line number Diff line number Diff line change @@ -23,11 +23,7 @@ ls ./target/jos-module/01-basic-0.1.jpkg
2323You ** must** exclude any jar file contain this modules from your projects :
2424
2525* jos.api
26- * ch.qos.logback.classic
27- * ch.qos.logback.core
2826* org.slf4j
29- * logback.json.core
30- * logback.json.classic
3127
3228### Manage Modules:
3329
You can’t perform that action at this time.
0 commit comments