maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Scholte" <>
Subject Re: Apache Maven JDeps Plugin
Date Sun, 15 Feb 2015 11:16:14 GMT
Op Sun, 15 Feb 2015 07:09:37 +0100 schreef Hervé BOUTEMY  

> another topic:
> "When using Apache Maven 3.2.6 you don't need to include the <<<maven-
> toolchain-plugin>>>; the <<<maven-jdeps-plugin>>>
>  can pick up..."
> looking at the code, IIUC: the plugin doesn't use the jdk toolchain  
> configured
> (or not) for the whole build with maven-toolchain-plugin but will select  
> a jdk
> toolchain based on its own preference
> isn't it?

yes. Up until Maven 3.2.5 the maven-toolchain-plugin was responsible for  
reading the toolchains.xml, so in a multimodule project the same file was  
read over and over again.
This has been rewritten. Now it is read only once on startup. This also  
made it possible to read it without the maven-toolchain-plugin, which  
makes sense in this case. You probably want to verify if your current  
(older JDK) code is ready according to jdeps (newer JDK, i.e. 8 and above).

This is the magic line:
List<Toolchain> tcs =
	(List<Toolchain>) getToolchainsMethod.invoke( toolchainManager, session,  
	Collections.singletonMap( "version", "[1.8,)" ) );
The final arguments defines the restriction.
We could make a mojo parameter for this, so users can lock it to a  
specific tool.


> Regards,
> Hervé
> Le samedi 14 février 2015 16:32:23 Robert Scholte a écrit :
>> Hi,
>> during FOSDEM 2015 a few members of the Apache Maven team visited a talk
>> of Oracle, presented by Rory O'Donnell and Dalibor Topic.
>> Their talk ended with encouraging everybody to use the JDeps tool to
>> analyze your dependencies in preparation of JDK9s jigsaw.
>> On behalf of the Maven team I've picked up the task to develop a plugin
>> which can do the analysis during the build of a Java project. Call it a
>> thin Maven wrapper around the JDeps tool.
>> The sources can be found here:
>> The documentation can be found here:
>> ps-plugin/
>> eps-plugin/usage.html
>> There's a SNAPSHOT version availabe at
>> The plugin is still in development, but now would be an appropriate  
>> moment
>> to share your thoughts on what this plugin should do. For instance:  
>> break
>> the build if the project depends on JDK internal APIs (already
>> implemented).
>> So please, share your ideas.
>> thanks,
>> Robert Scholte
>> ps. Quite a lot of users relate the plugin version to the Maven version.
>> For that reason the maven-jdeps-plugin version starts with 3.0,  
>> indicating
>> you need to use at least Maven-3.
>> ps2. Documentation already refers to Apache Maven 3.2.6, even though it  
>> is
>> not released yet. Chances are that Maven 3.2.6 will be released before
>> Maven JDeps Plugin 3.0
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message