Hi Karl Heinz,

Karl Heinz Marbaise wrote:

> Hi,
> 
> i'm working on the development of a plugin which can have a
> configuration like this.
> 
> <plugin>
>    <groupId>com.soebes.maven.plugins.mlv</groupId>
>    <artifactId>maven-license-verifier-plugin</artifactId>
>    <version>0.4</version>
>    <dependencies>
>      <dependency>
>        <groupId>YouCompanyPackage.licenses</groupId>
>        <artifactId>licenses</artifactId>
>        <version>6</version>
>      </dependency>
>    </dependencies>
>    <configuration>
>      <verbose>true</verbose>
>    </configuration>
> </plugin>
> 
> So the question is:
> 
> Is there a good way to access the classpath of the plugin only (not
> compile, test etc.) and be sure to get the given dependency
> (YouCompanyPackage.licenses) in simple way? Or do i have to inject
> something special to the Plugin like documented on
> http://maven.apache.org/guides/mini/guide-maven-classloading.html for
> plugin class loader...
> 
> Does there exist an example how to do this?

Not really possible for M2, since every plugin is loaded only once i.e. if 
you have configured this plugin two times with different deps in the 
reactor, the classpath is fixed with the first execution, ignoring the deps 
in the second.

M3 will use separate classloders. If that artifact is of type jar, you may 
simply load any content as resource.

> Many thanks in advance...

What do you really try to achieve?

- Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to