Just a quick note, camel will lookup some files in the META-INF/ to pick the components, converters and data formats. If you just build a big jar, you need to merge the META-INF files yourself, otherwise you will hit some strange issue there.
-- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English) http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: 姜宁willem On Monday, January 14, 2013 at 9:28 PM, Bilgin Ibryam wrote: > Hi Marco, > > To run your application as standalone, your application jar has to > contain all the dependencies > > Then you need a class with main method to run your application. > > Also you need to specify this class in the manifest of the generated jar. > > One way to do it is by using the maven-assembly-plugin. You can see an > example bellow. > > maven-assembly-plugin is not ideal, but it works for simple > application. For more complex application you'd better you maven-shade > plugin. > > Cheers, > Bilgin > > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-assembly-plugin</artifactId> > <version>2.2</version> > <configuration> > <descriptorRefs> > <descriptorRef>jar-with-dependencies</descriptorRef> > </descriptorRefs> > <archive> > <manifest> > > <mainClass>com.ofbizian.camelympic.MainApp</mainClass> > </manifest> > </archive> > </configuration> > <executions> > <execution> > <id>assembly</id> > <phase>package</phase> > <goals> > <goal>single</goal> > </goals> > </execution> > </executions> > </plugin> > > > > > On 14 January 2013 12:55, Marco Westermann <marwesterm...@gmx.de > (mailto:marwesterm...@gmx.de)> wrote: > > Hi, > > > > what is the correct way to run a camel project which was generated by the > > camel-java archtype in productive. In general I always deploy camel bundles > > to smx. But this time I want a standalone application without smx. Using > > java -jar xxx.jar I get an error that there is no main-class defined in the > > jar. > > > > best regards, Marco