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

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

Status

Assignee

Savas Ali Tokmen

Reporter

Paul Spencer

Fix versions

Affects versions

0.3.1-maven2

Priority

Major
Configure