1

Maven Eclipse プラグインが、ファイル名にハイフンが 2 つ含まれるソース JAR をダウンロードしようとするのはなぜですか? 以下のサンプルを参照してください: すべての場合において、URL の最後のビットは(2 つspring-web-3.0.5.RELEASE-sources.jarのハイフン) ではなく (1 つのハイフン) にする必要がありますspring-web-3.0.5.RELEASE--sources.jar

これがプラグインのバグによるものか、Maven メタデータによるものか、それともまったく別のものによるものかを突き止めるのに苦労しています。

Maven 実行のサンプル出力を次に示します。mvn eclipse:eclipse -DdownloadSources=true -DdownloadJavadocs=true -DforceRecheck=true

Downloading: http://artifactory.local:8081/artifactory/repo/org/springframework/spring-web/3.0.5.RELEASE/spring-web-3.0.5.RELEASE--sources.jar
[INFO] Unable to find resource 'org.springframework:spring-web:java-source:-sources:3.0.5.RELEASE' in repository central (http://artifactory.local:8081/artifactory/repo)
Downloading: http://repo1.maven.org/maven2/org/springframework/spring-web/3.0.5.RELEASE/spring-web-3.0.5.RELEASE--sources.jar
[INFO] Unable to find resource 'org.springframework:spring-web:java-source:-sources:3.0.5.RELEASE' in repository default (http://repo1.maven.org/maven2)
Downloading: http://maven.springframework.org/release/org/springframework/spring-web/3.0.5.RELEASE/spring-web-3.0.5.RELEASE--sources.jar
[INFO] Unable to find resource 'org.springframework:spring-web:java-source:-sources:3.0.5.RELEASE' in repository spring-maven-release (http://maven.springframework.org/release)
Downloading: http://maven.springframework.org/milestone/org/springframework/spring-web/3.0.5.RELEASE/spring-web-3.0.5.RELEASE--sources.jar
[INFO] Unable to find resource 'org.springframework:spring-web:java-source:-sources:3.0.5.RELEASE' in repository spring-maven-milestone (http://maven.springframework.org/milestone)
Downloading: http://spring-roo-repository.springsource.org/release/org/springframework/spring-web/3.0.5.RELEASE/spring-web-3.0.5.RELEASE--sources.jar
[INFO] Unable to find resource 'org.springframework:spring-web:java-source:-sources:3.0.5.RELEASE' in repository spring-roo-repository (http://spring-roo-repository.springsource.org/release)
Downloading: https://repository.jboss.org/nexus/content/repositories/releases/org/springframework/spring-web/3.0.5.RELEASE/spring-web-3.0.5.RELEASE--sources.jar
[INFO] Unable to find resource 'org.springframework:spring-web:java-source:-sources:3.0.5.RELEASE' in repository JBoss Repo (https://repository.jboss.org/nexus/content/repositories/releases)
Downloading: https://spring-roo-equals-roo-addon.googlecode.com/svn/maven-repository//org/springframework/spring-web/3.0.5.RELEASE/spring-web-3.0.5.RELEASE--sources.jar
[INFO] Unable to find resource 'org.springframework:spring-web:java-source:-sources:3.0.5.RELEASE' in repository googlecode.rooequals.repo (https://spring-roo-equals-roo-addon.googlecode.com/svn/maven-repository/)
Downloading: https://spring-roo-equals-roo-addon.googlecode.com/svn/maven-snapshot-repository//org/springframework/spring-web/3.0.5.RELEASE/spring-web-3.0.5.RELEASE--sources.jar
[INFO] Unable to find resource 'org.springframework:spring-web:java-source:-sources:3.0.5.RELEASE' in repository googlecode.rooequals.snapshotrepo (https://spring-roo-equals-roo-addon.googlecode.com/svn/maven-snapshot-repository/)

プラグイン構成:

  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-eclipse-plugin</artifactId>
    <version>2.9</version>  <!-- Note 2.8 does not work with AspectJ aspect path -->
    <configuration>
      <downloadSources>true</downloadSources>
      <downloadJavadocs>false</downloadJavadocs>
      <wtpversion>2.0</wtpversion>
      <additionalBuildcommands>
        <buildCommand>
          <name>org.eclipse.ajdt.core.ajbuilder</name>
          <arguments>
            <aspectPath>org.springframework.aspects</aspectPath>
          </arguments>
        </buildCommand>
        <buildCommand>
          <name>org.springframework.ide.eclipse.core.springbuilder</name>
        </buildCommand>
      </additionalBuildcommands>
      <additionalProjectnatures>
        <projectnature>org.eclipse.ajdt.ui.ajnature</projectnature>
        <projectnature>com.springsource.sts.roo.core.nature</projectnature>
        <projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
      </additionalProjectnatures>
    </configuration>
  </plugin>

更新 1

Maven のバージョンは次のとおりです。

> mvn -version
Apache Maven 2.2.1 (r801777; 2009-08-06 20:16:01+0100)
Java version: 1.6.0_37
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x" version: "10.6.8" arch: "x86_64" Family: "mac"
4

0 に答える 0