Resin java server has a neat feature they call pomegranate ( http://www.caucho.com/projects/pomegranate/ ) which allows to just put various jar dependencies in server's directory (project-jars/) and then it loads them for a web-app from its pom.xml file.
Question is: how should I put the jars to resin's project-jars ? (just copying them doesn't work)
Details:
I have a working project with maven, with all dependencies configured in projects pom.xml file. I can build a webapp war etc.
I copied the jar files to resin's project-jars/ as they were generated by maven for this particular web-app.
When I deploy the war, resin spots pom.xml and tries to resolve dependencies; unfortunately it cannot find any artifacts in its repository (project-jars).
I suppose this is because all the jars I have put there do not have META-INF/maven/pom.xml files packed in them. They are just normal jars like those downloaded by maven.
On pomegranate website they say resin scans project-jars for jars with pom.xml files, to determine their versions.
How should I create jars with pom.xml files included?
Or should I manually copy the foo-bar-1.0.pom files from the repository on my devel machine to the resin's project-jars directory? (which kind of beats the purpose of all the auto-magic)
Thanks for answer,
Best regards
Horace
My understanding of the Pomegranate Draft specification is that:
So I guess the idea is to mark the dependencies as "provided" in the war
pom.xml
and to add them inWEB-INF/pom.xml
for a deployment on Resin. I've not tested this though, so I might be wrong.Actually, this pomegranate looks interesting but I don't get it entirely for now. While I understand its benefits, it seems to make the WAR not portable which is a big drawback. I'll dig it a bit further...
(EDIT: I'm putting an answer to a comment from the OP below)
To be honest, I don't find the spec draft very clear. However, I found this pomegranate modules post on Caucho's blog that details a bit more how to get it working for a webapp:
At least, I understand these steps and they answer your question: you have to drop the jars manually in Resin's project-jars directory. That's not what I was expecting but I think that I was misunderstanding what pomegranate is all about. If I'm not wrong, pomegranate is a kind of alternative to OSGI, it is about module bundling and classloading voodoo. It uses Maven's conventions to describe dependencies but it's not about dependencies management.