maven 找不到工件 org.cytoscape:

maven Could not find artifact org.cytoscape:

我正在尝试在我的公司内部通过代理构建这个 Maven 项目 https://github.com/gsummer/cyNeo4j

Pom 中列出的依赖项在 Maven Central 仓库中不存在。 它们位于此处:

<repositories>
    <repository>
        <id>cytoscape_snapshots</id>
        <snapshots>
        </snapshots>
        <releases>
            <enabled>false</enabled>
        </releases>
        <name>Cytoscape Snapshots</name>
        <url>http://code.cytoscape.org/nexus/content/repositories/snapshots/</url>
    </repository>
    <repository>
        <id>cytoscape_releases</id>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
        <releases>
        </releases>
        <name>Cytoscape Releases</name>
        <url>http://code.cytoscape.org/nexus/content/repositories/releases/</url>
    </repository>
</repositories>

我收到这个错误

[ERROR] Failed to execute goal on project cyneo4j: Could not resolve dependencies for project nl.maastrichtuniversity.networklibrary:cyneo4j:bundle:1.3dev: The following artifacts could not be resolved: org.cytoscape:service-api:jar:3.1.1, org.cytoscape:swing-application-api:jar:3.1.1, org.cytoscape:session-api:jar:3.1.1, org.cytoscape:work-api:jar:3.1.1, org.cytoscape:work-swing-api:jar:3.1.1, org.cytoscape:viewmodel-api:jar:3.1.1, org.cytoscape:layout-api:jar:3.1.1: Could not find artifact org.cytoscape:service-api:jar:3.1.1 in nexus (http://our_host_nexus/nexus/content/groups/public/) -> [Help 1]

在我的设置中 xml,

我已经添加了

<mirrors>
    <!-- mirror | Specifies a repository mirror site to use instead of a given 
        repository. The repository that | this mirror serves has an ID that matches 
        the mirrorOf element of this mirror. IDs are used | for inheritance and direct 
        lookup purposes, and must be unique across the set of mirrors. | -->
    <mirror>
          <id>nexus</id>
                        <mirrorOf>*,!cytoscape_releases,!cytoscape_snapshots</mirrorOf>
          <name>Our Local Nexus Repo</name>

        <url>our_nexus_host/nexus/content/groups/public/</url>

</mirror>

还有 服务器标签 :

  <server>
        <id>deployment</id>
        <username>admin</username>
        <password>password</password>
    </server>

然后我有另一个错误"Access Denied":

[ERROR] Failed to execute goal on project CyPlugin: Could not resolve dependencies for project GraphSYSBIO:CyPlugin:bundle:1.0-SNAPSHOT: Failed to collect dependencies at org.cytoscape:vizmap-api:jar:3.6.1: Failed to read artifact descriptor for org.cytoscape:vizmap-api:jar:3.6.1: Could not transfer artifact org.cytoscape:vizmap-api:pom:3.6.1 from/to cytoscape_releases (http://code.cytoscape.org/nexus/content/repositories/releases/): Access denied to: http://code.cytoscape.org/nexus/content/repositories/releases/org/cytoscape/vizmap-api/3.6.1/vizmap-api-3.6.1.pom , ReasonPhrase:Forbidden. -> [Help 1]

我被屏蔽了

我唯一能想到的就是手动添加依赖项..但我想避免这种情况,因为我们可能会多次切换到多个依赖项版本。

可通过互联网访问 dependency。 access denied 错误意味着你公司的代理不允许maven通过。

您应该在 settings.xml:

中启用 company proxy
<proxy>
  <id>example-proxy</id>
  <active>true</active>
  <protocol>http</protocol>
  <host>proxy.example.com</host>
  <port>8080</port>
  <username>proxyuser</username>
  <password>somepassword</password>
</proxy>