Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
Patch
Description
Currently, if I have two dependencies on the same groupId:artifactId, one with a classifier and one without, the missing version error message does not distinguish which dependency is missing a version. For example, the following pom is missing a version number for one of the dependencies.
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>org.apache.maven</groupId> <artifactId>missing-version-error</artifactId> <packaging>jar</packaging> <name>Missing version error</name> <version>1.0.0-SNAPSHOT</version> <dependencies> <dependency> <groupId>org.apache.maven</groupId> <artifactId>myartifact1</artifactId> <version>1.0-SNAPSHOT</version> </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>myartifact1</artifactId> <classifier>test</classifier> </dependency> </dependencies> </project>
The error message prints the following:
Validation Messages: [0] 'dependencies.dependency.version' is missing for org.apache.maven:myartifact1
The error message should include information about the dependency's classifier.