0

我正在尝试在 POM.xml 文件中添加 Gephi 的依赖项(在 Eclipse 中)。这是POM文件:

<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>ch.unifr</groupId>
<artifactId>facebook</artifactId>
<version>1.0</version>
<packaging>war</packaging>
<name>Facebook Example</name>
<repositories>
<repository>
 <id>gephi-snapshots</id>
<name>Gephi Snapshots</name>
<url>http://nexus.gephi.org/nexus/content/repositories/snapshots/</url>
</repository>
     <repository>
        <id>gephi-releases</id>
        <name>Gephi Releases</name>
        <url>http://nexus.gephi.org/nexus/content/repositories/releases/</url>
     </repository>
</repositories>
<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <gephi.maven.requiredVersion>3.0.4</gephi.maven.requiredVersion>
    <netbeans.run.params.ide/>
    <netbeans.run.params>${netbeans.run.params.ide}</netbeans.run.params>
<!-- Netbeans Platfrom version -->
    <netbeans.version>RELEASE721</netbeans.version>

    <!-- Gephi version -->
    <gephi.version>0.9-SNAPSHOT</gephi.version>

    <!-- Java compilation settings -->
    <gephi.javac.source>1.6</gephi.javac.source>
    <gephi.javac.target>1.6</gephi.javac.target>
    <gephi.javac.xlint>-Xlint:all</gephi.javac.xlint>
    <gephi.javac.debug>true</gephi.javac.debug>
    <gephi.javac.optimize>true</gephi.javac.optimize>
    <gephi.javac.showDeprecation>true</gephi.javac.showDeprecation>
    <gephi.javac.showWarnings>true</gephi.javac.showWarnings>
    <gephi.javac.fork>true</gephi.javac.fork>
<!-- Testing settings -->
    <gephi.junit.version>4.7</gephi.junit.version>
    <gephi.test.maxMemory>768M</gephi.test.maxMemory>
    <gephi.test.reportsDirectory>${project.build.directory}/surefire-reports/plain</gephi.test.reportsDirectory>
    <gephi.test.failureIgnore>${testFailureIgnore}</gephi.test.failureIgnore>
<!-- Repository URLs -->
    <gephi.release.repository.id>gephi-nexus</gephi.release.repository.id>
    <gephi.snapshot.repository.id>gephi-nexus</gephi.snapshot.repository.id>
   <gephi.release.repository.url>http://nexus.gephi.org/nexus/content/repositories/releases</gephi.release.repository.url>
    <gephi.snapshot.repository.url>http://nexus.gephi.org/nexus/content/repositories/snapshots</gephi.snapshot.repository.url>

    <!-- SCM -->
    <gephi.scm>git</gephi.scm>
 <!--==== Plugin Versions ==================================================================================-->

    <gephi.maven-assembly-plugin.version>2.4</gephi.maven-assembly-plugin.version>

    <gephi.maven-clean-plugin.version>2.5</gephi.maven-clean-plugin.version>

    <gephi.maven-compiler-plugin.version>3.0</gephi.maven-compiler-plugin.version>

    <gephi.maven-dependency-plugin.version>2.6</gephi.maven-dependency-plugin.version>

    <gephi.maven-deploy-plugin.version>2.7</gephi.maven-deploy-plugin.version>

    <gephi.maven-gpg-plugin.version>1.4</gephi.maven-gpg-plugin.version>

    <gephi.maven-install-plugin.version>2.4</gephi.maven-install-plugin.version>

    <gephi.maven-jar-plugin.version>2.4</gephi.maven-jar-plugin.version>

    <gephi.maven-jarsigner-plugin.version>1.2</gephi.maven-jarsigner-plugin.version>

    <gephi.maven-javadoc-plugin.version>2.9</gephi.maven-javadoc-plugin.version>

    <gephi.maven-license-plugin.version>1.9.0</gephi.maven-license-plugin.version>

    <gephi.maven-release-plugin.version>2.3.2</gephi.maven-release-plugin.version>

    <gephi.maven-resources-plugin.version>2.6</gephi.maven-resources-plugin.version>

    <gephi.maven-source-plugin.version>2.2.1</gephi.maven-source-plugin.version>

    <gephi.maven-surefire-plugin.version>2.13</gephi.maven-surefire-plugin.version>

    <gephi.build-helper-maven-plugin.version>1.7</gephi.build-helper-maven-plugin.version>

    <gephi.wagon-maven-plugin.version>1.0-beta-4</gephi.wagon-maven-plugin.version>
</properties>
<dependencies>
<dependency>
  <groupId>com.restfb</groupId>
  <artifactId>restfb</artifactId>
  <version>1.6.12</version>
</dependency>
<dependency>
  <groupId>com.google.code.facebookapi</groupId>
  <artifactId>facebook-java-api</artifactId>
  <version>3.0.2</version>
</dependency>
<dependency>
    <groupId>org.apache.logging.log4j</groupId>
    <artifactId>log4j-api</artifactId>
    <version>2.0-beta9</version>
</dependency>
<dependency>
    <groupId>org.apache.logging.log4j</groupId>
    <artifactId>log4j-core</artifactId>
    <version>2.0-beta9</version>
</dependency>
<dependency>
    <groupId>org.openrdf.sesame</groupId>
    <artifactId>sesame-model</artifactId>
    <version>2.7.7</version>
</dependency>

<dependency>
     <groupId>org.gephi</groupId>
     <artifactId>gephi-toolkit</artifactId>
     <version>0.9-SNAPSHOT</version>
<dependency>
</project>

您可能会注意到,依赖项是针对 Gephi。这是错误消息的一部分,如下所示:

Multiple annotations found at this line:
- Missing artifact org.netbeans.api:org-netbeans-modules-queries:jar:RELEASE721
- Missing artifact commons-codec:commons-codec:jar:1.6
- Missing artifact org.apache.xmlgraphics:batik-util:jar:1.7
- Missing artifact gnu.trove:trove:jar:2.1.0
- Missing artifact javax.activation:activation:jar:1.1
- Missing artifact org.netbeans.api:org-openide-modules:jar:RELEASE721

谁能帮我解决这个问题?我不知道为什么 POM 不接受 Gephi 依赖项,但是我已经添加了一些其他依赖项,例如 openrdf 和 restfb。我还添加了 POM 文件中所示的 Gephi 存储库。非常感激你的帮助。

4

1 回答 1

1

查看文档页面,您似乎还需要将他们的存储库添加到您的 POM 中:

   <project>
   ...
      <repositories>
         <repository>
            <id>gephi-snapshots</id>
            <name>Gephi Snapshots</name>
            <url>http://nexus.gephi.org/nexus/content/repositories/snapshots/</url>
         </repository>
         <repository>
            <id>gephi-releases</id>
            <name>Gephi Releases</name>
            <url>http://nexus.gephi.org/nexus/content/repositories/releases/</url>
         </repository>
         ...
      </repositories>
   ...
   </project>
于 2013-10-11T22:39:38.540 回答