[
https://issues.apache.org/jira/browse/IVY-899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13276795#comment-13276795
]
Jon Reeve commented on IVY-899:
-------------------------------
It seems that the Jetty problem isn't really through any fault of Ivy, and more
to do with Jetty abusing the packaging type and putting in some new unknown one
when their end result is in fact a jar.
At the moment it is possible to work around this if one goes through every jar
that fails to download one at a time and adds an explicit dependency for it
with an artifact element specified to map type="orbit" to ext="jar". But our
project doesn't have a real direct dependency on that jar - it's indirect. If
we add one it means we have to keep it up to date to match whatever one is
pulled in by something else we do depend on - whenever we change the version of
that dependency that depends on Jetty, there is a risk that all the orbit->jar
fixing dependency entries are now pointing at the wrong versions.
With that in mind, I think a feature to specify custom mappings would be
incredibly useful, so users of Ivy would be able to quickly work around these
simple cases with a mapping to tell Ivy that "orbit->jar", i.e. packaging type
orbit should be considered as jar, for all dependencies. Would a patch for that
be considered?
> POM packaging not always mapped to main artifact file extension correctly
> -------------------------------------------------------------------------
>
> Key: IVY-899
> URL: https://issues.apache.org/jira/browse/IVY-899
> Project: Ivy
> Issue Type: Bug
> Components: Maven Compatibility
> Affects Versions: 2.0.0-beta-2
> Reporter: Tom Widmer
>
> POM files contain a packaging element that Ivy attempts to map to an
> extension for the main artifact of the module in question. In 2.0.0beta2, it
> maps as follows:
> ejb->jar
> bundle->jar only for org.apache.felix#maven-bundle-plugin
> [other]->[other]
> That mapping is not sufficient to cover common POM files. For a start:
> 1. maven-plugin is a standard packaging type, which should map to the
> extension jar.
> - e.g. Ivy erroneously searches for
> org.apache.axis2#axis2-ant-plugin;1.4.1!axis2-ant-plugin.maven-plugin
> rather than:
> org.apache.axis2#axis2-ant-plugin;1.4.1!axis2-ant-plugin.jar
> 2. bundle seems to be used by various things, and is a jar in the cases I've
> seen:
> org.apache.geronimo.specs#geronimo-activation_1.1_spec;1.0.1!geronimo-activation_1.1_spec.bundle
> should be
> org.apache.geronimo.specs#geronimo-activation_1.1_spec;1.0.1!geronimo-activation_1.1_spec.jar
> Also, apparently POMs can have custom packaging which might need to map to
> some other arbitrary file extension, or possibly potentially to multiple
> files?
> The ideal solution is to provide customisable mapping of POM packaging to
> file extensions that can be specified somewhere in the Ivy settings (it is
> somewhat similar to namespaces).
> An interim solution is to change the mapping as follows:
> ejb->jar
> ejb[N]->jar?? e.g. ejb3->jar
> maven-plugin->jar
> bundle->jar if and only if .bundle does not exist but .jar does (it may not
> be easy to check for file existence in the relevant code - I'd be happy to
> always map bundle to jar, but others might not be - might be fine for an
> interim solution though?).
> [other]->[other]
> The interim solution could perhaps be done for 2.0 (it is only a few minutes
> work I think), though the properly customisable solution might take longer
> than that.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira