Maven
  1. Maven
  2. MNG-2462

Using Maven 1.x Legacy Repository Layout in a Maven 2.0.4 Project, I can't depend on a "java-sources" jar

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.0.4
    • Fix Version/s: 2.0.5
    • Labels:
      None
    • Environment:
      Mac Os X
    • Complexity:
      Intermediate
    • Number of attachments :
      0

      Description

      Consider this dependency:

      <dependency>
      <groupId>javax.faces</groupId>
      <artifactId>jsf-api</artifactId>
      <version>1.2</version>
      <classifier>sources</classifier>
      </dependency>

      This yields depdency id: javax.faces:jsf-api:jar:sources:1.2

      This artifact is resolved from a 1.x Maven repository

      <repository>
      <snapshots />
      <id>java.net</id>
      <name>Java.net Maven 1.x Repository for external projects</name>
      <url>https://maven-repository.dev.java.net/nonav/repository/</url>
      <layout>legacy</layout>
      </repository>

      And the path to the actual jar is https://maven-repository.dev.java.net/nonav/repository/javax.faces/java-sources/jsf-api-1.2-sources.jar

      However, maven 2.0.4 is trying to fetch:

      https://maven-repository.dev.java.net/nonav/repository/javax.faces/jars/jsf-api-1.2-sources.jar

        Activity

        Hide
        Ed Burns added a comment -

        This was PEBKAC. The solution was to write the dependency in this manner:

        <dependency>
        <groupId>javax.faces</groupId>
        <artifactId>jsf-api</artifactId>
        <version>1.2</version>
        <type>java-source</type>
        </dependency>

        Show
        Ed Burns added a comment - This was PEBKAC. The solution was to write the dependency in this manner: <dependency> <groupId>javax.faces</groupId> <artifactId>jsf-api</artifactId> <version>1.2</version> <type>java-source</type> </dependency>
        Hide
        Ed Burns added a comment -

        PEBKAC

        Show
        Ed Burns added a comment - PEBKAC
        Hide
        Kohsuke Kawaguchi added a comment -

        This is not an operator error. If you set the type to java-source, you now won't be able to download the jar
        (in your case it probably has worked because previous runs must have downloaded jars to your local repo.)

        This inconsistency is really a bug in Maven2 — I'm just not sure where the bug is.

        Show
        Kohsuke Kawaguchi added a comment - This is not an operator error. If you set the type to java-source, you now won't be able to download the jar (in your case it probably has worked because previous runs must have downloaded jars to your local repo.) This inconsistency is really a bug in Maven2 — I'm just not sure where the bug is.

          People

          • Assignee:
            Unassigned
            Reporter:
            Ed Burns
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: