Coder Social home page Coder Social logo

Comments (5)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 30, 2024
I had the same problem when packaging with the Maven m2 plugin for Eclipse. 
However,
when performing a 'mvn package' from command line, there was no problem and the 
jars
are included as expected.

Original comment by [email protected] on 4 Jun 2009 at 6:30

from onejar-maven-plugin.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 30, 2024
Hi Elisha, thanks for your issue report. And thank you Tom for your input on 
the matter.

I made a small test project which I beleive does the same thing you are looking 
for,
Elisha.

It's three library projects, and one application project. All
<packaging>jar</packaging> and the app uses onejar-maven-plugin. They are built 
from
a root-pom which has all of them as <module>.

You can download it from here:
http://github.com/hugojosefson/onejar-maven-plugin-issue15/tree/master

Unpack, enter the unpacked directory and run these commands and you should get 
the
correct output:

$ mvn install
$ java -jar myapp/target/myapp-1.0-SNAPSHOT.one-jar.jar 
Hello World from App!
Hello World from Lib A!
Hello World from Lib B!
Hello World from Lib C!

I use Maven 2.0.10.

Elisha, please verify if it works for you with a recent version of Maven.

Switching issue status to Incomplete, while waiting for your response. Thank 
you.

/Hugo

Original comment by [email protected] on 12 Jun 2009 at 7:33

  • Changed state: Incomplete

from onejar-maven-plugin.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 30, 2024
Hi, Hugo.

Thanks for the working example. 

The strange thing is that it only works from command line. (as my project did)

When I package from within Eclipse with the Maven m2 Eclipse plugin there is no 
lib
folder included in myapp-1.0-SNAPSHOT.one-jar.jar, resulting in a 
NoClassDefFoundError.

Thanks,

Tom.


Original comment by [email protected] on 13 Jun 2009 at 11:00

from onejar-maven-plugin.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 30, 2024
Thank you Elisha for verifying that.

Yes, many people have problems with Eclipe's instability. That's why I always
recommend clients to rely on a stable build tool (like Maven) for building and
releasing, and only use an IDE as far as it makes certain things easier (like
CTRL-space completion and stuff). I even use a different IDE 
altogether...combined
with Maven of course!

/Hugo
----
Closing this now as WontFix, because it works with Maven as it should.

Original comment by [email protected] on 13 Jun 2009 at 11:16

  • Changed state: WontFix

from onejar-maven-plugin.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 30, 2024
Sorry Tom and Elisha! Mixed up your names there a little.. :)

Original comment by [email protected] on 13 Jun 2009 at 11:17

from onejar-maven-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.