Hi Roman,

seems like you want to mark your dependency as <optional>true</optional> and define the depending module as requires static some.module;

thanks,
Robert

On Wed, 11 Apr 2018 13:14:24 +0200, Roman Grigoriadi <roman.grigori...@gmail.com> wrote:

Thanks Robert,

I tried to add requires for name which is resolved by JPMS for my
non-modularised jar, and it *somehow* made compiler-plugin to put this jar
on module-path.

However if I don't want to reference this jar in my module descriptor, so I
let decision up to user if to put this dependency on CP or MP for app
runtime, would it make sense to add configuration parameter for
compiler-plugin which will force CP/MP for some of the dependencies during
compilation?

The best solution I have found so far is to copy such dependencies
somewhere before compilation and pass --module-path, --add-modules and
--add-reads to javac.


Thank you,
Roman

On Tue, Apr 10, 2018 at 8:55 PM, Robert Scholte <rfscho...@apache.org>
wrote:

Hi

every jar that matches a "requires"-entry of your projects module
descriptor and all jars that matches the indirect requirements will be
added to the module-path. The rest will stay on the classpath.
If you want to do more, you need to verify the JPMS options available for
java/javac[1]

thanks
Robert

[1] https://docs.oracle.com/javase/9/tools/javac.htm#JSWOR627


On Tue, 10 Apr 2018 16:23:10 +0200, Roman Grigoriadi <
roman.grigori...@gmail.com> wrote:

Hi,

I would like to place some of the project dependencies to --module-path to make them automatic "derived name" modules during project compilation. I can see that maven-compiler-plugin:3.7.0 tries to find module-info.class and Automatic-Module-Name entry in MANIFEST. If found it uses those jars
as
modules.

Is there any way I can force placement non-modularized dependencies on
module path?


Thank you,
Roman


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to