On Mon, 2006-05-08 at 11:50 -0700, Tim McCune wrote: > On Mon, 2006-05-08 at 13:36 -0500, Wayne Fay wrote: > > When you installed those dependencies in your local repo, did you use > > -DgeneratePom=true ? > > > > If not, reinstall the 3rd party artifacts and use that parameter so > > poms are created, to avoid this "downloading poms from central" thing > > in the future. > > Thanks for the reply Wayne. Not quite sure what you're referring to. > The jars that get installed in my local repo are put there 1 of 2 ways. > Either: > 1) Checked into a subversion module, which copies them to a web server > on commit. > 2) Placed on the web server by Continuum after building the project with > Maven 1. > > For option 1, it sounds like you're suggesting that there's a way to get > Maven to generate a pom for the jar file? If so, could you elaborate?
Maven always *wants* a pom, as that makes it possible for maven to automatically handle transitive dependencies. If there is one in your repo, it will use it and NOT go to the central repository. If there isn't one locally, it will of course try to get one remotely. If it can't find one anywhere, it still continues to work but as you've noticed there is a performance hit and warning messages due to the failed attempts to find a pom. As Wayne said, ensuring your repo has a pom for each installed jar solves this problem. Files can be installed into a repository using the command mvn install:install-file -DartifactID=.. -DgroupId=.. etc By default, the file is just copied into the repo; no pom.xml is created. However the params carry enough info to generate a primitive pom.xml file; adding -DgeneratePom=true to the arguments will do this. The generated file of course has no info on the dependencies of the jar you've just installed. If you simply use a copy command to install the jars into the right repo directories instead of mvn install:install-file, then that's fine too. Creating the appropriate primitive pom file is easy by hand or could be automated I'm sure. So why isn't -DgeneratePom=true the default? Because there are some cases where the central maven repo (on ibiblio) isn't allowed to host the jar for legal reasons. However it *is* of course legal for a pom.xml (including dependency info) to be in the repo. In this case you really want to install the jar locally but not create a pom; maven will then download the correct pom.xml from the central repo. > For option 2, Maven 2 isn't involved at all, and it's an automated > process, so I don't think that it's feasible at all to get a pom > generated for these jars. If your automated process is using "mvn install:install-file" then just add the -DgeneratePom=true option. 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. Cheers, Simon --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]