Reputation: 23
I added the following dependency to my POM.xml file but they do not show up under Maven Dependencies
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.2.5</version>
<type>pom</type>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.2.5</version>
<type>pom</type>
Upvotes: 0
Views: 1101
Reputation: 12039
If you look at the contents of the pom you'll see why there is no jar file:
https://repo1.maven.org/maven2/info/cukes/cucumber-java/1.2.6/cucumber-java-1.2.6.pom
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>info.cukes</groupId>
<artifactId>cucumber-jvm</artifactId>
<relativePath>../pom.xml</relativePath>
<version>1.2.6</version>
</parent>
<artifactId>cucumber-java</artifactId>
<packaging>pom</packaging>
<name>Cucumber-JVM: Java</name>
<distributionManagement>
<relocation>
<groupId>io.cucumber</groupId>
</relocation>
</distributionManagement>
</project>
And then looking at io.cucumber
:
https://repo1.maven.org/maven2/io/cucumber/cucumber-java/1.2.6/
io/cucumber/cucumber-java/1.2.6
../
cucumber-java-1.2.6-javadoc.jar 2019-11-09 17:48 1262464
cucumber-java-1.2.6-javadoc.jar.asc 2019-11-09 17:48 488
cucumber-java-1.2.6-javadoc.jar.md5 2019-11-09 17:48 32
cucumber-java-1.2.6-javadoc.jar.sha1 2019-11-09 17:48 40
cucumber-java-1.2.6-sources.jar 2019-11-09 17:48 222976
cucumber-java-1.2.6-sources.jar.asc 2019-11-09 17:48 488
cucumber-java-1.2.6-sources.jar.md5 2019-11-09 17:48 32
cucumber-java-1.2.6-sources.jar.sha1 2019-11-09 17:48 40
cucumber-java-1.2.6.jar 2019-11-09 17:48 238287
cucumber-java-1.2.6.jar.asc 2019-11-09 17:48 488
cucumber-java-1.2.6.jar.md5 2019-11-09 17:48 32
cucumber-java-1.2.6.jar.sha1 2019-11-09 17:48 40
cucumber-java-1.2.6.pom 2019-11-09 17:48 6052
cucumber-java-1.2.6.pom.asc 2019-11-09 17:48 488
cucumber-java-1.2.6.pom.md5 2019-11-09 17:48 32
cucumber-java-1.2.6.pom.sha1 2019-11-09 17:48 40
Upvotes: 1
Reputation: 35805
If you set the type
to pom
, you do not import the JAR, but only the dependencies inside the POM you reference.
If you want to use the JARs, you need to change the type
to jar
.
Upvotes: 0