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> 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

Reply via email to