I've ended using spring-boot:
/<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>1.1.4.RELEASE</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>/
With a custom main class:
/import org.apache.camel.spring.Main;
public class CamelMain {
public static void main(String[] args) throws Exception {
Main main = new Main();
main.setApplicationContextUri("spring/camel-context.xml");
main.enableHangupSupport();
main.start();
while (true);
}
}/
just running *mvn package* and generated jar file works as if running mvn
camel:run.
Thanks everyone
Used resources:
camel in action book
http://docs.spring.io/spring-boot/docs/1.0.1.RELEASE/reference/html/build-tool-plugins-maven-plugin.html
--
View this message in context:
http://camel.465427.n5.nabble.com/Package-camel-spring-into-jar-file-tp5753964p5753993.html
Sent from the Camel - Users mailing list archive at Nabble.com.