Uploaded image for project: 'Codehaus Cargo'
  1. CARGO-527

Container dependencies having <scope>test</scope> are not resolved

    Details

    • Type: Bug
    • Status: Closed (View workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects versions: 0.3.1-maven2
    • Fix versions: 1.2.0
    • Components: None
    • Labels:
      None

      Description

      Dependencies used by the container having a test scope result in the following build error:
      ERROR BUILD ERROR
      INFO ------------------------------------------------------------------------
      INFO Artifact edbc:edbc:jar is not a dependency of the project.
      INFO ------------------------------------------------------------------------

      In this case the dependency is a JDBC driver used by the container instantiated datasource. The associated jar should not be the war file since the application is getting the datasource from the container. To further expand on this point, if is use Derby for integration testing and Oracle for production, I would not want the Derby jar in WEB-INF/lib.

      Thus dependencies that are in test scope should be available to the container.

      ***

      • From pom.xml
        ***
        <dependencies>
        <dependency>
        <artifactId>edbc</artifactId>
        <groupId>edbc</groupId>
        <version>1.8</version>
        <scope>test</scope>
        </dependency>
        </dependencies>

      <build>
      <plugin>
      <groupId>org.codehaus.cargo</groupId>
      <artifactId>cargo-maven2-plugin</artifactId>
      <version>0.3.1</version>
      <container>
      <containerId>jetty5x</containerId>
      <type>embedded</type>
      <dependencies>
      <dependency>
      <artifactId>edbc</artifactId>
      <groupId>edbc</groupId>
      </dependency>
      </dependencies>
      </container>
      ...
      </plugin>
      </build>
      0

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                savasalitokmen Savas Ali Tokmen (Inactive)
                Reporter:
                paulspencer Paul Spencer (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: