簡體   English   中英

Maven SpringSource回購

[英]Maven springsource repo

我有一個與Maven有關的問題,該問題一直在尋找springsource倉庫,並且在倉庫不可用時會花費大量時間試圖通過:

[WARNING] The repository url 'http://repository.springsource.com/maven/bundles/release' is invalid - Repository 'com.springsource.repository.bundles.release' will be blacklisted.
[WARNING] The repository url 'http://repository.springsource.com/maven/bundles/external' is invalid - Repository 'com.springsource.repository.bundles.external' will be blacklisted.

我的問題是我不明白為什么將這些回購信息提取為:

  • 我不使用任何彈簧組件
  • 似乎沒有從這些存儲庫中獲取任何依賴關系文件(與mvn網站的依賴關系列表作了比較)
  • 我的任何文件中都沒有聲明該倉庫

我試圖在我們的檔案庫上甚至在我的本地〜/ .m2 / settings.xml中將回購都列入黑名單,即使回購網站將其顯示為已列入黑名單,該錯誤也會持續出現並消耗時間。

我的印象是,此回購由依賴項插件獲取,因為這是在以下日志消息之后的站點階段發生的:

[INFO] Generating "Dependencies" report    --- maven-project-info-reports-plugin:2.6

在回購錯誤之前,我還有以下一些錯誤:

...
[ERROR] Artifact: xerces:xml-apis:jar:2.11.0 has no file.
[ERROR] Artifact: xerces:xmlParserAPIs:jar:2.6.2 has no file.
[ERROR] Artifact: xml-apis:xml-apis:jar:1.3.02 has no file.
[ERROR] Artifact: xom:xom:jar:1.0 has no file.
...

我們歡迎任何關於如何找到負責任的(人工制品或插件)或擺脫那些錯誤的想法。

感謝您提供任何線索

PS:我在JDK 1.7.0_04上使用maven 3.0.4。

嘗試運行:

mvn help:effective-pom

您至少會看到以下內容:

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

然后,您可能還會看到springsource回購。


您還可以將maven-enforcer-plugin與Require No Repositories規則一起使用。

<plugins>
  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-enforcer-plugin</artifactId>
    <version>1.1.1</version>
    <executions>
      <execution>
        <id>enforce-no-repositories</id>
        <goals>
          <goal>enforce</goal>
        </goals>
        <configuration>
          <rules>
            <requireNoRepositories>
              <message>Best Practice is to never define repositories in pom.xml (use a repository manager instead)</message>
            </requireNoRepositories>
          </rules>
        </configuration>
      </execution>
    </executions>
  </plugin>
</plugins>

它將為發現的具有<repository/>標記的任何依賴項吐出消息。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM