you may look at the openjpa-maven-plugin: https://svn.codehaus.org/mojo/trunk/mojo/openjpa-maven-plugin/
latest version is in my git at http://ns1.backwork.net/git the interesting code is in https://svn.codehaus.org/mojo/trunk/mojo/openjpa-maven-plugin/src/main/java/org/codehaus/mojo/openjpa/AbstractOpenJpaMojo.java protected void extendRealmClasspath() hth LieGrue, strub --- Kamlesh Sangani <[email protected]> schrieb am So, 18.1.2009: > Von: Kamlesh Sangani <[email protected]> > Betreff: project artifacts returns empty collection > An: [email protected] > Datum: Sonntag, 18. Januar 2009, 0:02 > I have a mojo which is bound to generated-sources phase. In > the mojo I am calling some third party code which expects > project's dependecies in the classpath. These > dependencies are decalred in the project which is calling my > mojo. So before calling the third party code I need to add > these dependecies to the classpath. Is there a standard > solution to this problem? > > I have looked at the mailing list and there are some > suggestions of using ${project.artifacts} to get project > dependecies and then change context classloader. I tried to > decalre the following configuration but artifacts is always > empty set. > > /** > * The set of artifact artifacts > * > * @parameter expression = > "${project.artifacts}" > * @readonly > * @requiresDependencyResolution runtime > */ > private Collection artifacts; > > Do I need to have some other configuration in > project/plugin pom to make this work? Any help is > appreciated. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
