You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by blommish <jo...@gmail.com> on 2015/03/10 16:53:03 UTC

Camel Project Executable Jar

Hi,

I want to package my project as a JAR file with all dependencies.
* Or should I actually solve it in another way? We haven't decided how it
should be hosted yet

* Anyhow, I use maven-shade-plugin to package my project.
1. Get loads of warnings: "[WARNING] We have a duplicate"
2. Any improvements or changes I should consider?







--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Project-Executable-Jar-tp5763937.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel Project Executable Jar

Posted by blommish <jo...@gmail.com>.
And the alternative would be using this?

But then I still get an error.. I'm using the same version for all my
dependencies and so on

<dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-spring</artifactId>
      <version>${camel-version}</version>
    </dependency>

<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <addClasspath>true</addClasspath>
             
<mainClass>no.norsktipping.ntrouter.chain.ChainMain</mainClass>
            </manifest>
          </archive>
        </configuration>
      </plugin>

But then I get
Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/camel/spri
ng/Main
        at ....ChainMain.main(ChainMain.java:15)
Caused by: java.lang.ClassNotFoundException: org.apache.camel.spring.Main
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)



--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Project-Executable-Jar-tp5763937p5763940.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel Project Executable Jar

Posted by Claus Ibsen <cl...@gmail.com>.
See this FAQ
http://camel.apache.org/how-do-i-use-a-big-uber-jar.html

On Tue, Mar 10, 2015 at 4:53 PM, blommish <jo...@gmail.com> wrote:
> Hi,
>
> I want to package my project as a JAR file with all dependencies.
> * Or should I actually solve it in another way? We haven't decided how it
> should be hosted yet
>
> * Anyhow, I use maven-shade-plugin to package my project.
> 1. Get loads of warnings: "[WARNING] We have a duplicate"
> 2. Any improvements or changes I should consider?
>
>
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-Project-Executable-Jar-tp5763937.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/