jQuery in Action, 2nd edition
The moose likes Ant, Maven and Other Build Tools and the fly likes Maven - descriptor file alongside a jar Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Reply Bookmark "Maven - descriptor file alongside a jar" Watch "Maven - descriptor file alongside a jar" New topic
Author

Maven - descriptor file alongside a jar

Sharon whipple
Ranch Hand

Joined: Jul 31, 2003
Posts: 293
When installing jar to the repository - Is it possible to tell maven to add artifact descriptor file (something specific for my needs) alongside the jar file?
So in the repository I will have:

repoServer/com/company/artifact1.jar
repoServer/com/company/pom.xml
repoServer/com/company/artifact1.xml

Thank you!
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 4875

What you are looking for is a "classifer". Both source JAR files and site zip files are often loaded into repositories as classifiers. What you need is to either find or write a plugin that will let you identify the descriptor as a classifier, and that will attach that classifier to the build. Looks like the Build Helper plugin might just do this for you (see the Usage page for an example):
http://mojo.codehaus.org/build-helper-maven-plugin/attach-artifact-mojo.html


JBoss In Action
 
IntelliJ Java IDE
 
subject: Maven - descriptor file alongside a jar
 
Threads others viewed
cannot download j2ee-1.4.jar as defined in my pom.xml
Any existence of Class like portalglobal context
Could not resolve dependencies for maven project
Problem with Maven configuration
Maven Plugin not found issue
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture