maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Igor Fedorenko (JIRA)" <>
Subject [jira] [Commented] (MNG-5727) unexpected InvalidArtifactRTException from ProjectBuilder#build
Date Thu, 08 Oct 2015 12:19:26 GMT


Igor Fedorenko commented on MNG-5727:

I didn't want to change how maven handles unused invalid <dependencyManagement> elements,
so reporting problems with invalid <dependencies> seems like the right way to fix InvalidArtifactRTException.
For example, I don't see why the following pom.xml should be considered invalid


> unexpected InvalidArtifactRTException from ProjectBuilder#build
> ---------------------------------------------------------------
>                 Key: MNG-5727
>                 URL:
>             Project: Maven
>          Issue Type: Bug
>            Reporter: Igor Fedorenko
>             Fix For: 3.2.5
> Calling into ProjectBuilder#build(File, ProjectBuildingRequest) results in InvalidArtifactRTException
below if project pom.xml has managed dependency without <version>. Although the pom
is invalid, I expected to get ProjectBuildingException that includes location of problematic
dependency, similar to what I get during command line build.
> {code}
> org.apache.maven.artifact.InvalidArtifactRTException: For artifact {org.apache.maven.its:a:null:jar}:
The version cannot be empty.
> 	at org.apache.maven.artifact.DefaultArtifact.validateIdentity(
> 	at org.apache.maven.artifact.DefaultArtifact.<init>(
> 	at org.apache.maven.bridge.MavenRepositorySystem.XcreateArtifact(
> 	at org.apache.maven.bridge.MavenRepositorySystem.XcreateDependencyArtifact(
> 	at org.apache.maven.bridge.MavenRepositorySystem.createDependencyArtifact(
> 	at org.apache.maven.project.DefaultProjectBuilder.initProject(
> 	at
> 	at
> ...
> {code}

This message was sent by Atlassian JIRA

View raw message