17

I am looking for a maven repository that distributes jung2 packages. Unfortunetely I can not find any information on its location.

Update: I have included the cental repository repo1.

 <repository>
  <id>central</id>
  <name>Maven Repository Switchboard</name>
  <layout>default</layout>
  <url>http://repo1.maven.org/maven2</url>
  <snapshots>
    <enabled>false</enabled>
  </snapshots>
</repository>

But I still get an error: 10/4/10 1:31:57 PM CEST: Missing artifact net.sf.jung:jung2:jar:2.0.1:compile. I use Maven 3.0-SNAPSHOT on Mac osX.

Update2: Declaration of Jung2 dependency:

  <dependency>
                <groupId>net.sf.jung</groupId>
                <artifactId>jung2</artifactId>
                <version>2.0.1</version>
                <type>pom</type>                 
        </dependency>

After adding pom, there is no error message. Unfortunetely maven does not retrieve jars of jung2 modules.

[Solved] I have added also a dependency to jung-graph-impl and I can now use jung2 in my project:

   <dependency>
        <groupId>net.sf.jung</groupId>
            <artifactId>jung-graph-impl</artifactId>
            <version>2.0.1</version>
</dependency>
Joshua Taylor
  • 84,998
  • 9
  • 154
  • 353
Skarab
  • 6,981
  • 13
  • 48
  • 86

4 Answers4

8

On repo1 :

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

Resources :

Joshua Taylor
  • 84,998
  • 9
  • 154
  • 353
Colin Hebert
  • 91,525
  • 15
  • 160
  • 151
  • 1
    Still getting error: 10 1:26:09 PM CEST: Missing artifact net.sf.jung:jung2:jar:2.0.1:compile . Maven3 has download the jung2 pom but not jar files. – Skarab Oct 04 '10 at 11:27
  • 1
    @Skarab, add the `pom` to the dependency, it's not a jar ;) – Colin Hebert Oct 04 '10 at 11:36
  • 1
    Causes error in Eclipse if used as is. Has no errors if configured as `pom`, but also has no effect. – Dims Jan 27 '15 at 16:42
7

You need to add this to the pom.xml. This work with maven central. No need to specify repository. But you can still use <url>http://maven.apache.org</url> directly in your pom.xml.

    <dependency>
        <groupId>net.sf.jung</groupId>
        <artifactId>jung2</artifactId>
        <version>2.0.1</version>
        <type>pom</type>
    </dependency>
    <dependency>
        <groupId>net.sf.jung</groupId>
        <artifactId>jung-graph-impl</artifactId>
        <version>2.0.1</version>
    </dependency>
Emmanuel John
  • 2,296
  • 1
  • 23
  • 30
3

What is a maven repository url for jung2 (java graph framework)?

Answer: The Central Repository and its mirrors

But generally, you experiencied issue with dependencies.

To make your project buildable with Jung2 library, add specific modules (not jung2) to your pom.xml.

Example:

    <dependency>
        <groupId>net.sf.jung</groupId>
        <artifactId>jung-graph-impl</artifactId>
        <version>2.0.1</version>
    </dependency>
    <dependency>
        <groupId>net.sf.jung</groupId>
        <artifactId>jung-algorithms</artifactId>
        <version>2.0.1</version>
    </dependency>

See the list of the modules http://mvnrepository.com/artifact/net.sf.jung


Adding the following:

<dependency>
    <groupId>net.sf.jung</groupId>
    <artifactId>jung2</artifactId>
    <version>2.0.1</version>
    <type>pom</type>
</dependency>

will not work in the way one could expect.

The reason is declaration of modules inside of profiles in pom.xml for jung2 artifact:

<profiles>
    <profile>
        <id>all</id>
        <activation>
            <property>
                <name>all</name>
            </property>
        </activation>
        <modules>
            <module>jung-api</module>
            <module>jung-graph-impl</module>
            <module>jung-algorithms</module>
            <module>jung-io</module>
            <module>jung-visualization</module>
            <module>jung-samples</module>
            <module>jung-jai</module>
            <module>jung-jai-samples</module>
            <module>jung-3d</module>
            <module>jung-3d-demos</module>
    .............
</profiles>
0

Try Maven Repository or Maven Repository Browser.

Boris Pavlović
  • 63,078
  • 28
  • 122
  • 148