Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 0.3.1-maven2
-
Fix Version/s: 1.0.1-beta-2, 1.0.1-beta-3, 1.0.1
-
Component/s: Maven2
-
Labels:None
-
Complexity:Intermediate
-
Tested on JDKs:1.5
-
Number of attachments :
Description
The class is missing:
@requiresDependencyResolution compile
which means that dependency resolution for container dependencies always fails when doing mvn cargo:stop
The error message is: Artifact [<groupId>:<artifactId>:<type>] is not a dependency of the project, even though it clearly is, and it does work for cargo:start.
Example:
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>$
</version>
<scope>provided</scope>
</dependency>
<plugins>
...
<configuration>
<container>
...
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
</dependencies>
</container>
...
blackberry$ mvn cargo:stop
...
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Artifact [mysql:mysql-connector-java:jar] is not a dependency of the project.
Issue Links
- is related to
-
CARGO-1069
The ContainerStopMojo cannot resolve dependencies with scope <test> whereas ContainerRunMojo and ContainerStartMojo can
-
Is there are workaround for this, or do we just accept that mvn cargo:stop is broken in maven 2!? It is simply not working for us. Seems like a pretty big bug, yet it is still open after almost 5 months. Does no one actually use this feature of cargo, that it has gone this long without so much as an additional comment?