wood burning stoves 2.0*
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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
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: 294
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: 5812
    
    7

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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Maven - descriptor file alongside a jar
 
Similar Threads
Problem with Maven configuration
cannot download j2ee-1.4.jar as defined in my pom.xml
Could not resolve dependencies for maven project
Any existence of Class like portalglobal context
Maven Plugin not found issue