Maven: exclude jar from JDK

So, I searched for SO for hours and hours, and I am completely running into the brick wall here.

My problem is quite simple: I have a (rather large) project that I would like to build with Maven (so that I can automate all this a bit). So far, everything is working fine, except for one serious problem.

I have a dependency called "java-plugin". I do not know for sure the source or author, but it depended on my dependence. I added it to our own third-party Nexus repository with the name that the original bank was provided with.

This plugin is added from my Nexus without any problems, but it has the following structure:

- netscape
    -- javascript
        JSException.class
        JSObject.class
        JSUtil.class
    -- security
        ForbiddenTargetException.class
        ParameterizedTarget.class
        Principal.class
        Privilege.class
        PrivilegeManager.class
        PrivilegeTable.class
        Target.class
        UserDialogHelper.class
        UserTarget.class
- sun
    -- plugin
        ...
    -- plugin2
        ...
- com.sun.java.browser.plugin2
    ...

? Eclipse, JDK "" . Maven , -, Maven JDK . JDK jfxrt.jar ( Java FX). netscape.javascript.JSObject ( netscape.javascript.JSException). , netscape.javascript.JSUtil. , Maven JSObject JSException JDK, java-plugin.

, . , , java-plugin getWindow JSObject, JDK .

jfxrt.jar Maven, , . , Maven. . "" Java, , ( ).

!


, - , JDK - ! java-, JDK, plugin.jar ( ${java.home}/lib/plugin.jar).

:

Dependency problem in Maven

, jfxrt.jar , .jar. , Maven Java , netscape.javascript.JSObject ( jfxrt.jar). JSObject ( , ). , , ? Eclipse, Maven, IntelliJ Maven?

!

+4
1

, . -, IntelliJ, .

, IntelliJ JDK ( /jre/lib ) pathpath - -, Maven. : netscape.javascript.JSObject jfxrt.jar, plugin.jar Maven ( ). JSObject , jfxrt.jar, .

Eclipse , , Maven JDK, java-plugin.jar (, JSObject), jfxrt.jar, plugin.jar.

, JDK - jfxrt.jar JDK7.

, java-plugin.jar Maven, JDK- ( ). :

  • java.plugin.jar plugin.jar.

    <dependency>
        <groupId>com.sun.jdk</groupId>
        <artifactId>plugin</artifactId>
        <version>${version.java-plugin}</version>
        <type>jar</type>
        <scope>system</scope>
        <systemPath>${java.home}/lib/plugin.jar</systemPath>
    </dependency>
    
  • IntelliJ, , jfxrt.jar JDK- IntelliJ, .iml, , , , . ( , " " > "lt; 1.7" " ", Open Library Settings).

  • jfxrt.jar . , , , , , , . SVN, Jenkins.

, . plugin.jar, " " Jenkins, IntelliJ - JDK .

: IntelliJ, , Maven, , .

+2

All Articles