On Tue, 2006-05-09 at 09:53 -0700, Tim McCune wrote: > On Tue, 2006-05-09 at 22:25 +1200, Simon Kitching wrote: > > Even if your process is just doing a copy, a pom file is a fairly simple > > xml file. I'm sure your automated process could be enhanced to generate > > one. > > Thanks for the detailed response Simon. Your answers make sense, but > I'm still disappointed that Maven doesn't handle the missing pom > situation better. As you suggested, these auto-generated poms will > basically be brain-dead, and will provide no useful information. If > that's the case, then why-oh-why does Maven require them at all? I'd > much rather spend a few minutes fixing Maven to make it stop trying to > download pom files when it already has the jars, then write code to > auto-generate useless poms, and make sure that it gets plugged in > everywhere necessary. I'll probably do this and submit it as a patch, > unless someone can explain to me the virtues of having all of these > empty poms floating around.
Well, maven will need some way to figure out whether it has tried to download or not. As I described earlier, for some jars such as Sun's stuff it *is* desirable to download a pom even when the jar is available locally. It does seem reasonable for Maven to remember when it tried to download, successfully contacted all known remote repositories, but found no pom. In this case it could skip later attempts. Of course that assumes that no-one uploads a pom later, but that's not too likely to happen. So how could maven "remember" not to download more poms? Well, possibly by creating the pom.xml file itself... I think a nicer solution, though, would be a plugin, "maven-pomgenerator-plugin". If a user is sick of seeing failed pom access attempts, they could just run: maven pomgenerator:generate-all which would cause the plugin to walk the repository tree and generate a "brain-dead" pom for every jar that doesn't have one. Because it needs to be explicitly run, the user has more control I think. It's also far easier to implement that way, and I think more in the spirit of Maven. Note that I've never written a maven plugin myself; I'm only presuming it's possible to implement what I've described. Cheers, Simon --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]