aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Maven packging issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Maven packging issue" Watch "Maven packging issue" New topic
Author

Maven packging issue

Benson Fung
Ranch Hand

Joined: Apr 10, 2003
Posts: 207
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
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5772
    
    7

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


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Maven packging issue
 
Similar Threads
Maven: include files from other modules into current module
Jar file creation using Maven
Download Maven plugin
Maven - dependencies of external .jar package
How to put configuration files of Spring, JPA and log4j outside jar in standalone app?