We actually wrote a plugin to do the copy of all dependencies to the lib directory. It's pretty simple - it just:
- gets the list of artifacts, - gets the list of files already in lib, - traverses the first list, and for each uses the copyFileToDirectory method of the org.codehaus.plexus.utils.FileUtils class to copy it to lib. - Compares the two lists, and for every file that is in lib but not in the dependencies, it deletes the file. This way we can include it as part of the process-resources phase, and thus it's part of every build. Jim Babka Senior Software Engineer Main: (512) 334 3200 Direct: (512) 334 3237 Email: [EMAIL PROTECTED] Webify Solutions Enabling the On Demand Enterprise(tm) www.webifysolutions.com -----Original Message----- From: Treloar, Barrie (SAPOL) [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 11, 2006 4:07 PM To: 'Maven Users List' Subject: RE: [m2] Maven2 building Eclipse plugins, features, and update sites > In any case, because I have to get something done quickly, I am > abandoning the effort of putting a second JAR in the repository. I'm > going to hack around this and use a temporary directory for all the > "meta-JARs" that I need, and then I'll have a feature build ANT goal > that pulls from that directory before it starts packaging things up. > This is certainly not even close to correct - it will only work because > we only need to build one feature - but I'm just stymied at every turn > by the lack of documentation right now. I know that the documentation > situation will improve, but I've got to get something working by the end > of the week. Hopefully, I'll have a chance to revisit this later after > more documentation is in place. I'm doing something like this for my plugin: The non-eclipse dependencies are captured in the Maven pom.xml dependencies. To create a local copy of these libraries for inclusion in the project use the following command: +--- mvn dependency:copy-dependencies -DstripVersion=true -DoutputDirectory=lib +--- The libraries themselves should not be checked into CVS. Then in the MANIFEST.MF/plugin.xml editor I ensure that the Classpath entries on the Runtime tab include the libs just created. The .classpath and .project files are checked into CVS. So when the plugin is checked out it won't build since the libs are not there. After running the dependency:copy-dependencies command I can build the plugin. Of course I have not yet got to the point of automating all this. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
