Missing artifact net.sf.jung: jung2: jar: 2.0

jung2 is in the maven repository, here and here .

But my Eclipse does not figure out:

enter image description here

The code is here:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>tests.jung</groupId>
    <artifactId>TryJung</artifactId>
    <version>0.0.1-SNAPSHOT</version>

    <dependencies>

        <dependency>
            <groupId>net.sf.jung</groupId>
            <artifactId>jung2</artifactId>
            <version>2.0</version>
        </dependency>



    </dependencies>
</project>

UPDATE

Sorry, I can’t accept the answers to the question about the type of dependency, because it is not complete. The code for the jung dependencies was obtained directly from the Maven repository:

enter image description here

So, I need an explanation why the code taken from the repository site does not really work.

What is going on here, who is β€œto blame”?

+4
source share
3 answers

, pom. , , , :

<dependencies>

    <dependency>
        <groupId>net.sf.jung</groupId>
        <artifactId>jung2</artifactId>
        <version>${jung.version}</version>
        <type>pom</type>
    </dependency>

    <dependency>
        <groupId>net.sf.jung</groupId>
        <artifactId>jung-api</artifactId>
        <version>${jung.version}</version>
        <scope>compile</scope>
    </dependency>

    <dependency>
        <groupId>net.sf.jung</groupId>
        <artifactId>jung-visualization</artifactId>
        <version>${jung.version}</version>
        <scope>compile</scope>
    </dependency>

    <dependency>
        <groupId>net.sf.jung</groupId>
        <artifactId>jung-graph-impl</artifactId>
        <version>${jung.version}</version>
        <scope>compile</scope>
    </dependency>

    <dependency>
        <groupId>net.sf.jung</groupId>
        <artifactId>jung-algorithms</artifactId>
        <version>${jung.version}</version>
        <scope>compile</scope>
    </dependency>

    <dependency>
        <groupId>net.sf.jung</groupId>
        <artifactId>jung-io</artifactId>
        <version>${jung.version}</version>
        <scope>compile</scope>
    </dependency>

</dependencies>

:

<properties>
    <jung.version>2.0.1</jung.version>
</properties>

, .

+3

- , , pom file, jar. .

+1

. -, pom / () ( maven ) ( jung2)

<type>pom</type>, , .

see here for a more complete explanation: How to use POM as a dependency in Maven?

0
source

All Articles