• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Maven - dependencies of external .jar package

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I've got a problem with dependencies of jar imported to local repository.

1. I have somefile.jar, in this .jar package I have another .jar files (dependencies of this jar)
2. I installed somefile.jar in local repository and included it in another project.

When I run project which uses class from somefile.jar, I've got ClassNotFound exception on all dependencies of somefile.jar.

When I use somefile.jar directly (from command line) everything's fine.

It looks like Maven is not able to read dependencies from Manifest file of somefile.jar

Could you please help to fix it?

What should I do to make Maven read .jar's manifest and load dependencies of somefile.jar ?
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would have assumed that you'd need to manage that jar's dependencies just like any other Maven artifact--with a pom. Not entirely sure what you're doing, though--if you're compiling, I'd be almost certain that Maven controlled the compilation classpath.
 
Michal Borek
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

David Newton wrote:I would have assumed that you'd need to manage that jar's dependencies just like any other Maven artifact--with a pom. Not entirely sure what you're doing, though--if you're compiling, I'd be almost certain that Maven controlled the compilation classpath.



I have a tool which is packaged as .jar . This tool has its own dependencies included in this jar but it's not managed by maven.

I want to use this tool in my project which is managed by Maven.
I installed manually this .jar file into my local repository and added a dependency to project I'm developing.

It looks like maven changed classpath of this jar. I don'w know how to make this jar work just like if I run it by command line.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By creating a pom with the local jar's dependencies?
 
reply
    Bookmark Topic Watch Topic
  • New Topic