the corner office : tech blog

a tech blog, by Colin Pretorius

Maven plugins. Joy.

From How to get files from JAR dependencies in a plugin:

You could get the (runtime) class path of the current project via a mojo parameter like this:
   /**
    * @parameter default-value="${project.runtimeClasspathElements}"
    * @readonly
    */
   private List runtimeClassPath;
in combination with the mojo annotation @requiresDependencyResolution. From the class path, you can populate a URLClassLoader and call getResourceAsStream() on this.

{2009.12.23 10:39}

« JMockit

» Swing. Joy.