User Tools

Site Tools


spring_batch

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
spring_batch [2013/11/05 13:48]
mihael
spring_batch [2014/03/05 10:13]
mihael
Line 83: Line 83:
 </​beans:​bean>​ </​beans:​bean>​
 </​sxh>​ </​sxh>​
 +
 +===== Create Jar with Dependencies =====
 +To embed all dependencies and create an executable jar the pom.xml must be extended by the maven-assenbly-plugin.
 +
 +<sxh xml>
 +    <​build>​
 + <​plugins>​
 + <​plugin>​
 + <​artifactId>​maven-assembly-plugin</​artifactId>​
 + <​configuration>​
 + <​archive>​
 + <​manifest>​
 + <​mainClass>​
 + org.springframework.batch.core.launch.support.CommandLineJobRunner
 + </​mainClass>​
 + </​manifest>​
 + </​archive>​
 + <​descriptorRefs>​
 + <​descriptorRef>​jar-with-dependencies</​descriptorRef>​
 + </​descriptorRefs>​
 + </​configuration>​
 + </​plugin>​
 + </​plugins>​
 + </​build>​
 +</​sxh>​
 +
 +Create the jar with executing the following line on the command line
 +
 +  mvn clean compile assembly:​single
 +  ​
 +Execute the program with
 +
 +  java -jar program-jar-with-dependencies.jar launch-context.xml jobid
 +
 +{{tag>​devel java}}
spring_batch.txt ยท Last modified: 2015/03/17 08:38 by mihael