开发者

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

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:

   &l开发者_如何学运维t;dependency>
        <groupId>net.sf.jung</groupId>
            <artifactId>jung-graph-impl</artifactId>
            <version>2.0.1</version>
</dependency>


On repo1 :

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

Resources :

  • mvnrepository.com - Jung 2


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>


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>


Try Maven Repository or Maven Repository Browser.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜