On Sat, 2015-03-14 at 09:03 +0100, Emmanuel Bourg wrote: > You mean that a plugin can't be invoked from the command line if the > metadata file is missing, right? In this case I think we can live with > it. We don't execute many plugins when a package is built, the javadoc > plugin is probably the only one. The maven.mk script could be tweaked to > replace the javadoc:javadoc argument with the full GAV, it should be > easy to fetch the version installed with some shell scripting. When maven tries to resolve any plugin versions, it does so through the metadata. This includes both the prefix form javadoc:javadoc and the versionless GAV form org.apache.maven.plugins:maven-javadoc-plugin:javadoc. In either case, it will pick a release or latest version (updating depending on your configured update policy). Explicitly stating the version bypasses this lookup. Although specifying the version for javadoc may be reasonable, it will break again if users need to add their own goals not covered by default in a phase. > I think this could be done with a trigger. I agree this would be a very > nice optimization, but we may do it in a later phase if it turns out to > be too complicated. A quick look at deb-triggers looks like it's just what we need. I'll investigate a solution similar to the triggers in man-db. I've already looked into removing the repo copying logic so my opinion is a bit biased. You can probably use almost the same script for generating metadata when copying the repo so there won't be too much wasted effort if we swap. > We could just start by generating the metadata when the repository is > copied, and do it for the plugins only. Or even simpler, if this is just > an issue with the javadoc plugin, we could add the metadata to this > package only, we'll never get multiple versions of this plugin in > Debian, so a static file is fine in this case (and the metadata file > with the prefixes for the plugins under the org.apache.maven.plugins > group could be intalled with the maven-debian-helper package as a static > file copied from Maven Central). We know we need metadata for plugins, but it'll likely be needed for all artifacts if we start using more features of Maven. > > > The metadata might also be used to obsolete some of the > > maven-repo-helper logic. What do you guys think? > > What logic would be obsoleted? If we could leverage the version ranges > and get rid of the generic 'debian' and '2.x' versions that would be > awesome. Can't quite remember what I was referring to. I'll have to give it more thought.
Attachment:
signature.asc
Description: This is a digitally signed message part