• 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 packging issue

 
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I am new to Maven and would like to ask for help from expert right here. Actually, I have couple of jar files living at src/main/resources. Right now, I would like to include them into the final project big jar file but in the extracted .class file. Can anyone teach me what I need to do on pom.xml or there is no need to do?


Thanks
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure what you mean by "in the extracted .class file".

If you are interested in packaging your application to distribute to users, look at the Assembly plugin: http://maven.apache.org/plugins/maven-assembly-plugin/

Actually, I have couple of jar files living at src/main/resources


You should never do that. JAR files belong in the Maven repository, not within the source of your application. If the JARs are open source, then they are probably already available in the Maven Central repository. If they are not open source, you should use the deploy:deploy-file goal to load them into your local repository. Then add them as dependencies in your pom.xml. (Alternately, you should install a Mavne repository manager such as Nexus or Artifactory, and place the JARs there.)
reply
    Bookmark Topic Watch Topic
  • New Topic