ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Widmer <>
Subject POM packaging problems
Date Tue, 09 Sep 2008 12:32:25 GMT
I'm trying to install Axis2 and all its dependencies into my company IVY 
repo from public maven repos. I'm now down to just a few errors, all 
relating to the packaging element in the POM not matching the file 
extension of the main artifact. For example:


is actually a .jar in each case. I notice that trunk has attempted to 
fix this for bundles with this hack in 

	String ext;
         if ("pom".equals(packaging)) {
             // no artifact defined!
         } else if ("ejb".equals(packaging)) {
             ext = "jar";
         } else {
             ext = packaging;

	// TODO: we should refactor the following code into something more 

	// if 'packaging == bundle' and if we use the 'maven-bundle-plugin', the
         // type must be 'jar'
         if ("bundle".equals(packaging)) {
             for (Iterator it = 
getPlugins(ivyModuleDescriptor).iterator(); it.hasNext();) {
                 PomDependencyMgt plugin = (PomDependencyMgt);
                 if ("org.apache.felix".equals(plugin.getGroupId())
"maven-bundle-plugin".equals(plugin.getArtifactId())) {
                     ext = "jar";

That fixes the problem for a grand total of one case, which isn't the 
case I have a problem with (my problems are in:
WARN: 	:: 
WARN: 	:: 
WARN: 	:: 
WARN: 	:: 

The TODO is therefore pretty urgent for me and anyone else wanting to 
use Axis2 (or any of the above). I think a better fix than the current 
hack would be perhaps to check for the existence of the artifact in the 
repo (e.g. .bundle or .maven-plugin), and if that fails, fall back to 
.jar. Or even have a mapping for fall back extensions (e.g. bundle and 
maven-plugin fall back to jar, other types might have other fallbacks). 
According to the maven docs, these are the standard types:
pom, jar, maven-plugin, ejb, war, ear, rar, par

Of those, presumably maven-plugin and ejb both have .jar extensions (the 
code already handles ejb, adding maven-plugin is trivial).

Perhaps there should be a way of configuring these kinds of 
transformations in the ivy settings, maybe as an extension to namespaces 
(allow type and extension mappings, etc.).

Anyway, I could try to find some time to do a patch of some kind (the 
maven-plugin patch is obviously trivial, adding better support for 
<packaging>bundle</packaging> is trickier), but someone already set up 
with commit access could obviously do this much more quickly...


View raw message