• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Maven - descriptor file alongside a jar

 
Sharon whipple
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic