There is code in the dependency-maven-plugin (http://mojo.codehaus.org) that can allow you to either pull the artifacts from the project dependencies, or to specify them in the plugin configuration. You could use that code and it would get you a file handle to the jar. Presumably you could then load the xml from the jar that way. Alternatively, you could use the plugin in your project to unpack the jars and get your xml files that way.
Or, if the dependencies are listed in the pom, they should be on the classpath when the plugin runs. You could use the classloader to load your xml files that way. I recently found an issue with the plugin classpath that may affect you if you try this method: http://jira.codehaus.org/browse/MNG-1898?rc=1 -----Original Message----- From: Lewis, Allan E. (Number Six) [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 27, 2005 2:28 PM To: [email protected] Subject: Plugin Question: Loading resources from dependency JARs I have a code generation MOJO that currently reads all XML files from the resources folder of the current project and generates code based on each file. The XML for each file is digested and loaded into an in-memory structure used when the actual .java files get generated. Our issue now is that some of the metadata needed to generate the output for the current project may reside in JARs for other projects. Is there a clean/easy way to specify the dependent projects as dependencies in the project being built, and then reference XML files from the dependent JARs within the code generation MOJO? --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
